sbenten / d3MapRenderer

A python QGIS plugin to export of polygons, polylines and point vector layers from shapefiles to topojson for display within a web page using the d3 JavaScript library, with additional options of popup information via d3-tip, charts from c3.js and a legend.
http://maprenderer.org/d3/
MIT License
33 stars 3 forks source link

Line Layer Overlay blocking tooltip for some polygons #37

Closed smitty1788 closed 7 years ago

smitty1788 commented 7 years ago

I am adding a polyline shapefile that to indicate boundaries for neighbourhood clusters. It seems some of these polylines are causing tooltips for certain polygons to not appear. I have an arrow on the image below showing one polygon that doesn't work. It doesn't seem to have a consistent interference.

d3.png

The shape files/style can be found in the link below. I am using .10 Branch, QGIS2.18. Log file included as well.

Files: http://pc.cd/aoQotalK

2017-01-31T10:03:34 0 osHelper Windows 2017-01-31T10:15:56 0 model 2.18.0 2017-01-31T10:15:56 0 model 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 winHelper Query registry for HKEY_CURRENT_USER\Software\node.js\InstallPath 2017-01-31T10:15:56 2 winHelper No more data is available: Software\node.js 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 osHelper Windows 2017-01-31T10:15:56 0 winHelper Query registry for HKEY_CURRENT_USER\Software\node.js\InstallPath 2017-01-31T10:15:56 2 winHelper No more data is available: Software\node.js 2017-01-31T10:16:40 0 model EXPORT start ================================================== 2017-01-31T10:16:40 0 model Title = [Homicides in 2015] 2017-01-31T10:16:40 0 model Header = [True] 2017-01-31T10:16:40 0 model Width = [800] 2017-01-31T10:16:40 0 model Height = [600] 2017-01-31T10:16:40 0 model Main layer = [Homicide_CT] 2017-01-31T10:16:40 0 model IDField = [OBJECTID] 2017-01-31T10:16:40 0 model Projection = [Miller] 2017-01-31T10:16:40 0 model Simplify = [] 2017-01-31T10:16:40 0 model Output = [G:\DC Policy Center\Crime Incidents\Maps\Homicide] 2017-01-31T10:16:40 0 model Zoom/Pan = [True] 2017-01-31T10:16:40 0 model Legend = [True] 2017-01-31T10:16:40 0 model LegendPos = [Bottom Left] 2017-01-31T10:16:40 0 model IncExtras = [True] 2017-01-31T10:16:40 0 model Extras = [Homicide_CT, N_Lines] 2017-01-31T10:16:40 0 model IncPopup = [True] 2017-01-31T10:16:40 0 model PopupPos = [Bubble] 2017-01-31T10:16:40 0 model Popup = [

Homicide_2{Homicide_2}
Homicide_3{Homicide_3}
] 2017-01-31T10:16:40 0 model IncViz = [False] 2017-01-31T10:16:40 0 model Chart = [Line Chart] 2017-01-31T10:16:40 0 model VizWidth = [240] 2017-01-31T10:16:40 0 model DataRanges = [] 2017-01-31T10:16:40 0 model Labels = [] 2017-01-31T10:16:40 0 model EXPORT copying folders and files 2017-01-31T10:16:41 0 model EXPORT Homicide_CT 2017-01-31T10:16:42 0 qgisWrapper Adding field: d3Css 2017-01-31T10:16:42 0 model GRADUATED: attr Homicide_3 0 - 0::No Homicides::FILL SYMBOL (1 layers) color 166,166,166,255 0.1 - 1::1::FILL SYMBOL (1 layers) color 254,240,217,255 1 - 2::2::FILL SYMBOL (1 layers) color 253,216,164,255 2 - 3::3::FILL SYMBOL (1 layers) color 252,183,121,255 3 - 4::4::FILL SYMBOL (1 layers) color 252,141,89,255 4 - 5::5::FILL SYMBOL (1 layers) color 235,96,63,255 5 - 6::6::FILL SYMBOL (1 layers) color 211,49,33,255 6 - 7::7::FILL SYMBOL (1 layers) color 179,0,0,255

