GeoViewController is a helper class for enabling easy adoption of Model-View-ViewModel (MVVM) patterns in ArcGIS Maps SDK for .NET applications. The helper class allows you to perform view operations on the MapView from your ViewModel, through an attached proxy-object that ensures you keep ViewModel and View separated.
- GeoViewController class can manage most common
GeoView
operations like setting viewpoint, performing identify and showing callouts. Any specificMapView
orSceneView
operations are not accessible via this helper class. - The helper class is extensible. You can add your own custom map and scene operations, or interface to enable testing (see WPF sample).
<esri:MapView x:Name="MyMapView"
Map="{Binding Map, Source={StaticResource VM}}"
esri:GeoViewController.GeoViewController="{Binding Controller, Source={StaticResource VM}}">
<Behaviors:Interaction.Triggers>
<Behaviors:EventTrigger EventName="GeoViewTapped" >
<Behaviors:InvokeCommandAction Command="{Binding GeoViewTappedCommand, Source={StaticResource VM}}" PassEventArgsToCommand="True" />
</Behaviors:EventTrigger>
</Behaviors:Interaction.Triggers>
</esri:MapView>