glenrobertson / leaflet-tilelayer-geojson

Leaflet TileLayer for GeoJSON tiles
Other
250 stars 79 forks source link

pointtolayer makes first geojson feature parentLayer #14

Closed fritzvd closed 6 years ago

fritzvd commented 10 years ago

Hi,

We've been implementing some clickhandlers on this very fine TileLayer of yours. But I could not exactly pinpoint what the problem I think I found a little bug.

When I add a tilelayer with multiple features the first feature becomes a parentLayer. All of the other layers become part of this parentLayer.

This means that whenever I click on the layer it produces 2 events. Where one is always from the parent, the second from the specific child I'm pressing.

I added a little snippet with the console output in Chrome below. In the example I have 4 features that I add. The first feature is used as parent and also gets itself as a child.

geojsonlayers

tim-lan commented 8 years ago

same problem as @fritzvd here.