MapmyIndia REST APIs for Cordova/Ionic - Beta 1
For full documentation contact MapmyIndia here:
MapmyIndia: apisupport@mapmyindia.com.
You can get your api key to be used in this document here: https://www.mapmyindia.com/api/signup
Version History
Version | Last Updated | Author |
---|---|---|
0.0.9 | November 2018 | MapmyIndia API Team (AS) |
Technologies Used
Supported Platform
Supported Technologies
Installation
npm
> cordova plugin add mapmyindia-restapi-cordova-ionic-beta
git
> cordova plugin add https://github.com/mapmyindia/mapmyindia-restapi-cordova-ionic-beta.git
Browser Installation
IONIC | CORDOVA |
---|---|
ionic cordova platform add browser | cordova platform add browser |
Running in the browser
IONIC | CORDOVA |
---|---|
ionic cordova run browser | cordova run browser |
Only if you are running cordova project in browser not for ionicframework
-
replace your
<meta>
tag inindex.html
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' http://* 'unsafe-inline'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'" />MapmyIndia Plugin requires Cordova to run.
-
Declare mmi_rest var globally
> declare var mmi_rest;Inside
mmi_rest
function if you want to access this property you have to assign to a variable likevar thisObj = this
outside themmi_rest
function body if you are working withIONIC V > 1
API Usage
Features:
- Autosuggest
- Geocoding [
Legacy
] - Nearby
- Reverse Geocode
- Place detail
- Distance [
Legacy
] - Routing [
Legacy
] - Routing API
- Distance Matrix
- Atlas Geocode
Autosuggest
Parameters
client_id*
client_secret*
query*
successCallback*
errorCallback*
location
zoom
region
tokenizeAddress
pod
filter
Syntax
mmi_rest;
Example
mmi_rest;
Geocode
Parameters
key*
addr*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Nearby
Parameters
key*
client_id*
client_secret*
keywords*
refLocation*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Reverse Geocode
Parameters
key*
lat*
lng*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Place Details / eLoc
Parameters
key*
placeId*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Driving Distance Matrix
Parameters
key*
lat*
lng*
points*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Routing (Deprecated)
Parameters
Note: "alternatives" and "advices" are optional parameters; send null
if they are empty.
key*
start*
destination*
successCallback*
errorCallback*
Syntax
mmi_rest;
Example
mmi_rest;
Routing API
Parameters
key*
start*
destination*
successCallback*
errorCallback*
geometries
steps
exclude
rtype
region
bearings
alternatives
radiuses
overview
Syntax
mmi_rest;
Example
mmi_rest;
Atlas Geocode
Parameters
client_id*
client_secret*
addr*
successCallback*
errorCallback*
itemCount
bias
podFilter
bound
scores
Syntax
mmi_rest;
Example
mmi_rest
Distance Matrix
Parameters
key*
source*
secondryLocations*
successCallback*
errorCallback*
rtype
region
Syntax
mmi_rest;
Example
mmi_rest;
For any queries and support, please contact:
Email us at apisupport@mapmyindia.com
Ask a question under the mapmyindia-api Support Need support? contact us!
Blog Read about the latest updates & customer stories
© Copyright 2019. CE Info Systems Pvt. Ltd. All Rights Reserved. | Terms & Conditions
Written with StackEdit by MapmyIndia.