Monday, September 05, 2016

Parallax Map Markers

Leaflet.Parallax.Marker is a plug-in for Leaflet.js that allows you to create map markers with a parallax effect. The plug-in makes the markers move, when you pan the map, at a different speed to the basemap.

Leaflet.Parallax.Marker comes with two demo maps. One shows the parallax effect added to place labels. Four different sizes of place labels are used in the demo. Each of the four different sized labels is given a different 'parallax offset' so that they appear to move independently of each over. The result is that the place labels have a parallax effect in relation to the basemap.

The second demo uses clouds as the map markers. This creates a map with clouds that appear to float over the basemap when you pan around.
Post a Comment