Skip to main content
100%

Fork of OpenLayers Dark Basemap

✓ Published0🌍 Public
CCarlos Augusto Ribeiro Mantovani
Last edited Aug 4, 2021
Created on Jul 29, 2021

This example displays an interactive map using the Stamen Toner-Lite basemap, rendered through an OpenLayers map view integrated into a React component. The map initializes with a specific zoom level and center coordinate, and the `moveend` event logs the current view’s zoom and center to the console, demonstrating how to track navigation. The map is dynamically created in a React effect, attaching the tile layer to a `div` target, with cleanup that detaches the target on component destruction. The basemap layer uses a CSS filter to maintain a muted, inverted appearance.

AI-generated description

OpenLayers with React Starter code.

Additional feature: muted background.

MIT Licensed

Similar vizzes