ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native
Other
221 stars 125 forks source link

The application closes with remote icons in the second load in iOS #44

Closed ecomunicarte closed 6 years ago

ecomunicarte commented 6 years ago

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

If you choose 'problem or bug report', please select OS: (check one with "x")

cordova information: (run $> cordova plugin list)

call-number 0.0.2 "Cordova Call Number Plugin"
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
cordova-plugin-admobpro 2.31.6 "AdMob Plugin Pro"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-extension 1.5.4 "Cordova Plugin Extension"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-googlemaps 2.3.6 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.3.2 "Cordova sqlite storage plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.4.1 "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) "@ionic-native/google-maps": "^4.8.2", "@ionic-native/core": "^4.7.0",

Current behavior:

We add markers parametrized with remote data. One of these data is the icon image url. Then, when the map page load the first time on iOS, all is fine, but the second time the app crashes and closes automatically. If we don't give any image, or pass an static local image to all icons, the problem disappears and all if fine. On Android, all works fine. It only occurs in iOS. If there is any remote data and app does not have to make any icons, the app does not crash. Expected behavior:

All times we want to load the map with all remote data, we could do without crashes.

Screen capture or video record:

Related code, data or error log (please format your code or data):

  generate_icon(data){
    let promise = new Promise((resolve => {
      let icono:MarkerIcon;
        icon = {
          // With that line the app crash on second load
          url : data.markerPath,
          // With that line the app does not crash any time
          //url : "./assets/img/dashboard/markerfull.jpeg",
          size: {
            width: 60,
            height: 70
          }
        };
        resolve(icon);
    }));
    return promise;
  }

...
    this.map.addMarker({
         position: pos,
         icon: icono
     })
...
wf9a5m75 commented 6 years ago

Please share your project files on GitHub.

wf9a5m75 commented 6 years ago

ping

wf9a5m75 commented 6 years ago

Since there is no response, I close this thread, but you can still reply anytime.