[GeoNode-devel] Layer thumbnail keeps previous version of style

Simone Dalmasso simone.dalmasso at gmail.com
Wed Mar 30 04:38:30 PDT 2016


Hi Andrea,

thanks for the detailed report, please open a ticket in github and send a
pull request to master referencing the ticket.

If you need any assistance don't hesitate to write back!

2016-03-30 10:57 GMT+02:00 Andrea Pogliaghi <andrea.pogliaghi at gmail.com>:

> Hello to everybody.
>
> I am using Geonode 2.4 version (on Linux Ubuntu 14.04 LTS with
> Postgres/postgis) and I noticed that when I change the style of a layer
> (for instance the fill color), the layer thumbnail is not updated with the
> new version of the style but it reflects the previous one.
>
> For instance, to replicate it:
>
> 1. Choose a layer. Let's suppose it has a RED fill color.
> 2. Edit the style of the layer and change the fill color to BLUE
> 3. Save the style and go to the "layers" page. The thumbnail of the color
> is RED (should be BLUE)
> 4. Edit the style of the layer and change the fill color to YELLOW.
> 5. Save the style and go to the "layers" page. The thumbnail of the color
> is BLUE (should be YELLOW)
> and so on...
>
> I looked into the source code and it seems that the update of the style in
> Gesoserver (A) and the generation of the new thumbnail (B) are carried out
> in the wrong sequence, i.e. the new thumbnail is generated before the new
> style is updated onto Geoserver, and this explains why in the layer
> thumbnail there is the previous version of the style. (i.e. B-A instead of
> A-B)
>
> A workaround of the problem may be the following: when choosing a color in
> the colorpicker, click on the desired color twice instead of a single time,
> allowing a couple of seconds between the clicks. In this way the "style
> update" is triggered two times with the same color, and the layer thumbnail
> will be in sync with the style.
>
> Obviously this is only a workaround and it does not solve the bug,
>
> I made a modification in the "geoserver/views.py" file, changing reversing
> the sequence of update so that it saves the style onto geoserver before
> generating the thumbnail.
> With this patch it seems that the bug is solved.
>
> Since I am new to the mailing list, what should I do?
> Should I open a bug on Geonode GIT?
> Do I have to send the patch to someone to review it and/or eventually
> apply in on the trunk?
>
> Thank you all,
> Andrea
>
> --
> ing. Andrea Pogliaghi
> Gesp Srl - Sistemi Informativi Geografici
>
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-devel/attachments/20160330/4e9872bf/attachment.html>


More information about the geonode-devel mailing list