Skip to content
This repository was archived by the owner on Jul 27, 2023. It is now read-only.

How to add an event to a polygon? #45

@4khobta

Description

@4khobta
$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]], 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions