geolocation

Geolocation API (DOM)

[25] Geolocation API は、現在の地理的位置を取得するための API です。

[26] 現在の経緯度高度、移動の速度と方向が取得できます。 (ただし経緯度以外を取得できるか否かはプラットフォーム次第です。)

仕様書

API

[34] Geolocation API には次のものが含まれます。

[63] Geolocation API

Geolocation

[32] Geolocation オブジェクトは navigator.geolocation プロパティーで取得できます。

[58] Navigator オブジェクトは、 geolocation を持ちます。 作成時に新しい Geolocation に設定されます。 その後変化しません。

[28] Navigator インターフェイスgeolocation IDL属性取得器 >>27 は、 次のようにしなければなりません

  1. [57] 文脈オブジェクトgeolocation を返します。 SameObject です。

[59] 文書環境晒されています。ワーカー環境ワークレットでは利用できません。


[31] Geolocation インターフェイス >>27 は、文書環境晒されています。 navigator.geolocation プロパティーからのみ Geolocation オブジェクトにアクセスできます。

[61] Geolocation オブジェクトには位置情報アクセスのための API があります。

[62] Geolocation インターフェイスメンバー
[65] Geolocation オブジェクトの状態
キャッシュされたGeolocationPosition
ハンドルの状態

[60] SecureContext 以外 (素のHTTP) でも navigator.geolocation と各メソッドは存在しますが、 意味のある操作はできません。 (後方互換性のため残されているだけです。)

機能拡張

[53] 基本的な API の完成以後、何度か新機能の追加が提案され、 作業されていました。それらはいずれも成功せず、現在はメンテナンスのみが (それも消極的に) なされています。

[54] かわって Geolocation Sensor が提案されています。

実装

[55] すべての主要 Webブラウザーが対応しています。

歴史

[1] LocationAPI - google-gears - Google Code (2008-03-23 18:51:33 +09:00 版) http://code.google.com/p/google-gears/wiki/LocationAPI

[3] Geolocation API Specification (2008-06-06 04:50:16 +09:00 版) http://dev.w3.org/geo/api/spec-source.html

[4] W3CGeolocation Working Group ができました。

[5] Firefox 3.1 for developers - MDC ( 版) https://developer.mozilla.org/ja/Firefox_3.1_for_developers#.E6.96.B0.E3.81.97.E3.81.8F.E3.82.B5.E3.83.9D.E3.83.BC.E3.83.88.E3.81.95.E3.82.8C.E3.81.9F.E6.A9.9F.E8.83.BD_2

Geolocation API がサポートされました、これは Web アプリケーションがユーザの現在の位置についての情報が提供される場合にその情報を保持することを可能にします。

[6] Geolocation API Specification ( 版) http://dev.w3.org/cvsweb/~checkout~/geo/api/spec-source-v2.html?content-type=text/html;%20charset=utf-8

[7] Geolocation API Specification ( 版) http://www.w3.org/TR/2009/WD-geolocation-API-20090707/

[9] Re: Geolocation in the browser (Ian Hickson <ian@...> 著, 版) http://permalink.gmane.org/gmane.org.w3c.whatwg.discuss/16820

[10] Geolocation API Specification ( 版) http://www.w3.org/TR/2008/WD-geolocation-API-20081222/

[13] Geolocation API Specification ( ( 版)) http://www.w3.org/TR/2010/CR-geolocation-API-20100907/

[8] gist: 228509 - GitHub ( 版) http://gist.github.com/228509

[11] DoCoMo、au、SoftbankのGPSで位置情報をphpで取得する方法 :: 日々是作譜 ( 版) http://pgjapan.net/2008/07/get-location-info-in-gps-of-docomo-au-softbank.html

[12] Android の geolocation で GPS を使う方法 - 冬通りに消え行く制服ガールは、夢物語にリアルを求めない。 - subtech ( 版) http://subtech.g.hatena.ne.jp/cho45/20091007/1254894887

[14] 携帯電話と位置情報 : 現在地の測位 (1) (Yahoo! JAPAN Tech Blog) ( 版) http://techblog.yahoo.co.jp/cat207/cat211/_1_1/

(リダイレクト ) 携帯電話と位置情報 : 現在地の測位 (1) - Yahoo! JAPAN Tech Blog, () https://techblog.yahoo.co.jp/mobile/_1_1/

