Comments (6)
You forgot to put the shp in the zip
from qgis2web.
can you provide an example qgis project with example data? you can upload the zip in this chat.
from qgis2web.
Sure, the mapbox error is around mapboxLayerScripts.py, line 392:
UnboundLocalError: local variable 'classes' referenced before assignment
So, same as leaflet.
from qgis2web.
Even without your data, I have verified that it is very complicated for any webgis to execute the "inverted polygon" style. In fact, qgis2web exports do not export a result because they do not export a style, i.e. the geometries are in the map, but they cannot be seen because the system fails to color them.
I don't see any other method than to act on the geometries by drawing the graphic shape reversed with respect to the current one, and applying a standard "fill" style to it.
from qgis2web.
Apologies for the missing data, here is a re-upload
example.qgz.zip
I think for me, properly supporting inverted polygons is secondary (and low priority) compared to simply "not crashing" during the output; the existing "not supported" warning is probably enough.
My change which appears to work for leaflet exporter is as follows:
qgis2web/leafletLayerScripts.py:
356 else:
357 feedback.showFeedback(
358 """Layer {}: legend for renderer {}
359 not supported""".format(layer.id(), renderer.type()))
360
361 classes = None
362 legend = layer.name().replace("'", "\\'") + "<br />"
363 if classes is not None:
364 legend += "<table>"
365 for cnt, c in enumerate(classes):
366 symbol = c.symbol()
367 legend = iconLegend(symbol, c, outputProjectFileName,
368 safeLayerName, legend, cnt)
369 legend += "</table>"
370 symbol = classes[0].symbol()
371 else:
372 symbol = None
373 return (legend, symbol)
from qgis2web.
It's not just a matter of python code, webgis can't stylize inverted polygons like qgis does, you have to draw correct polygons and stylize them normally.
You have to choose the "single symbol" item in qgis or the "categorized" item
from qgis2web.
Related Issues (20)
- Qgis2web crashes when I want to Update Preview or Export project to Web HOT 4
- In qgis2web two layers overlap hiding each other despite being seen in QGIS HOT 11
- hey
- How to reduce information in Pop-up HOT 8
- File Name Too Long error when exporting to Leaflet HOT 5
- Qgis2web writes to /tmp - Firefox/snap can't read this. HOT 5
- WFS based layer exports are not working in leaflet nor openlayers
- QgsEmbeddedSymbolRenderer is not supported
- Do you want some money?
- I'm unable to export REST API layers from ArcGIS Map Service; latest version HOT 1
- Export/preview map empty/blank without error HOT 3
- Relative path attachment widget not working HOT 3
- Announcement: repository transferred HOT 2
- Popup options not showing up HOT 3
- Exporting dashed or dotted line HOT 7
- Overlapping polygons do not show on web report HOT 3
- Qgis2web crashes in different computers and with different qgis versions and projects HOT 1
- FILTERS in Qgis2Web HOT 2
- QGIS2web keeps failing with python errors HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgis2web.