Closed mykolakozyr closed 3 years ago
the 'hide' function for .geojson layer raises by this part:
map.on('click', function () {
sidebar.hide();
})
In my project i "fixed" by adding (below others) not existing function to the openSidebar(e)
function. However, it seems like a bug.
Did anybody fix this?
@mykolakozyr would you provide a code sample for what you meant by "adding 'not existing function' to openSidebar(e)
?
I'm closing this for now. @mykolakozyr please feel free to share a sample of the code you used to fix this, and we can explore the issue as well as a potential fix.
Thanks!
I'm using Leaflet 1.1.0 and want to toggle sidebar while clicking on features from .geojson layer. I currently work with polygon objects. open sidebar (demo version):
defining OnEachFeature:
open .geojson:
While clicking on feature, there is the following in the console:
The sidebar works fine with Leaflet 0.7 when it is a .geosjon polygon The sidebar works fine with Leaflet 1.1.0 when it is a marker