Map on Video effect. This is simply 1 final result inwards their Map Effects 100 collection of cool user interactions for Leaflet maps. In the demo of Map on Video a map of Las Vegas is overlaid on tiptop of a video driving downwards Las Vegas Boulevard. An animated motorcar mark shows the position of the motorcar moving on the map every bit it drives downwards the street, while, inwards the background, yous tin genuinely sentinel every bit the video plays.
Codrops has similar a shot created a similar map final result which uses static images rather than a video. Simple Interactive Points Effect creates a static map amongst a reveal of map markers. As the user hovers over the mark the map becomes partly transparent in addition to a photograph of the marked location tin hold out come across through the map. When the user clicks on the mark the map becomes completely opaque in addition to all yous tin come across is the background image.
In final result a background page chemical cistron replaces the park mark data window or mark pop-up. When the map user clicks on a map mark instead of content beingness displayed inwards a mark pop-up it is displayed inwards house of the actual map.
The codrops final result uses a static map but this final result could easily hold out reproduced amongst an interactive map. Essentially all yous take away to practise is practise ii page elements - 1 positioned just on tiptop of the other. The page chemical cistron for the map should hold out on tiptop (use z-index on your page elements) in addition to should accept an opacity of '1'.
You tin thence accommodate the opacity of the map past times using lawsuit listeners on your map markers. When a user mouse-overs a mark yous tin accommodate the opacity of the map chemical cistron to '0.5' - thence that the background icon tin hold out seen through the map. When the user clicks on the mark yous tin piece of job the lawsuit listener to accommodate the opacity of the map asset chemical cistron to '0' - thence that the map is similar a shot completely transparent in addition to all the user sees is the icon background.