Skip to content

Mappls Route Events Summary Plugin

Easy To Integrate Routing APIs & Map SDKs For Web Applications

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

  1. Copy and paste the JWT API key or generated Auth token from your API keys available in the dashboard (http://auth.mappls.com/console) in the sample code for interactive map development.
  2. The sample code is provided to help you understand the very basic functionality of MapmyIndia APIs.

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, with the help Mappls Rest API response dependency, provide the route events for the selected route.

This feature is also available inbuilt with Mappls Direction Plugin. For details, please contact apisupport@mapmyindia.com.

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.

  1. Copy and paste the key from your credentials section from your API keys into the access_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.
  2. The sample codes are provided on our domain to help you understand the very basic functionality of Mappls Direction Plugin. See Sample Codes here

Authentication Object - access_token mandatory query parameter.

  • access_token: "hklmgbwzrxncdyavtsuojqpiefrbhqplnm".

Implementation

Script URL

<script src="https://sdk.mappls.com/map/sdk/plugins?access_token=<Static Key>&v=3.0&libraries=routesummary"></script>

Method

mappls.routeSummary()

Properties

Mandatory Parameters

  • map(object): vector map or raster map object from respective Mappls Map SDKs.
  • routeId (String) : routeId, Provide routeId if users needs to get all routes reports summary.

Optional Parameters

  • Index (String) : routeIdx, Provide routeIdx if user needs routes reports for a selected route only Otherwise returns events for all suggested routes.

  • nodeId (String) : nodeId, nodeId of the Route.

  • categories (String) : Optional, categories (comma(,) separated String).

  • isGroup (Integer) : sGroup, Set to 1, if user needs parentCategory wise grouped data.

Example

mappls.routeSummary({
            map:map,
            routeId:routeId,
            index:0 , 
            categories:"",
            nodeId:"",
            isGroup:0
        },
        function(data){
            console.log(data);
        });

Sample Implementation

<html>
   <head>
      <title>Mappls Plugin - Route Events Summary</title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <meta name="desciption" content="Mappls Route Report Summary Plugin">
      <script src="https://sdk.mappls.com/map/sdk/plugins?access_token=<Static Key>&v=3.0&libraries=routesummary"></script>
      <style>
         body{margin: 0}
         #map{
         width: 100%; height: 100vh;margin:0;padding: 0;
         }
      </style>
   </head>
   <body>
      <div id="map"></div>
      <script>
         /*Map Initialization*/
          var map = new mappls.Map('map', {center: [28.62, 77.09], zoom: 15, search: false});

          /* RouteReport plugin initialization*/
           mappls.routeSummary({
                map:map,
                routeId:routeId,
                index:0 
        },
        function(data){
            console.log(data);
        });

      </script>
   </body>
</html>

That's All !

For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!


@ Copyright 2020 CE Info Systems Pvt. Ltd. All Rights Reserved.