Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

+ and – control options in react leaflet

Is there a way in which I can remove the "+" and "-" symbols
from my react-leaftlet map container?

+ and - symbols

This is my mapContainer element:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

<MapContainer
    center={[0.0, 0.0]}
    zoom={2}
    attributionControl={false}
    doubleClickZoom={false}
    boxZoom={false}
    zoomSnap={0.2}>
    <TileLayer url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
</MapContainer>

>Solution :

You should be able to use the zoomControl map creation option, which is ported as a prop in React Leaflet:

<MapContainer
    zoomControl={false}
</MapContainer>

When creating a MapContainer element, its props are used as options to create the Map instance.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading