[http://creativecommons.org/licenses/by/3.0/]
This work is licensed under a CC
Attribution 3.0 Unported License [http://creativecommons.org/licenses/by/3.0/]
Mobility is (one of) the key defining characteristics of mobile devices, and many use cases and scenarios not only depend on mobility (the ability to move), but on location (the knowledge of where something moved to). Determining the location of a mobile device can be done in a variety of ways, and in this lecture we briefly look at various localization technologies (IP address, Wi-Fi, cell phone, GPS). We then look at the W3C Geolocation API, which is currently under development and allows scripting code to request the location of the device it is running on. Finally, we discuss some privacy issues around automated access to location information.
Class A[http://en.wikipedia.org/wiki/Classful_network#Introduction_of_address_classes] networks are assigned to a few big entities [http://www.iana.org/assignments/ipv4-address-space/ipv4-address-space.xhtml]
only4 billion addresses [http://courses.ischool.berkeley.edu/i153/s11/internet#ip-address]
hidesdevice IP addresses to the outside world
seevarious towers
Accuracyinformation given by receivers often is wrong
navigator.geolocation.
object requests the info bar from the browser getCurrentPosition
does not immediately give a web app access to geolocation of the browsernavigator.geolocation.
is a global object, meaning the user opt-in cannot be circumvented
function get_location() {
navigator.geolocation.getCurrentPosition
(show_map);
}
coords
and timestamp
coords.latitude, coords.longitude, and coords.accuracy
function show_map(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
// show a map etc.
}
<!DOCTYPE html> <html> <head> <title>Minimal Geolocation Demo</title> </head> <body> <h1>Minimal <a href="http://www.w3.org/TR/geolocation-API/">Geolocation</a> Demo</h1> <p>You are <span id="location">somewhere</span>.</p> <script type="text/javascript"> navigator.geolocation.getCurrentPosition(function(position){ var lat = position.coords.latitude; var long = position.coords.longitude; var coord = "at (" + lat + "," + long +")"; document.getElementById('location').textContent = coord; }); </script> </body> </html>
<!DOCTYPE html> <html> <head> <title>Geolocation and Maps</title> <script src="jquery.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function() { $("p").click(function() { navigator.geolocation.getCurrentPosition(function(position){ var lat = position.coords.latitude; var long = position.coords.longitude; $("p").after("<img src='http://maps.google.com/maps/api/staticmap?center=" + lat + "," + long + "&zoom=16&size=512x512&sensor=false'/>"); }); }); }); </script> </head> <body> <h1><a href="http://www.w3.org/TR/geolocation-API/">Geolocation</a> and Maps</h1> <p>Are you curious where you are? Click here!</p> </body> </html>
norm
interface Position { readonly attribute Coordinates coords; readonly attribute DOMTimeStamp timestamp; };[http://www.w3.org/TR/geolocation-API/#position_interface]
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; };[http://www.w3.org/TR/geolocation-API/#coordinates_interface]
civic locationswill be supported in the next version
Berkeley, CA→ (37.875733,-122.265092)
Berkeley, CA
Normandy Village[http://ws.geonames.org/findNearby?lat=37.875733&lng=-122.265092]
Berkeley, Alameda, California, US[http://ws.geonames.org/extendedFindNearby?lat=37.875733&lng=-122.265092]
94709, 94704, 94720, 94703, 94708[http://ws.geonames.org/findNearbyPostalCodes?lat=37.875733&lng=-122.265092]
User Agents must not send location information to Web sites without the express permission of the user.
User Agents must acquire permission through a user interface, unless they have prearranged trust relationships with users.
The user interface must include the URI of the document origin.
[…] permissions […] must be revocable and User Agents must respect revoked permissions.
Recipients must only request location information when necessary.
Recipients must only use the location information for the task for which it was provided to them.
Recipients must dispose of location information once that task is completed, unless expressly permitted to retain it by the user.
Recipients must also take measures to protect this information against unauthorized access.
If location information is stored, users should be allowed to update and delete this information.
opt-out, an
opt-inmodel would have been possible
third partyoften is defined in a very fuzzy way
falselocations