Skip to content

with L_PREFER_CANVAS, Path click's event.layer points to Map #1215

@smremde

Description

@smremde

Tested with 0.4.5

var polygons = new L.FeatureGroup();

polygons.addLayer(
   new L.Polyline(points, { weight: 2, opacity: 1, color:'red' })
);

polygons.on('click', function (m) { 
   // m.layer is the clicked polygon here
   m.layer.bindPopup('hello!').openPopup();
});

stops working with

L_PREFER_CANVAS = true;

m.layer is something else?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions