Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polygon events are propagated multiple times when they are created in a list #197

Open
GoogleCodeExporter opened this issue Mar 23, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant