0

I have created a curved UIBezierPath from a list of points on the Google Map in my iOS application. Is there any way for me to draw this path on the GMSMapView? The only options I have seen so far for GMSOverlays are straight lines (GMSPolyLine, GMSPolygon, etc).

I have a workaround in which I create a CAShapeLayer from the UIBezierPath, and add it as a sub layer to the GMSMapView, however my path then runs on top of the GMSMarkers on my map, and I need the markers to show on top of the path. If there is a way to modify this workaround to get the path underneath the markers that would also be acceptable.

haplo1384
  • 1,206
  • 1
  • 12
  • 29
  • have you tried `GMSPolyline` with `geodesic` set to true ? "When YES, render this polyline edge as a geodesic. Geodesic segments follow the shortest path along the Earth's surface and may appear as curved lines on a map with a Mercator projection. Non-geodesic segments are drawn as straight lines on the map. Defaults to NO." – GIJOW May 31 '17 at 20:24
  • yes i tried this, the GMSPolyline doesn't curve much unless the distance is long. there is also no way to mimic the curve of the UIBezierPath, which can have significant deviations from the straight line path between two points. – haplo1384 May 31 '17 at 21:14
  • Can you please tell me do you draw curve path on google map with UIBezierPath ? – Dhruv Dalwadi Sep 13 '18 at 14:06

0 Answers0