4
I’m developing an app to design routes from data collected by an embedded GPS system. My server receives coordinates from different equipment and I am recording this in my database.
What has helped me so much is this question in Stackoverflow-en.
In this issue I found the code of my application as well as a small correction to suit my needs.
My question is how to remove Bookmarks from the map.
In the image below I have a result from the execution of my application:
I would like to make it as shown in the image edited below (No intermediate markers, only markers start and end):
During my research to solve this problem I found several possible solutions, among which I found plausible this, which is to add the following code to remove all markers.
for (i = 0;i < markers.length;i++) {
markers[i].setMap(null);
}
I know with some changes in the variable i
that could start with i = 1
and the condition i <= markers.length
it might be possible to preserve the markers start and end, but I don’t understand why this isn’t removing markers.
What code are you trying? Regarding the
i
, the stopping condition would bei < markers.length-1
and noti <= markers.length
, maybe this is returning an error and "seems" that is not working...– Felipe Avelar
Next Eduardo... it’s kind of hard to know where the problem is if we don’t have the marker generation code, post the javascript code we checked for you.
– Julio Borges