Git Product home page Git Product logo

Comments (3)

bbecquet avatar bbecquet commented on August 17, 2024

Hi, and thanks for your interest in my plugin.
I'm not quite sure about the effect you want to achieve. Can you please paste the relevant pieces of code you use and have problems with?
I'm not 100% sure but I think this is related to using svg symbols instead of raster images, something I haven't really considered when first coding my plugin and that I should probably improve.

from leaflet.polylinedecorator.

emrahkutlu avatar emrahkutlu commented on August 17, 2024

Hi thanks, yes that seems to be so. I know, that the position of the SVG changes when i change the svg coords and size or the iconAnchor. But I haven't found the right configuration for this. And the other thing is that while zooming the SVG position won't correspond to the map.
It would be so great if SVG would work.
Here is the code:
in JS:

var arrowHead = L.polylineDecorator(arrow, {
patterns: [
{ offset: '50%', repeat: '0%', symbol: L.Symbol.marker({rotate: true, markerOptions: {
icon: L.divIcon({
className: 'stepsSVG',
//iconSize: null,
//iconUrl: 'treppe3.svg',
iconAnchor: [5, 50],
})
}})}
]}).addTo(map);

in CSS:

.stepsSVG{
background-image : url(steps5.svg);
}

the SVG:

<style>.style0{fill: #B2CF71;}.style1{fill: #20401B;}</style>

from leaflet.polylinedecorator.

milovanderlinden avatar milovanderlinden commented on August 17, 2024

I got a similar request. I currently create these linestyles with OpenLayers 2.x but want to migrate to Leaflet. The only barrier is complex line styles. Picture is an operational OpenLayers example.

screenshot from 2015-04-08 23 04 03

from leaflet.polylinedecorator.

Related Issues (20)

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.