Hi!
I have a question regarding zoom-levels on a map. I would like to limit the allowed zoom-levels on the map, so that instead of 20 different levels, you would only have around 5. I have read multiple forums posts around this, but have yet to find a good answer regarding mobile. Using the code below makes it so that the map goes white if you zoom past lower/upper scale, but I am still able to use every zoom level between 1-20 by pressing the ± buttons to zoom, or pinch to zoom.
Is it possible to only allow 5 zoom levels on the map?
At the bottom, I have a WMTS-Layer.
I then create a LayerOverlay, and add the WMTS-Layer to it.
I then again add LayerOverlay to MapView.
ZoomLevelSet customZoomLevelSet = new ZoomLevelSet();
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(1153499));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(144187));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(36046));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(4505));
mapView.ZoomLevelSet = customZoomLevelSet;
mapView.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level04;
wmtsLayer.LowerScale = 4505;
wmtsLayer.UpperScale = 1153499;