Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added doc for GeoViewController #535

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Conversation

pMaske
Copy link
Member

@pMaske pMaske commented Dec 6, 2023

Add markdown for GeoViewController

@pMaske pMaske requested a review from dotMorten December 6, 2023 02:05
Copy link
Member

@dotMorten dotMorten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Consider adding more detailed second example from wpf sample

GeoViewController is a helper class for enabling MVVM patterns adoption is an 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.

![compass](https://user-images.githubusercontent.com/1378165/73389839-d9c8f500-4289-11ea-923c-18232489b3e0.png)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compass?


- 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 helpher class is extensible so you can add your own custom map and scene operations, or interface for allowing testing (see WPF sample).
- Currently, there are no events exposed. You can use `EventToCommand` or any similar already established approach to forward view events back to the ViewModel (see samples).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove. It makes it sound like this might come. The controller was never needed to do this in the first place

<esri:MapView x:Name="MyMapView"
Map="{Binding Map, Source={StaticResource VM}}"
toolkit:GeoViewController.GeoViewController="{Binding Controller, Source={StaticResource VM}}">
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the VM code be included?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about it but then I thought it would be like pasting the entire sample code. I think users can refer to WPF sample, if needed.

@pMaske pMaske requested a review from dotMorten December 6, 2023 02:24
Copy link
Contributor

@ThadT ThadT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @pMaske! I have just a couple of suggestions. Looks good 👍

@@ -24,6 +24,7 @@ The ArcGIS Maps SDK for .NET Toolkit contains controls and components to acceler
| [Compass](docs/compass.md) | ![compass](https://user-images.githubusercontent.com/1378165/73389839-d9c8f500-4289-11ea-923c-18232489b3e0.png) | Show a compass direction when the map or scene is rotated. | WinUI, MAUI, UWP, WPF |
| [FeatureDataField](docs/feature-data-field.md) | ![FeatureDataField](https://user-images.githubusercontent.com/1378165/73389879-ebaa9800-4289-11ea-8e4e-de153a6a371a.png) | Display and optionally allow editing of a single field attribute of a feature. | UWP, WPF |
|[FloorFilter](docs/floor-filter.md) | ![image](https://user-images.githubusercontent.com/29742178/158746908-71a39e28-596f-44b6-9230-e2a04bdaeb9e.png) | Browse floor-aware maps and scenes and filter the view to show levels in a facility. | WinUI, MAUI, UWP, WPF |
|[GeoViewController](docs/geoviewcontroller.md) | | A helpfer class to enable easy adoption of MVVM patterns in an ArcGIS Maps SDK for .NET application. | WinUI, MAUI, UWP, WPF |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|[GeoViewController](docs/geoviewcontroller.md) | | A helpfer class to enable easy adoption of MVVM patterns in an ArcGIS Maps SDK for .NET application. | WinUI, MAUI, UWP, WPF |
|[GeoViewController](docs/geoviewcontroller.md) | | A helper class to enable easy adoption of MVVM patterns in an ArcGIS Maps SDK for .NET application. | WinUI, MAUI, UWP, WPF |

@@ -32,6 +32,10 @@ Browse floor-aware maps and scenes and filter the view to show levels in a facil

![FloorFilter](https://user-images.githubusercontent.com/29742178/158746908-71a39e28-596f-44b6-9230-e2a04bdaeb9e.png)

### GeoViewController

A helper class for enabling easy adoption of MVVM patterns in ArcGIS Maps SDK for .NET applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most people will know what MVVM means, but just to be safe (?).

Suggested change
A helper class for enabling easy adoption of MVVM patterns in ArcGIS Maps SDK for .NET applications.
A helper class for enabling easy adoption of [Model-View-ViewModel (MVVM)](https://learn.microsoft.com/en-us/dotnet/architecture/maui/mvvm) patterns in ArcGIS Maps SDK for .NET applications.

@@ -0,0 +1,25 @@
# GeoViewController

GeoViewController is a helper class for enabling easy adoption of MVVM patterns in ArcGIS Maps SDK for .NET applications.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GeoViewController is a helper class for enabling easy adoption of MVVM patterns in ArcGIS Maps SDK for .NET applications.
GeoViewController is a helper class for enabling easy adoption of [Model-View-ViewModel (MVVM)](https://learn.microsoft.com/en-us/dotnet/architecture/maui/mvvm) patterns in ArcGIS Maps SDK for .NET applications.

Comment on lines +10 to +11
- 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 for enabling testing (see WPF sample).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 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 for enabling testing (see WPF sample).
- GeoViewController class can manage most common `GeoView` operations like setting a 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 an interface to enable testing (see WPF sample).

@pMaske pMaske merged commit b1ac85d into main Dec 6, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants