VERIFIED SOLUTION i
Changing the zoom range programtically for a layer displayed in MapXtreme .NET
UPDATED: July 26, 2018
The following code sample assumes that the user would want to change the second layer in the map (#1 in the 0-based Layers collection) to only be visible between 15 and 35 mile zoom ranges.
C# Code: MapInfo.Mapping.VisibleRange ZoomRange = new MapInfo.Mapping.VisibleRange(15, 35, MapInfo.Geometry.DistanceUnit.Mile); mapControl1.Map.Layers.VisibleRange = ZoomRange; mapControl1.Map.Layers.VisibleRangeEnabled = true; VB.Net Code: Dim ZoomRange As New MapInfo.Mapping.VisibleRange(15, 35,MapInfo.Geometry.DistanceUnit.Mile) MapControl1.Map.Layers(1).VisibleRange = ZoomRange MapControl1.Map.Layers(1).VisibleRangeEnabled = True
- No Downloads