Open arunkumart07 opened 5 years ago
Hi,
This is how I did it inside of the onMapReady function:
onMapReady = (event) => {
const mapView = event.object;
const polyline = new mapsModule.Polyline();
polyline.addPoint(mapsModule.Position.positionFromLatLng(someLatitude, someLongitude));
polyline.addPoint(mapsModule.Position.positionFromLatLng(someOtherLatitude, someOtherLongitude));
polyline.visible = true;
polyline.width = 2;
polyline.geodesic = false;
polyline.color = new Color("#DD00b3fd");
mapView.addPolyline(polyline);
Let me know if you have any issues. Hope this isn't too late!
Thanks alot @tylerablake I had been looking for this.
I have set of lat and lng point that is received from google direction api. Now i want to draw polylines between those points. Can anyone help me to draw polyline.