Hi Alexandre,
We're trying to use the WMSBrowser UX but we're facing the performance
problem you're describing with tiles served by a not-cached WMS
server. Using singleTile and buffer would be great for those layers.
Attached is a patch against the sandbox which allows the user to
configure the WMSBrowser with a layerOptions parameter.
Does it sound good to you, and do you mind if I commit this in your sandbox ?
Pierre
On Mon, Mar 22, 2010 at 2:36 PM, Alexandre Dube <[email protected]> wrote:
> Tim,
>
> Thanks a lot for the hints.
>
> Tim Schaub wrote:
>> Yeah. Two options:
>>
>> var store = new GeoExt.data.WMSCapabilitiesStore({
>> url: "path/to/wmscap.xml", layerOptions: {singleTile: true}
>> });
>>
> Cool, I hadn't noticed the layerOptions param in the
> WMSCapabilitiesReader yet.
>
> Since the above store is to be used for a generic WMSBrowser widget
> where the user can input any existing WMS address, I guess the
> 'singleTile: true' option isn't 100% reliable because of some servers
> with low max'Size' properties. That's why I wondered if there was a way
> to 'automatize' the process by checking the property in 1.3.0. I guess
> there no way to be 100% sure.
>
> About this issue, when a WMS server returns an error message showing a
> "Tile size excess the max width/height" in a 'image' format, is there a
> way for the client (browser) to know about that message in any way ?
> (sounds kinda silly)
>
>
>> - or -
>>
>> You should always clone layers from a store before they are added to
>> another store. In this case, if you are adding layers from the
>> WMSCapabilitiesStore to a map, you should also clone them. When you
>> clone the layer, you can set any layer properties that are appropriate
>> for your application.
>>
> Got it.
>
>
> Thanks again for your help,
>
> Alexandre
>
>> Tim
>>
>
> --
> Alexandre Dubé
> Mapgears
> www.mapgears.com
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/dev
>
--
Pierre GIRAUD
Géomaticien, Analyste
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 93
Mail : [email protected]
http://www.camptocamp.com
Index: lib/GeoExt.ux/widgets/WMSBrowser.js
===================================================================
--- lib/GeoExt.ux/widgets/WMSBrowser.js (revision 2197)
+++ lib/GeoExt.ux/widgets/WMSBrowser.js (working copy)
@@ -54,6 +54,12 @@
'height': 200
},
+ /** api: config[layerOptions]
+ * ``Object`` optional object passed as default options
+ * ``OpenLayers.Layer.WMS`` constructor
+ */
+ layerOptions: null,
+
zoomOnLayerAdded: false,
closeOnLayerAdded: false,
@@ -67,6 +73,7 @@
constructor: function(config) {
this.serverStore = config.serverStore || null;
this.gridPanelOptions = config.gridPanelOptions || this.gridPanelOptions;
+ this.layerOptions = config.layerOptions || this.layerOptions;
OpenLayers.Util.applyDefaults(
this.capabilitiesParams, this.defaultCapabilitiesParams);
@@ -213,7 +220,7 @@
};
// WMSCapabilitiesStore on blank url on start
- this.capStore = new GeoExt.data.WMSCapabilitiesStore({'url': ""});
+ this.capStore = new GeoExt.data.WMSCapabilitiesStore({'url': "", layerOptions: this.layerOptions});
this.capStore.on('load', this.onWMSCapabilitiesStoreLoad, this);
oCenterPanel.items.push(this.createGridPanel(this.capStore));
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev