Hi Chris,
The MapView.ZoomScales
is independent from a LayerOverlay
’s TileMatrixSet
. For example, if your MapView.ZoomScales
are [100, 110, 120, 130, 140, 150]
, but your LayerOverlay.TileMatrixSet
only has [100, 150]
, then:
- Zooming to 110 will actually render at 100 and scale the image up.
- Zooming to 140 will snap to 150 , render, and then scale the image down.
This design gives you flexibility. The TileMatrixSet
controls how the overlay renders and caches tiles. You can align it exactly with MapView.ZoomScales
, but you don’t have to. Also, different TileOverlay can have different TileMatrixSet as well.
If you want labels to always render at their defined size, you can make the overlay.TileMatrixSet consistent with mapView.ZoomScales, but maybe a better option is to put them in a FeatureLayerWpfDrawingOverlay
. This overlay renders directly on the canvas with hardware acceleration instead of through an image, so label sizes won’t be affected by intermediate zoom scaling. The rendering engine is different, so sizes may be slightly off, the panning performance would be lower as the features will be rendered on the fly, but anyway, it’s worth trying.
There’s a sample in HowDoI that shows points/lines/polygons/labels all in a FeatureLayerWpfDrawingOverlay
(with the checkbox checked). In your case, you could keep the shapes in a LayerOverlay
but only move the labels into the FeatureLayerWpfDrawingOverlay
for better consistency and performance. (set layer.LabelDisplayMode to LabelsOnly or ShapesOnly)
Thanks,
Ben