You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to identify the click on a polygon.
the problem is that every time the page is loaded, the event processclick is
invoked for all polygons.
how can I implement this?
<script type="text/javascript">
function processClick(id) {
alert(id);
}
</script>
<ui:repeat value="#{mapsheetsHome.rawDataTracks}" var="track">
<m:polygon lineWidth="1" hexFillColor="#0000FF" hexStrokeColor="#0033FF">
<m:point latitude="#{mapsheetsHome.rad2deg(track.latNearBegin.doubleValue())}" longitude="#{mapsheetsHome.rad2deg(track.longNearBegin.doubleValue())}"/>
<m:point latitude="#{mapsheetsHome.rad2deg(track.latFarBegin.doubleValue())}" longitude="#{mapsheetsHome.rad2deg(track.longFarBegin.doubleValue())}"/>
<m:point latitude="#{mapsheetsHome.rad2deg(track.latFarEnd.doubleValue())}" longitude="#{mapsheetsHome.rad2deg(track.longFarEnd.doubleValue())}"/>
<m:point latitude="#{mapsheetsHome.rad2deg(track.latNearEnd.doubleValue())}" longitude="#{mapsheetsHome.rad2deg(track.longNearEnd.doubleValue())}"/>
<m:point latitude="#{mapsheetsHome.rad2deg(track.latNearBegin.doubleValue())}" longitude="#{mapsheetsHome.rad2deg(track.longNearBegin.doubleValue())}"/>
<m:eventListener eventName="click" jsFunction="processClick('#{track.trackNumberTime}')"/>
</m:polygon>
</ui:repeat>
thanks.
Original issue reported on code.google.com by [email protected] on 14 Jun 2013 at 6:51
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 14 Jun 2013 at 6:51The text was updated successfully, but these errors were encountered: