I am able to create a box represent my viewable extent correctly, but I was curious if there was a way to disable zooming and panning by any chance?
Edit: Also, when incorporating the following code, I find sometime I end up with remnants of the feature left on the Locus but the performance of using .Refresh instead of .RefreshDynamic is very bad:
Private Sub mapViewer_CurrentExtentChanged(ByVal sender As Object, ByVal e As ThinkGeo.MapSuite.DesktopEdition.CurrentExtentChangedEventArgs) Handles mapViewer.CurrentExtentChanged
Dim rectEnvelope As RectangleShape = mapViewer.CurrentExtent.GetBoundingBox
Dim layerViewPort As New InMemoryFeatureLayer
If mapLocus.DynamicOverlay.Layers.Count = 0 Then
layerViewPort.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.SimpleColors.Red, 2)
layerViewPort.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
mapLocus.DynamicOverlay.Layers.Add("ViewPort", layerViewPort)
With mapLocus
.ShowLogo = False
.MapUnit = GeographyUnit.Meter
.Refresh()
End With
Else
layerViewPort = DirectCast(mapLocus.DynamicOverlay.Layers("ViewPort"), InMemoryFeatureLayer)
End If
layerViewPort.InternalFeatures.Clear()
Dim fView As New Feature(rectEnvelope)
layerViewPort.InternalFeatures.Add(fView)
mapLocus.RefreshDynamic()
End Sub