4 votes Vote

adding markers after initialisation

Add option to add marker by calling something like $("#map").gmap("addmarker", {//marker params here});

fridek, 14.03.2011, 16:48
Response from the site administrator
fridek, 20.03.2011
Scheulded for 3.1.0
Idea status: completed

Comments

fului, 31.03.2011, 11:56
In addition to the possibility of adding markers after initialization, it would be nice to be able to remove all the previously added markers, by calling something like,
$("#map").gmap("deletemarkers");
fridek, 02.04.2011, 18:16
Good point. I'll ship it with 3.1.0, it should be easy.
fului, 08.04.2011, 11:20
Thanks, the removeAllMarkers works great.

Also it would be nice to be able to select one of the new markers to be the center of the map, maybe by adding the followng to the json data.

{"markers":[{"latitude":lat,"longitude":lng,"center":true}]}

where defaults to false if not set.

Also the onComplete function would be nice to have on the addMarkers function

Leave a comment