map-scale-control

Scale control that can be used with vector map renderer.


Keywords
map-scale-control, scale, map, vector
License
MIT
Install
npm install map-scale-control@0.0.2

Documentation

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