-
Notifications
You must be signed in to change notification settings - Fork 17
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
Layer symbology differs from the one in thumbnails generated on map creation #406
Comments
Also related to this is the update map thumbnail which seems not to be working because of the above scenario. You cannot be sure if the thumbnail has changed because it has wrong symbology |
duplicate of #325? |
tested using postman on jalan sleman layer by specifyng either so, my guess is the style of health facilities may have some bug. |
@boney-bun which server are these examples from? (Should be testing) Note this issue is specifically about GeoNode Maps. The styles of the layers in maps are the same as the original layers. So the maps should use default layer styles. This is still very much an issue (with Madagascar 1975 Map on testing) There's no issue with Healthsites - the default style of any layer should be consistently used in layers, maps and thumbnails. |
@gubuntu i've uploaded the health layer to the testing (http://testing.geonode.kartoza.com/layers/geonode:health_facilities). for the madagascar layer (and other layers), i think the qgis server tends to change the origin colors of the layer. an exception is for tandale layer. |
@boney-bun You need to be checking this:
You need to make sure when a user clicks on save map the correct signal is passed to create the thumbnail. A simple logic would be:
See the example below from Geoserver. NB: If I am guessing right what could be happening is that for each time a user is creating a map QGIS server is creating a separate QGIS project for that layer and hence generate random colors for the layer as specified in the OTF and hence generating a thumbnail that is different. S |
thanks for your explanation and hints @NyakudyaA ! I've looked and compared at the qgs files of both map and layer from health layer. the original qgs layer: the map qgs: i think the bug is because the map doesn't store a style. |
I think we should maybe refactor how a map is stored in QGIS server backend. Am I correct in understanding that it creates a new QGIS project to define a map? (what does it do when you edit the map?) GeoNode-geoserver stores a map as a list of layers in the database, a bit like a simplified WMC. Why can we not do the same with QGIS backend? Or, if we keep the current method of creating a new project, then the layer styles used in the map project must be transferred (copied) from the original layers. |
@boney-bun the scenario you mentioned above is mainly because of what I said. The map creates a new QGIS project which it uses to create a thumbnail.
Solution
|
@gubuntu yes, you are right. everything in layers and maps should be on project format (qgs) in qgis-server backend. i think this is one of the reasons why we have otf-project. cmiiw, here is what happen when a user saves a map:
@NyakudyaA yes, it was your hint that helped me going deeper into qgs file. but, your solution seems to be infeasible.
the random symbology from the OTF is because we didn't specify the style when generate a new project for the map. this is not the case for generating a new project for a new uploaded layer.
i have tested this with postman. the thumbnail for the map will be correct if we use the layer's qgs. but, we can't simply copy paste the layer's qgs into map's qgs, mostly for the case when a map has more than one layer. I'm currently interested in modifying what do you think? |
The only benefit of the former that I can see is that the map layers will be rendered together by QGIS, so will look better than if they are fetched separately by Leaflet and overlaid. Behaviour should be as close as possible to Geoserver backend, so GeoNode users have a consistent experience. @boney-bun before diving in, I want to see a clear plan of your approach to this, with at least you, me and @NyakudyaA on the same page. |
yes, this is what happens now with the current implementation. the bug is because the map projects don't store the style (or symbol) from its original layers. i suspect that the qgis-server doesn't pick up the style from a layer because the map doesn't have style and default-style definitions in the model.
So far, the QGIS server still doesn't pickup the style. what do you think with this approach @gubuntu @NyakudyaA ? |
|
this is not fixed on testing so should not be in the testing column. Moved back to review |
cmiiw, the original problem can be found on this map: this PR intends to fix the issue above. |
try a map with more than one layer, the thumbnail is still wrong |
the end result will be similar to the abandon kartoza#472 fix kartoza#406 fix kartoza#325
@boney-bun this is not working at all. Here is a sample layer I have uploaded. |
@boney-bun the following are my observations:
The following is not working:
|
Problem
When creating a map you expect the thumbnail to be generated to be identical to the icons/symbology of the layer used to create the map with.
This is the thumbnail that is generated.
Solution
Investigate what is happening there. Why is the request being made returning icons that are different
The text was updated successfully, but these errors were encountered: