I have a project using MsSqlFeatureLayers, custom styles, custom zoom level scales, and TileType.Single. I think the project is set up fairly normally in that different feature layers turn on at different zoom levels. All zoom levels have ApplyUntilZoomLevel set to Level20. The project is slowing down to an unacceptable crawl once the zoom level gets to about 5 and I have been trying to find ways to speed it up.
I noticed that every time I draw the map, The DrawCore event of my custom style is hit at least twice per layer.
The following is a list of layers:
layer 1 - major highways - 302 features
layer 2 - county highways - 2997 features
layer 3 - secondary roads - 60899 features
layer 5 - railroads - 316 features
layer 9 - county boundaries - 384 features
The following is a list of the layers drawn by DrawCore for each zoom cycle;
ZoomLevel - Layers Drawn
1 - 1,5,1,5
3 - 1,1,5,5,1,1,5,5
5 - 1,1,1,2,5,5,5,1,1,1,2,5,5,5
8 - 1,1,1,1,1,1,2,2,2,5,5,5,5,5,5,1,1,1,1,1,1,2,2,2,5,5,5,5,5,5
10 - 1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,5,5,5,5,5,5,5,5,3,3,5,5,5,5,5,5,5,5,5,9,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,5,5,5,5,5,5,5,5,5,9
I also noticed that the first time a new layer is added to the list there is a significant pause in the drawing process (but i don't know where). The DrawCore event is very difficult to troubleshoot, in part because it is asyncronous. Can you give me any insight as to why layers would be drawn multiple times per pass and why there would be two passes through the layers for each zoom event?
Charles