block by rveciana a8f24ce0ea98e403e266dfb4f9b6b2e9

Svelte mapping: Transitions

Full Screen

Third example of a map drawn with Svelte and the d3 projections. Transitions are made now when the mouse is over a region and when the projection is changed.

Check this blog post from Geoexamples for more explanations.

To test it, clone the standard svelte template by

npx degit sveltejs/template svelte-app cd svelte-app

And copy the App.svelte and Feature.svelte files into the src directory.

index.html

App.svelte

Feature.svelte

bundle.css