1.0.0 • Published 4 years ago

google-maps-drawing-tools v1.0.0

Weekly downloads
11
License
MIT
Repository
github
Last release
4 years ago

google-maps-drawing-tools

Have you noticed that Google Maps has two ways to draw and both have different options? Well this library tries to have a unified way to draw that allows exporting geojson and restoring drawings from existing geojson.

Install

npm install --save google-maps-drawing-tools

Usage

import DrawingManager from 'google-maps-drawing-tools';

const map = new google.maps.Map(element, mapOptions);
const manager = new DrawingManager({ map });

// Load geojson
manager.data.addGeoJson(geoJson);

// Can also use 'line', 'circle', 'rectangle' and 'marker'
manager.changeTool('polygon');

// Draw a polygon on the map..

manager.data.toGeoJson((geojson) => {
  // access the geojson
});

API Documentation

TODO

  • Add Text Label
  • Add measurement option
  • Add measurement units option
  • etc..
1.0.0

4 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago