CHAP 4. GEOLOCATION API.  You can request users to share their location and, if they agree, you can provide them with instructions on how to get to a.

Slides:



Advertisements
Similar presentations
Location based services
Advertisements

HTML 5 – GeoLocation and Maps. Geolocation API What is a ”geolocation”…? A geographical location, defined in terms of – Latitude (north/south) – Longitude.
Tracking & Login Data persistence User tracking.
Sensors. Point your phone at the sky, and Google Sky Map tells you which stars you’re looking at. Tilt your phone, and you can control the game you’re.
Apple iPhone. Visual Voic allows you to go directly to any of your messages without listening to the prior messages. So you can quickly select the.
GOOGLE’S “MY LOCATION” By Rebecca Crooks. My Location  What is it?  How does it work?  Who can use it?  Advantages of My Location  Disadvantages.
Geolocation Frances Ho.  The identification of the real-world location of an object. What is it? 35°55 ′ 44 ″ N 79°2 ′ 22 ″ W.
Location & Maps.  Mobile applications can benefit from being location-aware, e.g.,  Routing from a current to a desired location  Searching for stores.
Google AppInventor implementation quickstart Chris Greenhalgh G54UBI / Chris Greenhalgh
Geo Using a device’s location as an input. Why Because the user might not know where they are Because typing is the worst on small devices.
Electrical and Computer Engineering PeopleFinder Vitaly Gordievsky Alex Trefonas Scott Richard Matt Beckford Comprehensive Design Review.
© 2009 Research In Motion Limited Introduction to GPS and Wi-Fi technology on BlackBerry smartphones.
CHAPTER 26 CREATING LOCATION-AWARE WEBPAGES USING GEOLOCATION.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved BUSINESS PLUG-IN B21 Mobile Technology.
Local Positioning Mike Overy Chair Local Positioning WG Local Positioning v5.ppt #1 Mike Overy.
Pervasive Computing MIT SMA 5508 Spring 2006 Larry Rudolph 1 Location Again Location API’s and Room-Size Location Feb 28, 2006 Larry Rudolph.
Finding Nearby Wireless Hotspots CSE 403 LCA Presentation Team Members: Chris Scoville Tessa MacDuff Matt Mohebbi Aiman Erbad Khalil El Haitami.
Wireless Networks. Why go wireless? C Don’t have to be tied to a N, furniture or infrastructure Can retrieve , access the Internet, a corporate database.
AS ICT.  A portable communication device is a pocket sized device that is carried around by an individual  They typically have a display screen with.
PRO HTML5 PROGRAMMING POWERFUL APIS FOR RICHER INTERNET APPLICATION DEVELOPMENT.
Serving Sociologists | Advancing Sociology | Promoting Sociology to Society Geolocation.
Geolocation with ColdFusion Oğuz Demirkapı CTO | NicheClick Media.
BY LINDA MOHAISEN MIKE ZIELINSKI The Tree Census Project.
HTML5 GEOLOCATION AND SHAREPOINT GEOLOCATION What is Geolocation? How easy it is to use this service? Can we do something without Javascript?
Presenter: PhuongNQK. Goals Introduce HTML5 basics with some cool demos.
UNIT 10 LINKS AND GEOLOCATION. OBJECTIVES  CO1 Describe various components of the Open Web Platform.  CO2 Create a website using HTML5.  CO3 Create.
Location-Based API 1. 2 Location-Based Services or LBS allow software to obtain the phone's current location. This includes location obtained from the.
Programming Games Recap on Google Maps. Creating elements. Dynamic creation of elements (multiple video elements). Geolocation. Classwork/Homework: Catch-up.
Location based services Using Google Maps v2 etc. in Android apps 1Location based services.
Social Media. Behavioral Marketing General themes. Cookies. Geolocation. Homework: check out cookies on your computer. Experiment with geolocation.
Location based services
Phones and fieldTask. Session Objective Be familiar with: – selecting smart phones for a survey, – configuring them – and using them – fieldTask (c) Smap.
INTRODUCTION TO HTML5 Geolocation. Display a Specific Location with Google Maps  You can use the Google Maps API to display a custom map on your own.
Campus Tour COMP 523 Final Presentation Justin, Paul, Florian.
Proglan Session 1. .  HTML5 will be the new standard for HTML.  The previous version of HTML, HTML 4.01, came in The web has changed a lot since.
Campus Tour COMP 523 Midterm Presentation Justin, Paul, Florian.
CHAP 6. USING THE HTML5 WEB STORAGE API.  Cookie - Are a built-in way of sending text values back and forth from server to client.  Servers can use.
Programming Games Reprise: storage, datatypes. Geolocation/Google API example. Work session Homework: [Catch up. Upload work. Post proposal.] Work on your.
Phonegap Bridge – Compass API CIS 136 Building Mobile Apps 1.
Session: 19. © Aptech Ltd. 2HTML5 Geolocation and APIs / Session 19  Explain geolocation and its use in HTML5  Explain the Google Maps API  Explain.
GPS Provider:  GPS signal Network Location Provider:  Cell ID  Wi-Fi.
Human Tracking System Using DFP in Wireless Environment 3 rd - Review Batch-09 Project Guide Project Members Mrs.G.Sharmila V.Karunya ( ) AP/CSE.
Creating Interfaces Show form validation examples, Hangman. HTML5 with Google Maps API. Add in localStorage. Design pitfalls. Homework: Make proposal for.
CMPE Senior Design Project Group Members: Jose A Montoya (CMPE) Carlos Olvera (CSCI)
Android - Location Based Services. Google Play services facilitates adding location awareness to your app with automated location tracking Geo fencing.
Phonegap Bridge – Device, Network, Console, Geolocation API’s CIS 136 Building Mobile Apps 1.
Internet Browser Setting Nov SyncSCM Team. 1. Internet Explorer(9 or 10) 2. Google Chrome Agenda.
Once, Only Once, and In the Right Place: Gathering Location Data for the 2020 Census Jennifer Hunter Childs Center for Survey Measurement Research and.
RIA Geo Location. Finding Location modern devices can get location coordinates phones and tablets can use GPS desktops and laptops –often cannot use GPS.
Rich Internet Applications 9. HTML 5 and RIAs. HTML 5 Standard currently under development by W3C Aims to improve the language with support for the latest.
JavaScript, Sixth Edition
Phonegap Bridge –Geolocation and Google maps CIS 136 Building Mobile Apps 1.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Location based services 1. Some location-based services available in Android Geo-coding – Address -> location Reverse geo-coding – Location -> address(es)
1. 2 Android location services Determining a device’s current location Tracking device movements Proximity alerts.
1 Bus Tracker A Google Maps Application. 22 Objectives You will be able to Add an icon to a map created with the Google Maps API. Use Ajax techniques.
Geolocation.
Chap 4. Geolocation API.
Mobile Computing CSE 40814/60814 Spring 2017.
CHAPTER 9 APIS. CHAPTER 9 APIS WHAT IS AN API?
Tracking and Booking Taxi
Geolocation using Google maps
Mobile Computing CSE 40814/60814 Spring 2018.
HTML5 Geolocation 11/12/2018 Copyright © Carl M. Burnett.
Geolocation using Google maps
HTML Level II (CyberAdvantage)
Session V HTML5 APIs - HTML5 Geolocation
Presented by Ignas Šeškauskas
Device,Network, Vibration, Console, Accelerometer
Geolocation using Google maps
Presentation transcript:

