Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@makina-corpus/mapbox-gl-forbidden-area

Package Overview
Dependencies
Maintainers
4
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@makina-corpus/mapbox-gl-forbidden-area

Disable events on feature collection

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
4
Weekly downloads
 
Created
Source

Mapbox-gl-forbidden-area

Mapbox-gl-forbidden-area allows you to disable events on feature collection.
It requires Mapbox-gl-js (or Maplibre-gl-js) as a dependency.

Run Locally

cd mapbox-gl-forbidden-area

Install dependencies

npm install

Start the server

mapboxglToken="YOUR_ACCESS_TOKEN" npm run start

Build

npm run build

Installation

Install Mapbox-gl-forbidden-area with your package manager:

npm install @makina-corpus/mapbox-gl-forbidden-area

Usage in your application

import MapboxForbiddenAreaControl from "@makina-corpus/mapbox-gl-forbidden-area";

Sample configuration

const mapboxForbiddenAreaControl = new MapboxForbiddenAreaControl(parameters);

map.addControl(mapboxForbiddenAreaControl);

Parameters

interface Parameters {
  featureCollection?: GeoJSON.FeatureCollection<GeoJSON.Geometry>;
  eventsToFire?: string[];
  eventsToDisable?: string[];
  radius?: number;
  forbiddenAreaConfiguration?: ForbiddenAreaConfiguration;
  getGeometryOnEnterForbiddenArea?: Function;
}

interface ForbiddenAreaConfiguration {
  sourceConfiguration: { id: string };
  layerConfiguration: {
    id: string;
    type: string;
    paint: { "fill-opacity": number; "fill-color": string };
  };
}

FAQs

Package last updated on 28 Oct 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc