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.

Slides:



Advertisements
Similar presentations
MFA for Business Banking – Security Code Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing these QT sheets.
Advertisements

JQuery MessageBoard. Lets use jQuery and AJAX in combination with a database to update and retrieve information without refreshing the page. Here we will.
Touchsquid Technology Inc. Setting up the TouchSquid Remote App.
Learning from BC2014 The reviewer’s perspective on the mobile experience James Coltham Better connected
HTML 5 – GeoLocation and Maps. Geolocation API What is a ”geolocation”…? A geographical location, defined in terms of – Latitude (north/south) – Longitude.
Project Two Art3870 fall Web Services Concept Selling web services to Art Galleries ◦ Our group sells web site development for art galleries: the.
AJAX asynchronous server-client communication. Test.
AdvWeb-1/20 DePaul University SNL 262 Web Page Design Design Information Instructor: David A. Lash.
Today Microformats and a sprinkling of RDF Everyone good with SVN? Everyone checked something in? No? Try now. Mobile – Functionality – UX If you get too.
CHAPTER 26 CREATING LOCATION-AWARE WEBPAGES USING GEOLOCATION.
Eye Candy for Your iPhone Tricks to make your WordPress site look more like a native iPhone app Brian Shim Slides at brianshim.com.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
HTML and Designing Web Pages. u At its creation, the web was all about –Web pages were clumsily assembled –Web sites were accumulations of hyperlinked.
HTML5 GEOLOCATION AND SHAREPOINT GEOLOCATION What is Geolocation? How easy it is to use this service? Can we do something without Javascript?
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.
UNIT 10 LINKS AND GEOLOCATION. OBJECTIVES  CO1 Describe various components of the Open Web Platform.  CO2 Create a website using HTML5.  CO3 Create.
JavaScript Form Validation
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
SUNY Polytechnic Institute CS 490 – Web Design, AJAX, jQueryAngularJS AngularJS is a client-side JavaScript Framework for adding interactivity to HTML.
JavaScript & jQuery the missing manual Chapter 11
Google Cloud Messaging for Android (GCM) is a free service that helps developers send data from servers to their Android.
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.
CS 4720 Usability and Accessibility CS 4720 – Web & Mobile Systems.
HTML5 Communication. The Setup Somewhere on the web, a server makes a ”service” available, that we wish to use in a web application The service may offer.
Ideas to Improve SharePoint Usage 4. What are these 4 Ideas? 1. 7 Steps to check SharePoint Health 2. Avoid common Deployment Mistakes 3. Analyze SharePoint.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
Click ‘Sign up or sign in’ 1 Go to the web address
FIRST SCREEN In 1929, we were introduced to the “First Screen” Still today, Television advertising is a tremendously effective way to market.
Programming Games Reprise: storage, datatypes. Geolocation/Google API example. Work session Homework: [Catch up. Upload work. Post proposal.] Work on your.
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
FIRST SCREEN In 1929, we were introduced to the “First Screen” Still today, Television advertising is a tremendously effective way to market.
Session: 19. © Aptech Ltd. 2HTML5 Geolocation and APIs / Session 19  Explain geolocation and its use in HTML5  Explain the Google Maps API  Explain.
Changing Your Case Password And a few other words about IT Security.
1 Mezzanine Ware (Pty) Ltd © 2014 Installing\Uninstalling the Mezzanine Helium Android application.
Ajax for Dynamic Web Development Gregory McChesney.
Phonegap Bridge – Device, Network, Console, Geolocation API’s CIS 136 Building Mobile Apps 1.
SE-2840 Dr. Mark L. Hornick 1 Introduction to Ajax Asynchronous Javascript And XML.
PAYware Mobile Blackberry Comparison March Discussion Topics Obtaining the App PAYware Mobile App Determining Model and system information such.
RIA Geo Location. Finding Location modern devices can get location coordinates phones and tablets can use GPS desktops and laptops –often cannot use GPS.
François Briard GS-AIS-HR Database Developers Forum, APEX 6th May 2014 APEX Mobile Application Development 101.
JavaScript, Sixth Edition
Phonegap Bridge –Geolocation and Google maps CIS 136 Building Mobile Apps 1.
MOBILE CAMPUS NAVIGATION APPLICATION WITH AUGMENTED REALITY GROUP - 20.
JQuery, JSON, AJAX. AJAX: Async JavaScript & XML In traditional Web coding, to get information from a database or a file on the server –make an HTML form.
MEDIA KIT. WHO WE ARE? YOUR TEXT HERE 6:58 min AVG. SESSION DURATION 13.6M+ UNIQUE USERS 2.8M+ FACEBOOK LIKES 189M+ MONTHLY PAGE VIEWS 71.3M+ RETURNING.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
 Learn the mechanics of using App Inventor to build apps.  Learn how to design an app’s user interface with the App Inventor Designer, and its behavior.
