Question

I was wondering if I could access the iPhones Core Location framework over a website?

My goal is to build a webapp/website that the iPhone would browse to, then upload its current GPS location. This would be a simple site primary for friends/family so we could locate each other. I can have them manually enter lng/lat but its not the easiest thing to find. If the iPhone could display or upload this automatically it would be great.

I don't own a Mac yet (waiting for the new Mac Book Pro) but would like something a little more automatic right now. Once I have the mac I could download the SDK and build a better version later. For now a webapp version would be great if possible. Thanks.

Was it helpful?

Solution

Why not simply use W3C GeoLocation API available in mobile Safari? This will work on ipod touch as well (suburb precision).

It's literally 10 lines of code and the javascript will work without change on Firefox 3.5. Far easier than scrape some third party website.

OTHER TIPS

http://www.instamapper.com/iphone

iPhone App store

While this may not directly answer your question, there are quite a few iPhone apps that already do this kind of thing with GPS. Instamapper is the first one I pulled up from the app store, but I'm sure you could find something to fit your needs.

I'm pretty sure you can't do what you want directly.

The best idea I can come up with is to "reuse" an iPhone app that records location and makes it accessible on the web. Take Twitter for example. If I'm not mistaken, Tapulous' app Twinkle will grab your location and post it to your Twitter.com user profile. Here's an example of what that looks like:

iPhone location

From your webapp, you could then scrape the user page for each person whose location you're interested in. It's a pain in the butt, but like I said, this is the best I could come up with.

Again, if you don't want to mess with Twitter, there may be other apps out there that do this as well, but I don't personally know of any. Good luck.

We built a really thin iphone client app that simply calls a predefined .js file on our site. Works like a charm.

See arisgames.org for the project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top