adding "where" to mobile and web applications
DESCRIPTION
Web 2.0 Expo 2008 Session Slides"Adding 'Where' to Mobile and Web Applications"Ryan Sarver (Skyhook Wireless / Loki)TRANSCRIPT
Adding “Where” to Mobile and Web
Applications1Wednesday, April 23, 2008
me
Ryan Sarver
Director of Consumer Products
Skyhook Wireless / Loki
http://loki.com
http://skyhookwireless.com
http://sarver.org
http://linkedin/in/rsarver
2Wednesday, April 23, 2008
practical tools to allow you to add
location capabilities to your website or app
today
3Wednesday, April 23, 2008
sarver.org for links after session
4Wednesday, April 23, 2008
location = context
5Wednesday, April 23, 2008
context = higher relevancy
6Wednesday, April 23, 2008
location = higher relevancy
7Wednesday, April 23, 2008
location comes in many flavors
8Wednesday, April 23, 2008
42.2817, -71.18279
9Wednesday, April 23, 2008
Polygons
10Wednesday, April 23, 2008
747 Howard StSan Francisco, CA
11Wednesday, April 23, 2008
Howard St & 3rd St
12Wednesday, April 23, 2008
South of Market
13Wednesday, April 23, 2008
how you display it can be used as a way of
blurring location
14Wednesday, April 23, 2008
markers in maps can be difficult when dealing with exposed location
15Wednesday, April 23, 2008
Ryan checked into Soma, San
Francisco, CA
16Wednesday, April 23, 2008
Sharing Location with
Friendshttp://my.loki.com
17Wednesday, April 23, 2008
1. Offer everything you can
2. Degrade gracefully
3. Allow the user to change it
Know your users, know your use cases!
Geotargeting Rules of Thumb
18Wednesday, April 23, 2008
yoursite.com ?lat=&lng=
Tip!
19Wednesday, April 23, 2008
where does location happen?
client & network
20Wednesday, April 23, 2008
Mobile
Web Apps
Laptop
Location Broker(FireEagle)
Mobile
Web Apps
Laptop
asynchronous
many locations in,one location out
21Wednesday, April 23, 2008
22Wednesday, April 23, 2008
<?php$fe = new FireEagle( $fe_key, $fe_secret, $_SESSION['access_token'], $_SESSION['access_secret']);
$r = $fe->update(array(‘q’ => ‘san francisco, ca’));
$loc = $fe->user();foreach ($loc->user->location_hierarchy as $location) { echo $location->latitude.", ".$location->longitude;}?>
FireEagle Pseudo
23Wednesday, April 23, 2008
Desktop Web Profile
• Stationary sessionssingle location lookups
• IndoorsGPS and Cell Tower don’t work
• Easier data entry
• More complex data can be displayed
24Wednesday, April 23, 2008
Mobile Profile
• Transient sessionssingle location and continuous
• Indoors and OutdoosIP doesn’t work
• Difficult data entryminimize the amount typed
• Small screen size, low computing power, be “power-aware”
25Wednesday, April 23, 2008
Geolocation Methods
1.Triangulate2.Associate3.Geo Term Extraction4.Data Entry / Geocoding
26Wednesday, April 23, 2008
Triangulation
Determine position of an unknown object relative to known objects
• Wi-Fi
• GPS
• Cell Tower27Wednesday, April 23, 2008
1 meter
20 meter
2,000 meter
GPS
Wi-Fi
Cell Tower28Wednesday, April 23, 2008
San Francisco Wi-Fi
29Wednesday, April 23, 2008
Wi-FiLoki Javascript API
http://loki.com/developers
http://loki.com/developers/documentation
30Wednesday, April 23, 2008
GPS (sideload)Garmin Communicator
Pluginhttp://www.garmin.com/products/communicator/
http://developer.garmin.com/web-device/garmin-
communicator-plugin/
31Wednesday, April 23, 2008
Association
32Wednesday, April 23, 2008
Association
• Match an IP Address to a physical location
• Not an exact science
• Best for city-level geotargeting
• False positives and in the correct state only ~85%
33Wednesday, April 23, 2008
IP Geolocation
Quovahttp://www.quova.com
ip2locationhttp://www.ip2location.com
MaxMindhttp://www.maxmind.com
34Wednesday, April 23, 2008
Geo Term Extraction
Resolve an arbitrary string into a geographical point or area:
“food in cambridge” = “food” in “Cambridge, Massachusetts, USA”
MetaCarta Query Parser APIhttp://ondemand.metacarta.com/?method=QueryParser
Urban Mapping GeoModshttp://urbanmapping.com/geomods/index.html
35Wednesday, April 23, 2008
Geocoding
Resolve a geographically-based string into a geographical point or area
36Wednesday, April 23, 2008
Geocoding
• Geonames Webserviceshttp://www.geonames.org/export/
• Google Geocoder Classhttp://code.google.com/apis/maps/documentation/services.html#Geocoding
• Yahoo Geocoding APIhttp://developer.yahoo.com/maps/rest/V1/geocode.html
• Geocoder.ushttp://geocoder.us/
37Wednesday, April 23, 2008
Location in the Browser
• LocationAware.orgSession at Where 2.0http://www.locationaware.org
• W3C Web APIhttp://www.w3.org/2006/webapi/
navigator.getGeolocation()
38Wednesday, April 23, 2008
Mobile Location
39Wednesday, April 23, 2008
Mobile Location APIs
• iPhone Core Location APIWi-Fi, Cell Tower
• Symbian S60 Location APIGPS, A-GPS
• J2ME JSR-179GPS, device-specific
40Wednesday, April 23, 2008
@implementation MyLocationGetter
- (void)startUpdates{ if (nil == locationManager) locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self; locationManager.distanceFilter = 1000; // 1 kilometer locationManager.desiredAccuracy = kCLLocationAccuracyKilometer; [locationManager startUpdatingLocation];
}
41Wednesday, April 23, 2008
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ // Disable future updates to save power. [manager stopUpdatingLocation];
printf("latitude %+.6f, longitude %+.6f\n", newLocation.coordinate.latitude, newLocation.coordinate.longitude);}
http://forums.macrumors.com/showthread.php?t=455767
42Wednesday, April 23, 2008
Other APIs / Platforms
• Skyhook SDKWinMo, S60, Linux, XP, Vista, OSXhttp://www.skyhookwireless.com/developers
• WHERE WidgetsAT&T, Sprint, Alltel, MetroPCShttp://developer.where.com/
43Wednesday, April 23, 2008
Skyhook Example int main(int argc, char *argv[]) { WPS_SimpleAuthentication authentication; authentication.username = argv[1]; authentication.realm = argv[2]; WPS_Location* location; int rc = WPS_location(&authentication,
WPS_NO_STREET_ADDRESS_LOOKUP, &location);
if (rc == WPS_OK) printf("%f, %f\n", location->latitude, location->longitude); WPS_free_location(location); return 0; }
44Wednesday, April 23, 2008
Cell Tower
• Zone Tag (yahoo)http://developer.yahoo.com/yrb/zonetag/
• OpenCellIDhttp://www.opencellid.org
• CellDBhttp://celldb.org/
45Wednesday, April 23, 2008
Upcoming Events
• Where 2.0Burlingame, CAMay 12th - 14th
• WhereCampMountain View, CAMay 17th - 18th
46Wednesday, April 23, 2008
Questions?
47Wednesday, April 23, 2008