Git Product home page Git Product logo

Comments (7)

andreaordonselli avatar andreaordonselli commented on May 24, 2024 1

Thanks for the test. Soon I will commit to github and publish the new version also in the QGIS plugin repository. Kindly consider donating a coffee to support the project. You can do this via the button on the home page. Thank you.

from qgis2web.

andreaordonselli avatar andreaordonselli commented on May 24, 2024 1

Released version 3.18.0 which includes a fix for this issue. The update will be available soon from the QGIS plugin repository. Thanks for the tip.

from qgis2web.

andreaordonselli avatar andreaordonselli commented on May 24, 2024

Good evening @danieljuschus
I ran some tests and report line style results that can be implemented with both openlayers and leaflet export, can they meet your expectations?

The difference between qgis and export is minimal, perhaps the scale could be adjusted slightly but the result is good. I believe that by using different thicknesses and colors already with these examples it is possible to differentiate the data visible on the map well. What do you think?

Dot lines
dot lines

Dash lines
dash lines

Black dash and red dot lines
black dash lines and red dot line

Multiple simple line
multiple simple line

from qgis2web.

danieljuschus avatar danieljuschus commented on May 24, 2024

The problem emerges with thicker lines. I need to use those because I'm drawing over OSM tiles.

Here's what a Dot Line with a Stroke width of 3mm looks like in the editor:

image

The exported result:

image

When changing the parameter lineDash of the layer style js file from [1,5] to [10,20]:

image

So perhaps we would need to figure out a better mapping between the QGIS and OL parameters?

from qgis2web.

tomchadwin avatar tomchadwin commented on May 24, 2024

@danieljuschus I would avoid print-based units - mm have no meaning on screen. Pixels is definitely sfest. There is some code in there to try to handle map units, but I cannot remember how reliable it is. I'm not saying switching to pixels will fix the issue, but that's where I'd start.

from qgis2web.

andreaordonselli avatar andreaordonselli commented on May 24, 2024

I should have managed to fix everything for openlayers export.
@danieljuschus Can I ask you to run some tests?
I'll leave you the file to replace in this folder for windows sistem:
C:\Users\your_user\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\qgis2web
Make a backup copy of the existing file.

The new version fixes:

  • line width with decimals (previously there was an approximation to the whole number)
  • stroke length and space length based on line width (both for dotted line, dashed line, and dash/dot line)
  • separate definitions for lines or outer lines of polygons

2023-12-29 15_06_37-NVIDIA GeForce Overlay

2023-12-29 15_06_53-NVIDIA GeForce Overlay

2023-12-29 15_07_59-NVIDIA GeForce Overlay

from qgis2web.

danieljuschus avatar danieljuschus commented on May 24, 2024

That seems to work perfectly now, thank you!

from qgis2web.

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.