जियोलोकेशन एपीआई
जियोलोकेशन ऑब्जेक्ट
जियोलोकेशन ऑब्जेक्ट उपयोगकर्ता को वेब एप्लिकेशन को अपना स्थान प्रदान करने की अनुमति देता है। गोपनीयता कारणों से, उपयोगकर्ता से स्थान की जानकारी की रिपोर्ट करने की अनुमति मांगी जाती है।
नोट: यह सुविधा केवल सुरक्षित संदर्भों (HTTPS) में उपलब्ध है।
ध्यान दें: iPhone जैसे GPS वाले डिवाइस के लिए जियोलोकेशन सबसे सटीक होता है।
जिओलोकेशन एपीआई नेविगेटर.जियोलोकेशन ऑब्जेक्ट के माध्यम से प्रकाशित होता है।
भौगोलिक स्थान वस्तु गुण
Property | Description |
---|---|
coordinates | Returns the position and altitude of the device on Earth |
position | Returns the position of the concerned device at a given time |
positionError | Returns the reason of an error occurring when using the geolocating device |
positionOptions | Describes an object containing option properties to pass as a parameter of Geolocation.getCurrentPosition() and Geolocation.watchPosition() |
जियोलोकेशन ऑब्जेक्ट मेथड्स
Method | Description |
---|---|
clearWatch() | Unregister location/error monitoring handlers previously installed using Geolocation.watchPosition() |
getCurrentPosition() | Returns the current position of the device |
watchPosition() | Returns a watch ID value that then can be used to unregister the handler by passing it to the Geolocation.clearWatch() method |