[GeoNode-devel] generation of layer's thumbnail with a custom base map (Paolo Corti)

Paolo Corti pcorti at gmail.com
Mon Feb 25 15:20:31 PST 2019


Hi Toni

thanks for helping with this.

As a first thing, I tried to add the base layers IP in the hosts
section of config.yaml (with !dnsMatch).
What is confusing me, looking at the log, is that GeoServer is trying
to read the tiles from the cache, as it would be a local layer:

....
2019-02-25 23:16:25,811 DEBUG [geoserver.printng] - using cache for
http://t4.tianditu.com/DataServer?T=vec_w&X=14&Y=7&L=4&tk=mykey
2019-02-25 23:16:25,812 DEBUG [geoserver.printng] - using cache for
http://t4.tianditu.com/DataServer?T=vec_w&X=14&Y=5&L=4&tk=mykey
...

not sure how to solve this. Maybe I'll ask in the GeoServer list
best
Paolo

On Sat, Feb 23, 2019 at 3:38 PM Toni Schönbuchner
<toni.schoenbuchner at csgis.de> wrote:
>
> Dear Paolo,
>
> some time ago I´ve been in a similar situation trying to debug thumbnails with leaflet.
> Unfortuantely I could not find docs for printing execept:
>
> https://docs.geoserver.org/latest/en/user/extensions/printing/index.html
> https://docs.geoserver.org/stable/en/user/extensions/printing/configuration.html
>
> However what helped me was a to double check that cleaned markup has everything we need:
> https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/utils/thumbnail.js#L17
>
> I did this by just testing the code in browser console and adding the cloned map to the body.
> Then to work a bit faster I´ve used https://www.getpostman.com/ to send the generated markup to the printing endpoint.
>
> If I remember correctly I´ve faced an issue with thumbnail.js deleting to much and some SSL mixed
> content blocking.
>
> Not much, but hopefully a start.
>
> cheers,
>
> Toni
>
>
>
> Message: 1
> Date: Fri, 22 Feb 2019 17:35:04 -0500
> From: Paolo Corti <pcorti at gmail.com>
> To: geonode-devel <geonode-devel at lists.osgeo.org>
> Subject: [GeoNode-devel] generation of layer's thumbnail with a custom
> base map
> Message-ID:
> <CAHXrU-KOd-v4aivGgvz3O9c0Sv-qmSmW=4gLT1QKTH5Mgidbfg at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi GeoNode developers
>
> We have the following problem: in one of our instances we are using
> some custom basemaps. When using the "Set Thumbnail" feature from
> layer page using one of this custom base maps, the thumbnail is
> created but only the layer is rendered, in a white background.
> Debugging the code, it looks like the thumbnail is generated by
> sending a post request to geoserver/rest/printng (in the
> geoserver/helpers.py/_render_thumbnail).
> Where can I find some documentation about this printng GeoServer endpoint?
>
> Thanks
> Paolo
>
> --
> Paolo Corti
> Geospatial software developer
> web: http://www.paolocorti.net
> twitter: @capooti
> skype: capooti
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> geonode-devel mailing list
> geonode-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-devel
>
>
> ------------------------------
>
> End of geonode-devel Digest, Vol 49, Issue 22
> *********************************************
>
>


-- 
Paolo Corti
Geospatial software developer
web: http://www.paolocorti.net
twitter: @capooti
skype: capooti


More information about the geonode-devel mailing list