Skip to Main Content
Leaflet.js Essentials
book

Leaflet.js Essentials

by Paul Crickard III
August 2014
Intermediate to advanced content levelIntermediate to advanced
180 pages
3h 41m
English
Packt Publishing
Content preview from Leaflet.js Essentials

Animating markers with plugins

In the next two sections, you will learn how to animate markers using the Leaflet.BounceMarker and Leaflet.AnimatedMarker plugins. Animation adds a wow factor to your map, but if overdone, it can make your map appear amateurish.

Bouncing your markers

The Leaflet.BounceMarker plugin does not have a large number of options to customize the markers or their behavior, but it provides a simple animation that is useful when you add markers to the map or on the hover event. You can download and learn more about the plugin at https://github.com/maximeh/leaflet.bouncemarker.

The following steps will show you how to add a bounce marker to your map:

  1. Add a reference to the JavaScript file. There is no CSS file required for this ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

GeoServer Beginner's Guide - Second Edition

GeoServer Beginner's Guide - Second Edition

Stefano Iacovella
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths
Stop Guessing

Stop Guessing

Nat Greene

Publisher Resources

ISBN: 9781783554812Supplemental Content