Skip to content

Latest commit

 

History

History
150 lines (101 loc) · 4.34 KB

markerProperties.md

File metadata and controls

150 lines (101 loc) · 4.34 KB

< Back to Table of Contents

MapmyIndia Interactive Vector Maps JS SDK for Web !

Marker Properties Quick Reference:

For access, you can get your api key from Mappls Console

Required

  • Map Object
  • Position: Lat Lng Object

Optional

  • fitbounds: Pans and zooms the map to contain its visible area within the specified geographical bounds. This function will also reset the map's bearing to 0 if bearing is nonzero. By default it is false.
    {
        fitbounds: true
    }
  • fitboundOptions: Options in fitbounds like padding and time duration.
    {
        fitboundOptions: {padding: 120,duration:1000}
    }
  • icon: Enter the url of the icon for marker.
    CORS should be enabled for absolute URL.
    {
        icon: 'icon_url'
    }
  • offset: Offset is used to set the correct position on the marker.
    {
        offset: [x,y]
    }
  • width: Define the icon width of the marker.
    {
        width: 25
    }
  • height: Define the icon height of the marker.
    {
        height: 25
    }
  • html: DOM element to use as a marker.
    html: '<div style="white-space:nowrap;font-size:10px;padding left:15px;color:#fff">Hello World</div>'
  • popupOptions: This includes the options to be used in showing the popup.
    {
        popupOptions: {offset: {'bottom': [0, -20]}}
    }
  • popupHtml: This shows the HTML you want on marker popup.
    {
        popupHtml: 'MapmyIndia'
    }
  • draggable: This property meant to drag the markers on the map. By default the value is false.
    {
        draggable: false
    }
  • clusters: To show the cluster on the map in case of multiple markers by geoJson. By default the value is true.
    {
        clusters: true
    }
  • clustersOptions: To show the multiple options we have on showing clusters on the map in case of multiple markers by geoJson.
    {
        clustersOptions: {"color": "blue","bgcolor":"red"}
    }
  • cType: It is for geojson data geometry
    • 0: for lat,lng combination (Default)
    • 1: for lng,lat conbination
    {
        cType: 1
    }

For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!





@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.