ionic-team / ionic-native-google-maps

Google maps plugin for Ionic Native

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Plugin 'map' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

elabayoub opened this issue · comments

  • question
  • any problem or bug report
  • feature request

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

  • Android
  • iOS
  • Browser

cordova information: (run $> cordova plugin list)

com.googlemaps.ios 3.9.0 "Google Maps SDK for iOS"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-advanced-http 3.0.1 "Advanced HTTP plugin"
cordova-plugin-camera 4.1.0 "Camera"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-file 6.0.2 "File"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-googleplus 8.5. "Google SignIn"
cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-navigationbar 1.0.31 "Cordova NavigationBar plugin"
cordova-plugin-screen-orientation 3.0.2 "Screen Orientation"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova-sqlite-storage 5.0.1 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
ee-cordova-plugin-facebook4 4.0.2 "EE Facebook Connect"

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

"cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",

"cordova-plugin-googlemaps": {}

"@ionic-native/google-maps": "^5.27.0-beta-20200630",

Current behavior:
The map works fine on Android, but on iOS the location (lat,lng) are always undefined even that the maps is displayed, and on xcode i get this error:

ERROR: Plugin 'map_0_1480585309286' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.

-> APIs are set for both iOS and Android,

Expected behavior:
Getting coords

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

loadMap() {
    let mapOptions: GoogleMapOptions = {
      camera: {
        target: {
          lat: 34.6573970,
          lng: -1.9016625
        },
        zoom: 16
      }
    };
    let element = this.mapElement.nativeElement;
    this.map = GoogleMaps.create(element, mapOptions);
  }
this.map.getMyLocation()
        .then((myLocation:MyLocation)=>{
          this.map.animateCamera({
            target: myLocation.latLng,
            zoom: 16,
          });
          this.nativeGeoCoder.reverseGeocode(myLocation.latLng.lat,myLocation.latLng.lng)
              .then(data=>{
                this.authService.setLocation({
                  "latLng":myLocation.latLng,
                  "address": data[0].areasOfInterest,
                  "postalcode": data[0].postalCode
                });
                this.position=true;
                ....// some marker logic
                this.loader.loadingDismiss();
              })

        })
        .catch(err=>{
          // always fails here 
          this.loader.loadingDismiss();
        })

Could you share your project file (or create a reproduce project) on github?

What would you need ? package.json ? because i've provided the code above

I'm super busy person. That's why I need to save my time as much as possible. I would like to do only git clone then build it. Please prepare for that

I would love to, but its a private project, any other alternatives ?

Could you share your project file (or create a reproduce project) on github?

This plugin is used by many people, and the most of people use without any problems.

I recommend you create a simple project that contains only a map part and reproduce your issue.

I got the same issue ERROR: Plugin 'map_0_830491478280' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml. and it crashed thereafter - only when dealing with Map Marker Clusters - regular map with single marker works fine. I may have too many markers, if I find the cause I'll post it to help.