Web API

Discussion about the Geocaching Australia web site
Guest

Web API

Post by Guest » 23 October 08 12:23 am

I am organising to write a blackberry app with a guy I know, technically speaking it should with some tweaking be possible to use on any J2ME capable device/phone/etc.

We've done some googling and come up empty handed, I'm hoping someone here can point me in the right direction, we would ideally like to write a similar app to the one groundspeak wrote for the iPhone, which is slightly amusing that they pick the iPhone to make an app for but that's getting off topic.

To make this work we need to be able to hook into the current website, but without all the website bits, is this something you guys are open to, would appreciate at all? (Or am I barking up the wrong tree here?)

Would love to get some feed back on this.

User avatar
zactyl
Posts: 1171
Joined: 28 July 04 6:40 pm
Location: Mullumbimby, NSW

Post by zactyl » 23 October 08 12:47 am

That sounds fantastic! It would be great to have something like Trimble Geocache Navigator that would work with Geocaching Australia caches! Trimble Navigator does a good job with Groundspeak caches, but it doesn't do GCA. :cry:

Guest

Post by Guest » 23 October 08 1:02 am

zactyl wrote:That sounds fantastic! It would be great to have something like Trimble Geocache Navigator that would work with Geocaching Australia caches! Trimble Navigator does a good job with Groundspeak caches, but it doesn't do GCA. :cry:
Something that doesn't cost US$6/mo would be even better in my opinion ;)

User avatar
Map Monkey
1050 or more caches found
1050 or more caches found
Posts: 2214
Joined: 08 April 04 3:06 pm
Location: Banana Republic
Contact:

Post by Map Monkey » 23 October 08 1:28 am

You are talking about a program written specifically for GCA caches ONLY?........no Geocaching.com stuff.

I thought geocaching.com didn't like scraping from their website normally?

mm

Guest

Post by Guest » 23 October 08 2:24 am

Map Monkey wrote:You are talking about a program written specifically for GCA caches ONLY?........no Geocaching.com stuff.

I thought geocaching.com didn't like scraping from their website normally?
I'm not looking to reference geocaching.com at all, there seems to be more than enough apps and what not for that particular market if you want to pay for them one way or another.

The goal here is that I just want to be able to easily find and log caches others hid, or even I hid. Any app we make will be open source, we hope to be able to utilise openstreetmap.org maps which would also be legit, Google doesn't like their maps being scraped either I think you'll find.

Using an app tends to be faster over GPRS connections, and cheaper although that's mostly a secondary concern, than browsing web pages, most WAP pages look and work like the little brother of the main website, except he's been left out in the rain to die and rott a bit but it still sort of alive ;)

User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Post by CraigRat » 23 October 08 5:42 am

We already have some XML feeds available for certain stats/logs etc (I'd have to look them up though as I can't recall all of them right now).
Depending on usage, I would hav to re-write some of them to cache data to limit the hits on the database....but we have got a good method for doing that and it wouldn't take too long.

We have no mechanism in place just yet for remote logging of GCA caches, but it's something that could be done.

We would be more than happy to work with you if the app is going to be OSS!

Obvious restriction is we couldn't feed ANYTHING to you that belongs to GC, but we can feed stats etc and obviously all our cache info etc.

