package.dist.esm.components.fullscreen-control.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of react-map-gl Show documentation
Show all versions of react-map-gl Show documentation
React components for Mapbox GL JS-compatible libraries
The newest version!
import { useEffect, memo } from 'react';
import { applyReactStyle } from '../utils/apply-react-style';
import useControl from './use-control';
function FullscreenControl(props) {
const ctrl = useControl(({ mapLib }) => new mapLib.FullscreenControl({
container: props.containerId && document.getElementById(props.containerId)
}), { position: props.position });
useEffect(() => {
applyReactStyle(ctrl._controlContainer, props.style);
}, [props.style]);
return null;
}
export default memo(FullscreenControl);
//# sourceMappingURL=fullscreen-control.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy