Y E S,
it works, http://www.variouselmts.com/happytrees/map2.html
Thanks a lot for your help
Now I "only" have to add the save to kml function
greetings
On Oct 13, 1:06 am, Mike Williams <[EMAIL PROTECTED]> wrote:
> Wasn't itVariousElmtswho wrote:
>
>
>
> >I want to add markers by clicking the map and remove them by clicking
> >on a link in the info window.
> >my script didn't work if you add multiple marker and drag them
> >arround.
>
> It's nothing to do with the dragging. You attempt to use "clickmarker"
> to store a global reference to the last marker that was created, and
> remove that one. What you should do is keep a reference to the last
> marker on which the info window was opened, and remove that one.
>
> Also, when the user clicks on an overlay, such as the "remove" or "save"
> link in the info window, you don't test to see whether the map click was
> a point or an overlay, so your code crashes when you do this:
> GEvent.addListener(map, 'click', function(overlay, point) {
> clickmarker = createmarker(point, 'click');
> You need to add a test, like this
> GEvent.addListener(map, 'click', function(overlay, point) {
> if (point) {
> clickmarker = createmarker(point, 'click');
> ...
> }
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---