Geolicious / qgis2leaf

A QGIS plugin to create a working leaflet based webmap from it
127 stars 30 forks source link

Error with brushStyle #216

Open pcav opened 9 years ago

pcav commented 9 years ago

I'm getting this error with a simple project:

An error has occured while executing Python code:

Traceback (most recent call last): File "/home/paolo/.qgis2/python/plugins/qgis2leaf/qgis2leafdialog.py", line 297, in export2leaf qgis2leaf_exec(self.outFileName, self.basemapName, self.basemapMeta, self.basemapAddress, self.width, self.height, self.extent, self.full_screen, self.layer_list, self.visible, self.opacity, self.encode2JSON,self.createcluster, self.webpage_name, self.webmap_head,self.webmap_subhead, self.legend,self.locate,self.address, self.precision, self.labels, self.labelshover, self.matchCRS, self.selected) File "/home/paolo/.qgis2/python/plugins/qgis2leaf/qgis2leaf_exec.py", line 288, in qgis2leaf_exec if i.rendererV2().symbol().symbolLayer(0).brushStyle() == 0: AttributeError: 'QgsSimpleLineSymbolLayerV2' object has no attribute 'brushStyle'

pcav commented 9 years ago

sorry, no attachments in gh. may I send you the file privately?

tomchadwin commented 9 years ago

Issue confirmed and recreated. Looking at it now.

tomchadwin commented 9 years ago

@pcav, you've uncovered a fairly fundamental issue with how qgis2leaf extracts style information from layers. It assumes that polygon layers have fill styles, and does not handle the "Outline:simple line" style which your example uses. This will take some work to fix.

In the meantime, your workaround would be to change to a simple fill style with a transparent fill and the border style you need.

pcav commented 9 years ago

I see, thanks. Perhaps issue a warning, or at least document the issue, for now?