Skip to main content

Marker Methods

You can get your api key to be used in this document here: https://apis.mappls.com/console/

  • setIcon: Setting the URL of the icon. It replaces the icon URL.
    marker.setIcon("https://apis.mapmyindia.com/map_v3/1.png");
  • setDraggable: To make the marker draggable.
    marker.setDraggable();
  • setPosition: Setting the Position of the marker.
    marker.setPosition({lat:28.454,lng:77.5454});
  • setZIndex: Setting the priority index of the marker.
    marker.setZIndex(1);
  • setPopup:
    marker.setPopup("html",popupOptions(optional));
ie. marker.setPopup("India",{openPopup:true});
  • getPosition: Returns the compass heading of aerial imagery.
    marker.getPosition();

Example

    marker.setPosition({lat:28.454,lng:77.5454});
marker.setIcon("https://apis.mappls.com/map_v3/1.png");