Reference/Sample
Samplestatelesssample

MapmyIndia Interactive Maps JS SDK & MapmyIndia RESTful APIs for Web in Pure JS

mapmyindia-pureJS-sample-webSDK-REST

PureJS Sample for MapmyIndia Interactive Maps JS SDK & MapmyIndia RESTful APIs for Web

What this surface enables

PureJS Sample for MapmyIndia Interactive Maps JS SDK & MapmyIndia RESTful APIs for Web

Why this source is classified stateless

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 vocabulary
Platforms

WebREST

Product areas

MapsSearch PlacesRoutes NavigationTracking TelematicsIdentity Platform

Languages found

HTMLJavaScriptText

Authentication signals

Oauth2Api Key

Prepare the integration

  1. A browser application and an allowed development origin
  2. A trusted backend or API client capable of HTTPS requests
  3. OAuth client credentials issued for the intended Mappls project
  4. A Mappls project key restricted to the intended app, domain, or backend
Production guardrailsPin package versions and record the source fingerprint.Keep server credentials out of client binaries and logs.Test failures, timeouts, quota limits, upgrades, and rollback.Validate legacy examples against current authentication contracts.

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.

mapmyindia-pureJS-sample-webSDK-REST examples
<html>
    <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
    // Interactive Map JS
    <script src="https://apis.mapmyindia.com/advancedmaps/v1/<Map_Key>/map_load?v=1.3"></script> 
    // Map Style 
    <style>
        #map{
            height: 70vh;
            width: 100%;
        }
    </style >
    </head>
    <body onload="Auth_token_generate();">
    <div id="map"></div><br> // div for map
    <button onclick="auto();">autosuggest</button>
    <button onclick="geocoding();">geocoding</button>
    <button onclick="rev_geocode();">rev_geocode</button>
    <button onclick="Many_to_Many_distance_matrix();">Many_to_Many_distance_matrix</button>
    <button onclick="distance_matrix();">distance_matrix</button>
    <button onclick="route();">Draw route</button>
    
    <script>
    // Creating Map
    var map = new MapmyIndia.Map('map',
    {
        center: [28.04, 78.2],
        zoom: 12
    });

    var token;

Topics documented by the source

01MapmyIndia Interactive Maps JS SDK & MapmyIndia RESTful APIs for Web in Pure JS

Easy To Integrate Maps & Location APIs & SDKs For Web & Mobile Applications

Powered with India's most comprehensive and robust mapping functionalities. Now Available for Srilanka, Nepal, Bhutan, Myanmar and Bangladesh

You can get your api key to be used in this document here: https://www.mapmyindia.com/api/signup

02Pre-requisites & Assumptions

1. Supported frameworks: The sample is prepared in Pure JS. 2. CORS to be ENABLED: You need to ask API Support to enable CORS for your credentials. 3. This sample is provided as a reference only and users can adjust and enhance it to suit their requirements.

03Call Routing API

That's it folks !!!

For any queries and support, please contact:

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

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://www.mapmyindia.com/api/signup](https://www.mapmyindia.com/api/signuphttps://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.jshttps://apis.mapmyindia.com/advancedmaps/v1/https://outpost.mapmyindia.com/api/security/oauth/tokenhttps://atlas.mapmyindia.com/api/places/search/json?https://atlas.mapmyindia.com/api/places/geocode?address=mapmyindiahttps://stackoverflow.com/questions/tagged/mapmyindia-apihttps://www.mapmyindia.com/api/index.php#f_cont