I’d like to take a Google Map v3-based map with some custom polylines, and make some of those lines dotted or dashed. I can’t seem to find any way of doing this. Is it possible, and if so, how?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This feature has been added to Polyline options, and it’s called Symbols on Polylines
Creating a dashed line looks like this (demo):
Dash length is controlled by
path‘s +/-1, and spacing is controlled byrepeat. It’s a bit verbose, but very flexible.Besides dashes, the new feature includes predefined paths for a circle, arrowheads, and the docs even include an animation demo 🙂