Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG markers not supported for categorised based rendering #262

Closed
philipjohnbarlow opened this issue Apr 28, 2016 · 8 comments
Closed

SVG markers not supported for categorised based rendering #262

philipjohnbarlow opened this issue Apr 28, 2016 · 8 comments

Comments

@philipjohnbarlow
Copy link

philipjohnbarlow commented Apr 28, 2016

Produces the following error:

Traceback (most recent call last):
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\maindialog.py", line 125, in previewMap
MainDialog.previewLeaflet(self)
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\maindialog.py", line 304, in previewLeaflet
visible, cluster, json, params, popup)
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\leafletWriter.py", line 159, in writeLeaflet
canvas)
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\leafletLayerScripts.py", line 186, in writeVectorLayer
json, wfsLayers)
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\leafletLayerScripts.py", line 448, in categorizedLayer
catLegend)
File "C:/Users/philipb/.qgis2/python/plugins\qgis2web\leafletLayerScripts.py", line 483, in categorizedPoint
border_transp = float(symbolLayer.borderColor().alpha()) / 255
AttributeError: 'QgsSvgMarkerSymbolLayerV2' object has no attribute 'borderColor'

I've tried half a dozen symbols and combinations of symbols, can anyone replicate?

@philipjohnbarlow philipjohnbarlow changed the title SVG markers not support for rule based rendering SVG markers not support for categorised based rendering Apr 28, 2016
@philipjohnbarlow
Copy link
Author

Sorry I meant categorised, I am aware that rule is not supported.

@tomchadwin
Copy link
Collaborator

You just saved me typing that reply. OK, will investigate - sounds as though you are probably right, though. I'm fairly sure that categorized and graduated assumes that it is a simple marker.

This one could be a swine to fix, actually. Might be OK in OL3 because Victor and Luca's code is properly modularized. Not so much the Leaflet stuff, though. Thanks a bunch, Phil...

@philipjohnbarlow
Copy link
Author

I'm surprised someone hasn't noticed before, I didn't even think to try until just now. I'm working on some maps for an HLF bid that have invasive non-native species categorised by species for which I am using SVG markers. It doesn't have to be a web map but I ran the plugin just to see if it would export it.

@tomchadwin
Copy link
Collaborator

Workaround is of course to split the layer out into separate layers. Still worth investigating a fix.

@tomchadwin
Copy link
Collaborator

Python error occurs with Leaflet. OL3 produces no error, but also produces no output. Agreed?

@philipjohnbarlow
Copy link
Author

Agreed.

@philipjohnbarlow philipjohnbarlow changed the title SVG markers not support for categorised based rendering SVG markers not supported for categorised based rendering Apr 29, 2016
@tomchadwin
Copy link
Collaborator

Crash trapped (issue was raised again as #328). Issue not solved, so not closing, but at least the crash is gone.

@tomchadwin
Copy link
Collaborator

Leaflet now implemented in master. Please test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants