0.0.3 • Published 4 months ago

map-scale-control v0.0.3

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

NPM version Build Status Dependency Status

map-scale-control

Scale control that can be used with vector map renderer: a simplified version of the ScaleControl implemented in mapbox-gl-js

Install

$ npm install --save map-scale-control

Usage

var scaleControl = require('map-scale-control');

var scale = scaleControl({
  maxWidth: 150,
  unit: 'imperial'
 });

 map.addControl(scale);
 scale.setUnit('metric');

License

MIT © Damian Krzeminski