Place Details Plugin for Mappls Web Maps¶
Easy To Integrate Maps & Location APIs & SDKs For Web & Mobile Applications
Powered with India's most comprehensive and robust mapping functionalities. Now Available for 200+ nations and territories accross the world.
Document Version History¶
Version | Last Updated | Team | Author | Remarks |
---|---|---|---|---|
1.0 | 07 Aug 2025 | SDK Product Team | Prabhjot Kaur (PK) | OAuth 2 |
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 codes are provided on our domain to help you understand the very basic functionality of Mappls PIN (eLoc) Plugin. See Sample Codes here
Authentication Object - access_token
mandatory query parameter.¶
access_token
: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
Introduction¶
A simple plugin / widget to render details of a particular place. The Place Details plugin for MapmyIndia Web Map JS library is provided as a means to enable rendering of MapmyIndia Places on MapmyIndia Maps.
The plugin can be used in combination with our Interactive Map JS library but it also possesses the adaptability to be used as an independent plugin within any web map implementation. Thus it enables developers to include MapmyIndia Places SDK in their own customized solutions easily.
The SDK offers the following basic functionalities: 1. Ability to render places directly on map with reference to the provided eLoc(s). 2. A getPinDetails() method to fetch the details of a place. 3. Customizable markers 4. Remove markers from map.
Sample Implementation¶
Visit the samples for assistance to create a sample implementation with your own keys.
For detailed understanding, Let’s get started!
Plugin's configurations¶
Adding the Place Details plugin in the script
1. Script URL¶
<script src="https://sdk.mappls.com/map/sdk/plugins?access_token=<Static Key>&v=3.0&libraries=getPinDetails"></script>
2. Initializing the Place Details plugin¶
Method¶
Mappls.getPinDetails()
Mappls.getPinDetails({ map: map, pin: '3F45CB'}, callback);
Mandatory Parameters¶
getPinDetails
: The pin (Mappls Pin/Eloc) whose details are required.callback
: to return data to a specified callback method.
Optional Parameters¶
map
: Map Objecticon
: custom icon url.divId
: The div to put the result in.markerPopup
(boolean): to show pop-ups on marker click. Default is true.(example:markerPopup:true
)popupHtml
: to show html pop up on marker click. User should define values to be shown while using this parameter.(example:obj.setPopup({content:"<h1>Hello MapmyIndia</h1>"})
)fitbounds
(boolean): To show all rendered eLoc(s) in a single view bound. (example:fitbounds:true
)fitboundOptions
: padding in fitbounds, if any. (Example:{ padding:50,maxZoom:18}
)infoDiv
(boolean): To render html div on map or not. Default is true. (example:infoDiv:true
)click_callback
: method to call on click of callback.
3. Method to remove the markers with callback populated by Place Details Plugin¶
pinObj.remove();
4. Method to set up the div content for populating details from getEloc() plugin¶
pinObj.setDivContent(“Div html);
5. Method to set up the pop up content on marker as html.¶
For Eg:
pinObj.setPopup({content:"<h1>Hello Mappls</h1>"});
That's All ! Visit the samples for assistance to create a sample implementation with your own keys.
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support
Need support? contact us!