Your SlideShare is downloading. ×
0
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Geoloaction
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Geoloaction

143

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
143
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Jason
  • 2. Support
  • 3. Geolocation API The Geolocation API exposes the latitude andlongitude to JavaScript in a webpage by usingthe geolocation object, which is a child objectof the window.navigator.
  • 4. Geolocation API - Method getCurrentPosition(successCallback,[errorCallback],[options]) The function specified bythesuccessCallback parameter takesone position parameter. The function specified bytheerrorCallback parameter takesone positionError parameter
  • 5. Geolocation API - GeopositionPositionPropertiesCoordsPropertiesExplaincoordslatitude The latitude of the location specified inthe coordinates objectlongitude The longitude of the location specified inthe coordinates objectaltitude Specifies the altitude, in meters, ofthe coordinates object.accuracy Gets the accuracy of the latitudeand longitude properties , in meters.altitudeAccuracy Accuracy of the altitude property, in meters.heading Specifies a direction of travelspeed Current ground speed of the device runningInternet Explorer, specified in meters per second.timestamp Gets the time associated with the geographic information
  • 6. Geolocation API - PositionErrorProperties Explaincode Error CodeUNKNOWN_ERROR Uncertainty ErrorPERMISSION_DENIED The user has denied permission for the website to accessgeographic information.POSITION_UNAVAILABLE The geographic location could not be determined.TIMEOUT The request did not complete within the time allowed.message Gets an error message for debugging purposes.
  • 7. Geolocation API - OptionProperties ExplainenableHighAccuracy bool (false) Obtain the most accurate position possible, orfalse to optimize in favor of performance andpower consumption.timeout Integer (none) An Integer value that indicates the time, inmilliseconds, allowed for obtaining the position.maximumAge Integer (0) An Integer value indicating the maximum age,in milliseconds, of cached position information.
  • 8. Geolocation API - Method watchPosition(successCallback,[errorCallback],[options]) Returns :WatchID [Integer] Begins listening for updates to the currentgeographical location of the device runningthe client.
  • 9. Geolocation API - Method clearWatch ( WatchID ) Stops listening for updates to the currentgeographical location.
  • 10. Reference http://msdn.microsoft.com/en-us/library/ie/hh772290(v=vs.85).aspx http://kuro.tw/blog/2011/12/07/html5-geolocation-api

×