mapsplugin / cordova-plugin-googlemaps

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

Unable to add markers and polyline path to a map. #2842

Closed evansbusobozi closed 4 years ago

evansbusobozi commented 4 years ago

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

OS: (check one with "x")

cordova information: (run $> cordova plugin list)

cordova-androidx-build 1.0.4 "cordova-androidx-build"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-add-swift-support 2.0.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.1.0 "Permissions"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-dialogs 2.0.2 "Notification"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.8.0-20200709-2008 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 4.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.4.1 "NativeGeocoder"
cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
cordova-plugin-sms-retriever-manager 1.0.2 "Device"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
mx.ferreyra.callnumber 0.0.2 "Cordova Call Number Plugin"
uk.co.workingedge.phonegap.plugin.launchnavigator 5.0.5 "Launch Navigator"

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/core : "^5.29.0"
@ionic-native/google-maps : "^5.5.0"

Current behavior: Polyline path and markers do not appear on the map.

Expected behavior: Polyline path should be displayed with markers both at the beginning and the end.

The polyline path and markers are not appearing on the map. This is how I add them to the map.


// Add markers
    this.pickUpMarker = this.map.addMarkerSync(markerOptionsPickup);
    this.dropOffMarker = this.map.addMarkerSync(markerOptionsDropOff);

    let latLngBounds = new LatLngBounds(points);
    this.map.animateCamera({
      target: latLngBounds,
      duration: 1000
    });

    // Add the polyline route.
    this.path = this.map.addPolylineSync({
      points: points,
      color: '#3171e0',
      width: 5, 
      geodesic: true,
      clickable: false,
      zIndex: 3
    });
`
wf9a5m75 commented 4 years ago

Please share the project files , not part of code.

wf9a5m75 commented 4 years ago

And also did you confirm the logcat?

evansbusobozi commented 4 years ago

And also did you confirm the logcat?

I checked all the variables in the logs and everything was fine.

evansbusobozi commented 4 years ago

Please share the project files , not part of code.

Here are the files https://github.com/Evanzsnr/google-maps-v1/tree/main

wf9a5m75 commented 4 years ago

Please include all files to rebuild your project. And I'm not your teacher or friend, or even not your debug service. Please try to use this plugin step by step.

wf9a5m75 commented 4 years ago

Additionally, creating navigation app is prohibited by the Google Maps API terms.

evansbusobozi commented 4 years ago

Additionally, creating navigation app is prohibited by the Google Maps API terms.

I am not trying to create a navigation app in any way, am fully aware of the google terms of service. That was just a function name but has nothing to do with navigation. Thanks for your help.

evansbusobozi commented 4 years ago

Please include all files to rebuild your project. And I'm not your teacher or friend, or even not your debug service. Please try to use this plugin step by step.

I didn't mean to make you my teacher or debug service, the docs are very clear but some functions fail to work due to different reasons. So by the time I raise an issue, I have tried all options and failed. Am sorry if you felt disturbed by my issues.

evansbusobozi commented 4 years ago

Thanks for your commitment and help.