🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

ol-rectangle-draw

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ol-rectangle-draw

This is an openlayers rectangle drawing supplement package. 这是一个openlayers矩形绘制补充包。

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

ol-rectangle-draw

ol-rectangle-draw nodejs blog

这是一个openlayers矩形绘制补充包。

This is an openlayers rectangle drawing supplement package.

中文文档

Run Simple Demo

$ git clone https://github.com/SuperYesifang/ol-rectangle-draw.git
$ cd ol-rectangle-draw
$ npm run serve

Usage

new RectangleDraw(Draw, Polygon, options?)

1. Use CDN

<script src="https://raw.githubusercontent.com/SuperYesifang/ol-rectangle-draw/master/dist/RectangleDraw.cdn.js"></script>
<script>
const draw = new RectangleDraw(ol.interaction.Draw, ol.geom.Polygon, {
  //...Draw constructor options
});

map.addInteraction(draw);
</script>

2. Use ESM

import Draw from "ol/interaction/Draw";
import Polygon from "ol/geom/Polygon";
import RectangleDraw from "ol-rectangle-draw";

const draw = new RectangleDraw(Draw, Polygon, {
  //...Draw constructor options
})

map.addInteraction(draw);

Options

proptypedescription
DrawDrawopenlayers Draw interaction constructor.
PolygonPolygonopenlayers Polygon geometry constructor.
optionsobjectDraw consturctor options (without type and geometryFunction)

Keywords

openlayers

FAQs

Package last updated on 18 Jul 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts