Content deleted Content added
improve citations (like including archived URLs for dead URLs), deduplicate |
m →Deployment in web browsers: HTTP to HTTPS for Blogspot |
||
(18 intermediate revisions by 10 users not shown) | |||
Line 1:
{{Short description|Javascript API to geolocate devices}}
{{Use dmy dates|date=June 2020}}
{{Infobox technology standard
| title = Geolocation API
| long_name =
| image =
| caption =
|
▲| year_started = {{Start date and age|2008}}<ref name="geolocation-spec-hist">{{Cite web|url=https://www.w3.org/standards/history/geolocation-API|title=Geolocation API Specification 2nd Edition Publication History - W3C|date=n.d.|access-date=2021-04-21}}</ref><ref name="geolocation-spec-20081222">{{cite web|url=https://www.w3.org/TR/2008/WD-geolocation-API-20081222/|title=Geolocation API Specification|first=Andrei (editor, Google Inc.)|last=Popescu|website=W3C|publisher=Geolocation Working Group|date=2008-12-22|access-date=2021-04-21}}</ref>
| version = W3C Recommendation
| version_date = {{Start date and age|
| preview =
| preview_date =
Line 29 ⟶ 26:
}}
The '''W3C Geolocation API''' is an effort by the [[World Wide Web Consortium]] (W3C) to standardize an interface to retrieve the [[geographical ___location information]] for a client-side device.<ref name="geolocation-spec">{{cite web|url=https://www.w3.org/TR/2008/WD-geolocation-API-20081222/|title=Geolocation API Specification
The result of W3C Geolocation API will usually give 4 ___location properties, including [[latitude]] and [[longitude]] (coordinates), altitude (height), and
== Deployment in web browsers ==
Web pages can use the Geolocation API directly if the web browser implements it. Historically, some browsers could gain support via the [[Google Gears]] [[plug-in (computing)|plugin]], but this was discontinued in 2010 and the server-side API it depended on stopped responding in 2012.<ref>{{cite web |url=https://code.google.com/apis/gears/api_geolocation.html
The Geolocation API is ideally suited to web applications for mobile devices such as
▲The result of W3C Geolocation API will usually give 4 ___location properties, including latitude and longitude (coordinates), altitude (height), and [accuracy of the position gathered], which all depend on the ___location sources. In some queries, altitude may yield or return no value.
==Location sources==
{{Unreferenced section|date=January 2022}}
The Geolocation API does not provide the ___location information. The ___location information is obtained by a device (such as a smartphone, PC or modem), which is then served by the API to be brought in browser. Usually geolocation will try to determine a device's position using one of these several methods.
; GPS (Global Positioning System): This happens for any device which has
; Mobile Network Location: [[Mobile phone tracking]] is used if a cellphone or wireless modem is used without a GPS chip built in.
; Wi-Fi Positioning System: If Wi-Fi is used indoors, a [[Wi-Fi positioning system]] is the likeliest source. Some Wi-Fi spots have ___location services capabilities.
; IP Address Location: Location is detected based on the nearest
==Implementation==
Though the implementation is not specified, W3C Geolocation API is built on extant technologies, and is heavily influenced by Google Gears Geolocation API. Example: Firefox's Geolocation implementation<ref>{{cite web |url=https://support.mozilla.org/en-US/kb/does-firefox-share-my-___location-websites?redirectslug=does-firefox-share-my-___location-web-sites&redirectlocale=en-US|title=Does Firefox share my ___location with websites? {{!}} Mozilla Support|work=Mozilla Firefox|author-link=Mozilla Firefox|publisher=Mozilla|date=n.d.|access-date=2021-04-21}}</ref> uses Google's network ___location provider.<ref name="code-google-gear-geo-api">{{cite web |url=https://code.google.com/apis/gears/geolocation_network_protocol.html|url-status=dead|archive-url=https://web.archive.org/web/20151222162645/https://code.google.com/p/gears/wiki/GeolocationAPI|title=GeolocationAPI - gears - Provides the geolocation of a device running a Gears-enabled web browser. - Improving Your Web Browser - Google Project Hosting|work=Google Code|archive-date=2015-12-22|date=n.d.|access-date=2021-04-21}}</ref> Google Gears Geolocation works by sending a set of parameters that could give a hint as to where the user's physical ___location is to a network ___location provider server, which is by default the one provided by Google (code.l.google.com).<ref>{{cite web |url=http://webscannotes.com/?page_id=425|url-status=dead|archive-url=https://web.archive.org/web/
===Example code===
Line 83 ⟶ 81:
==See also==
* [[Local search (Internet)]]▼
* [[Location-based service]]
▲*[[Local search (Internet)]]
==References==
{{
==External links==
Line 96 ⟶ 94:
[[Category:Application programming interfaces]]
[[Category:Internet geolocation]]▼
[[Category:HTML5]]
[[Category:
[[Category:Location-based software]]
|