Skip to content

Latest commit

 

History

History
82 lines (61 loc) · 2.69 KB

File metadata and controls

82 lines (61 loc) · 2.69 KB

MapmyIndia APIs

ELocation Strategy

Add Marker

To add marker using eLoc:

mapmyIndiaMap.addMarker(new MarkerOptions().eLoc(eLoc));

To get the callback that marker is added or not:

mapmyIndiaMap.addMarker(new MarkerOptions().eLoc(eLoc), new OnMarkerAddedListener() {  
    @Override  
  public void onSuccess() {  
        //On Marker Added Successfully  
    }  
  
    @Override  
  public void onFailure() {  
	  //Failure
    }  
});

To set Camera to particular eLoc

Sdk allows various method to Move, ease,animate Camera to a particular location :

Java

mapmyIndiaMap.moveCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));  
mapmyIndiaMap.easeCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));  
mapmyIndiaMap.animateCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));

Kotlin

mapmyIndiaMap?.moveCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));  
mapmyIndiaMap?.easeCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));  
mapmyIndiaMap?.animateCamera(CameraELocUpdateFactory.newELocZoom("MMI000", 14));

To set Camera to particular eLoc Bound

Sdk allows various method to Move, ease,animate Camera to a particular eLoc Bound :

Java

mapmyIndiaMap.moveCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));  
mapmyIndiaMap.easeCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));  
mapmyIndiaMap.animateCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));

Kotlin

mapmyIndiaMap?.moveCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));  
mapmyIndiaMap?.easeCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));  
mapmyIndiaMap?.animateCamera(CameraELocUpdateFactory.newELocBounds(eLocs, 10 , 100, 10, 10));

For any queries and support, please contact:

Email Email us at apisupport@mapmyindia.com

Stack Overflow Ask a question under the mapmyindia-api

Support Need support? contact us!

Blog Read about the latest updates & customer stories

© Copyright 2022. CE Info Systems Ltd. All Rights Reserved. | Terms & Conditions.