W3C Geolocation API - Making Websites Location-aware
Upcoming SlideShare
Loading in...5
×
 

W3C Geolocation API - Making Websites Location-aware

on

  • 32,863 views

my slides from the Web 2.0 Expo session on the W3C Geolocation API

my slides from the Web 2.0 Expo session on the W3C Geolocation API

Statistics

Views

Total Views
32,863
Views on SlideShare
31,335
Embed Views
1,528

Actions

Likes
19
Downloads
379
Comments
2

23 Embeds 1,528

http://www.web2expo.com 772
http://www.wat-betekent.nl 480
http://www.slideshare.net 172
https://www.wat-betekent.nl 46
http://watbetekent.eu 9
https://twitter.com 7
http://translate.googleusercontent.com 6
http://comeandseeafrica.blogspot.com 6
http://static.slidesharecdn.com 5
http://www.google.nl 4
http://www.e-presentations.us 4
http://picometric.blogspot.com 4
http://www.wat-betekent.be 2
http://hazdat.com 2
http://wat-betekent.be 1
http://www.watbetekent.eu 1
http://www.web2expo.com.ezp.lib.rochester.edu 1
http://209.85.229.132 1
https://si0.twimg.com 1
http://picometric.blogspot.fr 1
http://webcache.googleusercontent.com 1
http://www.posteezy.com 1
https://romy1.basecamphq.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • www.giite.com

    We provide various Online & Classroom courses to help you achieve your goals.
    GIITE Training is the fastest way to match you with IT market Industry, whether you want to learn from home or take virtual classes,
    You will find the ultimate in convenience and instructions when you understand the benefits of our training program.
    It is known that the field of IT training has been a fast growing area of expertise in recent years, In order to keep up and adjust to its expansion in the technology world, verity of IT Training courses have been developed and IS now being offered to yo
    Are you sure you want to
    Your message goes here
    Processing…
  • Nice overview thanks. When I worked at MapQuest back in the day one very important issue that MapQuest couldn't solve was customer feedback of the form 'That's not my beautiful house' when our geolocater got it wrong, we could not correct it. How do we put customer feedback into these systems?
    Do any allow me to update the geolocation of my wifi when I move to a new city?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • - who here runs a website? <br /> - who here uses location of some kind on their website? <br /> - mobile? <br />
  • - who here already knows Skyhook? <br />
  • - its important that you can leave here <br />
  • - leave lots of time for questions at the end <br />
  • - location is a proxy to lots of metadata - rich demographic data <br /> - context about the physical surroundings of the user <br /> - events they might be at <br /> - nearby POIs <br /> - time of day, weather <br />
  • - the more context you have the more relevant the experience you can delivery <br /> <br />
  • - deliver the most highly relevant experience to your users <br /> - use most accurate location available <br /> <br />
  • - so lets define “location” <br /> - what does that mean? <br />
  • - going to become important that sites can work with lat/lon <br /> - w3c api will always deliver you a lat/lon <br /> - start to architect your apps to store lat/lon as well <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • - anyone here use brightkite or foursquare? <br /> - disambiguate lat/lon into something meaningful. business names are great <br /> - also consider using custom place names <br />
  • <br />
  • - some location information is only relevant to nearby users <br /> - placenames, neighborhoods <br /> - add higher-level context for other users <br />
  • - maps can be a misnomer bc users dont always want to share exact location <br /> - EXAMPLE: user is in San Francisco -- where do you put the marker? <br /> - consider text display <br />
  • - Here is a video of BrightKite using auto-location <br /> - gives you a feel for how other sites are doing it <br />
  • - relevancy. too much noise, not enough signal <br /> - location is a piece of metadata that can make the entire web more relevant <br /> - better user experience <br /> - geotag photos, share location on social networks, local search, local news <br />
  • - Lets take a store finder as an example <br /> - each dot represents a Dunkin Donuts in Boston <br /> - if you ask a user to tell you where they are, they will say “boston” or “02218” <br /> - using precise location allows you to instantly show them the correct location and start to route them there <br />
  • - A lot has changed in one year, since i was here last <br /> - last year i was talking about the how it was coming together and some tools <br /> - now, W3C working group and 3 major browser vendors you can download today <br />
  • - Loki was launched at Where 2.0 in 2006 <br /> - toolbar to get skyhook’s technology into the browser <br /> - eventually made a javascript API to the toolbar <br />
  • - May 2006 <br /> - i realized the only way for this to grow was to get consensus among browser vendors <br /> - needed to evangelize the idea of location on the web <br /> - no one knew you could make a laptop a gps-like device <br /> - pre iPhone <br />
  • - google picked it up, added it to Gears <br /> - started with cell positioning for mobile devices <br /> - created their own Javascript API <br />
  • - June 2008 <br /> - standardize the way geolocation is exposed through the browser <br /> <br />
  • - all major vendors are involved <br /> - already getting to draft <br /> - KISS <br />
  • “its all coming together” <br />
  • - bold proclamation <br /> - location was always the technology of next year, well its finally next year <br /> - desktops, laptops and netbooks will all be location enabled <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • - accuracy is directly proportional to cell size <br /> - gps, wps = street address accuracy <br /> - cell = neighborhood / city accuracy <br />
  • <br />
  • <br />
  • <br />
  • - instead of waiting for all the browsers, add it now <br /> - cross platform, cross browser <br /> - on MapQuest.com/findme <br />
  • <br />
  • - Wi-Fi positioning is primary, IP as a fallback <br />
  • <br />
  • - REALLY this simple to add location to your website <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • enableHighAccuracy will probably change <br />
  • do this to save a new location request. power friendly <br /> position &lt;= 5 minutes <br /> timeout:0 = return cached position <br />
  • do this to save a new location request. power friendly <br /> position &lt;= 5 minutes <br /> timeout:0 = return cached position <br />
  • - if you are looking to get more involved in geo, there are some great events to attend <br />
  • <br />