[16] Firefox ではなぜか結果が帰ってこない (どちらの callback も呼ばれない) ことがよくあります。 watchPosition よりも getCurrentPosition の方がましな印象があります。 エラーが返ってくるときも再試行したらちゃんと結果が返ってきたりしそう。

[17] W3C Geolocation API in IE9 - IEBlog - Site Home - MSDN Blogs ( 版) http://blogs.msdn.com/b/ie/archive/2011/02/17/w3c-geolocation-api-in-ie9.aspx

[18] Geolocation API Specification Level 2 ( ( 版)) http://www.w3.org/TR/2011/WD-geolocation-API-v2-20111201/

[19] Geolocation API Specification ( ( 版)) http://www.w3.org/TR/2012/PR-geolocation-API-20120510/

[20] ( ( 版)) http://lists.w3.org/Archives/Public/www-archive/2013Nov/att-0007/W3C_TPAC_Breakout_Geolocation_November_2013.pdf

[21] Enhanced Geolocation ( ( 版)) http://gmandyam.github.io/enhanced-geolocation/

[22] Enhanced Geolocation ( ( 版)) http://gmandyam.github.io/enhanced-geolocation/

[23] Geolocation API Specification ( ( 版)) http://www.w3.org/TR/2013/REC-geolocation-API-20131024/

[24] Geolocation API Specification Level 2 ( ( 版)) http://dev.w3.org/geo/api/spec-source-v2

[2] Requiring Authenticated Origins for Geolocation API's: Status (Mandyam, Giridhar 著, 版) https://lists.w3.org/Archives/Public/public-webappsec/2015Feb/0423.html

[38] Intent to deprecate: Insecure usage of powerful features - Google グループ ( 版) https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/2LXKVWYkOus

We want to start applying the concepts in https://w3c.github.io/webappsec/specs/powerfulfeatures/ to features that have already shipped and which do not meet the (new, not present at the time) requirements.

[39] Geolocation API Specification ( ( 版)) http://www.w3.org/TR/2015/PER-geolocation-API-20150528/

[40] W3C Geolocation Working Group ( 版) http://www.w3.org/2008/geolocation/

[41] Geolocation WG Charter (Giridhar D. Mandyam 著, 版) http://www.w3.org/2014/04/geo-charter.html

[42] Geolocation API Specification 2nd Edition () https://www.w3.org/TR/2016/REC-geolocation-API-20161108/

[43] 506435 - Geolocation disabled when Chrome is in the background or screen turns off. - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=506435

[44] Privacy | Symantec () https://www.symantec.com/privacy

[45] >>44 アクセスすると何もしなくても現在地取得の承認が要求されます。 プライバシーポリシーを読もうとしたら現在地を求められている。読者は試されていますな。

[46] Moved to WICG. Cleaned up respec config (plehegar著, ) https://github.com/w3c/geolocation-api/commit/4cba5ba9bbdb49ca31362b83517db53e07fbb216

[47] Geolocation API Specification () https://w3c.github.io/geolocation-api/

[48] w3c/geolocation-api: W3C Geolocation API () https://github.com/w3c/geolocation-api

[49] Geolocation API Specification () https://w3c.github.io/geolocation-api/

[50] Geolocation API Specification () https://w3c.github.io/geolocation-api/

Warning

Implementors need to be aware that the future work is now happening on the Geolocation Sensor specification in the Devices and Sensors Working Group.

[51] Geolocation Sensor () https://w3c.github.io/geolocation-sensor/

The work on the Geolocation API [GEOLOCATION-API] has been concluded, and as such, any new feature development is happening in this Geolocation Sensor specification. The two specifications are expected to coexist.

[64] Geolocation API Specification は開発停止して久しく、 最低限のメンテナンスしかなされていないまま年月が経過しています。 仕様書は古いスタイルの現在の基準では曖昧な規定の一部が継ぎ接ぎに近代化されている、 中途半端な形になっています。 新しく厳密な用語が使われる部分がある一方で、 曖昧で空気を読んで解釈するべき古い規定が残り、 アルゴリズムの形で明確な規定がありながらそこに含まれない猿パッチ的な規定が別にあったりと、 仕様書の構成としては混乱した状態にあります。

[29] [wbs] response to 'Call for Review: Devices and Sensors Working Group Charter' (Tantek Çelik via WBS Mailer著, ) https://lists.w3.org/Archives/Public/public-new-work/2020Jun/0012.html