I’m having issues getting all labels to show up regardless of zoom level. Right now, if labels overlap then only one is shown until I zoom in closer. The user doesn’t want that. They want the labels to all show and stack regardless if they overlap or not.
I’ve tried a few things:
- On the
TextStyle
for the labels, I’ve setOverlappingRule = LabelOverlappingrule.AllowOverlapping
- I’ve set
LabelDuplicateRule.UnlimitedDuplicateLabels
DrawingLevel = DrawingLevel.LabelLevel
SuppressPartialLabels = false
Still, overlapping labels disappear until certain zoom levels.
Could this have anything to do with the fact that I have custom zoom levels?
I made a ZoomLevelSet
with extra ZoomLevel
s and set my Map’s ZoomLevelSet
to that. However, I didn’t set each layer’s ZoomLevelSet
to it, because I assumed since the map was already set to it, it would automatically set the layers. Is this true?
Here’s an example of how I’m setting custom zoom levels:
var partitionedZoomLevelSet = new ZoomLevelSet(); //make custom zoom levels to zoom in further than default
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMapZoomLevelSet.GetZoomLevels()[0].Scale));//Zoo
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[1].Scale));//Zoo
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[2].Scale)); //Zo
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[3].Scale)); //Zo
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[4].Scale)); //Zo
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[5].Scale)); //Z
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[6].Scale)); //Z
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[7].Scale)); //Z
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[8].Scale)); //
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[9].Scale)); //
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[10].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[11].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[12].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[13].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[14].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[15].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[16].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[17].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[18].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[19].Scale)); /
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 2));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 4));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 6));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(MyMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 8));
MyMap.ZoomLevelSet = partitionedZoomLevelSet;
Again, I don’t set these for my layers because I assumed it would inherit from the map’s zoomlevel.