Mobile GMaps Home Page
 FAQFAQ    SearchSearch    MemberlistMemberlist    UsergroupsUsergroups   RegisterRegister  
 ProfileProfile    Log in to check your private messagesLog in to check your private messages    Log inLog in 

Gmap-Track API
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Web Sites
View previous topic :: View next topic  
Author Message
joshpowers
Junior


Joined: 24 May 2007
Posts: 4

Phone Type: Unknown

PostPosted: Wed Jul 25, 2007 7:29 pm    Post subject: Gmap-Track API Reply with quote

I know the API page for Gmap-Track is "coming soon" but I am curious what it is going to be exactly? Are you going to allow other applications access to submit locations to gmap-track (for those of us who cant get it running on our new phones) and / or are you going to let other applications request locations from the website. Or am I totally off base for your goals for the API section.

Just curiosity really. Thanks.
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Wed Jul 25, 2007 9:08 pm    Post subject: Re: Gmap-Track API Reply with quote

joshpowers wrote:
I know the API page for Gmap-Track is "coming soon" but I am curious what it is going to be exactly? Are you going to allow other applications access to submit locations to gmap-track (for those of us who cant get it running on our new phones) and / or are you going to let other applications request locations from the website. Or am I totally off base for your goals for the API section.

Just curiosity really. Thanks.

Well, I'm sorry I didn't have time to work on the API recently. I'm pasting below the current functionality supported, of course any suggestions are welcome.

Cristian.

Quote:

Quick reference:

http://www.gmap-track.com/api?v=1.07&m=login&out=txt&user=...&tid=...
http://www.gmap-track.com/api?v=1.07&m=location.set&out=txt&sid=...&lat=...&lon=...&alt=...&spd=...&hd=...&t=...
http://www.gmap-track.com/api?v=1.07&m=location.get.me&out=xml&sid=...
http://www.gmap-track.com/api?v=1.07&m=location.get.friends&out=xml&add=...&limit=0|...&sid=...&BBOX=...
http://www.gmap-track.com/api?v=1.07&m=location.get.public&out=xml&add=...&limit=0|...&sid=...&BBOX=...
http://www.gmap-track.com/api?v=1.07&m=location.get.user&out=xml&add=...&getuser=...&sid=...

Longer description:

The API is under development. At least for the first version (not ready yet), the URL for the REST API is http://www.gmap-track.com/api (or equivalent http://www.gmap-track.com/rest/rest.php ) and it takes the following parameters:

