A plugin of maptalks.js to set a custom zoom control which is different from maptalks's zoom control,and update some functions.
- marker clusters of 50000 points. (data from Leaflet.Heat)
- Install with npm:
npm install maptalks.customzoom. - Download from dist directory.
- Use unpkg CDN:
https://unpkg.com/maptalks.customzoom/dist/maptalks.customzoom.min.js
As a plugin, maptalks.customzoom must be loaded after maptalks.js in browsers.
<script type="text/javascript" src="https://unpkg.com/maptalks/dist/maptalks.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/maptalks.customzoom/dist/maptalks.customzoom.min.js"></script>
<script>
var zoom = new maptalks.CustomZoom({position: {
left: 100,
top: 50
}
}).addTo(map);
</script>IE 9-11, Chrome, Firefox, other modern and mobile browsers.
CustomZoom is a subclass of maptalks.control.Control and inherits all the methods of its parent.
new maptalks.CustomZoom(options)- options Object some config for the zoom control
We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.
The only source file is index.js.
It is written in ES6, transpiled by babel and tested with mocha and expect.js.
- Install dependencies
$ npm install- Watch source changes and generate runnable bundle repeatedly
$ gulp watch- Tests
$ npm test- Watch source changes and run tests repeatedly
$ gulp tdd- Package and generate minified bundles to dist directory
$ gulp minify- Lint
$ npm run lint