google-maps-drawing-measurements

1.0.39 • Public • Published

google-maps-drawing-measurements

Draw poly and measure its lengths and area on Google Map.

Usage

# install google-maps-drawing-measurements 
npm install google-maps-drawing-measurements format-unit
# install peerDependecy format-unit 
// import lib
import * as GMDM from 'google-maps-drawing-measurements'
 
// set map
GMDM.setMap(map)
 
// start measuring
GMDM.start()
 
// stop measuring
GMDM.stop()
 
// start measuring from existing shape
GMDM.start([
  [-116.71335014686588, 47.95272425175882],
  [-116.71021732673648, 47.952810478513214],
  [-116.71030315742496, 47.95384518834307],
])}
 
// track changes
GMDM.on('coordinates', console.log)

Development

Client side ESM module bundled as ESM module with rollup.

Readme

Keywords

Package Sidebar

Install

npm i google-maps-drawing-measurements

Weekly Downloads

15

Version

1.0.39

License

UNLICENSED

Unpacked Size

257 kB

Total Files

69

Last publish

Collaborators

  • jesus-crow
  • svycka