Skip to main content
100%

Fork of OpenLayers Dark Basemap

✓ Published0🌍 Public
Wweldream
Last edited Mar 21, 2023
Created on Mar 21, 2023

This example shows a muted, inverted-toner map rendered with OpenLayers in a React component, using a Stamen toner-lite basemap that is styled through CSS filters (`invert(1) opacity(0.3)`) to create a dark cartographic background. The React `useEffect` hook initializes an `ol.Map` and `ol.View` with a specific center and zoom, and logs the updated zoom and center coordinates on every `moveend` event. It demonstrates integrating OpenLayers 6.2.1 with React 16, managing map lifecycle cleanup via `map.setTarget(null)`, and a custom `Basemap.js` layer built from `ol.layer.Tile` and `ol.source.Stamen`.

AI-generated description

OpenLayers with React Starter code.

Additional feature: muted background.

MIT Licensed

Similar vizzes