Widget HTML Atas

Two Maps For The Cost Of One


The Mapbox GL JS documentation has a prissy novel illustration showing how yous tin synchronize 2 maps side-by-side. Swipe Between Maps creates 2 synchronized maps together with allows yous to swipe betwixt the 2 dissimilar map instances.

Swipe Between Maps could live on a a prissy agency to showcase all the beautiful map styles that I'm certain yous bring been creating amongst Mapbox Studio. Of shape yous aren't express to only 2 maps. You could add together a carte du jour to i of the map instances inward Swipe Between Maps which would let users to alter the base of operations map layer (you could fifty-fifty add together a carte du jour to let users to alter the base of operations maps of both map instances).

I've created a quick demo which adds a carte du jour to Swipe Between Maps. Swipe Compare allows yous to pick out a dissimilar base of operations map agency inward the left map instance. I've added only 4 base of operations map styles to my example. You could off shape add together equally many map styles equally yous bring created inward Mapbox Studio.