SlideShare a Scribd company logo
1 of 51
Location Aware Browsing Aizat Faiz aizat.faiz@gmail.com http://www.flickr.com/photos/st3f4n/2860706946/ http://creativecommons.org/licenses/by/3.0/
http://www.flickr.com/photos/st3f4n/2860706946/ http://creativecommons.org/licenses/by/3.0/ Download and view at http://blog.aizatto.com/?p=3847
Creative Commons http://www.flickr.com/photos/st3f4n/2860706946/ http://creativecommons.org/licenses/by/3.0/
By Attribution http://www.flickr.com/photos/thevoicewithin/551651500/ http://creativecommons.org/licenses/by/3.0/
Aizat Faiz [email_address]
http://www.flickr.com/photos/willpate/111479065/
HTML 5 http://www.flickr.com/photos/willpate/111479236/
JavaScript http://www.flickr.com/photos/nyuhuhuu/3367743012/
HTML 5 introduces an API to interact with Geolocation services Interaction is done via JavaScript http://www.flickr.com/photos/mrbill/2481198023/
How does it find your location? Google Latitude GPS http://www.flickr.com/photos/sejhok/2343828092/
 
navigator.geolocation Geolocation API Specification http://dev.w3.org/geo/api/spec-source.html
JavaScript Object Geolocation API Specification http://dev.w3.org/geo/api/spec-source.html
2 kinds of variables 3 functions 2 kinds of callbacks Simple API http://dev.w3.org/geo/api/spec-source.html
Mozilla Firefox v3.5+ Browser Support Apple Safari 5 Google Chrome 5
http://dev.w3.org/geo/api/spec-source.html
2 Variables Coordinates Position http://dev.w3.org/geo/api/spec-source.html#api_description
http://dev.w3.org/geo/api/spec-source.html#api_description 3 Functions navigator.geolocation. getCurrentPosition navigator.geolocation. watchPosition navigator.geolocation. clearWatch
http://dev.w3.org/geo/api/spec-source.html#api_description 2 Callbacks Success Callback Error Callback
http://dev.w3.org/geo/api/spec-source.html#api_description Geolocation API Specification variables Coordinates Position functions navigator.geolocation.getCurrentPosition navigator.geolocation.watchPosition navigator.geolocation.clearWatch Callbacks  Success Callback Error Callback
http://dev.w3.org/geo/api/spec-source.html#api_description
http://dev.w3.org/geo/api/spec-source.html#api_description 2 Variables Coordinates Position
http://dev.w3.org/geo/api/spec-source.html#api_description JavaScript Objects
http://dev.w3.org/geo/api/spec-source.html#coordinates_interface
http://dev.w3.org/geo/api/spec-source.html#coordinates_interface Coordinates
http://dev.w3.org/geo/api/spec-source.html#coordinates_interface Describe location Coordinates
http://dev.w3.org/geo/api/spec-source.html#coordinates_interface Coordinates ,[object Object]
Longitude
Accuracy ,[object Object]
AltitudeAccuracy
Heading
Speed
http://dev.w3.org/geo/api/spec-source.html#coordinates_interface Coordinates Description Variable Name Latitude coordinates.latitude Longitude coordinates.longitude Accuracy coordinates.accuracy Altitude coordinates.altitude Altitude Accuracy coordinates.altitudeAccuracy Heading coordinates.heading Speed coordinates.speed
http://dev.w3.org/geo/api/spec-source.html#position_interface
http://dev.w3.org/geo/api/spec-source.html#position_interface Position
http://dev.w3.org/geo/api/spec-source.html#position_interface Describes Time and Location Position
http://dev.w3.org/geo/api/spec-source.html#position_interface Position Timestamp and  Coordinates
http://dev.w3.org/geo/api/spec-source.html#position_interface Position Description Variable Name Coordinates position.coordinates Timestamp position.timestamp
http://dev.w3.org/geo/api/spec-source.html#position_interface Coordinates and Position Coordinates Position coordinates.latitude position.coordinates coordinates.longitude position.timestamp coordinates.accuracy coordinates.altitude coordinates.altitudeAccuracy coordinates.heading coordinates.speed
http://dev.w3.org/geo/api/spec-source.html#get-current-position
http://dev.w3.org/geo/api/spec-source.html#get-current-position navigator.geolocation.getCurrentPosition
http://dev.w3.org/geo/api/spec-source.html#get-current-position navigator.geolocation.getCurrentPosition Returns current  Position
JavaScript Implementation
navigator.geolocation.getCurrentPosition
navigator.geolocation.getCurrentPosition ① ③ ② ①   browser object ②  function call ③  success callback
navigator.geolocation.getCurrentPosition
HTML and JavaScript Implementation
navigator.geolocation.getCurrentPosition
navigator.geolocation.getCurrentPosition if  condition is required, in case browser does not support geolocation
Your browser will try to request permissions to determine your location
Mozilla Firefox v3.5+

More Related Content

Similar to Location Aware Browsing

Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012Atlassian
 
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on RailsUsing ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on RailsDave Bouwman
 
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...Sébastien Levert
 
Building Skyscrapers with our Scholarship
Building Skyscrapers with our ScholarshipBuilding Skyscrapers with our Scholarship
Building Skyscrapers with our ScholarshipHeather Piwowar
 
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...Crossref
 
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...Sébastien Levert
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...Crossref
 
Ferramentas de apoio ao desenvolvedor
Ferramentas de apoio ao desenvolvedorFerramentas de apoio ao desenvolvedor
Ferramentas de apoio ao desenvolvedorLuciano Filho
 
SharePoint and Office Development Workshop
SharePoint and Office Development WorkshopSharePoint and Office Development Workshop
SharePoint and Office Development WorkshopEric Shupps
 
Building Rackspace Cloud Monitoring
Building Rackspace Cloud MonitoringBuilding Rackspace Cloud Monitoring
Building Rackspace Cloud Monitoringgdusbabek
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentAizat Faiz
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsStormpath
 
Firefox 4 & web
Firefox 4 & webFirefox 4 & web
Firefox 4 & webdynamis
 
Firefox 4 and Web
Firefox 4 and WebFirefox 4 and Web
Firefox 4 and Webdynamis
 
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...Sébastien Levert
 
Rest experience-report
Rest experience-reportRest experience-report
Rest experience-reportJim Barritt
 

Similar to Location Aware Browsing (20)

YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012YQL - HackU IIT Madras 2012
YQL - HackU IIT Madras 2012
 
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
Mobile Dev Trends and Confluence Mobile, AtlasCamp US 2012
 
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on RailsUsing ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
 
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
SharePoint Fest DC 2018 - Everything your need to know about the Microsoft Gr...
 
Building Skyscrapers with our Scholarship
Building Skyscrapers with our ScholarshipBuilding Skyscrapers with our Scholarship
Building Skyscrapers with our Scholarship
 
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...
2013 CrossRef Annual Meeting Building Skyscrapers With Our Scholarship Heathe...
 
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
SharePoint Fest DC - Everything your need to know about the Microsoft Graph a...
 
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
CrossRef How-to: A Technical Introduction to the Basics of CrossRef, Chuck Ko...
 
Ferramentas de apoio ao desenvolvedor
Ferramentas de apoio ao desenvolvedorFerramentas de apoio ao desenvolvedor
Ferramentas de apoio ao desenvolvedor
 
SharePoint and Office Development Workshop
SharePoint and Office Development WorkshopSharePoint and Office Development Workshop
SharePoint and Office Development Workshop
 
Building Rackspace Cloud Monitoring
Building Rackspace Cloud MonitoringBuilding Rackspace Cloud Monitoring
Building Rackspace Cloud Monitoring
 
Locate your hacks
Locate your hacksLocate your hacks
Locate your hacks
 
Hacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT BombayHacking location aware hacks HackU IIT Bombay
Hacking location aware hacks HackU IIT Bombay
 
Beginning WordPress Plugin Development
Beginning WordPress Plugin DevelopmentBeginning WordPress Plugin Development
Beginning WordPress Plugin Development
 
Design Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIsDesign Beautiful REST + JSON APIs
Design Beautiful REST + JSON APIs
 
Firefox 4 & web
Firefox 4 & webFirefox 4 & web
Firefox 4 & web
 
Firefox 4 and Web
Firefox 4 and WebFirefox 4 and Web
Firefox 4 and Web
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware apps
 
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
SPS Utah - Everything your need to know about the Microsoft Graph as a ShareP...
 
Rest experience-report
Rest experience-reportRest experience-report
Rest experience-report
 

More from Aizat Faiz

Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social PluginsAizat Faiz
 
The Age of Collaboration
The Age of CollaborationThe Age of Collaboration
The Age of CollaborationAizat Faiz
 
Read Write Culture
Read  Write  CultureRead  Write  Culture
Read Write CultureAizat Faiz
 
Free and Open Source Software Society Malaysia
Free and Open Source Software Society MalaysiaFree and Open Source Software Society Malaysia
Free and Open Source Software Society MalaysiaAizat Faiz
 

More from Aizat Faiz (6)

Facebook Social Plugins
Facebook Social PluginsFacebook Social Plugins
Facebook Social Plugins
 
The Age of Collaboration
The Age of CollaborationThe Age of Collaboration
The Age of Collaboration
 
Read Write Culture
Read  Write  CultureRead  Write  Culture
Read Write Culture
 
Ruby on Rails
Ruby on RailsRuby on Rails
Ruby on Rails
 
Free and Open Source Software Society Malaysia
Free and Open Source Software Society MalaysiaFree and Open Source Software Society Malaysia
Free and Open Source Software Society Malaysia
 
Ruby
RubyRuby
Ruby
 

Location Aware Browsing