Main Page | Recent changes | View source | Page history

Printable version | Disclaimers | Privacy policy

Not logged in
Log in | Help
 

Working Draft

From LocationAware.org

Contents

Status of the Document

This document is a work in progress. Comments/Feedback/Questions are welcome -- email us at: locationaware-specs(*)locationaware.org.


Todos

Introduction

Examples of Usage

An example of a single location request with a callback handler

var geolocator = navigator.getGeolocator();
geolocator.request(function(location) {
   alert(location.latitude+', '+location.longitude);
});

An example of a single location request with a callback handler

var geolocator = navigator.getGeolocator();
geolocator.onResponse = function(location) {
   alert(location.latitude+', '+location.longitude);
}
geolocator.request();

An example of a single location request without a callback handler

var provider = navigator.getGeolocator();
provider.request();
window.setInterval(handleLocation,500,provider);

function handleLocation(provider){
   if(provider.status == provider.VALID){
      var location = provider.getLocation();
      alert(location.latitude+', '+location.longitude);
   }else{
      alert(provider.error);
   }
}

Interfaces

interface Geolocator {
   request
   onResponse
   ERROR
   VALID
   ...
}

interface Geolocation {
   latitude
   longitude
   hpe
}

TODO: define status codes

Not in this Specification

References

Acknowledgements

Retrieved from "http://locationaware.org/wiki/index.php?title=Working_Draft"

This page has been accessed 4,605 times. This page was last modified 18:54, 1 February 2008.


[Main Page]
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations

View source
Discuss this page
Page history
What links here
Related changes

Special pages
Bug reports