dapriett / nativescript-google-maps-sdk

Cross Platform Google Maps SDK for Nativescript
MIT License
244 stars 169 forks source link

shape.loadPoints is not a function? #465

Open xeroxstar opened 3 years ago

xeroxstar commented 3 years ago

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);