Identifying marker clicked in EventListener's JS function
65 views
Skip to first unread message
vision
unread,
Jul 11, 2009, 10:16:24 PM7/11/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gmaps4jsf-dev
So I've created a map with a variable amount of markers using
ui:repeat, each having an event listener. However, I have yet to
figure out a way to identify which marker was clicked (more than just
it's latitude/longitude coordinates). I've tried doing it explicitly
like below, overwriting the MarkerValue that I believe is passed, but
this causes the js function to be executed on page load. Is there a
currently a way to do what I'm attempting in my example below?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gmaps4jsf-dev
Sorry, I didn't see this reply. I haven't used google groups before
and expected to get an email about a reply... Anways, yes, it's ran
on page load, which should have been quite obvious to me before. What
it's actually doing is making the function call when the page is
loaded, and trying to use whatever value the function returns as the
jsFunction name.
I have since been looking at the documentation of google maps more
closely and understand better it's use of closures and anonymous
functions to pass information. I haven't yet tried translating this
or my other ideas on how to get it working with gmaps4jsf. Perhaps
something I can play around with this weekend.