Compose MapViewProxy lacks a bunch of APIs already accessible from the underlying MapView / GeoView e.g.:
getCurrentViewpoint
layerViewStateChanged
etc.
Please, add those proxy getters to the MapViewProxy so we could experience the same level of integrity in the Compose world.
the `currentViewPoint` and the `layerViewState` values are available as callbacks from the Composable MapView,
onViewpointChangedForCenterAndScale: ((Viewpoint) -> Unit)? = null, onViewpointChangedForBoundingGeometry: ((Viewpoint) -> Unit)? = null, ... onLayerViewStateChanged: ((GeoView.GeoViewLayerViewStateChanged) -> Unit)? = null,
https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/blob/main/toolkit/geoview-compose/src/main/java/com/arcgismaps/toolkit/geoviewcompose/MapView.kt#L132
https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/blob/main/toolkit/geoview-compose/src/main/java/com/arcgismaps/toolkit/geoviewcompose/MapView.kt#L157
These callbacks are invoked everytime a new value for the viewpoint or layerViewState is available and provide you the latest value.
We do have a method on the `GeoViewProxy` that you can use to find out the LayerViewState for a given layer at this time. https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/blob/main/toolkit/geoview-compose/src/main/java/com/arcgismaps/toolkit/geoviewcompose/GeoViewProxy.kt#L305
Here's a sample showing onLayerViewStateChanged in use on a composable GeoView
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.