Markers On Map
Use highly customizable maps (Google Maps) with multiple custom Markers in your web projects.
Current Version
1.4.0 *
Website and Demo
https://furcan.github.io/Markers-On-Map/
(A) Install & Import
Install
npm i markers-on-map
yarn add markers-on-map
Import
import MarkersOnMap from "markers-on-map";
(B) Adding to an HTML Document
<script src="dist/markers-on-map-1.4.0.js"></script>
1- Initialize (Basic)
MarkersOnMap.Init({
googleApiKey: null,
markerObjects: [
{
markerLat: 39.925018,
markerLong: 32.836956,
}
],
});
2- Run
MarkersOnMap.Run('div#GoogleMaps');
MarkersOnMap.Run('div#GoogleMaps', function () {
});
MarkersOnMap.Remarker([
{
markerLat: 40.2155784,
markerLong: 28.937106,
},
{
markerLat: 39.9412639,
markerLong: 32.8495664,
},
]);
Initialize (Advanced) + (All Default Options)
MarkersOnMap.Init({
googleApiKey: null,
googlePlacesApiEnabled: false,
googlePlacesContentButton: 'Get Directions',
mapWidth: '100%',
mapHeight: '450px',
mapBackgroundColor: '#f8f8f8',
mapCenterLat: 39.925054,
mapCenterLong: 32.8347552,
mapZoomLevel: 13,
mapMinZoom: 2,
mapMaxZoom: 18,
mapZoomControl: false,
mapAnimatedZoom: false,
mapTypeId: 'roadmap',
mapTypeControl: false,
mapStreetViewControl: false,
mapFullscreenControl: true,
mapRotateControl: false,
mapScaleControl: false,
mapClickableIcons: true,
mapDraggable: true,
mapScrollWheel: true,
mapDisableDoubleClickZoom: false,
mapStyles: null,
markerDefaultUrl: momMarkerBase64(),
markerDropAnimation: 'drop',
markerAdjustZoom: true,
markerOverlay: true,
markerOverlayClassName: 'mom-marker',
markerLabel: {
useLabel: false,
labelPosition: 'top',
labelColor: '#1e1e1e',
labelFontSize: '12px',
labelFontWeight: '600',
labelFontFamily: 'Roboto',
},
markerObjects: [
{
markerLat: 39.925018,
markerLong: 32.836956,
markerTitle: 'Anitkabir',
markerSize: 45,
markerUrl: momMarkerBase64(),
markerLabelText: 'MOM',
markerContent: null,
markerContentFromGoogleQuery: 'Anitkabir',
markerCallback: null,
closeCallback: null,
}
],
});
Copyright
Copyright © 2020 Markers On Map
License
MIT license - https://opensource.org/licenses/MIT