[BUG/workaround] Change color selection in QGIS does not change selection or highlighting in LWC
Master branch, QGIS 2.18
When i change the color selection in QGIS project properties, the color does not change in the LWC (selection or highlighting). The color stays in yellow. Maybe CSS could override?
In HTML i see
<path id="OpenLayers_Geometry_Polygon_1917" d=" M 637.6069366662632,335 .........................."
fill-rule="evenodd" fill="none" stroke="yellow" stroke-opacity="1" stroke-linecap="round" stroke-linejoin="round" stroke-width="5"></path>
I edit it manually, it's ok.. but how to add it to a theme? I added this in projectdirectory/media/css/map.css
path[id^="OpenLayers_Geometry_Polygon_"] ,path[id*=" OpenLayers_Geometry_Polygon_"]
{
stroke: blue;
}
No results
hi @jlstanus
i think it's not a bug but an enhancement for LWC
@josemvm hi. Maybe :-P but i don't know how to use. if you have a tip, i can add the explication to the documentation.
@jlstanus i have no tips to offer on this issue :-( i think it could be a good improvement!
@josemvm , ok i keep you in touch ;) thank you
The selection color in Lizmap is contained in the image given by QGIS Server. This is probably related to QGIS not using the selection color defined in the project properties for the getMap WMS request
@mdouchin OK
As workaround for the highlighting, i edited this in map.js
$('#locate .menu-content').html(locateContent.join('<br/>'));
map.addLayer(new OpenLayers.Layer.Vector('locatelayer',{
styleMap: new OpenLayers.StyleMap({
pointRadius: 6,
fill: false,
stroke: true,
strokeWidth: 7,
strokeColor: 'DarkMagenta'
By example: I replaced yellow by DarkMagenta and 3 by 7
Second workaround is to use media/themes/default/css and add the map.css with this content :
path[id*="OpenLayers_Geometry_Polygon_"] {
stroke : DarkMagenta
}
i saw this pull request https://github.com/qgis/QGIS/pull/7294 by @rldhont on QGIS Server 2.18.21 but the LWC still doesn´t use the selection color (on display and on print)...
realted to https://github.com/3liz/lizmap-web-client/issues/288
- on display always uses the yellow color
- on print always uses the feature color, it doesn't print selection (this implies that the only way to highlight a feature is to use a filter, losing all the rest of the layer features...)
see here https://github.com/qgis/QGIS/pull/7185 for the capability to print selection with Server 2.18
thanks
@rldhont what can say about these issues related to print selection with Server 2.18(.24) ? thanks
The selection print is available since QGIS 2.18.21 and the use of project selection color in print is also available since QGIS 2.18.21.
i'm talking about the lizmap capabilities to explore these features (?)
https://github.com/3liz/lizmap-web-client/issues/464
If no mistake, this is working now.
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
The selection made by QGIS Server works but we should use the color defined in the QGIS project also for the highlight layer used in several tools (search, atlas etc.). Ref: https://github.com/3liz/lizmap-web-client/pull/4025