I need to be able to zoom in within a few feet. To do this, I thought I could just add custom zoom levels. However, I’m unable to zoom in any further than the original 20 zoom levels no matter how many I add to the customzoomlevel collection. Code below:
var partitionedZoomLevelSet = new ZoomLevelSet(); //make custom zoom levels to zoom in further than default
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[0].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[1].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[2].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[3].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[4].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[5].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[6].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[7].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[8].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[9].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[10].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[11].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[12].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[13].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[14].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[15].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[16].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[17].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[18].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[19].Scale));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 2));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 4));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 6));
partitionedZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(GlobalObjects.Instance.OnyxMap.ZoomLevelSet.GetZoomLevels()[19].Scale / 8));
MyMap.ZoomLevelSet = partitionedZoomLevelSet;
The map is in decimal degrees, unprojected.