Testing and delivery Web design principles. Web development is software development.
Lesson 11: Web Services and API's
CSE 154 Lecture 11: AJAx.
What this activity will show you
Acquirly Review Generation Setup and Overview
CHAPTER 9 APIS. CHAPTER 9 APIS WHAT IS AN API?
Lesson 11: Web Services & API's
Google Chrome Not Syncing Bookmarks Google Chrome Technical Support Phone Number
Geolocation using Google maps
Form Validation and AJAX
Web Programming– UFCFB Lecture 17
Facing Problem with Hulu on Android and iPhone Device? (Check Here)
CSE 154 Lecture 11: AJAx.
Multifactor Authentication & First Time Login
CSE 154 Lecture 22: AJAX.
Mondopad Mobile Device View
Geolocation using Google maps
JavaScript Form Validation
Lesson 11: Web Services and API's
Creating User Interfaces
Geolocation using Google maps
Presentation transcript:

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

HTML5 Supports a browser’s (navigator) location as a property

Test for GEO if(typeof(navigator.geolocation) != 'undefined'){ //do your geo stuff here }else{ //do something else (ask user to enter a zipcode, perhaps?) }

Get a Geolocation object var geo = navigator.geolocation; ! You can’t act on geo directly (not a static object/array)

Act on the geo object geo.getCurrentPosition(successfx, errorfx); Callback functions

Error function errorfx(positionError) { alert("error: " + positionError.code + “ “ + positionError.message); } Error codes: 1: user didn’t share browser’s location 2: location unavailable (browser doesn’t know its location) 3: timeout

Success function successfx (position) { //html proposed std has the following properties: position.coords.latitude (dec degress) position.coords.longitude (dec degress) position.coords.accuracy (meters) }

Ok… What do you do after you know the client’s browser location? 1)Call home (ajax) and get some location specific info 2)Append location data to links 3)Send user geo data ahead of time (json), use position data to sort this info

In Class 1.Locate someone near you with a smart phone 2.Inspect the code at Get it working in your public webspace 4.Test with desktop + mobile clients

In Practice It can take a while to get the browser location – Provide the visitor with something (spinning wheel, &c) to let them know things are processing If you need high accuracy – There are additional parameters for that – You might need to check back a few times until the phone gets a good fix on satellites

Accuracy Inform the browser how new the data needs to be (clears the cache) maximumAge Tells the browser to get a GPS fix if it can (rather than some other means it may have) enableHighAccuracy Tells the browser how long you are willing to wait for info timeout

Accuracy geo.getCurrentPosition( displayPosition, displayError, {enableHighAccuracy:true, timeout:10000, maximumAge:60000} );

Accuracy Browser might fail in high accuracy mode and succeed in low accuracy mode. If one fails, do you want to fail down?

Accuracy If the browser succeeds, it might report an accuracy lower than your needs On success, if position.coords.accuracy is lower than a threshold Retry N times (3?) Use setTimeout to try again (greater number of ms than you set timeout)

Doing something useful App that reports name/info of nearest building – If you use building centers: it is possible to be closer to the center of one building when you are standing next to the edge of another! >> bad time – GPS gets super terrible indoors (and whenever there is no clear view of the sky) Use other plans indoors (QR codes?)

In Class Alter to: – After the first success, get the geo location ever 30 seconds – Every time a location is returned, use Ajax / JSONP to call the following service: Output the lat/lon/userID generated on the screen. Jsonp example here:

Outside Go outside with a mobile device Walk around with your web app open Observe that it is working

Lab Call your data from today Plot it on Google maps as a line