Hi everybody

I am trying to implement a function where the user add a pin to the
map, then remove if he wants. But once removed the pin, he is not able
to add anymore. Can anybody tell me what is wrong with my function?

How can he add/remove the pin anytime he wants?


here is my code:

marker = new GMarker(latlng, {draggable:true});

GEvent.addListener(marker, "click", function() {
var html = "<table>" +
"<tr><td>Name:</td> <td><input type='text' id='name'/> </td> </tr>" +
"<tr><td>Address:</td> <td><input type='text' id='address'/></td> </
tr>" +
"<tr><td></td><td><input type='button' value='Save' onclick='saveData
()'/></td></tr>" +
"<tr><td></td><td><input type='button' value='Delete'
onclick='map.removeOverlay(marker)'/></td></tr>" +
"</table>";
marker.openInfoWindow(html,{redraw:true});
});
map.addOverlay(marker);



Does anybody help me?


Cheers


Kelson




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-maps-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to