(I'm tinkering with the Google Android SDK right now with a view to writing a geocaching app, although history dictates that I will never finish it!)

Guest

Post by Guest » 23 October 08 10:28 am

CraigRat wrote:We already have some XML feeds available for certain stats/logs etc (I'd have to look them up though as I can't recall all of them right now).
Depending on usage, I would hav to re-write some of them to cache data to limit the hits on the database....but we have got a good method for doing that and it wouldn't take too long.
We were planning on caching on the device itself too, this way we out of coverage you can store your find, or just the location information and once back in range the app updates everything as if you were connected when you did it earlier.
We have no mechanism in place just yet for remote logging of GCA caches, but it's something that could be done.
We would be more than happy to work with you if the app is going to be OSS![/quote]

Great, the other person involved has already released a GPL app, but is no where near as extensive as I have in mind, although we're toying with the idea of extending it.

http://code.google.com/p/gpsnavigation/
Obvious restriction is we couldn't feed ANYTHING to you that belongs to GC, but we can feed stats etc and obviously all our cache info etc.
I've been trying to think of ways in the past few days to make GC more redundant, and I guess the more accessable and easy things can be made the more people are likely to use them and so on and so forth and before you know it who knows where things will end up.

Guest

Post by Guest » 23 October 08 3:13 pm

I've been thinking about what would an ideal way to do this be, answer is I have no idea, but a starting point might be if a search of some kind is sent to you, you could return a simple XML/GPX type file of the matching locations, for lon/lat searches it might be good to include an option to limit by distance not sure.

This simple list could/should just include the location name, long/lat obviously, maybe type/size of cache, terrain & difficulty, summary and description but strip out the html tags to minimise the size, last found hints/clues.

Also it would be good if the returned data could be gziped or in some way compressed to minimise download, and maximise speed etc, also the local app, regardless if its ours or another 3rd party app accessing the same API should then cache that information locally on the device, perhaps when a search is requested a time/date stamp could be sent with it indicating the last update/download and only locations that have been changed/created/deleted since that time/date stamp would be returned.

From there the user could be presented with a list of locations, and if needed a full list of logs could be pulled down as well, again some kind of time/date stamp could be used to only download logs that have been posted or edited since the last download.

It would be nice if there was someway to list gallery items and then be able to pull down images the same res as the mobile devices screen. So instead of loading a 1600x1200 photo of a spot, the server could resize the images to say 320x240 before sending them out, again this would speed up downloads and minimise how much is actually downloaded.

I'm just brain storming here but that's what has come to mind so far, although I'd welcome/appreciate feedback, especially from those with intimate knowledge of the database/website and if this is easy to implement and wouldn't require any major changes and what not.

User avatar
zactyl
Posts: 1171
Joined: 28 July 04 6:40 pm
Location: Mullumbimby, NSW

Post by zactyl » 24 October 08 1:20 am

delta_foxtrot2 wrote:
zactyl wrote:That sounds fantastic! It would be great to have something like Trimble Geocache Navigator that would work with Geocaching Australia caches! Trimble Navigator does a good job with Groundspeak caches, but it doesn't do GCA. :cry:
Something that doesn't cost US$6/mo would be even better in my opinion ;)
Definately better, though it's currently free on Nokia mobiles. I'd love to see you replace it with a program that does on the fly GCA cache lookup and navigation, with the ability to also take gpx files (for offline use, also makes it useable for Groundspeak caches).

User avatar
ideology
Posts: 2763
Joined: 28 March 03 4:01 pm
Location: Sydney
Contact:

Post by ideology » 24 October 08 2:38 am

there are already two xml interfaces that we know of: the google earth and google maps interfaces. the google earth network link spits out kml, which is probably not all that useful, but the google maps one spits out a nicely formatted xml list of caches surrounding a given point. you can see how it works by looking at the javascript at http://geocaching.com.au/cache/ga1248.gmap the code of interest is at GDownloadUrl("/caches/gmap_caches.php?lat="+center_lat+"&lon=" + center_lon + optionsURL,
so you can get some xml with http://geocaching.com.au/caches/gmap_ca ... 33&lon=151
this could easily be modified to provide whatever other info you require

Guest

Post by Guest » 24 October 08 9:45 am

zactyl wrote:Definately better, though it's currently free on Nokia mobiles. I'd love to see you replace it with a program that does on the fly GCA cache lookup and navigation, with the ability to also take gpx files (for offline use, also makes it useable for Groundspeak caches).
Well if we get it to deal with GPX files, which I'm told there is already XML parsing in the B* code, then sure.

Guest

Post by Guest » 24 October 08 9:48 am

ideology wrote:there are already two xml interfaces that we know of: the google earth and google maps interfaces. the google earth network link spits out kml, which is probably not all that useful, but the google maps one spits out a nicely formatted xml list of caches surrounding a given point. you can see how it works by looking at the javascript at http://geocaching.com.au/cache/ga1248.gmap the code of interest is at GDownloadUrl("/caches/gmap_caches.php?lat="+center_lat+"&lon=" + center_lon + optionsURL,
so you can get some xml with http://geocaching.com.au/caches/gmap_ca ... 33&lon=151
this could easily be modified to provide whatever other info you require
Yup, that looks pretty much what I had in mind. Will have a play with it and see what I can come up with etc, although server side compression, either gzip or deflate would be nice *hint hint* ;)

Not sure on the software you are running, apache 2 comes with a module to do this, apache 1 you can install mod_gzip

Actually, while that would be suitable for getting cache info etc, what about an API interface for logging finds and logging hides?

User avatar
mtrax
Posts: 1974
Joined: 19 December 06 9:57 am
Location: Weston Creek, Canberra

Post by mtrax » 24 October 08 1:04 pm

They used mod_compress on the oztivo site and save huge on downloads, it will be obviously useful for downloading large XML or GPX files.

Guest

Post by Guest » 24 October 08 1:56 pm

mtrax wrote:They used mod_compress on the oztivo site and save huge on downloads, it will be obviously useful for downloading large XML or GPX files.
I use compression on my servers and while the load increases a little, the download time decreases overall, which actually has the effect of decreasing load since the connection time is less ;)

User avatar
CraigRat
850 or more found!!!
850 or more found!!!
Posts: 7015
Joined: 23 August 04 3:17 pm
Twitter: CraigRat
Facebook: http://facebook.com/CraigRat
Location: Launceston, TAS
Contact:

Post by CraigRat » 24 October 08 3:43 pm

Server loading is our biggest issue at the moment, however when we go to the new hardware we can look at doing compression on the fly.

We'll have to work out a bit of a framework for the API as we will need to keep track of a few bits and bobs to ensure the integrity of the data and prevent misuse.

Post Reply