getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
GoogleMapAPIを使って現在地情報を取得しようとしたところ Chromeで
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
[blocked] Access to geolocation was blocked over insecure connection to http://xxx.com.
とのエラーが…
GoogleMapAPIからの返り値を見ると下記のエラー文
getCurrentPosition() and watchPosition() no longer work on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See https://goo.gl/rStTGz for more details.
原因としては、
セキュリティの関係上SSLになっているか、ドメインがlocalhostなど限られた条件でないと現在地情報を使えないようになっているようです。
ローカル環境で開発しているならドメインをlocalhostに設定してデバッグすれば動作します。
もしくはFirefoxならドメイン関係なく現在地情報を使えるため問題なくデバッグできました。