Open 4khobta opened 5 years ago
$polygon = new Polygon(['name'=>'poly','map'=>'map']); $polygon->setLatLngs([$poly1, $poly2, $poly3, $poly4]); $polygon->clientEvents = ['click' => "function(e) {alert(1)}"]; but return wrong js without event: map.addLayer(var poly = L.polygon([[50.07300647938297,31.440094543457036],[50.07300647938297,31.438094543457034],[50.074006479382966,31.438094543457034],[50.074006479382966,31.440094543457036]],
@4khobta you just found a bug. Forgot to collect events.
this code worked for me. I created a class by extending the Polygon class and modified the encode function as seen in the image.