2017-01-31T10:16:42 0 model setGraduatedSymbol 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 0.0 and "Homicide_3" <= 0.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 0.1 and "Homicide_3" <= 1.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 1.0 and "Homicide_3" <= 2.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 2.0 and "Homicide_3" <= 3.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 3.0 and "Homicide_3" <= 4.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 4.0 and "Homicide_3" <= 5.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 5.0 and "Homicide_3" <= 6.0 2017-01-31T10:16:42 0 model Filter: "Homicide_3" >= 6.0 and "Homicide_3" <= 7.0 2017-01-31T10:16:42 0 model EXPORT N_Lines 2017-01-31T10:16:43 0 qgisWrapper Adding field: d3Css 2017-01-31T10:16:43 0 model SINGLE: LINE SYMBOL (1 layers) color 0,0,0,255 2017-01-31T10:16:43 0 model setSingleSymbol 2017-01-31T10:16:43 0 model Filter: 2017-01-31T10:16:44 0 model EXPORT popup data 2017-01-31T10:16:44 0 model EXPORT complete ========================================================= 2017-01-31T10:23:42 0 model 2.18.0 2017-01-31T10:23:42 0 model 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:23:42 0 winHelper Query registry for HKEY_CURRENT_USER\Software\node.js\InstallPath 2017-01-31T10:23:42 2 winHelper No more data is available: Software\node.js 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:23:42 0 osHelper Windows 2017-01-31T10:24:02 0 model EXPORT start ================================================== 2017-01-31T10:24:02 0 model Title = [test] 2017-01-31T10:24:02 0 model Header = [False] 2017-01-31T10:24:02 0 model Width = [800] 2017-01-31T10:24:02 0 model Height = [600] 2017-01-31T10:24:02 0 model Main layer = [Homicide_CT] 2017-01-31T10:24:02 0 model IDField = [OBJECTID] 2017-01-31T10:24:02 0 model Projection = [Miller] 2017-01-31T10:24:02 0 model Simplify = [] 2017-01-31T10:24:02 0 model Output = [G:\DC Policy Center\Crime Incidents\Maps\Homicide] 2017-01-31T10:24:02 0 model Zoom/Pan = [True] 2017-01-31T10:24:02 0 model Legend = [True] 2017-01-31T10:24:02 0 model LegendPos = [Bottom Left] 2017-01-31T10:24:02 0 model IncExtras = [True] 2017-01-31T10:24:02 0 model Extras = [Homicide_CT, N_Lines] 2017-01-31T10:24:02 0 model IncPopup = [False] 2017-01-31T10:24:02 0 model PopupPos = [Bubble] 2017-01-31T10:24:02 0 model Popup = [] 2017-01-31T10:24:02 0 model IncViz = [False] 2017-01-31T10:24:02 0 model Chart = [Line Chart] 2017-01-31T10:24:02 0 model VizWidth = [240] 2017-01-31T10:24:02 0 model DataRanges = [] 2017-01-31T10:24:02 0 model Labels = [] 2017-01-31T10:24:02 0 model EXPORT copying folders and files 2017-01-31T10:24:03 0 model EXPORT Homicide_CT 2017-01-31T10:24:03 0 qgisWrapper Adding field: d3Css 2017-01-31T10:24:03 0 model SINGLE: FILL SYMBOL (1 layers) color 166,166,166,255 2017-01-31T10:24:03 0 model setSingleSymbol 2017-01-31T10:24:03 0 model Filter: 2017-01-31T10:24:04 0 model EXPORT N_Lines 2017-01-31T10:24:04 0 qgisWrapper Adding field: d3Css 2017-01-31T10:24:04 0 model SINGLE: LINE SYMBOL (1 layers) color 0,0,0,255 2017-01-31T10:24:04 0 model setSingleSymbol 2017-01-31T10:24:04 0 model Filter: 2017-01-31T10:24:06 0 model EXPORT complete =========================================================

sbenten commented 7 years ago

Strange. I don't know why this is happening, as none of the LineStrings are closed into LinearRings and hence becoming polygons. Indeed a working and non-working area fall under the same area that would be affected if a LineString were closed... Though as it's placed above the data driven layer in the map the simplest thing would be to stop it being clickable and the click event will drop down the top layer to the main layer. For now, add "pointer-events: none;" to the css class on that layer, and I'll add it to branch asap.