Adding marker by clicking on map problem
Hi
I'm also using this code to select location from map and it sends the latlng of the last click to LVs nicely but the problem is that it still places markers every time I click
How to have it just moving the same marker .?
------var placedMarkers = 0;
var availableMarkersToPlace = 1;
setTimeout( function(){
if(placedMarkers = availableMarkersToPlace)
return;
placedMarkers++;
var map = Appery("google_map").gmap;
google.maps.event.addListener(map, 'click', function(event) {
localStorage.setItem('myPos',event.LatLng);
placeMarker(event.latLng,map);
Code: Select all
});
}, 1000);
---------