GeoView viewpoint synchronization
Keep the view points of two views (e.g. MapView and SceneView) synchronized with each other.
You might need to synchronize GeoView viewpoints if you had two map views in one application - a main map and an inset. An inset map view could display all the layers at their full extent and contain a hollow rectangular graphic that represents the visible extent of the main map view. As you zoom or pan in the main map view, the extent graphic in the inset map would adjust accordingly.
Interact with the MapView or SceneView by zooming or panning. The other MapView or SceneView will automatically focus on the same viewpoint.
- Wire up the
NavigationCompletedevent handlers for both geo views.
- In each event handler, get the current viewpoint from the geo view that is being interacted with and then set the viewpoint of the other geo view to the same value.
- Note: The reason for setting the viewpoints in multiple event handlers is to account for different types of interactions that can occur (ie. single tap pan -vs- continuous pan, single tap zoom in -vs- mouse scroll wheel zoom, etc.).
This application provides two different perspectives of the Imagery basemap. A 2D MapView as well as a 3D SceneView, displayed side by side.
3D, automatic refresh, event, event handler, events, extent, interaction, interactions, pan, sync, synchronize, zoom
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <Esri.ArcGISRuntime.UI.Controls.MapView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/GeoViewSync_MyMapView" /> <Esri.ArcGISRuntime.UI.Controls.SceneView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:id="@+id/GeoViewSync_MySceneView" /> </LinearLayout>