React-leaflet: Events zoomlevelschange

Created on 27 Feb 2017  路  3Comments  路  Source: PaulLeCam/react-leaflet

Hi

Is it possible to get events using react-leaflet?.. specifically want to show / hide Markers based on zoom level.

Thanks

All 3 comments

Hi, please refer to the relevant section of the documentation.

Which is the relevant section you refer to? I need this fuctionality too

Basically just prefix Leaflet events with 'on', so zoom, becomes onZoom. I believe
<Map onZoomlevelschange={(e) => { console.log(e); }}> ... </Map> should work.

That's what I've been doing with the 'zoom' event.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

acpower7 picture acpower7  路  4Comments

kaitlynbrown picture kaitlynbrown  路  3Comments

thenickcox picture thenickcox  路  4Comments

farahabdi picture farahabdi  路  3Comments

kojoa picture kojoa  路  3Comments