Friday, July 30, 2010

iPhone Location Browser with Latitude and Longitude

August 20th, 2008 by s

I’ve been working on a native iPhone version of Metosphere for a while, but after talking to several people I’ve decided to go in a slightly different direction. I’m about to submit this to the AppStore, but I wanted to bounce it off a larger audience first.

I’ve run into several web developers who want to make cool webapps for the iPhone using its location information.  Unfortunately, even though they’re killer web devs, there are several hurdles to overcome such as not having a Mac, needing to learn Objective C, obtaining a certificate, etc.

So I proposed we just create a generic, skeleton, native iPhone app that would access our websites using UIWebView and do all the heavy lifting on the web side.  A generic browser with a URL bar at the top but providing CoreLocation information to the website.  Essentially, like Safari but allowing the website access to location information.

This solved several of the issues we’d been thinking of:

  • We don’t all have to pay the SDK fee and spend weeks/months learning it.  Web developers can focus on web development.
  • Each of us doesn’t have to go through the hassle of creating an app, getting it approved, and maintaining it over time.  We can just share the generic browser/client.
  • The App Store is just going to get more crowded, I’m already getting tired of installing apps and uninstalling them right away.  A general location browser allows someone to quickly try out a site without having to find and download an app.

I’d like to see this project open-sourced, although there’s been a lot of confusion recently if that’s allowed with the current SDK agreement.

There are some folks working on similar concepts like PhoneGap and WebToNative, but I think there’s room for a completely simple solution like this.

Ideally, location information would be an option to expose within Safari, but I’m not convinced that will ever happen.  There are serious privacy issues if something like that were built into Safari, and it’s definitely not for most people. But there’s a subset of folks out there that have a use for something like Metosphere.  Kind of like the location info provided in Google Gears or  the Skyhook Firefox extension.

I was hoping to provide Lat/Long information to websites through HTTP headers, but that’s not available in UIWebView, so webpages that want location information from the Metosphere browser will need to include a simple Javascript function.

Here’s a summary of how this works:

  1. Install Metosphere on your iPhone (hope it gets approved!)
  2. Create a webpage with a Javascript function called updateLocation that looks something like this:
    <html><head>
    <script language=”javascript”>
    var latitude=0;    //these will be set when the Metosphere browser calls updateLocation()
    var longitude=0;function updateLocation(metoLat, metoLng){
    latitude=metoLat;
    longitude=metoLng;
    document.getElementById(“message”).innerHTML = “Your latitude=”+latitude + ” and longitude=” + longitude;
    //now do something cool with latitude and longitude set
    }
    </script></head>
    <body>
    <div id=”message”>Location not available</div>
    </body>
    </html>
  3. Enter your webpage’s URL in Metosphere’s location bar and your page should have access to the latitude and longitude.
    iphone latitudeiphone longitude
  4. Create a webpage/webapp that does something cool with this location information.

iphone native

Anyway, that’s the current direction for this project.  Some cool features to add down the road would be:

  • integration with Yahoo’s FireEagle
  • a setting to allow the browser to periodically update location info at set intervals
  • the ability to create extensions like Firefox

Posted in Location, Mobile, iphone | 6 Comments »

iPhone Location Browser

April 10th, 2008 by s

I often run into difficulty explaining the concept of Metosphere since I don’t always have my laptop with Android emulator at hand. So I whipped up an iPhone webapp that has similar functionality to the Android version.

I decided to focus on an iPhone webapp for now, since most people I know have unJailbroken iPhones. Thankfully, FireEagle handles the location info nicely. The backend is the same, so any geospatial information created in either the iPhone or Android version shows up in the same, um, metosphere.

Features:
- Create geotagged objects at your location (messages, alerts, events, reviews, etc.)
- View geotagged objects created by others in your proximity (list or map)
- List nearby events from Upcoming and Eventful
- List nearby geotagged Wikipedia pages
- I left out the GeoBlog functionality for now since that’s still in flux while I’m finalizing the forthcoming Android release.
- I used the CiUI iPhone UI instead of IUI because it seems faster.

Click here for Metosphere for iPhone

Some Screenshots:

iphoneiphone

iphone iphone

iphoneiphone

iphoneiphone

Posted in Location, iphone | 7 Comments »

Events on the horizon

March 25th, 2008 by s

Some interesting events over the next few months that I’m looking forward to.

March 26 WhereWednesday – Social Networking and Location (San Francisco)

April 2 SV-GTUG Mapping the Votes: Building Election Maps (Mountain View)

April 22-25 Web 2.0 (San Francisco)

May 12-14 Where 2.0 (Burlingame, CA)

May 17-18th WhereCamp (Mountain View, CA)

Posted in Location | No Comments »