0

OnClick event on Gpolygon?

asked 2014-12-08 12:15:36 +0800

Stoichkoff gravatar image Stoichkoff
1

Hi all!

I want to make Gpolygon clickable, but zk Gmaps does not support "clickable". I want to call a method, when Gpolygon is clicked

 <gpolygon editable="true" opacity="25" fillOpacity="5" fillColor="@load(poly.color)" points="@load(poly.points)" onPathChange="@command('changeCoordPolygon')" />
delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-12-10 17:23:19 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Have you try with a clickable div around it?

link publish delete flag offensive edit
0

answered 2014-12-11 07:46:06 +0800

Stoichkoff gravatar image Stoichkoff
1

Yes, like this:

<div onClick="@command('test')">
<gpolygon opacity="25" fillOpacity="5" fillColor="@load(poly.color)" points="@load(poly.points)" onPathChange="@command('changeCoordPolygon')" />
</div>

But throws exception: Only Mapitem such as Ginfo, Gmarker, Gpolyline, Gpolygon, Gimage, Gscreen is allowed to be child of Gmaps: <gmaps d0jqe1#mymap="">,

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-12-08 12:15:36 +0800

Seen: 11 times

Last updated: Dec 11 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More