question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MAP_READY event not fired

See original GitHub issue

I’m submitting a … (check one with “x”)

  • question
  • any problem or bug report
  • feature request

If you choose ‘problem or bug report’, please select OS: (check one with “x”)

  • Android
  • iOS

cordova information: (run $> cordova plugin list)

cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-firebase 1.0.5 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googlemaps 2.2.9 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.0.5 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-vibration 3.1.0 "Vibration"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova.plugins.diagnostic 4.0.7 "Diagnostic"
onesignal-cordova-plugin 2.4.0 "OneSignal Push Notifications"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly) This is my package.json

{
  "name": "whereismybike",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "5.2.10",
    "@angular/common": "5.2.10",
    "@angular/compiler": "5.2.10",
    "@angular/compiler-cli": "5.2.10",
    "@angular/core": "5.2.10",
    "@angular/forms": "5.2.10",
    "@angular/http": "5.2.10",
    "@angular/platform-browser": "5.2.10",
    "@angular/platform-browser-dynamic": "5.2.10",
    "@ionic-native/browser-tab": "^4.7.0",
    "@ionic-native/camera": "^4.7.0",
    "@ionic-native/core": "4.7.0",
    "@ionic-native/diagnostic": "^4.7.0",
    "@ionic-native/firebase": "^4.7.0",
    "@ionic-native/geolocation": "^4.7.0",
    "@ionic-native/globalization": "^4.7.0",
    "@ionic-native/google-maps": "4.7.0",
    "@ionic-native/in-app-browser": "^4.7.0",
    "@ionic-native/network": "^4.7.0",
    "@ionic-native/onesignal": "^4.7.0",
    "@ionic-native/splash-screen": "4.7.0",
    "@ionic-native/status-bar": "^4.7.0",
    "@ionic-native/vibration": "^4.7.0",
    "@ionic/storage": "2.1.3",
    "cordova-android": "7.1.0",
    "cordova-plugin-browsertab": "^0.2.0",
    "cordova-plugin-camera": "^4.0.3",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-firebase": "^1.0.5",
    "cordova-plugin-geolocation": "^4.0.1",
    "cordova-plugin-globalization": "^1.11.0",
    "cordova-plugin-googlemaps": "^2.2.9",
    "cordova-plugin-inappbrowser": "^3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-network-information": "^2.0.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-vibration": "^3.1.0",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova.plugins.diagnostic": "^4.0.7",
    "firebase": "^4.13.1",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "ng2-translate": "^5.0.0",
    "onesignal-cordova-plugin": "^2.4.0",
    "rxjs": "5.5.10",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.9",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-camera": {},
      "cordova-plugin-vibration": {},
      "cordova-plugin-browsertab": {},
      "cordova-plugin-firebase": {},
      "onesignal-cordova-plugin": {},
      "cordova-plugin-inappbrowser": {},
      "cordova-plugin-globalization": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-network-information": {},
      "cordova.plugins.diagnostic": {},
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-googlemaps": {
        "API_KEY_FOR_ANDROID": "AIzaSyAMJZQkbwaw-vPOmMbcs0mx-2IGk35Ha-s",
        "API_KEY_FOR_IOS": "AIzaSyDoVrwVoH7iNoqPnvOywwiljO2CMCSfmoo",
        "PLAY_SERVICES_VERSION": "15.0.1",
        "ANDROID_SUPPORT_V4_VERSION": "26.1.0"
      }
    },
    "platforms": [
      "android"
    ]
  }
}

Current behavior: The application worked fine, but since yesterday the MAP_READY event is not fired anymore. I receive the ‘Google maps created!’ log but don’t get the ‘Google maps ready!’ log. Since I receive no error messages it is hard to find a solution. I expect it would be something with an auto updated plugin.

Expected behavior: The application should show the google map.

Related code, data or error log (please format your code or data): src/providers/native-map-container.ts

this.map = GoogleMaps.create(document.getElementById("map"), mapOptions);
      console.log('Google maps created!');
      this.map.one(GoogleMapsEvent.MAP_READY) // --> event never fired
        .then(() => {
          console.log('Google maps ready!');
          this.map.setClickable(false);
          this.map.setCompassEnabled(false);
          this.map.setTrafficEnabled(false);
          this.map.setIndoorEnabled(false);
          this.addUserToMap();
          this.addDevicesToMap();
          this.map.setClickable(true);
          //this.hasShown = true;
          this.map.setClickable(true)
        }).catch(error => console.log(error));

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
battikacommented, May 18, 2018

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2272 Use this thread for reference. This is what I did and I am using Ionic too.

0reactions
VangrunderbeekArnoudcommented, May 18, 2018

Oke thanks for the quick replies !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Leaflet map-event 'load' does not fire - Stack Overflow
Put the mymap.on('load', onMapLoad); event handler before you actually load the map (with map.setView... ). So your actual code should look ...
Read more >
mapReady not firing! · Issue #1138 - GitHub
Issue description. When i try to implement the mapReady output it dont trigger. Steps to reproduce and a minimal demo of the problem...
Read more >
Events | Maps JavaScript API - Google Developers
Whenever an object's property changes, the Maps JavaScript API will fire an event that the property has changed. For example, the API will...
Read more >
Xamarin Forms - Map.Loaded event handlers not call...
Hello, We've got an interesting problem. In the OnAppearing of on of our views that has a Map, we've wired up the Map.Loaded...
Read more >
Working with events | Guide | ArcGIS API for JavaScript 3.29
Since event handlers fire asynchronously and there is no guarantee of the context in which the event handler will fire, the value of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found