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 | Last Updated | Author |
|---|---|---|
| 1.0.1 | Sep 2019 | MapmyIndia API Team (BM) |
> cordova plugin add https://github.com/mapmyindia/mapmyindia-restapi-cordova-ionic-beta.git
or
> cordova plugin add mapmyindia-restapi-cordova-ionic-beta| IONIC | CORDOVA |
|---|---|
| ionic cordova platform add browser | cordova platform add browser |
| IONIC | CORDOVA |
|---|---|
| ionic cordova run browser | cordova run browser |
- 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_restfunction if you want to access this property you have to assign to a variable like
var thisObj = thisoutside themmi_restfunction body if you are working withIONIC V > 1
-
client_id* -
client_secret* -
query* -
successCallback* -
errorCallback* -
location -
zoom -
region -
tokenizeAddress -
pod -
filter
mmi_rest.atlas_auto(
{
client_id: 'clientId',
client_secret: 'clientSecret',
query: 'agr'
},SuccessCallback, Error Callback);mmi_rest.atlas_auto({client_id: 'clientId', client_secret: 'clientSecret',query: 'agr'},
function(result)
{
console.log(result);
},
function(error)
{
console.log(error);
});client_id: 'clientId',
client_secret: 'clientSecret',
address: 'agra'
-
successCallback* -
errorCallback*
mmi_rest.atlas_geocode(client_id: 'clientId', client_secret: 'clientSecret',address: 'agra'}, Success Callback, Error Callback);mmi_rest.atlas_geocode({client_id: 'clientId', client_secret: 'clientSecret',address: 'agra'},
function(result){
console.log(JSON.stringify(result));
},
function(err){
console.log(err);
});-
key* -
client_id* -
client_secret* -
keywords* -
refLocation* -
successCallback* -
errorCallback*
mmi_rest.atlas_nearby({client_id: 'clientId', client_secret: 'clientSecret', keywords: 'beer', refLocation: '28.631460,77.217423'}, SuccessCallback, ErrorCallback);mmi_rest.atlas_nearby({client_id: 'clientId',client_secret: 'clientSecret',keywords: 'beer',refLocation: '28.631460,77.217423'},
function(result)
{
console.log(JSON.stringify(result));
},
function(error)
{
console.log(error);
});-
key* -
lat* -
lng* -
successCallback* -
errorCallback*
mmi_rest.rev_geocode(key: 'YOUR API KEY', lat: '27.61234', lng: '77.61234'}, Success Callback, Error Callback);mmi_rest.rev_geocode({key: 'YOUR API KEY', lat: '27.61234', lng: '77.61234'},
function(result){
console.log(JSON.stringify(result));
},
function(err){
console.log(err);
});-
key* -
placeId* -
successCallback* -
errorCallback*
mmi_rest.place_detail({key: 'YOUR API KEY', placeId: 'MMI000'}, Success Callback, Error Callback);mmi_rest.place_detail({key: 'YOUR API KEY', placeId: 'MMI000'},
function(result)
{
console.log(JSON.stringify(result));
},
function(err)
{
console.log(err);
});-
key* -
lat* -
lng* -
points* -
successCallback* -
errorCallback*
mmi_rest.distance({key: 'YOUR API KEY', lat: '27.61234', lng: '77.61234', points:'29,78|30,78|28,79'}, Success Callback, ErrorCallback);mmi_rest.distance({key: 'YOUR API KEY', lat: '27.61234', lng: '77.61234', points: '29,78|30,78|28,79'},
function(result)
{
console.log(JSON.stringify(result));
},
function(err)
{
console.log(err);
});Note: "alternatives" and "advices" are optional parameters; send null if they are empty.
-
key* -
start* -
destination* -
successCallback* -
errorCallback*
mmi_rest.route({key: 'YOUR API KEY', start: '28.111,77.111', destination: '28.22,77.22', alternatives: null, advices: null}, SuccessCallback, ErrorCallback);mmi_rest.route({key: 'YOUR API KEY', start: '28.111,77.111', destination: '28.22,77.22', alternatives: null, advices: null},
function(result)
{
console.log(JSON.stringify(result));
},
function(err)
{
console.log(JSON.stringify(err));
});-
key* -
start* -
destination* -
successCallback* -
errorCallback* -
geometries -
steps -
exclude -
rtype -
region -
bearings -
alternatives -
radiuses -
overview
mmi_rest.route_new({key: 'YOUR API KEY', start: '77.131123,28.552413', destination: '77.113091,28.544649'}, SuccessCallback, ErrorCallback);mmi_rest.route_new({key: 'YOUR API KEY', start: '77.131123,28.552413', destination: '77.113091,28.544649'},
function(result)
{
alert(JSON.stringify(result));
},
function(err)
{
alert(JSON.stringify(err));
});-
client_id* -
client_secret* -
addr* -
successCallback* -
errorCallback* -
itemCount -
bias -
podFilter -
bound -
scores
mmi_rest.atlas_geocode({client_id: 'ID', client_secret: 'secret', addr: 'mapmyindia'}, Success Callback, Error Callback);mmi_rest.atlas_geocode({client_id: 'ID', client_secret: 'secret', addr: 'mapmyindia'},
function(result)
{
alert(JSON.stringify(result));
},
function(error)
{
alert(error);
})-
key* -
source* -
secondryLocations* -
successCallback* -
errorCallback* -
rtype -
region
mmi_rest.distance_new({key: 'YOUR API KEY', source: '77.983936,28.255904', secondryLocations: '90.379249,23.497178'}, Success Callback, ErrorCallback);mmi_rest.distance_new({key: 'YOUR API KEY', source: '77.983936,28.255904', secondryLocations: '90.379249,23.497178'},
function(result)
{
alert(JSON.stringify(result));
},
function(err)
{
alert(err);
});For any queries and support, please contact:
Email us at apisupport@mapmyindia.com
Ask a question under the mapmyindia-api
Need support? contact us!
Read about the latest updates & customer stories
© Copyright 2019. CE Info Systems Pvt. Ltd. All Rights Reserved. | Terms & Conditions
Written with StackEdit by MapmyIndia.

