Exporting a user’s location

The export method currently exposes a user’s location by delivering a HTML page containing a full-screen map showing one or more user’s location, either the current location or their location history depending on the arguments passed in. It is intended to be used in an iframe to allow simple embedding on third-party websites. The method can be accessed at:

http://mapme.at/api/export.html

You must pass one or more usernames whose location you want to export or the call will not work. You can also pass the same arguments as you would pass to the where method which you would use to read a user’s current location. Some example arguments would be:

http://mapme.at/api/export.html?usernames=thebox&mode=since&since=3%20months%20ago

http://mapme.at/api/export.html?usernames=royaliris,snowdrop,royaldaffodil&mode=since&since=6%20hours%20ago

http://mapme.at/api/export.html?usernames=royaliris&mode=day&day=20090216

The first of those gives the following output:

If no username is given then an error will be returned. The accuracy of the location returned will depend on the whether the user viewing the iframe is logged into mapme.at. If the user is not logged in then the location will be shown at “Public” accuracy, if the user is logged in then this may be different depending on whether the user is a contact of the user whose location is being exported.

The following parameters are also unique to the export page:

static=yes
The map will be static, not able to move or zoom, no controls will show.
controls=no
No map controls will be shown but the map will still be dynamic.
iphone=yes
This sets some iPhone specific properties to allow the export page to be used as a full-screen iPhone web-app.

5 Responses to Exporting a user’s location

  1. Pingback: Show your location on your blog or other websites « blog.mapme.at

  2. Gerard says:

    Wow, very useful tool you’ve created. But, unfortunately useless if history can not be deleted or edited. Hopefully this functionality can be added. Until then I will continue my search…

  3. john says:

    Wow, I wouldn’t say it was entirely useless and many people are finding a use for it. I do agree though that it would be better if we could get history editing going at some point in the future though. There’s support for it in the API so if someone wanted to make a third party tool to do it that would be possible.

  4. Brian Medema says:

    This is pretty cool! Is there a way to show location history with a starting date and and ending date? It looks like the “since” command shows history to the present day. I’d like to create a map that shows a certain period of history, but does not continue updating after I’ve created the map.

    This is a pretty great service! Thanks!

  5. john says:

    Yes, use “until” to set the end date. You’ll get a maximum of 1000 entries back, send a “page” argument to get the next page (you can use “count” to get less than 1000 but not more).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>