Giter VIP home page Giter VIP logo

Comments (13)

andreaordonselli avatar andreaordonselli commented on June 9, 2024

Can you attach your data in a zip?

Another user told me that qgis2web doesn't work with the latest version of QGIS, but I still have to investigate.
It certainly works with the LTR 3.34 version.

from qgis2web.

azstumbler avatar azstumbler commented on June 9, 2024

from qgis2web.

andreaordonselli avatar andreaordonselli commented on June 9, 2024

Attaching files via email doesn't work. you should create a zip file and upload it to the github discussion. Thank you.

from qgis2web.

agiudiceandrea avatar agiudiceandrea commented on June 9, 2024

@andreaordonselli, the symbollayer color property value in QGIS 3.36 is something like '190,178,151,255,rgb:0.74509803921568629,0.69803921568627447,0.59215686274509804,1' while the plugin expect it as '190,178,151,255' in

qgis2web/utils.py

Lines 632 to 633 in b7dc3d9

def getRGBAColor(color, alpha):
r, g, b, a = color.split(",")

See https://api.qgis.org/api/qgsfillsymbollayer_8cpp_source.html#l00355, https://api.qgis.org/api/qgscolorutils_8cpp_source.html#l00192

from qgis2web.

azstumbler avatar azstumbler commented on June 9, 2024

The 2 shp files were in one zip file

from qgis2web.

andreaordonselli avatar andreaordonselli commented on June 9, 2024

something is happening that doesn't allow you to attach, I still don't see the zip you upload. send it to me by email [email protected]
Thanks

from qgis2web.

tomchadwin avatar tomchadwin commented on June 9, 2024

@andreaordonselli, the symbollayer color property value in QGIS 3.36 is something like '190,178,151,255,rgb:0.74509803921568629,0.69803921568627447,0.59215686274509804,1' while the plugin expect it as '190,178,151,255'

Is this a QGIS breaking API change, @agiudiceandrea?

from qgis2web.

andreaordonselli avatar andreaordonselli commented on June 9, 2024

by applying a simple style to the two levels qgis2web has no problems exporting.

openlayers:

image

leaflet:

image

What styles are you applying? can you export your styles in the following way and send them to me?

image

from qgis2web.

agiudiceandrea avatar agiudiceandrea commented on June 9, 2024

@andreaordonselli, the symbollayer color property value in QGIS 3.36 is something like '190,178,151,255,rgb:0.74509803921568629,0.69803921568627447,0.59215686274509804,1' while the plugin expect it as '190,178,151,255'

Is this a QGIS breaking API change, @agiudiceandrea?

@tomchadwin, see: qgis/QGIS#55718 (comment) and subsequent comments.

from qgis2web.

andreaordonselli avatar andreaordonselli commented on June 9, 2024

@tomchadwin
@agiudiceandrea
I ask for your advice as an update would make qgis2web incompatible with previous versions of qgis. do I update and define the minimum version of qgis to use, or do I specify that it must be used with versions prior to the latest one, until an ltr version is released?

from qgis2web.

tomchadwin avatar tomchadwin commented on June 9, 2024

@andreaordonselli Wrap new code to try to parse the new format in a try block, and put the existing code which parses the old format in the except clause. Worth adding a comment that the old format is deprecated, so it can be found and removed later.

from qgis2web.

andreaordonselli avatar andreaordonselli commented on June 9, 2024

Thanks for your advice, I solved it by acquiring only the first 4 values ​​and this will work with the old and new qgis.
can it be okay?

def getRGBAColor(color, alpha):
    r, g, b, a = color.split(",")[:4]
    a = (float(a) / 255) * alpha
    return "'rgba(%s)'" % ",".join([r, g, b, str(a)])

from qgis2web.

tomchadwin avatar tomchadwin commented on June 9, 2024

Looks good to me. Thanks!

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.