CHAP 4. GEOLOCATION API

 You can request users to share their location and, if they agree, you can provide them with instructions on how to get to a nearby store to pick up a new pair of shoes at a discounted rate.  You request a position and, if the user agrees, the browser returns location information.  The position is provided to the browser by the underlying device (for example, a laptop or a mobile phone) on which the HTML5 Geolocation–enabled browser is running.  IP Address  Global Positioning System (GPS)  Wi-Fi with MAC addresses from RFID, Wi-Fi, and Bluetooth  GSM or CDMA cell phone IDs ABOUT LOCATION INFORMATION

ProsCons GPS Very accurate Take a long time, can drain a user’s device’s batteries Does not work well indoors May require additional hardware Wi-Fi Accurate Works indoors Fix quickly & cheaply Not good in rural areas with few wireless access points Cell Phone Fairly accurate Works indoors Fix quickly & cheaply Requires a device with access to a cell phone or cell modem Not good in rural areas with fewer cell phone towers User-Defined May have more accurate location data Allows services for alternate locations User entry might be faster than detection Can also be very inaccurate, especially if the location changes THE PROS AND CONS OF GEOLOCATION DATA

 The browser intercepts and requests user permission at step 2. ARACHITECTURE & PRIVACY

 Browser support for HTML5 Geolocation BROWSER SUPPORT BrowserDetails ChromeSupported in Google Chrome version 2 with Gears FirefoxSupported in version 3.5 and greater Internet ExplorerSupported via the Gears plugin OperaPlanned support version 10, experimental support in nightly builds SafariSupported in version 4 for the iPhone

 if(navigator.geolocation) {  document.getElementById("support").innerHTML = "HTML5 Geolocation supported.";  } else {  document.getElementById("support").innerHTML = "HTML5 Geolocation is not supported in your browser.";  } CHECKING FOR BROWSER SUPPORT

 Theres are two type of position requests  One-shot position request  Repeated position updates POSITIONS REQUESTS

 Usage  void getCurrentPosition(in PositionCallback successCallback,  in optional PositionErrorCallback errorCallback,  in optional PositionOptions options);  Example  navigator.geolocation.getCurrentPosition(updateLocation, handleLocationError, {timeout:10000});  updateLocation is a PositionCallback function will implement later  handleLocationError is a PositionErrorCallback function will implement later ONE-SHOT POSITION REQUESTS

 function updateLocation(position) {  var latitude = position.coords.latitude;  var longitude = position.coords.longitude;  var accuracy = position.coords.accuracy;  document.getElementById("latitude").innerHTML = latitude;  document.getElementById("longitude").innerHTML = longitude;  document.getElementById(“accuracy”).innerHTML = “This location is accurate within “ +accuracy + “ meters.”  } IMPLEMENT POSITION CALLBACK

 function handleLocationError(error) {  switch(error.code) {  case 0:  updateStatus(“Retrieving location error: " + error.message);  break;  case 1:  updateStatus("The user prevented retrieving location.");  break;  case 2:  updateStatus(“Unable to determine your location: " + error.message);  break;  case 3:  updateStatus(“Retrieving timed.");  break;  } IMPLEMENT POSITION ERROR CALLBACK

 Usage  long watchPosition(in PositionCallback successCallback,  in optional PositionErrorCallback errorCallback,  in optional PositionOptions options);  Example  navigator.geolocation.watchPosition(updateLocation, handleLocationError);  updateLocation is a PositionCallback function same as getCurrentPosition implemented above.  handleLocationError is a PositionErrorCallback function same as getCurrentPosition implemented above. REPEAT POSITION UPDATES

 Usage  navigator.geolocation.clearWatch(watchId);  Example  var watchId = navigator.geolocation.watchPosition(updateLocation, handleLocationError);  navigator.geolocation.clearWatch(watchId); CANCEL POSITION UPDATES

 Require Google Map JavaScript API   Put Div for Google Map  SHOW ME ON A GOOGLE MAP

 Google Map Example  var map; function initialize() { map = new google.maps.Map(document.getElementById('map_canvas'), {zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP}); navigator.geolocation.getCurrentPosition(function(position) { var pos = new google.maps.LatLng(position.coords.latitude, position.coords.longitude); var infowindow = new google.maps.InfoWindow({ map: map, position: pos, content: 'Location found using HTML5.‘ }); map.setCenter(pos); }, function(error) { alert('Cannot get Location data: ' + error.code); }); } window.addEventListener("load", initialize, true); SHOW ME ON A GOOGLE MAP (CONT.)