Select to view content in your preferred language

Compose GeoViewProxy lacks GeoView ports

179
2
Jump to solution
03-20-2025 07:40 AM
dev4567
Emerging Contributor

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.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
PuneetPrakash
Esri Contributor

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/ja...

https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/blob/main/toolkit/geoview-compose/src/main/ja...

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/ja...

 

 

View solution in original post

0 Kudos
2 Replies
PuneetPrakash
Esri Contributor

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/ja...

https://github.com/Esri/arcgis-maps-sdk-kotlin-toolkit/blob/main/toolkit/geoview-compose/src/main/ja...

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/ja...

 

 

0 Kudos
TrevorDraeseke
New Contributor

Here's a sample showing onLayerViewStateChanged in use on a composable GeoView