Mappls Tracking Plugin¶
Easy To Integrate Routing APIs & Map SDKs For Web Applications
Getting Access¶
Before using the API in the your solution, please ensure that the related access is enabled in the Mappls Console, within your app - be it for Mobile OR Web or Cloud integration.
- Copy and paste the key from your
credentials
section from your API keys into theaccess_token
query parameter.- Your static key can be secured by whitelisting its usage for particular IPs (in case of cloud app usage) OR a set of domains (in case of a web app)
- Your static key obtained from your Console is to be passed as a query parameter:
access_token
.
- The sample code is provided to help you understand the very basic functionality of MapmyIndia APIs.
Authentication Object - access_token
mandatory query parameter.¶
access_token
: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
Document Version History¶
Version | Last Updated | Team | Author | Remarks |
---|---|---|---|---|
1.0 | 07 Aug 2025 | SDK Product Team | Prabhjot Kaur (PK) | OAuth 2 |
Introduction¶
This plugin, offered by Mappls plugins for Web, allows one to track the path traveled.
Features:
- Uses Mappls map
- Search for the destination place using Mappls API
- Route from source (current position) to destination.
- Custom Map controls and animation
- Live tracking user position and traveled coordinates
This feature is also available inbuilt with Mappls Direction Plugin. For details, please contact apisupport@mapmyindia.com.
Getting Access¶
Before using the Plugin in the your solution, please ensure that the related access is enabled in the Mappls Console, in the same project you set up for the Maps SDK.
- Copy and paste the generated
access token
from your API keys available in the dashboard in the sample code for interactive map development.- This APIs follow OAuth2 based security.
Access Token
can be generated using Mappls Portal
- The sample codes are provided on our domain to help you understand the very basic functionality of Mappls Direction Plugin. See Sample Codes here
Implementation¶
Script URL¶
<script src="https://sdk.mappls.com/map/sdk/plugins?access_token=<Static Key>&v=3.0&libraries=direction"></script>
Method¶
direction_obj.tracking()
Properties¶
Mandatory Parameters¶
map(object)
: vector map or raster map object from respective Mappls Map SDKs.location
: current location . For eg - 28.63124010064198,77.46734619140625
Optional Parameters¶
label
: to label the current position.icon
: to show a custom marker. Supports PNG format as of now.heading
: To control the rotation of the marker as per the route direction.For example if you are using a car icon, it would rotate as per the route direction otherwise it would move straight . Default is true.reRoute
: To refresh the route as per the current location. This means the route will change as per the current location. If kept false the same route will be displayed. Default is true.fitbounds
: Allowing this would fit the map in the view bound.Default is true.animationSpeed
: Minimum breakage between the two received locations. For exampleanimationSpeed
: 5 means if the location received is 100 meters apart the animation would appear at every 5 meters. This parameter would decide the smoothness of the animation appearing on the screen.
Example¶
mappls.direction({
direction.tracking({
location: 28.63124010064198,77.46734619140625,
label:'current location',
icon:"../img/mkr_start.png",
heading: false,
reRoute: true,
fitBounds:false,
animationSpeed:5,
},
function(data){
console.log(data);
});
That's All !
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!