mapsplugin / cordova-plugin-googlemaps

Google Maps plugin for Cordova
Apache License 2.0
1.66k stars 913 forks source link

ios14でのgetMyLocationのパーミッション #2848

Open ohtanzcom opened 3 years ago

ohtanzcom commented 3 years ago

I'm submitting a ... (check one with "x")

OS: (check one with "x")

ios14以前ではgetMyLocationを使用した時、初回のパーミッション選択後に選択結果(OK or NG)が戻ってきましたが、ios14だと選択する前にNG判定となってしまいます。 この回避方法があれば教えてください。

Before ios14, when using getMyLocation, the selection result (OK or NG) was returned after the first permission selection. In ios14, the result is NG before I select it. Please let me know if there is a way around this.

await LocationService.getMyLocation().then((location: MyLocation) => {
  this.lat = location.latLng['lat'];
  this.lng = location.latLng['lng'];      
}).catch((err: any) => {
  // We'll be called before you can make a choice.
});
wf9a5m75 commented 3 years ago

Mapsプラグインのバージョンを教えてもらえますか?

wf9a5m75 commented 3 years ago

とりあえずですが、cordova-plugin-geolocationとか代替プラグインを使っていただけると良いかと思います。 若干、このプラグインとの互換性に問題があるようなので、4.1.0を使うと良い、とのことでした https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2844#issuecomment-741201972

ohtanzcom commented 3 years ago

Mapsプラグインのバージョンを教えてもらえますか?

cordova-plugin-googlemapsのバージョンは2.8.0です。

ohtanzcom commented 3 years ago

とりあえずですが、cordova-plugin-geolocationとか代替プラグインを使っていただけると良いかと思います。 若干、このプラグインとの互換性に問題があるようなので、4.1.0を使うと良い、とのことでした #2844 (comment)

ありがとうございます。 検討してみます。