GithubHelp home page GithubHelp logo

w8r / l.control.linestringselect Goto Github PK

View Code? Open in Web Editor NEW
47.0 5.0 8.0 3.18 MB

Polyline selection control for Leaflet

Home Page: https://w8r.github.io/L.Control.LineStringSelect

License: MIT License

JavaScript 99.73% HTML 0.19% Less 0.07%
leaflet leaflet-plugin linestring selection

l.control.linestringselect's Issues

TypeScript Support

Hello,
Nice work!!! This is a really cool component. I am developing a custom map tool in Angular2/4 project and would like to include your tool. I am having issue getting it to load in my angular project (Typescript). Do you have any Typescript support or recommendations for type script support and including and using in an Angular2/4 project?

Thank you in advance.

Why is this a 'Control'?

It seems that this class would fit better under L.Handler, since it is enabled/disabled and uses markers (much like the Draw handlers), and isn't added to a control corner (like other L.Control types)

Is there a reason that this wasn't extended from L.Handler?

Set a fixed start point that doesn't respond to drag

How would it be possible to set a starting point that doesn't move, and only allow the end handle to respond to drag events?
This would need blocking the swapping of start and end points to go only in one direction.

Markers can be dragged outside of LineString Element

There is an issue with creating a selection from the lineString, I have used your demo to illustrate.
Grabbing the marker and pulling it past the end of the segment extends the marker itself out to the point where the cursor influences the base feature. This influence (in latitude and longitude) becomes greater as the map is zoomed out.

I increased the thickness of the base feature to illustrate the discrepancy between its end and the end of the selection which was achieved at a lower zoom level.

issue-lineselect

Uncaught Error: Cannot find module 'rbush'

On a new reactjs project https://github.com/keyanyang/react-leaflet-webpack-boilerplate
npm install --save leaflet-linestring-select

I just add this lines in App.js

import { Map, TileLayer } from 'react-leaflet';
import Select from 'leaflet-linestring-select'

or

import { Map, TileLayer } from 'react-leaflet';
var Select = require('leaflet-linestring-select');

Uncaught Error: Cannot find module 'rbush'
    o http://localhost:8080/main.js?c2066d2489971b870df7:1666
    ./node_modules/leaflet-linestring-select/dist/L.Control.LineStringSelect.no-rbush.js/</</<[5]</<

On line : var Rbush = global.Rbush || require('rbush');

What I'm doing wrong ?

Angular Js6

Please provide any reference or documentation in order to implement this great tool in typescript or angular.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.