GPS Tracker API Guide

This is our guide on using InstaMapper's GPS Tracker API functionality, using either iframe or Json return.

This guide is only applicable once you have set up a phone/device on your insta-mapper account on the website

The API will only return results when your API sharing is turned on for your devices, within 'my devices'.

 

Single Markers/Devicessingle device

Use this if you plan to return just one marker at a time on your website:

iframe

Here is the source code -

Just replace the device key with your own which can be found in "My Devices" page

<iframe src='http://www.insta-mapper.com/google_map.php?device_id=ENTER_DEVICE_KEY_HERE' width="900" height="900">
</iframe>

Adjust the height and width to fit your website, the map will automatically resize to fit your iframe

Arguments

if you wish to customize the zoom then add zoom={NUMBER} after google_map.php
if you wish to remove the fb banner then add &fb_remove=1 to the url
if you wish to remove the gps information on the left add &remove_info=1 to the url
If you wish to default the map to show terrain view add &map_type=TERRAIN
if you wish to change the time out setting add time_out={NumberOfMinutes}
the time out is how long since last??transmission??before the page displays a message saying no ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? location available

Example

<iframe src='http://www.insta-mapper.com/google_map.php?device_id=ENTER_DEVICE_KEY_HERE&fb_remove=1&zoom=5&time_out=60&remove_info=1' width="900" height="900">
</iframe>

Json

Using an API call you can return your markers in a Json format to be used within your site however you wish

Replace the device ID with your which can be found in the my devices page.

http://ww2.insta-mapper.com/api/api_single.php?device_id=<INSERT_DEVICE_ID>

Arguments

If you want to return multiple rows, add &num=XXX at the end of the url string, this is limited to 512, if you require more get in touch with us.

example:??http://ww2.insta-mapper.com/api/api_single.php?device_id=<INSERT_DEVICE_ID>&num=50

 

[{

"heading":"0" Heading of the device,
"id":"766305" unique id of the tranmission,
"datetime":"2013-11-29 16:16:06" local date time of tranmission,
"device_id":"1" device id,
"lat":"54.58761597" lat,
"lng":"-5.88851929" lng,
"speed":"6.0" speed in MPH,
"altitude":"181" altitude in feet,
"sharing":"Y" sharing enabled(This will always show Y),
"friendly_name":"Fabio" friendly name of the device,
"minutes":"13963" minutes since last update,
"kph":"10 speed in KPH"

}]

Multiple Devicesmultiple devices

This is perfect if you wish to retrieve information on all your devices with in your account:

iframe

Just replace key id with your key id which can be found at the bottom of your "My Devices" page, this keyid is unique to your account.

<iframe src='http://www.insta-mapper.com/multi_map_v3.php?id=ENTER_KEY_ID_HERE'??width="900" height="900"></iframe>

Change the width and height as you desire, the iframe will automatically adjust

?? ?? ?? ?? ?? ?? Arguments

ZOOM - if you wish to customize the zoom then add &zoom={NUMBER} after multi_map_v3.php
CENTER - if you wish to set the center, add &center=lat,lng after multi_map_v3.php

?? <iframe src='http://www.insta-mapper.com/multi_map_v3.php?id=ENTER_KEY_ID_HERE&zoom=5&center=50,1'??width="900" height="900"> ?? ?? ?? ?? ?? ????</iframe>

Json

Using an API call you can return your markers in a Json format to be used with in your site however you wish

Replace the key id with your which can be found at the bottom of the my devices page.

You will also need a device id, Any device id on your account is fine, this is just for added security measures, which ever device id you Input it will still return all devices as long as sharing is turned on for them.

http://ww2.insta-mapper.com/api/api_multi.php?key=<INSERT_KEY_ID>&device_id=<INSERT DEVICE ID>

Arguments

If you want to return only the last known location for each device, add ???&latest=1??? to your URL string.

If you want to order your results by device id add "&order_by=device"

??Json Response

[{

"heading":"0"??Heading of the device,
"id":"766305"??unique??id of the tranmission,
"datetime":"2013-11-29 16:16:06"??local date time of tranmission,
"device_id":"1"??device id,
"lat":"54.58761597"??lat,
"lng":"-5.88851929"??lng,
"speed":"6.0"??speed in MPH,
"altitude":"181"??altitude in feet,
"sharing":"Y"??sharing enabled(This will always show Y),
"friendly_name":"Fabio"??friendly name of the device,
"minutes":"13963"??minutes since last update,
"kph":"10??speed in KPH"

}]

Note: If you have any problems with the above or you have spotted a mistake, just let us know via the contact page.

We also are very open to feature request changes so just let us know if you wish for us to add something for you