1.0.13 ā€¢ Published 4 months ago

ol-zoom-level v1.0.13

Weekly downloads
1
License
ISC
Repository
github
Last release
4 months ago

Welcome to ol-zoom-level šŸ‘‹

Twitter: plexearth

OpenLayers zoom level library. Adds a zoom level view on an OpenLayers map that displays the current zoom level.

Install

npm install ol-zoom-level

Usage

To use ol-zoom-level, first you need to load OpenLayers JavaScript library along with its corresponsing CSS.

<script src="https://openlayers.org/en/v4.6.5/build/ol.js"></script>
<link rel="stylesheet" href="https://openlayers.org/en/v4.6.5/css/ol.css" type="text/css">

Then, load the ol-zoom-level library from node_modules

<script src="./node_modules/ol-zoom-level/build.js"></script>

Finally, in your existing OpenLayers application, add ol-zoom-level HTML element and pass the OpenLayers map object as a property.

const zoomLevel = document.createElement('ol-zoom-level');

// map is the OpenLayers map object
zoomLevel.map = map;

document.body.appendChild(zoomLevel);

Please note that if you are creating the zoom level control synchronously with the creation of the map, you may need to introduce a timeout so that the map has enough time to instantiate.

Author

šŸ‘¤ Plexscape

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

1.0.13

4 months ago

1.0.12

5 months ago

1.0.11

12 months ago

1.0.10

2 years ago

1.0.9

3 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.2

6 years ago

1.0.0

6 years ago

0.0.1

6 years ago