Hi Devs, I'd like to have comments on one matter. I thing this could be a OpenLayers-dev thread but I'm not sure. Please let me know.
*Problem* When adding WMS layers using the WMSCapabilitiesStore widget, their tile size is set to 256x256 (OpenLayers' default value). Please correct me if I'm wrong, but I noticed that using tiles rather than singleTile for WMS layers is slower. *More info* So, for performance reason, I'd rather go with a singleTile: true option but since it's possible that the tile generated exceeds the maxWidth/Height of the WMS server, we can't use that solution. The only way to know would be to use WMS version 1.3.0 where we do know maxWidth/Height in the service tag. At this point, we could do something. *Solution* How about this : If using 1.3.0, layers could be created normally with the 256x256 tile size (because at this point it's not yet linked to any map so it's not yet the time to play around the tile size) and we could store the maxHeight and maxWidth as new layer options. Then, when the layer is added to a map, we could check these values. If the (map size * ratio of the singletile) is smaller than maxWidth/Height, then set singleTile to true. Every time the map is resized, we need to check the above condition again. If it becomes false, set the singleTile to false and set the tile size to maxHeight and maxWidth. I'm not sure if this kind of "on map size changed" event could be possible since in OpenLayers you can't register a map "resize" event. It needs to be done manually with the updateSize method that calls each layer onMapResize methods so they would need to be modified. How about if maxWidth/Height of a WMS layer is set, do the above ? If we don't want that to always happen, we could add a flag to trigger this when set to true. Any thoughts ? -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ Dev mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/dev