* v=<version> - latest is 1.07
* out=<outputformat> - known output formats: txt, xml, kml, json, kmldata. Note that some methods work only with some of these formats. out=txt gives a text format output for the status of location.set method (errorcode:errormessage, errorcode is 0 for OK). out=xml gives a proprietary xml format for location.get.*. out=kml gives a network KML that in turn loads a URL with out=kmldata (out=kml files should be viewed in Google Earth as they can auto-refresh). out=json give JSON output (only for location.get.*).
* user=<user> - username (login info)
* tid=<trackingid> - tracking ID (login info)
* sid=<sessionid> - alternate login info
* m=<method> - method to be called. Known methods: m=login assigns a session id given a user and tracking id (session ID is returned ; m=location.set sends location info to the server for a user; m=location.get.* get location info for the logged-in user (location.get.me), logged-in user and friends (location.get.friends), public users (location.get.public) or a specific user (location.get.user).
* limit=<n> - limit the number of results returned by location.get.*. The results are returned sorted by timestamp, newest first.
* getuser=<username> - parameter for location.get.user. Note that it's "getuser=..." and not "user=..." - the "user=..." is a login parameter (as above)
* bbox=<W>,<N>,<E>,<S> - "boundary box", only users in these area will be returned (<W>,<N>,<E>,<S> are the decimal coordinates for the bounds)
* add=<users> - can be used to specify a comma-separated list of users that will be returned even if they are outside of the "bbox" area
* lat=<latitude>, lon=<longitude>, alt=<altitude>, spd=<speed>, hd=<heading>, t=<timestamp> - used when sending position info. Latitude and longitude are in decimal, altitude is in meters, speed is in km/h, heading is in degrees (0-360), timestamp is unix timestamp (seconds since Jan. 1 1970 00:00 GMT, if not set defaults to server timestamp)
* no API key is needed and no limits are set, but that may change in the future

For more info, try some URLs as described above, look in Help/Debug in MGMaps (it shows "Enqueuing http://..." messages) or use view source on a www.gmap-track.com map page.

[Sorry if the above info is not very descriptive, I'll put together a good documentation that as soon as I have more time available and I finish the API implementation]


Last edited by Cristian Streng on Mon Nov 09, 2009 3:25 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
joshpowers
Junior


Joined: 24 May 2007
Posts: 4

Phone Type: Unknown

PostPosted: Thu Jul 26, 2007 7:54 pm    Post subject: Reply with quote

Cristian,

Thanks for answering my questions and more. I had no idea the API was already so developed. I am going to get to playing with it! You rock.
Back to top
View user's profile Send private message
N1029676
MGMapper


Joined: 10 May 2007
Posts: 21
Location: Fort Lewis, WA, USA
Phone Type: Unknown

PostPosted: Fri Aug 03, 2007 11:13 am    Post subject: Reply with quote

Out of curiosity, do you have any future plans of allowing users to host their own database so we could track ourselves? I plan on downloading an XML formatted files (using your API) every other 8 seconds, as a makeshift track log. However I haven't yet because it seems rude to do that to someone else's server.

What do you suggest?
Back to top
View user's profile Send private message AIM Address MSN Messenger
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Fri Aug 03, 2007 1:39 pm    Post subject: Reply with quote

N1029676 wrote:
Out of curiosity, do you have any future plans of allowing users to host their own database so we could track ourselves? I plan on downloading an XML formatted files (using your API) every other 8 seconds, as a makeshift track log. However I haven't yet because it seems rude to do that to someone else's server.

What do you suggest?

Yes, I do have such plans, but I'll have to think about the best form for this... (you can see the gmap-track URL is visible in the web tracking settings which suggests that other URLs could be allowed). I'm currently not making any money out of the gmap-track website and I may want to change that in the future. Wink

Meanwhile, thanks for letting me know and feel free to do that -- download the XML formatted file every other 8 seconds, it's pretty light on the server and there are others already doing it...

Cristian
Back to top
View user's profile Send private message Visit poster's website
rich_parker
Junior


Joined: 02 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Fri Aug 03, 2007 2:02 pm    Post subject: Reply with quote

Can you share the specification for the txt record type? It has a strange data formatting.

Anyone know how to take the XML and create a KML from it, we're driving 1000 miles next week and it'd be cool to see where we've been Wink

Rich
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Fri Aug 03, 2007 7:49 pm    Post subject: Reply with quote

rich_parker wrote:
Can you share the specification for the txt record type? It has a strange data formatting.

That's not complete... it works only for error messages where it's a single line with the format "errorcode:errormessage".

rich_parker wrote:
Anyone know how to take the XML and create a KML from it, we're driving 1000 miles next week and it'd be cool to see where we've been Wink

MGMaps has the ability to output KML, but only for the current (latest) position of a user, or of friends. There's no ability to view a range of positions reported as a track yet, but I am working to add that.
Back to top
View user's profile Send private message Visit poster's website
rich_parker
Junior


Joined: 02 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sat Aug 04, 2007 11:01 am    Post subject: Reply with quote

I suppose what I want is the ability to take either the XML or KML every minute or so and combine it into a KML that displays the track in Google.

Does anyone know a utility that takes several (or in this case probably thousands) of KMLs specifying single points and turn them into tracks?

Rich
Back to top
View user's profile Send private message
hand
Junior


Joined: 04 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sat Aug 04, 2007 8:26 pm    Post subject: Reply with quote

rich_parker wrote:
I suppose what I want is the ability to take either the XML or KML every minute or so and combine it into a KML that displays the track in Google.

Does anyone know a utility that takes several (or in this case probably thousands) of KMLs specifying single points and turn them into tracks?

Rich


I'm going on vacation tomorrow and I would like to have some track record.
Ideally I may be able to patch something till tomorrow evening (next 16h or so)
I'm talking sever side php script wise Smile

If I'll make it I'll let you know Smile
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Sat Aug 04, 2007 8:50 pm    Post subject: Reply with quote

hand wrote:
rich_parker wrote:
I suppose what I want is the ability to take either the XML or KML every minute or so and combine it into a KML that displays the track in Google.

Does anyone know a utility that takes several (or in this case probably thousands) of KMLs specifying single points and turn them into tracks?

Rich


I'm going on vacation tomorrow and I would like to have some track record.
Ideally I may be able to patch something till tomorrow evening (next 16h or so)
I'm talking sever side php script wise Smile

If I'll make it I'll let you know Smile

I'll make sure the server saves to a database (archive) all the GPS positions reported. This is already supported, but the database is growing too quickly so I'll have to add some kind of partitioning... My point is that when I have the code for tracking ready you'll be able to generate a track by simply selecting your start and end "timestamps" - it will generate a track based on all the positions reported in that interval.

Also, in case you are concerned with privacy I just want to re-state that I will not share the database with anyone for any fee. If I will ever do that (which I doubt), I will announce it on the news pages and it will apply only for the positions reported from that moment on.

Cristian
Back to top
View user's profile Send private message Visit poster's website
hand
Junior


Joined: 04 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sat Aug 04, 2007 9:18 pm    Post subject: Reply with quote

I'm just fighting with your api and wget (never used it before ^^) and it keeps writing server output into file named "api" am I stupid or does it simply can't deal with lack of extension at the end of url?

or possibly it's to late for writing ;P

never mind that..
k 1/4 done time to do some pre-vacation laundry and back to the script Smile
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Sun Aug 05, 2007 8:57 am    Post subject: Reply with quote

hand wrote:
I'm just fighting with your api and wget (never used it before ^^) and it keeps writing server output into file named "api" am I stupid or does it simply can't deal with lack of extension at the end of url?

The -O parameter for wget specifies the name of the file to write to.
Back to top
View user's profile Send private message Visit poster's website
hand
Junior


Joined: 04 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sun Aug 05, 2007 10:07 am    Post subject: Reply with quote

Cristian Streng wrote:
hand wrote:
I'm just fighting with your api and wget (never used it before ^^) and it keeps writing server output into file named "api" am I stupid or does it simply can't deal with lack of extension at the end of url?

The -O parameter for wget specifies the name of the file to write to.


mhm I did that - something didn't work, went do stuff, came back did it again with no problem.. let just say it was late Razz

anyhoo don't now if i'll make it - time is running out and I still got stuff to do Wink
Back to top
View user's profile Send private message
hand
Junior


Joined: 04 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sun Aug 05, 2007 12:33 pm    Post subject: Reply with quote

api wise, I don't seem to find a way to location.get.user with timestamp instead of formated date - is there?
Back to top
View user's profile Send private message
hand
Junior


Joined: 04 Aug 2007
Posts: 5

Phone Type: Unknown

PostPosted: Sun Aug 05, 2007 3:34 pm    Post subject: Reply with quote

ok
http://gmt.sowek.eu/

it's getting the data once every 4 minutes (most recent point) for every gmap-track name in the database (@ my server)
it wont save multiple records with the same date -> if date is the same -> do nothing

(btw it uses http://www.gmap-track.com/rest/rest.php api address)

oh and location.get.user works only for public location (right?) so it works only for public locs

i wont make it to write kml dump now sorry Sad
maybe i'll do it in the next few days.. maybe my gf will kill me for trying Wink

k loads of stuff do to and so little time Smile

PS: I really didn't have time to make the site "more professional looking" Wink
Back to top
View user's profile Send private message
cfernandes
Newbie


Joined: 04 Dec 2007
Posts: 1

Phone Type: Unknown

PostPosted: Wed Dec 05, 2007 8:34 pm    Post subject: I manage to use the api and put a location on the map Reply with quote

Hello Cristian, great work you have here, I just want to say that I manage to use the api and put a location on the map, check for HERE

I use this site to see the right unix timestamp: http://www.unixtimestamp.com/index.php

I hope to log my mtb rides here.

Thanks and
Cheers,
Celso Fernandes.
Back to top
View user's profile Send private message
Cristian Streng
Founder


Joined: 28 Oct 2005
Posts: 4585

Phone Type: (many)

PostPosted: Thu Dec 06, 2007 9:57 am    Post subject: Re: I manage to use the api and put a location on the map Reply with quote

cfernandes wrote:
Hello Cristian, great work you have here, I just want to say that I manage to use the api and put a location on the map, check for HERE

Thanks for letting me know... I'll try to add support for showing tracks soon, but I can't give you a time estimate.

cfernandes wrote:
I use this site to see the right unix timestamp: http://www.unixtimestamp.com/index.php

Well, the timestamp is available as a function call in most web & programming platforms, like C, Java, PHP, Perl, Javascript, ...

Regards,
Cristian
Back to top
View user's profile Send private message Visit poster's website
moorsey
MGMapper


Joined: 21 May 2009
Posts: 13

Phone Type: Unknown

PostPosted: Thu May 21, 2009 8:00 am    Post subject: Reply with quote

sorry for dragging this up, but it is the most relevant topic I could find on the matter.

I see a lot of topics regarding recording GPS locations for later use, "offline" tracking. But the API would seem to offer this without additional work on the MPMaps side of the program

Now, unfortunalty, I am no programmer, so have no idea how I can go about extracting this data from Gmap-Track servers. I tried the address below that "hand" posted http://gmt.sowek.eu/. But it does not seem to work.

If anyone has developed any code that will work with the API, I would really appreciate some assistance.
Back to top
View user's profile Send private message
moorsey
MGMapper


Joined: 21 May 2009
Posts: 13

Phone Type: Unknown

PostPosted: Wed May 27, 2009 1:34 pm    Post subject: Reply with quote

well, played around a little more with this, managed to get the positions showing in Google Earth, which is very handy when combined with the various overlays available in there.

Anyway, Christian, you said above that all the GPS points and timestamps are stored and you have code for tracking ready, is this the case? Would really polish it off for me then!

I am using your software for a charitable youth group I volunteer for, we have youngsters out on walking expeditions and this GPS tracking is invaluable, the right combination of phone on GPS can last for 26 hours before a battery change is needed!!!
Back to top
View user's profile Send private message
moorsey
MGMapper


Joined: 21 May 2009
Posts: 13

Phone Type: Unknown

PostPosted: Fri Jul 10, 2009 12:36 pm    Post subject: Reply with quote

BUMP

any advice on getting access to the stored GPS locations and timestamps etc?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MGMaps Forum Index -> Web Sites All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
MGMaps topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group