のGoogleマップは、ブラウザに表示されますが、私は、コマンドに ionic run android
を実行したときにそれが正常にビルドしてアプリを起動しかし、すべてはそれだけでDEVICE READY FIRED AFTER 630 ms
が、エラーなしを言うchrome://inspect
にエラーがないのGoogleマップを除いて正常に動作しますGoogleマップ用私はconsole.developers.google.comのアプリを登録して、鍵を手に入れて、でそれを使用しましたが、まだ変更はありません。ありがとうございます。 home.ts
(地図機能は、このファイルの中にある)Googleマップの問題 - イオンは2
// Get the current location
Geolocation.getCurrentPosition().then((position) => {
// Set latitude and longtitude variable
this.lat = position.coords.latitude;
this.long = position.coords.longitude;
// This function will get the name of the city where user is located
this.getCityName(this.lat, this.long);
// this function sets up the google map
let latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
let mapOptions = {
center: latLng,
zoom: 11,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var mapi = new google.maps.Map(this.mapDiv.nativeElement, mapOptions);
// Below code is provided by a ai pollution control website (http://aqicn.org/faq/2015-09-18/map-web-service-real-time-air-quality-tile-api/)
// haven't changed anything in below code copied as it is from web
var waqiMapOverlay = new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return 'http://tiles.aqicn.org/tiles/usepa-aqi/' + zoom + "/" + coord.x + "/" + coord.y + ".png?token=_TOKEN_ID_";
},
name: "Air Quality",
});
// Insert above received data into map
mapi.overlayMapTypes.insertAt(0,waqiMapOverlay);
`
私の問題を解決しました。あなたの答えをありがとう。 –