Ready-to-use React component for a MapLibre GL JS-based
NextGIS Web map. It configures the MapLibre adapter for the common component
from @nextgis/react-ngw-map.
npm install maplibre-gl @nextgis/react-ngw-maplibre-gl
import { createRoot } from 'react-dom/client';
import ReactNgwMap from '@nextgis/react-ngw-maplibre-gl';
function App() {
return (
<ReactNgwMap
baseUrl="https://demo.nextgis.com"
resources={[{ resource: 6118, id: 'webmap', fit: true }]}
style={{ width: '100%', height: '100%' }}
/>
);
}
createRoot(document.getElementById('app')!).render(<App />);
The component accepts the common ReactNgwMap props, including
whenCreated, placeholder, and children. MapLibre GL JS worker setup also
applies; see the ngw-maplibre-gl instructions.
See the API Documentation and the package architecture guide.
Need to fix a bug or add a feature to @nextgis/react-ngw-maplibre-gl? We provide custom development and support for this software. Contact us to discuss options!