Skip to content

Latest commit

 

History

History
52 lines (30 loc) · 1.1 KB

README.rst

File metadata and controls

52 lines (30 loc) · 1.1 KB

Leaflet.Deflate

Extends Leaflet.Map to automatically substitute polygons and lines with markers when their screen size falls below a defined threshold.

https://cloud.githubusercontent.com/assets/159510/7164588/090c06fe-e399-11e4-956d-0283ef7e69cf.gif

Usage

Initialize along with the minSize. minSize defines the minimum width and height in pixels for a Path to be displayed in its actual shape.

var map = L.map.deflate('map', {minSize: 20})

All options and methods from Leaflet.Map are inherited.

Developing

You'll need to install the dev dependencies to test and write the distribution file.

npm install

To run tests:

gulp test

To write a minified JS into dist:

gulp dist

Author

Oliver Roick

License

Apache 2.0