nativescript-google-maps-sdk icon indicating copy to clipboard operation
nativescript-google-maps-sdk copied to clipboard

shape.loadPoints is not a function?

Open xeroxstar opened this issue 3 years ago • 0 comments

Why do i get this error when i am trying to draw polyline on the map?

System.err: An uncaught Exception occurred on "main" thread.
System.err: Calling js method onItemClick failed
System.err: TypeError: shape.loadPoints is not a function
let shape = new com.google.android.gms.maps.model.PolylineOptions();
item.directions.forEach(direction => {
            shape.add(new com.google.android.gms.maps.model.LatLng(direction[0],direction[1]))
});
global.account.getViewById('map').addPolyline(shape);

xeroxstar avatar Apr 03 '21 23:04 xeroxstar