plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[@nativescript/google-maps] No markers appeared on Android

Open paul-castro opened this issue 2 years ago • 3 comments

I'm trying to populate markers for every coordinates in the map. It was working on iOS but not on Android

Only one marker appears on Android

Screen Shot 2022-10-07 at 4 54 38 PM

ns info:

✔ Getting NativeScript components versions information... ✔ Component nativescript has 8.3.3 version and is up to date. ✔ Component @nativescript/core has 8.3.5 version and is up to date. ✔ Component @nativescript/ios has 8.3.3 version and is up to date. ✔ Component @nativescript/android has 8.3.1 version and is up to date.

"@nativescript/geolocation": "^8.0.2" "@nativescript/google-maps": "^1.4.7"

code: loadLocations.forEach((loc) => { let marker = new Marker(); let img = new Image(); img.imageSource = ImageSource.fromFileSync('~/images/pin-atm2.png'); marker = { icon: img, position: { lat: loc.latitude, lng: loc.longitude }, visible: true, userData: loc, title: null } as Marker; this.map.addMarker(marker) });

any idea?

paul-castro avatar Oct 07 '22 09:10 paul-castro

Hi @paul-castro, Any errors in the console?

lekhmanrus avatar Oct 11 '22 20:10 lekhmanrus

I have the same issue, no errors in the console!

defdis avatar Dec 06 '22 09:12 defdis

@paul-castro, I solve the issue! marker.position latitude/longitude must be a float, not string!

defdis avatar Dec 07 '22 07:12 defdis