Building location aware websites

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    3 Favorites

    Building location aware websites - Presentation Transcript

    1. Building location aware websites Paul Hagon
    2. @paulhagon
    3. W3C geolocation specification ... define a secure and privacy-sensitive interface for using client-side location information in location-aware Web applications. http://www.w3.org/2008/geolocation/
    4. IP address inaccurate Wi-Fi Triangulation GPS accurate
    5. Built in GPS
    6. Applications - Objective C
    7. Firefox 3.5 iPhone OS 3.0
    8. Opera Fennec
    9. Google Gears
    10. Privacy User is alerted before sending their location
    11. Privacy IP address Access point Random client identifier http://www.google.com/privacy-lsf.html http://www.skyhookwireless.com/howitworks/privacy.php
    12. Starting out <script type="text/javascript"> function findLocation() {            } </script>
    13. Make geolocation call <script type="text/javascript"> function findLocation() {        navigator.geolocation.getCurrentPosition();    } </script>
    14. Success <script type="text/javascript"> function findLocation() {        navigator.geolocation.getCurrentPosition(successCallback);    } function successCallback(position) { } </script>
    15. Get the latitude & longitude <script type="text/javascript"> function findLocation() {       navigator.geolocation.getCurrentPosition(successCallback);   } function successCallback(position) {   var lat = position.coords.latitude;   var lon = position.coords.longitude;    } </script>
    16. Do something <script type="text/javascript"> function findLocation() {       navigator.geolocation.getCurrentPosition(successCallback);   } function successCallback(position) {   var lat = position.coords.latitude;   var lon = position.coords.longitude;   alert("latitude: " + lat + ", longitude: " + lon); } </script>
    17. Error handling <script type="text/javascript"> function findLocation() {        navigator.geolocation.getCurrentPosition(successCallback,errorCallback);    } function successCallback(position) {   var lat = position.coords.latitude;   var lon = position.coords.longitude;   alert("latitude: " + lat + ", longitude: " + lon); } function errorCallback() {   // Do something with the error } </script>
    18. Error handling <script type="text/javascript"> function findLocation() {   if(navigator.geolocation) {     navigator.geolocation.getCurrentPosition(successCallback,errorCallback);   } else {     // Do something to alert the user   } } function successCallback(position) {   var lat = position.coords.latitude;   var lon = position.coords.longitude;   alert("latitude: " + lat + ", longitude: " + lon); } function errorCallback() {   // Do something with the error } </script>
    19. Finished script <script type="text/javascript"> function findLocation() {   if(navigator.geolocation) {     navigator.geolocation.getCurrentPosition(successCallback,errorCallback);   } else {     // Do something to alert the user   } } function successCallback(position) {   var lat = position.coords.latitude;   var lon = position.coords.longitude;   alert("latitude: " + lat + ", longitude: " + lon); } function errorCallback() {   // Do something with the error } </script>
    20. Reverse geocoding Take a latitude and longitude and return an address -35.300114,149.132726 Parkes ACT 2620, Australia
    21. Parkes Parkes, ACT Parkes, NSW Henry Parkes
    22. Yahoo Placemaker Extracts location information from text or a URL http://developer.yahoo.com/geo/placemaker/
    23. Parkes Australia Name Type WOE ID Latitude Longitude Parkes, New Town 1104910 -33.1369 148.175 South Wales, AU Parkes, Canberra, Suburb 7225344 -35.3028 149.129 Australian Capital Territory, AU
    24. Open Australia Repurposing Australian Hansard so people can keep track of their representatives http://www.openaustralia.org/
    25. http://www.openaustralia.org/debates/?id=2009-06-23.8.1 Match Real name Type WOE ID Latitude Longitude Melbourne Melbourne, Town 1103816 -37.8175 144.967 Victoria, AU Warringah Warringah, County 55864177 -33.7033 151.25 New South Wales, AU North Sydney North Sydney, Suburb 1107124 -33.8399 151.208 Sydney, New South Wales, AU
    26. Can I use this yet? YES
    27. within 1 week 50% upgraded to iPhone OS 3.0 (iPhone 0.1% of traffic to NLA)
    28. For NLA - Firefox 3.5 is around 1% of users (2nd most popular version of Firefox)
    29. More than 95% of the NLA users have the potential to use these features if they install Google Gears
    30. Thanks! slideshare.net/paulhagon delicious.com/paulhagon/wsg09 www.paulhagon.com @paulhagon phagon@nla.gov.au

    + Paul HagonPaul Hagon, 4 months ago

    custom

    805 views, 3 favs, 1 embeds more stats

    A presentation given to the Canberra Web Standards more

    More info about this document

    CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

    Go to text version

    • Total Views 805
      • 694 on SlideShare
      • 111 from embeds
    • Comments 0
    • Favorites 3
    • Downloads 8
    Most viewed embeds
    • 111 views on http://www.paulhagon.com

    more

    All embeds
    • 111 views on http://www.paulhagon.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories