Simple experiment with a "fog of war" effect. Try it out at https://experiment-fog-of-war.netlify.app/.
Warning: Some of the map layers does not load when using StackBlitz and Firefox.
All the code for drawing the map is available in src/geo.js. All other files are for the user interface.
Libraries used:
- OpenLayers for drawing the map
- ol-ext for layer filters
- Turf.js for geometry calculations
Screenshot:
Clone repo:
$ git clone https://github.com/orbat-mapper/experiment-fog-of-war.git
Navigate to project root:
$ cd experiment-fog-of-war
Install dependencies:
$ npm install
To start a development server run:
$ npm run dev
The demo is now running on http://localhost:5173/.