Styling Google Maps API Policies

I use the google map api and wondered if there was anything at all to create a dashed or dashed line stroke of the polyline. There would also be an easy way to create a curved line between two destination points, not a straight line: the code I'm drawing now has a straight gray line,

polyline = new google.maps.Polyline( { path: route, strokeColor: "#7d7d7d", strokeOpacity: 0.6, strokeWeight: 5 } ); polyline.setMap( map ); 

Any advice or help would be appreciated, thanks.

+6
source share
2 answers

What is the curved line? You can add geodesic: true to your Polyline parameters, which will draw curved lines showing the shortest distance between two points (taking into account the curvature of the earth), but they are really noticeable only at a sufficiently large magnification, and the line is between two rather far apart .

+8
source

Look at my free plug-in for curved lines on Google maps, I have a very simple solution, but it does its job: http://curved_lines.overfx.net/

+8
source

Source: https://habr.com/ru/post/899521/


All Articles