W3C Geolocation API - Making Websites Location-aware W3C Geolocation API - Making Websites Location-aware Presentation Transcript

  • W3C Geolocation API Making Websites Location-aware Wednesday, April 1, 2009
  • me • Director of Consumer Products at Skyhook Wireless • Founded Locationaware.org which eventually became W3C Geolocation API Working Group • Follow @rsarver to get the SlideShare link for slides after I post them Wednesday, April 1, 2009
  • practical tools to allow you to add location capabilities to your website today Wednesday, April 1, 2009
  • What is Geolocation? History of Geolocation on the web Current State of the Union Location Technologies Code Examples Questions Wednesday, April 1, 2009
  • location = context Wednesday, April 1, 2009
  • higher context = relevancy Wednesday, April 1, 2009
  • higher location = relevancy Wednesday, April 1, 2009
  • location comes in many flavors Wednesday, April 1, 2009
  • 37.78467, -122.40162 Wednesday, April 1, 2009
  • Wednesday, April 1, 2009
  • 747 Howard St, San Francisco, CA Wednesday, April 1, 2009
  • 4th St & Howard St Wednesday, April 1, 2009
  • Soma Wednesday, April 1, 2009
  • Pete’s Coffee Wednesday, April 1, 2009
  • Business Search APIs • Yahoo Local Search API • Yelp API • Localeze - sells business listing information • small businesses are tough, no db is totally complete Wednesday, April 1, 2009
  • how you display it can be used as a way of blurring location Wednesday, April 1, 2009
  • Ryan checked into The Mission Wednesday, April 1, 2009
  • map markers can be misleading when dealing with user’s location ... maybe use text instead Wednesday, April 1, 2009
  • Wednesday, April 1, 2009
  • Wednesday, April 1, 2009
  • so, why should I use it? Wednesday, April 1, 2009
  • Wednesday, April 1, 2009
  • HISTORY a lot has changed in a year Wednesday, April 1, 2009
  • Wednesday, April 1, 2009
  • locationaware.org Wednesday, April 1, 2009
  • Google Gears Wednesday, April 1, 2009
  • W3C Geolocation API Wednesday, April 1, 2009
  • coalition of the willing Wednesday, April 1, 2009
  • state of the union http://www.flickr.com/photos/xrrr/2478140383/ Wednesday, April 1, 2009
  • 2009 is the year of location in the Browser Wednesday, April 1, 2009
  • • Geode Extension in Mozilla Labs. Powered by Skyhook • W3C Geolocation API support natively in 3.1 (now called 3.5) • Opera Labs release with W3C Geolocation API support. Powered by Skyhook • Support in Chrome for Windows and Android Wednesday, April 1, 2009
  • http://bit.ly/mozilla-geode http://bit.ly/opera-geolocation http://google.com/chrome Wednesday, April 1, 2009
  • Location Technologies Wednesday, April 1, 2009
  • Two primary methods 1. IP Geolocation 2. Triangulation • GPS • Wi-Fi • Cell Tower Wednesday, April 1, 2009
  • IP Geolocation Pros • Widely available • Detection happens server-side Cons • Only accurate to the city-level • Only in the right state 85% of the time • Costly • Produces false positives Wednesday, April 1, 2009
  • IP Geolocation Vendors • MaxMind - http://www.maxmind.com • Has a free database - GeoLite City • Quova - http://www.quova.com • IPligence - http://www.ipilgence.com • IP2Location - http://www.ip2location.com Wednesday, April 1, 2009
  • Triangulation GPS 10 m Wi-Fi 20 m Cell Tower 1000 m Wednesday, April 1, 2009
  • GPS Pros • Accurate after it gets a fix • Highly accurate in rural area Cons • Doesn’t work indoors • Difficulty with Urban Canyons • Long Time to First Fix Wednesday, April 1, 2009
  • Wi-Fi Triangulation Wednesday, April 1, 2009
  • Wi-Fi Positioning (WPS) Pros • Accurate • Works indoors and in Urban Areas • Quick Time to First Fix • Software-only, leverages existing Wi-Fi Cons • Doesn’t work well in rural areas Wednesday, April 1, 2009
  • • Cross-platform, cross-browser plugin for adding geolocation to any website • Locate a user down to their exact street address with a few lines of javascript • http://loki.com/how • </plug> Wednesday, April 1, 2009
  • Cell Triangulation Pros • Works where there is cell coverage (most areas) • Quick Time to First Fix • Software-only, leverages existing cellular radio Cons • Very inaccurate Wednesday, April 1, 2009
  • short answer hyrbid is the way Wednesday, April 1, 2009
  • W3C Geolocation API ... shut up and get to the code Wednesday, April 1, 2009
  • Single shot lookup navigator.geolocation.getCurrentPosition(function(pos){ //show map at (pos.coords.latitude, pos.coords.longitude) }); Wednesday, April 1, 2009
  • Position & Coordinates Objects interface Position { readonly attribute Coordinates coords; readonly attribute DOMTimeStamp timestamp; }; interface Coordinates { readonly attribute double latitude; readonly attribute double longitude; readonly attribute double altitude; readonly attribute double accuracy; readonly attribute double altitudeAccuracy; readonly attribute double heading; readonly attribute double speed; }; Wednesday, April 1, 2009
  • Single shot lookup w/ callbacks function showMap(pos) { //show map at pos.coords.latitude, pos.coords.longitude } function showError(err) { alert(err.message + ‘, ’ + err.code); } navigator.geolocation.getCurrentPosition(showMap, showError); Wednesday, April 1, 2009
  • PositionError Object interface PositionError { const unsigned short UNKNOWN_ERROR = 0; const unsigned short PERMISSION_DENIED = 1; const unsigned short POSITION_UNAVAILABLE = 2; const unsigned short TIMEOUT = 3; readonly unsigned short code; readonly DOMString message; }; Wednesday, April 1, 2009
  • Single shot lookup w/ callbacks & options function showMap(pos) { //show map at pos.coords.latitude, pos.coords.longitude } function showError(err) { alert(err.message + ‘, ’ + err.code); } navigator.geolocation.getCurrentPosition(showMap, showError, {enableHighAccuracy:true}); Wednesday, April 1, 2009
  • PositionOptions interface PositionOptions { attribute boolean enableHighAccuracy; attribute long timeout; attribute long maximumAge; }; Wednesday, April 1, 2009
  • Single shot lookup w/ cached position function showMap(pos) { //show map at pos.coords.latitude, pos.coords.longitude } function showError(err) { alert(err.message + ‘, ’ + err.code); } navigator.geolocation.getCurrentPosition(showMap, showError, {maximumAge:300000, timeout:0}); Wednesday, April 1, 2009
  • Periodic lookup w/ callbacks function moveMap(pos) { //update map to pos.coords.latitude, pos.coords.longitude } function showError(err) { alert(err.message + ‘, ’ + err.code); } // Track location with periodic updates watchId = navigator.geolocation.watchPosition(moveMap, showError); function stopTracking() { navigator.geolocation.clearWatch(watchId); } Wednesday, April 1, 2009
  • Upcoming Geo Events • Where 2.0 San Jose, CA May 19th - 21st • WhereCamp San Francisco, CA May 23rd - 24th Wednesday, April 1, 2009
  • Questions? tweet @rsarver with questions as well Wednesday, April 1, 2009