You can reference the clicked marker with 'this':

google.maps.event.addListener(marker, 'click', markerListener);

function markerListener() {
  alert(this.getPosition());
  // this.setIcon(...
}

On Tue, Mar 29, 2011 at 7:20 PM, Thoern <turbokil...@gmail.com> wrote:

> Anyhow I thought of a different approach, googlemaps does only render
> the markers in current mapwindow right? can you fetch those array ids
> somehow ? or the coordinates of the markers?
>
>
> I would like to get the markers id for two purposes. (both ways)
>
> 1. to do some extra stuff (maby open a certain kml file) based on the
> map clicked markers id.
> 2 have the marker "highligted" when doing a seach on one of the
> markers so you can see wich one you picked in select/option list.
>
> --
> 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
> google-maps-js-api-v3@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-js-api-v3+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>


-- 
http://twitter.com/broady

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to