Answer the question
In order to leave comments, you need to log in
What is the best way to implement a route in GoogleMaps as points?
Hello, friends.
I need to do the following thing - draw a route with dots on the Google map. I understand that the standard API does not provide such an opportunity, but suggests using Polyline. That's why I decided to implement a fairly hacky solution:
- create an array of markers
- attach a picture of a point to each marker
I will say right away that Circle is not suitable, I need the size of the points not to change. It is also necessary that the number of points change when scaling, so that the points do not intersect at a large scale, and are not too far apart from each other at a small one. I have not yet decided how to do this, but I will gladly accept advice))) But for now, I think that, depending on the scale, the iteration step over the elements of the array of all "points" will simply change when "drawing" elements on the map.
By the way, an object moves along the route, when it reaches a point, the image of the point changes to the image of the object, well, just in case.
What do you say, comrades? Maybe there is a more elegant solution? Some kind of specific library or something like that?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question