Hi,
Is there a way I can calculate the ZoomLevel for a given tile inside the GetMapCore() method? I presume there must be some way of doing this using the tile dimensions and tile bounding box (which is Spherical Mercator metres).
We have a large number of layers/zoom levels that are activated on a per-user basis. We initially tried loading all of the layers in the GetMapConfiguration() method and then filtering these in the GetMapCode() method as suggested in one of the samples. This uses a lot of memory though as the GetMapConfiguration() runs multiple times as IIS spawns new threads, and the startup times are also much slower because of the large number of layer/zoom levels.
We're seeing much better performance by only generating the layers in the GetMapCore() method. We've done some optimisation by only adding layers that are inside the bounding box of the tile being requested, but we would see further significant improvements by only adding layers that should be rendered for the zoom level required by the tile. All I need to know is how to calculate the zoom level!
Thanks in advance,
Gary