From: Steven M. O. <ste...@ge...> - 2006-06-27 13:56:10
|
Hi all, For tiling I need fixed zoomLevels. At first I wanted to calculate those in TileExtent.js but then I realised that I will have a problem when adding other layers. So I propose to include the fixed zoom levels in mapcontainerbase and extent. In MapContainerBase.js an extra config-parameter check is included to see if <zoomLevels> are defined. Then it enables fixed scale in extent by: if (this.zoomLevels) this.containerModel.extent.setFixedScale(true,this.zoomLevels); In extent two function are added: setFixedScale (access point for MapContainerBase) and getFixedScale(res) The latter one calculates the closest greater fixed scale. In the centerAt function a check for zoomLevels is included to change res if needed: if (this.zoomLevels) { newres=this.getFixedScale(newres); } If there are no objections I commit the code, so people can have a look and enhance it. (a problem is that the initial extent is not adepted to zoomLevels ATM) Steven -- Geodan S&R Amsterdam ------------------------------------- Geodan S&R President Kennedylaan 1 1079 MB Amsterdam (NL) ------------------------------------- Tel: +31 (0)20 - 5711 311 Fax: +31 (0)20 - 5711 333 ------------------------------------- E-mail: ste...@ge... Website: www.geodan.nl Disclaimer: www.geodan.nl/disclaimer ------------------------------------- |