Leaflet Overlay OnEachFeature
When you are displaying geojson
with leaflet
overlays, onEachFeature
is a function will be applied on each feature, e.g. a point or a polygon in a features
collection.
I overwrote the onEachFeature
with a cusmerized function, when this funtion is running, it get the information from current display/undisplay layer, and changes the global variable gDisplayLayersInfo
accordingly.
1 | function overlayOnEachFeature(feature, layer){ |
Apply the cusmerized onEachFeature
to the layer which will be added:
1 | //add geojson polygon to the map |