Socket
Socket
Sign inDemoInstall

maptalks.geosplit

Package Overview
Dependencies
120
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    maptalks.geosplit

A tool to split Polygon or Line whith one or more lines.


Version published
Maintainers
1
Install size
1.10 MB
Created

Readme

Source

maptalks.geosplit

A tool to split Polygon or Line whith one or more lines.

Examples

DEMO

Install

  • Install with npm: npm install maptalks.geosplit.
  • Install with yarn: yarn add maptalks.geosplit.
  • Download from dist directory.
  • Use jsdelivr CDN: https://cdn.jsdelivr.net/npm/maptalks.geosplit/dist/maptalks.geosplit.min.js

Usage

As a plugin, maptalks.geosplit must be loaded after maptalks.js in browsers. You can also use 'import { GeoSplit } from "maptalks.geosplit" when developing with webpack.

<!-- ... -->
<script src="https://cdn.jsdelivr.net/npm/maptalks.geosplit/dist/maptalks.geosplit.min.js"></script>
<!-- ... -->
const ms = new maptalks.GeoSplit() // use GeoSplit API, targets is not necessary parameters and if no targets user will choose geometry on the map. Get details in API Reference.

API Reference

new maptalks.GeoSplit()
// new maptalks.GeoSplit({ deleteTargets: false })
  • options
    • deleteTargets boolean decide if targets lines will be removed, default is true
    • colorHit String the color of symbol when geo hit
    • colorChosen String the color of symbol when geo chosen

split(geometry, targets) targets can be one line or lines-array submit(callback) callback can get two attr, the result and deals which be remove in task cancel() remove()

Contributing

We welcome any kind of contributions including issue reportings, pull requests, documentation corrections, feature requests and any other helps.

Develop

The only source file is index.js.

It is written in ES6, transpiled by babel and tested with mocha and expect.js.

Scripts

  • Install dependencies
$ npm install
  • Watch source changes and generate runnable bundle repeatedly
$ gulp watch
  • Package and generate minified bundles to dist directory
$ gulp minify
  • Lint
$ npm run lint

More Things

Keywords

FAQs

Last updated on 30 Mar 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc