Hi,
I'm attempting to set the display of labels in a subset of zoom levels. I add the TextSyle to (e.g.) ZoomLevel # 11, and applies this until zoom level # 20. It didn't work ! The labels we're clearly displayed on all levels.
I then got suspicious. I'm using customized map zoom level scales (to enable zooming in closely), and thought that these we're automatically applied to the map layers on a zoom level _index_ basis. I.e. map.ZoomLevelSet.ZoomLevel01 equals layer.ZoomLevelSet.ZoomLevel01 etc. This appeared to be a wrong assumption on my part.
It seems that layer zoom levels and map zoom levels are independent entities, and matched on their scale values when applied.
Now, after setting custom map zoom level scales, after adding all my layers to the map, when I apply the map scales to each layer, the label display finally works as expected:
Sub ApplyMapZoomLevelScalesToLayers(ByVal Map1 As Map)
For Each ovl In Map1.CustomOverlays
If TypeOf ovl Is LayerOverlay Then
For Each lyr In DirectCast(ovl, LayerOverlay).Layers
If TypeOf lyr Is FeatureLayer Then
With DirectCast(lyr, FeatureLayer)
For i = 0 To .ZoomLevelSet.GetZoomLevels.Count - 1
Try
.ZoomLevelSet.GetZoomLevels(i).Scale = Map1.ZoomLevelSet.GetZoomLevels(i).Scale
Catch ex As Exception
End Try
Next
End With
End If
Next
End If
Next
End Sub
Is this WAD ? Why would one want to set zoom level scales independently on each layer as opposed to on the interactive map ?
Would it not be better to use the map zoom level scales for all layers, at least when the latter haven't been specifically defined ?
TIA