Skip to content

Conversation

@PaulAllanSturm
Copy link
Collaborator

@PaulAllanSturm PaulAllanSturm commented Dec 4, 2025

Add support for Local Scene View to Compass and OverviewMap. This is mostly equivalent to the support for Scene View, but requires a separate code branch because LocalSceneView and SceneView don't have a shared ancestor with the common functionality.

For the example, I used the LocalSceneView code from the Sample Viewer.

The doc comments were updated to add LocalSceneView everywhere we had SceneView.

For OverviewMap, we had two constructors -- withMapView() and withSceneView(). It turns out that we don't even need separate constructors. I originally thought we did, because they require different "controller" types. But all the "controller" types subclass from GeoViewController, so they can all be treated as GeoViewController. So rather than creating a third constructor withLocalSceneView(), I just added an unnamed constructor that handles all three types. And then I marked the other two constructors "deprecated". We might want to discuss if that's the right approach.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for ArcGISLocalSceneView to the Compass and OverviewMap widgets. Previously, these widgets only worked with ArcGISMapView and ArcGISSceneView. The key insight is that all three controller types inherit from GeoViewController, allowing a unified approach.

Key changes:

  • Replaced type checks with switch statements on controller types for better pattern matching
  • Consolidated OverviewMap constructors by deprecating withMapView() and withSceneView() in favor of a single unnamed constructor
  • Added comprehensive documentation updates mentioning LocalSceneView alongside MapView and SceneView

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/src/overview_map/overview_map.dart Unified constructor approach, added LocalSceneView support via switch statements, updated documentation
lib/src/compass/compass.dart Added LocalSceneView case to switch statements for rotation handling, updated documentation
example/lib/example_overview_map_with_scene.dart Updated to use new unified OverviewMap constructor
example/lib/example_overview_map_with_map.dart Updated to use new unified OverviewMap constructor
example/lib/example_overview_map_with_local_scene.dart New example demonstrating OverviewMap with LocalSceneView
example/lib/example_overview_map.dart Added local scene example to the example enum
example/lib/example_compass_local_scene.dart New example demonstrating Compass with LocalSceneView
example/lib/example_compass.dart Added local scene example to the example enum

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants