New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-leaflet-craft

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-leaflet-craft

React Component for leaflet-craft

  • 1.0.18
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

npm version

react-leaflet-craft

React component built on top of react-leaflet that integrates Leaflet-Craft library.

Install

npm install react-leaflet-craft

Make sure that you have the following peer dependencies installed.

npm install leaflet react-leaflet leaflet-craft ramda react react-dom

Getting started

Please make sure that you go through Leaflet-Craft readme before integrating this component.

You need to wrap this component into Map component and pass the options as shown below.

import { Map } from 'react-leaflet';
import Freedraw, { ALL } from 'react-leaflet-craft';

const Component = () => (
  <Map>
    <Freedraw
      mode={ALL}
      onMarkers={this.handleOnMarkers}
      onModeChange={this.handleModeChange}
      ref={this.freedrawRef}
    />
  </Map>
);

It supports all the options mentioned in Leaflet-Craft.

A detailed example of how to use this component is in the example folder of this repo. To run the example,

  1. Clone this repo
  2. Run npm i
  3. Run npm run example

FAQs

Package last updated on 21 Nov 2019

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