What this surface enables
Mappls's Latest Vector Maps Web SDK for rendering beautifully interactive, fluid maps that are powered by browser based WebGL.
No durable provider record or application workflow contract was established from the source identity or bounded document evidence; view, camera, callback, and authentication sessions alone do not make a source stateful.
Authority: Conservative Default · No durable-state signal promoted from incidental vocabularyWeb
MapsSearch PlacesRoutes NavigationGis AnalyticsWidgets Deep LinksCapture FeedbackIdentity Platform
HTMLTextJavaScript
Static Key 2025Oauth2Api Key
Prepare the integration
- A browser application and an allowed development origin
- OAuth client credentials issued for the intended Mappls project
- A Mappls project key restricted to the intended app, domain, or backend
Setup and usage examples
These examples were extracted from the canonical public source document and sanitized for credential-like values. Check the source branch and package version before copying into a production application.
<script src="https://sdk.mappls.com/map/sdk/web?v=3.0&access_token=REDACTED Key>"></script>Topics documented by the source
01Important Note – Please read first
The main branch contains the documentation for releases using the updated Authorization & Authentication mechanism introduced in August 2025. > If you wish to use the releases that use the legacy authentication method based on OAuth 2.0, please refer to the auth-legacy branch.
02Mappls Web Maps JS
Explore the largest Mappls directory of APIs & SDKs for maps, routes and search.
Our APIs, SDKs, and live updating map data available for 200+ countries & territories to give developer's tool to build better mapping, navigation, and search experiences across different platforms.
This page will be continually enhanced to offer more insights and reference materials on how to best utilize our Vector Maps JS SDK for Web.
You can get your api key to be used for access here: https://auth.mappls.com/console
03Table Of Content
• Mappls Web Maps JS - Introduction - Web Map Features - Getting Access - Authentication Object - accesstoken mandatory query parameter. - Getting Started - Understanding Map Methods, Events \& Properties - Adding the Map Script to your web page - Map Methods, Events \& Properties - Markers - Types of Markers - Marker Implementation - Marker Methods,Events \& Properties - Markers Quick Reference: - View Sample Codes for Quick Reference - Heat Map Overlays - HeatMap Quick Reference - Add Geojson layer - Geojson Quick Reference - KML Overlay - Important Notes to remember - Info Windows - Types of Information windows - Info Window Quick Reference - Feature Classes - Polylines - Polyline Quick Reference - Check out our vast list of sample codes for different polylines styles. - Polygons - Polygon Quick Reference - Check out our vast list of sample codes for polygons. - Circles - Circle Quick
| Version | Remarks | Author | |--|--|--| | 1.0 | Initial Commit |Mappls API Team (PK)|
04Introduction
The Mappls Web Maps JavaScript SDK is a tool that enables the creation and customization of interactive maps for both India and the global context. Developed by Mappls (MapmyIndia) India's leading Map provider, this SDK is designed to produce mobile-friendly maps with a user-friendly interface and excellent performance. It consists of a set of classes and functions that allow developers to incorporate a wide range of map features into their web and mobile applications.
05Web Map Features
• Zoom: A map of India that can be panned or scrolled, allowing users to explore it in various levels of detail. The highest level of detail is achieved at a zoom level of 22, while the lowest level provides a global view at zoom level 1. - Overlays: We recognize the significance of maps in businesses, and that's why, at Mappls, we offer pre-made overlays that can be easily integrated into your code, streamlining the process and reducing the need for repetitive code. - Map Markers (Pushpins): You can pinpoint any location using the default map markers (pushpin) feature, and then you have the flexibility to customize its appearance to align with the unique style of your application. Check out the Plug-ins section for additional enhancements that can elevate your customization options. - Info Windows (Pop-ups): When a user clicks on a pushpin, an information window automatically appears, a
Note:The location settings must be turned on and must allow the site to fetch the location for this control to work.
Please Note: Mappls(MapmyIndia) may extend and enhance functionality for its interactive map API in future, which will be documented in this section, and which will be available through the Mappls.
06Getting 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.
1. Copy and paste the key from your credentials section from your API keys into the accesstoken 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: accesstoken.
07Authentication Object - accesstoken mandatory query parameter.
• accesstoken: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".
08Getting Started
Now that you’re all caught up with the features let’s get down right to them implementing and look at how can you integrate our interactive Map to your Website from scratch.
09Understanding Map Methods, Events & Properties
Mappls Live Demo | CodePen Implementation
The easiest way to start loading maps in a web page is with a “Hello World” sample code, you can download or view a working “Hello World” sample from the links for adding your first marker below.
10Adding the Map Script to your web page
Follow the below steps to integrate Mappls interactive Maps into your existing code base or even a File -> New Project. - Declare application as HTML5: Define on top of your HTML. - Integrate Interactive maps from Mappls into your browser application by simply including Mappls's interactive map API in your script source in the head section.
Important: - Please ensure that you insert your static key in place of - v: This is the version. Please keep as the latest version: 3.0. - layer: The type of map applicable for the project. The default is vector. Alternate value is raster.
Please discuss with apisupport@mappls.com for futher clarification and support.
• Define style in the head section to load your CSS. CSS can be defined as per the developers requirement (Extenal, Internal and inline)
• Define a div object in the body tag of the HTML where you want the Mappls Map to show up.
• Initialize a Mappls Map by simply calling new Mappls.Map() in the JavaScript and passing it at the minimum, the div object in which you want the map populated. (All other parameters are optional.)
11Map Methods, Events & Properties
• Map Properties - Map Methods - Map Events
12Markers
Utilizing markers to pinpoint locations is a hassle-free approach. You have the option to use the markers we provide as the default choice, and if you wish to use your own custom markers, we've got that aspect covered as well.
13Types of Markers
• Stock Markers: The one you get out of the box using our Interactive Vector Maps SDK and you can select from a lot of choices. - Custom Marker: In case you want to add your own markers, we’ve handled that for you as well. - HTML Marker: In case you don’t want to add in an image you can use HTML to create a marker and then plot it on the map as well.
For more details, please read article in Markers
14Marker Implementation
Mappls Live Demo | Code Pen Implementation
The easiest way to start loading maps with simple markers in a web page is with sample code given on the link above, you can download or view a working sample with your authorized access keys.
Method to add marker on map
15Marker Methods,Events & Properties
You can fine-tune the map methods, events and properties we offer to align with your unique requirements and amplify the level of customization for your map layer. These functions serve as a handy resource for promptly addressing specific events or scenarios.
16Markers Quick Reference:
• Marker Properties - Marker Methods
• Multiple Marker with cluster
• GeoJSON Bulk Marker
17View Sample Codes for Quick Reference
• Advance Cluster Marker
• Marker using HTML
• Marker with Custom Popup
• Marker with Popup
• Multiple Marker using GeoJSON
18Heat Map Overlays
For details , please read article in Heatmap Overlays
Mappls Live Demo | Code Pen Implementation
19HeatMap Quick Reference
• Heatmap on Click
• Heatmap on Overmouse
• Heatmap Properties
20Add Geojson layer
For details, please read article in GeoJSON
Mappls Live Demo | Code Pen Implementation
GeoJSON Supports marker, polyline and polygon addition and Style properties
Marker Property support in geojson
1. description 2. icon 3. icon-size 4. icon-offset 5. text 6. text-size 7. text-offset
Polyline Property support in geojson:
21Geojson Quick Reference
• Dashed Polyline Using GeoJson
• Multi Colored Dashed Polyline Using GeoJson
• Multiple Marker Using Geojson
• Add GeoJSON Properties
Remove Layer Method
22KML Overlay
KML: Keyhole Markup Language is a file format employed to showcase geographical data on maps. With this plugin, you have the capability to superimpose KML data onto Mappls Maps for web applications.
Mappls Live Demo | Code Pen Implementation
23Important Notes to remember
1. Only KML data supported. 2. KML file must have absolute path or raw KML string (in variable or in textbox) 3. All internal URL's path must be absolute. (for icon path etc) 4. File must not be password protected. 5. File must be CORS enabled from the server where they are hosted. 6. File must follow KML standard strictly.
• KML Properties: #KML-Properties
For details, please read article in KML Overlay
24Info Windows
Mappls Live Demo | Code Pen Implementation
Info Windows provide a user-friendly method for displaying information related to a marker, essentially explaining the purpose of that marker. When users encounter a marker, their natural instinct is to click on it to discover more details, and presenting an info window is the ideal approach to fulfill this expectation.
Please Note: Our JS supports a default info window that you can leverage but we want you to have an option to customize your info window to fit in with your UI and you can do so by manipulating the CSS.
For a quick sample or a demo you can follow up with the links on live Demo
For more details , please read article in Info Windows
Service references found
URLs are sanitized during ingestion and may include documentation or legacy hosts. Use them to trace the source, not as a substitute for the current API contract.
https://github.com/mappls-api/mappls-web-maps-js/tree/mainhttps://github.com/mappls-api/mappls-web-maps-js/tree/auth-legacyhttps://about.mappls.com/apihttps://github.com/MapmyIndia/mapmyindia-rest-api/blob/master/docs/countryISO.mdhttps://auth.mappls.com/console](https://auth.mappls.com/consolehttps://github.com/prabhjot729/https://auth.mappls.com/console/https://about.mappls.com/api/web-sdk/vector-map-auth2/Maps/mappls-default-maphttps://codepen.io/mappls/pen/xbwYobrhttps://sdk.mappls.com/map/sdk/web?v=3.0&access_token=REDACTEDhttps://about.mappls.com/api/web-sdk/vector-map-auth2/Markers/mappls-singlemarkerhttps://codepen.io/mappls/pen/NPGzEOJhttps://about.mappls.com/api/web-sdk/vector-map-auth2/Markers/mappls-multiplemarkerhttps://about.mappls.com/api/web-sdk/vector-map-auth2/Markers/mappls-advanceclusterhttps://about.mappls.com/api/web-sdk/vector-map-auth2/Markers/mappls-bouncing-markerhttps://about.mappls.com/api/web-sdk/vector-map-auth2/Markers/mappls-cluster