map-scale-control

0.0.3 • Public • Published

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

Package Sidebar

Install

npm i map-scale-control

Weekly Downloads

2

Version

0.0.3

License

MIT

Unpacked Size

4.53 kB

Total Files

4

Last publish

Collaborators

  • pirxpilot