[GeoNode-users] Custom background layers not in Thumbnail

Simone Dalmasso simone.dalmasso at gmail.com
Thu Mar 16 03:19:05 PDT 2017


Hm, the bbox is in 900913 and it seems acceptable. Any chance that your
server is unable to fetch those images because of something blocking the
connection?

2017-03-16 11:09 GMT+01:00 John, Steffen <s.john at atenekom.eu>:

> Hi,
> Yes, this is waht i'm doing. I started debugging, and found out that tiles
> with really weired bounding box values are send to geonode.maps.views.map_
> thumbnail.
> but some of the tiles of wms_webatlas have correct bounding boxes. Also
> the bounding boxes of the geoserver-Wms are correct.
>
> What may be the problem? I guess it has something to do with the layer
> definition..
>
> Any further ideas?
>
> This are the images sended to map_thumbnail():
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 268px; top: 36px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=626172.135625,6887893.491875,1252344.27125,7514065.
> 6275&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=626172.135625,6887893.491875,1252344.27125,7514065.6275&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 12px; top: 36px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=0,6887893.491875,626172.135625,7514065.6275&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=0,6887893.491875,626172.135625,7514065.6275&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 268px; top: 292px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=626172.135625,6261721.35625,1252344.27125,6887893.
> 491875&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=626172.135625,6261721.35625,1252344.27125,6887893.491875&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 268px; top: -220px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=626172.135625,7514065.6275,1252344.27125,8140237.
> 763125&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=626172.135625,7514065.6275,1252344.27125,8140237.763125&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 524px; top: 36px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=1252344.27125,6887893.491875,1878516.406875,7514065.
> 6275&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=1252344.27125,6887893.491875,1878516.406875,7514065.6275&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 12px; top: 292px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=0,6261721.35625,626172.135625,6887893.491875&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=0,6261721.35625,626172.135625,6887893.491875&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 12px; top: -220px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=0,7514065.6275,626172.135625,8140237.763125&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=0,7514065.6275,626172.135625,8140237.763125&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 524px; top: 292px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=1252344.27125,6261721.35625,1878516.406875,6887893.
> 491875&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=1252344.27125,6261721.35625,1878516.406875,6887893.491875&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: 524px; top: -220px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=1252344.27125,7514065.6275,1878516.406875,8140237.
> 763125&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=1252344.27125,7514065.6275,1878516.406875,8140237.763125&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: -244px; top: 36px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=-626172.135625,6887893.491875,0,7514065.6275&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-626172.135625,6887893.491875,0,7514065.6275&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: -244px; top: 292px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=-626172.135625,6261721.35625,0,6887893.491875&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-626172.135625,6261721.35625,0,6887893.491875&WIDTH=256&HEIGHT=256>
> ;
> <img class="olTileImage" style="visibility: inherit; opacity: 1; position:
> absolute; left: -244px; top: -220px; width: 256px; height: 256px;" src="
> https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=
> webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&
> VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&
> BBOX=-626172.135625,7514065.6275,0,8140237.763125&WIDTH=256&HEIGHT=256">
> <https://sg.geodatenzentrum.de/wms_webatlasde_grau__UUID?LAYERS=webatlasde_grau&FORMAT=image%2Fpng&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A900913&BBOX=-626172.135625,7514065.6275,0,8140237.763125&WIDTH=256&HEIGHT=256>
> ;
>
>
> Am Donnerstag, den 16.03.2017, 10:21 +0100 schrieb Simone Dalmasso:
>
> Hi, are you saving the thumbnail through the set thumbnail button in map
> detail -> edit map?
> This is the only way to get the background rendered in the thumbnail
>
> 2017-03-16 9:43 GMT+01:00 John, Steffen <s.john at atenekom.eu>:
>
> Hi,
> I created custom map base layers, which are added to every newly
> created map. When saving this map, the thumbnail is created without the
> basemap on it.
>
> To define the basemaps, i added a gxp plugin, correspondingly to the
> BingSource, based on a WMS. May be I missed something?
> Do you have any idea, what I have done wrong?
>
> Thank you so much for your help.
>
> Here is the code:
>
> gxp.plugins.WebAtlasFarbeSource = Ext.extend(gxp.plugins.LayerSource, {
>
>     ptype: "gxp_webatlasfarbesource",
>
>     title: "WebAtlasDE Farbe",
>
>     webAtlasFarbeTitle: "WebAtlasDEFarbe",
>     url: "https://sg.geodatenzentrum.de/wms_webatlasde__UUID",
>     attribution: "© GeoBasis-DE / <b>BKG</b> ("+year+")",
>     createStore: function() {
>
>         var layers = [
>              new OpenLayers.Layer.WMS(this.webAtlasFarbeTitle,
>                                    this.url,
>                                    {layers: ["webatlasde"],
>                                    format:"image/png",
>                                    tiled: true
>                                    },
>                                    {
>                                        attribution : this.attribution
>                                    })
>
>         ];
>
>         this.store = new GeoExt.data.LayerStore({
>             layers: layers,
>             fields: [
>                 {name: "source", type: "string"},
>                 {name: "name", type: "string", defaultValue:
> "webatlasdefarbe"},
>                 {name: "abstract", type: "string", mapping:
> "attribution"},
>                 {name: "group", type: "string", defaultValue:
> "background"},
>                 {name: "fixed", type: "boolean", defaultValue: true},
>                 {name: "selected", type: "boolean"}
>             ]
>         });
>         this.store.each(function(l) {
>             l.set("group", "background");
>         });
>         this.fireEvent("ready", this);
>
>     },
>
>     createLayerRecord: function(config) {
>         var record;
>         var index = this.store.findExact("name", config.name);
>         if (index > -1) {
>
>             record =
> this.store.getAt(index).copy(Ext.data.Record.id({}));
>             var layer = record.getLayer().clone();
>
>             // set layer title from config
>             if (config.title) {
>                 /**
>                  * Because the layer title data is duplicated, we have
>                  * to set it in both places.  After records have been
>                  * added to the store, the store handles this
>                  * synchronization.
>                  */
>                 layer.setName(config.title);
>                 record.set("title", config.title);
>             }
>
>             // set visibility from config
>             if ("visibility" in config) {
>                 layer.visibility = config.visibility;
>             }
>
>             record.set("selected", config.selected || false);
>             record.set("source", config.source);
>             record.set("name", config.name);
>             if ("group" in config) {
>                 record.set("group", config.group);
>             }
>
>             record.data.layer = layer;
>             record.commit();
>         }
>         return record;
>     }
>
> });
>
> Ext.preg(gxp.plugins.WebAtlasFarbeSource.prototype.ptype,
> gxp.plugins.WebAtlasFarbeSource);
>
>
> _______________________________________________
> geonode-users mailing list
> geonode-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geonode-users
>
>
>
>
> --
> Simone
>
>


-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20170316/0cc2f016/attachment-0001.html>


More information about the geonode-users mailing list