Giter VIP home page Giter VIP logo

leaflet.lineextremities's Introduction

Leaflet.LineExtremities

Shows symbols on the extremities of a Polyline, using SVG markers.

Check out the demo !

Leaflet versions

The version on the gh-pages branch targets Leaflet 0.7.3.

Please use the leaflet0.8-dev branch to be compatible with the development version of Leaflet (0.8).

Usage

To display dots at the extremities of a Polyline:

    var layer = L.polyLine(...);

    layer.showExtremities('dotM');

There is currently 5 types of markers:

  • stopM: perpendicular line
  • squareM: square
  • dotM: dot
  • dotL: large dot
  • arrowM: arrow

CHANGELOG

0.1.1

  • Create the defs node before the paths (#10)

Authors

Makina Corpus

leaflet.lineextremities's People

Contributors

bo-duke avatar fredericbonifas avatar leplatrem avatar mazgis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

leaflet.lineextremities's Issues

Demo offline

Hi all! I've clicked on the demo link in the README but it's not online. Are you aware of that?

I was just interested in add an operational demo link from this page:

https://leafletjs.com/plugins.html

Thank you so much for your work on this plugin! :)

Extremities shown wrongly

If the map is moved or zoomed so that the entirety of a polyline with extremities on is not onscreen then, the extremities are shown at a single point on the map, usually to the left of the map (See attached image taken from the demo).

image

Dot markers

I tried to created a new marker type from inkscape DotM and DotL.

Somehow they were not showing up.

This is what I tried :

dotM: {
            'transform': 'matrix(0.4,0,0,0.4,2.96,0.4)',
            'path': 'm -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z'
        },
        dotL: {
            'transform': 'matrix(0.8,0,0,0.8,5.92,0.8)',
            'path': 'm -2.5,-1 c 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 z'
        },

I also tried to mess up with transform and stuff, but no result.

@fredericbonifas any idea ?

Thanks !

doesnot work with leaflet version 1.0+

does not work with leaflet.js version 1.0+.
the error like below:

Uncaught TypeError: Cannot read property 'classList' of undefined at Object.hasClass (leaflet.js:5) at e.showExtremities (leaflet.lineextremities.js:96)

could you please take a look at this bug?

Arrow extremities not working on IE

Hi,
Thank you for your plugin. I have an issue on internet explorer (at least <= 10). Arrows are displaying well after loading, but when I proceed to a zoom or unzoom, arrows stays at the same place and are not redrawed at the good position.
Everything is working fine on the others browsers.
Any idea/patch?

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.