On Jun 25, 9:34 am, Eishita <[email protected]> wrote:
> I have created something like following -
>
>    1. In a Google map I'll place markers by clicking and there will be
> a table row created dynamically with each click and will show the lat,
> long in that table row.
>    2. I have put a delete button with each of the table row which
> deletes the corresponding row.
>
> What I want -
>
> I want when the row is deleted, the corresponding marker should also
> be deleted from the map. I have no clue how can I associate that
> specific marker with that delete button.
>
> Any sort of help will be appreciated. A rough look of my page is
> available here-
>
> http://aiworker2.usask.ca/stack.html

My suggestion would be to give each marker as it is created a unique
id.  Use that unique id to delete that marker by processing through
the markerArray looking for the marker with that id.  The hard part is
putting that unique id in call to deleteRow in the table.  I usually
create the entire row in javascript rather than cloning an existing
row, then I can pass whatever arguments to the function called by the
button click listener that I want to.

As an FYI, at least in Chrome all the rows (except the header) have
the id"tr1", all the delete buttons have the id delPOIbutton (the id
on an html element is supposed to be unique).

  -- Larry

-- 
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