also tried setting pushPin.id = index and the pushPin.id.setMap(null) -
= no luck.

Any further suggestions/help.
thanks

On 23 Apr, 12:22, kathb4 <[email protected]> wrote:
> Thanks. Gave that a shot and it doesn't work because any/all saved
> pushpins get deleted as well.
>
> The application allows a user to add a marker and save the data and
> the pin stays on the map.
> They should be able to enter 'add a tree' again to add another pin.  I
> want them to be able to click cancel in the infowindow form, or click
> the clickclose and delete the current pin they have just added.  Thats
> why I was using the array (I thought) and pop off the last one they
> added.
>
> Do I somehow need to uniquely name each pushpin as it is added?
>
> In addition, if you delete, then add, then delete, you can see the
> alert still appears for every marker added, not just once as it
> should?
>
> Appreciate your help - and all your work on this forum
> -K
>
> On 22 Apr, 20:47, Esa <[email protected]> wrote:
>
>
>
>
>
> > You delete the marker by cancelAndClose() function trying to use an
> > index system. You should pass the marker to the function as a
> > parameter.
>
> > Inside your makeMarker() function:
>
> >     cancelAndClose(pushPin);
>
> > and modify your cancelAndClose() function to:
>
> >     function cancelAndClose(marker){
> >       marker.setMap(null);
> >     }
>
> > You don't have to close the info window in that function. It is
> > already closing when the function is called.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Maps JavaScript API v3" 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 
> > athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Maps JavaScript API v3" 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 
> athttp://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to