Hello all!

it seems to me there is a little inconsistence between the OpenLayers
stack order and the order of layers transmitted to the print module by
the PrintProvider.

In OL, layers are stacked using the layers' z-indices, not according
the map.layers order.

In the print() method of GeoExt.data.PrintProvider, layers are listed
in the print request using the following piece of code:
        var pagesLayer = pages[0].feature.layer;
        var encodedLayers = [];
        Ext.each(map.layers, function(layer){
            if(layer !== pagesLayer && layer.getVisibility() === true) {
                var enc = this.encodeLayer(layer);
                enc && encodedLayers.push(enc);
            }
        }, this);
        jsonData.layers = encodedLayers;
=> layers are listed using the map.layers order.
Then in the generated PDF, layers are stacked in the same order, no
matter if a given layer should appear above the others because it has
a greater z-index in the OL map.

I'm wondering if it would not be more relevant to sort map.layers
according to the layers' z-indices before adding layers to the
encodedLayers list? Is it worth submitting a patch about that issue?

Thanks,
alex
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to