Open saadsaifse opened 4 years ago
@saadsaifse I just installed it in an app that uses react-leaflet@2.6.1
and the control is rendered and works. The usage is a little quirky -- you add fullscreenControl
as a prop on the Map
element, not as a child element like you would almost any other plugin:
import "react-leaflet-fullscreen-control"
<Map fullscreenControl />
@CraigCottingham I tried using 2.6.1
as well but it did not work out for me. May be its my setup or something. I can try creating a standalone project to test this later today.
Just using the original import "leaflet-fullscreen";
without this react wrapper works for me.
import "leaflet-fullscreen"
import "leaflet-fullscreen/dist/leaflet.fullscreen.css"
<Map fullscreenControl />
Just using the original
import "leaflet-fullscreen";
without this react wrapper works for me.import "leaflet-fullscreen" import "leaflet-fullscreen/dist/leaflet.fullscreen.css" <Map fullscreenControl />
This works for me in Firefox but crashes the whole map on iPhone Safari.
I came to using same solution as @aldipower -- works for me on all devices I've tested it on so far (including iOS Safari).
I tried using this plugin with
react-leaflet@2.6.3
but the control does not show up on the map. Is this compatible with v2 yet? https://react-leaflet.js.org/docs/en/plugins says it is still unknown whether its compatible or not.