Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.48 KB

geoviewcontroller.md

File metadata and controls

25 lines (19 loc) · 1.48 KB

GeoViewController

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

Features

  • GeoViewController class can manage most common GeoView operations like setting viewpoint, performing identify and showing callouts. Any specific MapView or SceneView 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).

Usage

<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>