geocanvas: beta version
Functions for Working with GeoSpatial Canvas Elements
install
npm install geocanvas
basic usage
```js
import { maskCanvas } from 'geocanvas';// this function is mutable // modifying the original canvas maskCanvas({ // required // an HTML Canvas Element canvas,
// required // bounding box of the canvas // as xmin, ymin, xmax, ymax // or west, south, east, north canvasbbox: 7698736.857788673, 163239.83797837645, 10066450.245949661, 1325082.6679127468,
// required // spatial reference system of the canvas image canvassrs: 3857,
// optional canvaspixelheight: 2445.98490512499,
// optional canvaspixelwidth: 2445.98490512499,
// required // a GeoJSON Feature, FeatureCollection, Polygon, or MultiPolygon mask: { type: "FeatureCollection", features: / ... / },
// required // spatial reference system of the mask geometry masksrs: 4326,
// optional parameter // accepts "outside" or "inside" // default is outside // choose whether to make the inside or outside // of the mask geometry transparent strategy: "outside" });