mapsplugin / cordova-plugin-googlemaps

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

I only see the google logo #2870

Open astronmy opened 3 years ago

astronmy commented 3 years ago

I understand that it is an API problem but I have entered the API Console I have created a new credential without restrictions and I continue with the same problem

Create a new project inside Api Console and enable Android SDK, IOS SDK even javascript API V3

Create a new credential with no restrictions and I still can't see the map

inside the config.xml I have added the preference with the corresponding key

this is the version that I am using of the plugin cordova-plugin-googlemaps 2.7.1 "@ionic-native/core": "^5.32.0", "@ionic-native/google-maps": "^5.5.0",

CODE

async ngOnInit() { await this.platform.ready(); await this.loadMap(); }

async loadMap() { let mapOptions: GoogleMapOptions = { camera: { target: { lat: 43.0741904, lng: -89.3809802 }, zoom: 18, tilt: 30 } };

  this.map = GoogleMaps.create('map_canvas');

  this.map.one(GoogleMapsEvent.MAP_READY).then(() => {
       console.log("Map is ready to use.");

    this.map.addMarker({
        title: 'Ionic',
        icon: 'blue',
        animation: 'DROP',
        position: {
          lat: 43.0741904,
          lng: -89.3809802
        }
      })
      .then(marker => {
        marker.on(GoogleMapsEvent.MARKER_CLICK)
          .subscribe(() => {
            alert('clicked');
          });
      }).catch(e => console.log(e));

  }).catch(e => console.log(e));

}

HTML

CSS

map_canvas {

width: 100%; height: 100%; }

Please honestly I don't know what else to try

wf9a5m75 commented 3 years ago
<widget ...>
  <preference name="GOOGLE_MAPS_ANDROID_API_KEY" value="(api key)" />
  <preference name="GOOGLE_MAPS_IOS_API_KEY" value="(api key)" />
</widget>

without parentheses

astronmy commented 3 years ago

sorry I forgot to put that I had already added the variable inside the config.xml

seeing the logcat this is the error

Unexpected response code 503 for https://clients4.google.com/glm/mmap/api

wf9a5m75 commented 3 years ago

Could you show me the whole logs?

astronmy commented 3 years ago
2021-05-13 18:00:36.518 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:37.014 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:37.315 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:37.803 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:38.293 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:38.775 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:39.260 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:39.752 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:40.233 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:40.515 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:41.000 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:41.281 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:41.767 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:42.254 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:42.750 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:43.239 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:43.731 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:44.020 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:44.511 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:44.788 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:45.291 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:45.780 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:46.362 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:46.847 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:47.322 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:47.603 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:48.091 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:48.583 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:49.073 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:49.561 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:49.837 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:49.901 24123-24123/ar.gob.ciudaddemendoza.parquedeportivo E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted
2021-05-13 18:00:50.328 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:50.614 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:51.091 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:51.375 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:51.905 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:52.219 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:52.219 24123-24273/ar.gob.ciudaddemendoza.parquedeportivo E/Google Maps Android API: Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
2021-05-13 18:00:52.698 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:52.973 24123-24265/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1049] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:55.256 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:55.550 24123-24262/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1046] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:00:58.342 24123-24263/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1047] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:01:01.866 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api
2021-05-13 18:01:02.178 24123-24264/ar.gob.ciudaddemendoza.parquedeportivo E/Volley: [1048] ch.a: Unexpected response code 503 for https://clients4.google.com/glm/mmap/api

The app show trails. from the option "Senderos" one chooses the path to be displayed on the map

When I touch "ver más" that opens the page where the map is displayed

At that moment it begins to fail

the same happens in a mobile device as in the emulator

I have tried different API KEYs from different projects. All enabled with Android SDK and the problem persists

wf9a5m75 commented 3 years ago

Unfortunately, there is no enough information in the error log. Only possible reason is network (like the error log says)

 E/Google Maps Android API: Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
devinder33 commented 2 years ago

@astronmy Are you able to fix it?

namnh240795 commented 2 years ago

I also got this error on React-Native, the config run fine on ios, but on android it always show blank page Like above picture.

wf9a5m75 commented 2 years ago

This plugin does not support ReactNative yet.

namnh240795 commented 2 years ago

This plugin does not support ReactNative yet.

i'm just saying that even the config is right, the app not showing up, so i'm not sure what is the problem.

keev-studio commented 2 years ago

This plugin does not support ReactNative yet.

i'm just saying that even the config is right, the app not showing up, so i'm not sure what is the problem.

what version of android platform you use?