Jeremy,
I think you can work this issue around by adding proper ZoomLevels. To make sure it is clear, first I would like to talk about the ZoomLevelSet and ZoomLevel.
ZoomLevel accepts a scale, which is a point not a range. That is to say we CANNOT specify the renders just by one zoomlevel. ZoomLevelSet however, as it includes multi ZoomLevels, it in fact has ranges which we can set the renders within. Take your codes for example,
ProvinceLayer.CustomZoomLevels.Add(1000000);
ProvinceLayer.CustomZoomLevels.Add(10000);
ProvinceLayer.CustomZoomLevels.Add(1000);
The ProvinceLayer.CustomZoomLevels has 3 ranges, (Double.Max~505000), (505000~5500), (5500~0). 505000 comes from (1000000 + 10000) / 2 and 5500 comes from (10000+1000)/ 2. That means if the current scale is within (Double.Max ~ 505000), it is within the first ZoomLevel; if it is within (505000~5500), it is then within the 2nd ZoomLevel. Ideally, you can use ApplyUntilZoomLevel to set the style across different ZoomLevels, but as ApplyUntilZoomLevel is an enumeration with 20 items and has some bugs when dealing with custom ZoomLevels, you might have some issues when using that. We will work on that.
So for your codes about RiverLayer,
RiverLayer.CustomZoomLevels.Add(10000);
RiverLayer.CustomZoomLevels[0].ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level02;
You only have one ZoomLevel in the ZoomLevelSet, that means there is only ONE range in RiverLayer.CustomZoomLevels, which is (Double.Max ~ 0). That’s why wherever you zoom in / out, the map is always with the same style, as it is always within the only ZoomLevel.
Now let’s do some changes. Let’s say we want the River Layer be visible ONLY within the scale range (8000, 12000), I then need to add 3 ZoomLevels to the ZoomLevelSet.
RiverLayer.CustomZoomLevels.Add(14000);
RiverLayer.CustomZoomLevels.Add(10000);
RiverLayer.CustomZoomLevels.Add(6000);
And only set the style for the second ZoomLevel.
Hope that makes sense.
At last talk about the ClientZoomLevelSet in Web Edition. The zoomLevel/ZoomLevelSet above are all on server side which defines how we want to render the map, the clientZoomLevelSet though defines what zoomlevels we can zoom to on Client. Technically we can zoom to whatever scale we want, like 6000:1, 6001:1, 6002:1,…, but usually at client side, we only provide several options (20 by default) so you can only zoom to those scales. Sure it can be changed by the method Map1.SyncClientZoomLevels().
Let us know if you have any more issues about it.
Thanks,
Ben