Skip to content

Geo-compose: update since tags #227

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.arcgismaps.mapping.view.AttributionBarLayoutChangeEvent
/**
* State holder for attribution bar related properties/events on the [com.arcgismaps.toolkit.geocompose.MapView].
*
* @since 200.3.0
* @since 200.4.0
*/
@Stable
public data class AttributionState(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package com.arcgismaps.toolkit.geocompose
/**
* Used to perform operations on a composable MapView or SceneView.
*
* @since 200.3.0
* @since 200.4.0
*/
public sealed class GeoViewProxy {
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import kotlinx.coroutines.flow.asSharedFlow
/**
* A collection class to encapsulate the [GraphicsOverlay] list used by the [com.arcgismaps.toolkit.geocompose.MapView]
*
* @since 200.3.0
* @since 200.4.0
*/
@Stable
public class GraphicsOverlayCollection : Iterable<GraphicsOverlay> {
Expand All @@ -52,7 +52,7 @@ public class GraphicsOverlayCollection : Iterable<GraphicsOverlay> {
* Add a [graphicsOverlay] to this GraphicsOverlayCollection.
*
* @return if the add operation succeeds, return true.
* @since 200.3.0
* @since 200.4.0
*/
public fun add(graphicsOverlay: GraphicsOverlay): Boolean {
return if (graphicsOverlays.add(graphicsOverlay)) {
Expand All @@ -65,7 +65,7 @@ public class GraphicsOverlayCollection : Iterable<GraphicsOverlay> {
* Remove a [graphicsOverlay] from this GraphicsOverlayCollection.
*
* @return if the remove operation succeeds, return true.
* @since 200.3.0
* @since 200.4.0
*/
public fun remove(graphicsOverlay: GraphicsOverlay): Boolean {
return if (graphicsOverlays.remove(graphicsOverlay)) {
Expand All @@ -77,15 +77,15 @@ public class GraphicsOverlayCollection : Iterable<GraphicsOverlay> {
/**
* Returns the number of graphics overlays in this GraphicsOverlayCollection.
*
* @since 200.3.0
* @since 200.4.0
*/
public val size: Int
get() = graphicsOverlays.size

/**
* Clears all graphics overlays from this GraphicsOverlayCollection.
*
* @since 200.3.0
* @since 200.4.0
*/
public fun clear() {
graphicsOverlays.clear()
Expand All @@ -96,7 +96,7 @@ public class GraphicsOverlayCollection : Iterable<GraphicsOverlay> {
* Sealed class used to notify the compose MapView to update the GraphicOverlays on the
* type of [ChangedEvent].
*
* @since 200.3.0
* @since 200.4.0
*/
internal sealed class ChangedEvent() {
class Added(val element: GraphicsOverlay) : ChangedEvent()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ import kotlinx.coroutines.launch
* @param onTwoPointerTap lambda invoked when a user taps two pointers on the composable MapView
* @param onPan lambda invoked when a user drags a pointer or pointers across composable MapView
* @param onDrawStatusChanged lambda invoked when the draw status of the composable MapView is changes
* @since 200.3.0
* @since 200.4.0
*/
@Composable
public fun MapView(
Expand Down Expand Up @@ -211,7 +211,7 @@ public fun MapView(
* Updates the viewpoint of the provided view-based [mapView] using the given [viewpointOperation]. This will be
* recomposed when [viewpointOperation] changes.
*
* @since 200.3.0
* @since 200.4.0
*/
@Composable
private fun ViewpointUpdater(
Expand Down Expand Up @@ -419,7 +419,7 @@ private fun GraphicsOverlaysUpdater(
*
* @param key invalidates the remembered LocationDisplay if different from the previous composition
* @param init called when the [LocationDisplay] is created to configure its initial state
* @since 200.3.0
* @since 200.4.0
*/
@Composable
public inline fun rememberLocationDisplay(
Expand All @@ -441,7 +441,7 @@ public inline fun rememberLocationDisplay(
*
* @param key invalidates the remembered GraphicsOverlayCollection if different from the previous composition
* @param init called when the [GraphicsOverlayCollection] is created to configure its initial state
* @since 200.3.0
* @since 200.4.0
*/
@Composable
public inline fun rememberGraphicsOverlayCollection(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import com.arcgismaps.mapping.view.ScreenCoordinate
* Operations performed when the associated composable MapView is not in the composition will fail gracefully,
* i.e. won't throw exceptions but won't return a successful result.
*
* @since 200.3.0
* @since 200.4.0
*/
public class MapViewProxy : GeoViewProxy() {

Expand All @@ -39,15 +39,15 @@ public class MapViewProxy : GeoViewProxy() {
* be initialized by the composable [MapView] when it enters the composition and set to null when
* it is disposed by calling [setMapView].
*
* @since 200.3.0
* @since 200.4.0
*/
private var mapView: com.arcgismaps.mapping.view.MapView? = null

/**
* Sets the [mapView] parameter on this operator. This should be called by the composable [MapView]
* when it enters the composition and set to null when it is disposed.
*
* @since 200.3.0
* @since 200.4.0
*/
internal fun setMapView(mapView: com.arcgismaps.mapping.view.MapView?) {
this.mapView = mapView
Expand All @@ -61,7 +61,7 @@ public class MapViewProxy : GeoViewProxy() {
*
* @param screenCoordinate the screen point, in pixels
* @return a [Point] object, or null if the location could not be determined or an error occurs
* @since 200.3.0
* @since 200.4.0
*/
public fun screenToLocationOrNull(screenCoordinate: ScreenCoordinate): Point? {
return try {
Expand All @@ -79,7 +79,7 @@ public class MapViewProxy : GeoViewProxy() {
*
* @param mapPoint a [Point] object representing a coordinate on the map
* @return A [ScreenCoordinate] for the screen in pixels. Returns null if an error occurs
* @since 200.3.0
* @since 200.4.0
*/
public fun locationToScreenOrNull(mapPoint: Point): ScreenCoordinate? {
return try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import kotlinx.coroutines.CompletableDeferred
/**
* Defines operations for setting the viewpoint of a composable [MapView].
*
* @since 200.3.0
* @since 200.4.0
*/
@Stable
public sealed class MapViewpointOperation {
Expand All @@ -41,7 +41,7 @@ public sealed class MapViewpointOperation {
* Awaits the completion of this MapViewpointOperation.
*
* @return a Result returning a boolean used to indicate if the operation completed successfully or not
* @since 200.3.0
* @since 200.4.0
*/
public suspend fun await(): Result<Boolean> = deferred.await()

Expand All @@ -53,7 +53,7 @@ public sealed class MapViewpointOperation {
* Changes the map view to the new viewpoint. The viewpoint is updated instantaneously.
*
* @property viewpoint the new viewpoint
* @since 200.3.0
* @since 200.4.0
*/
public class Set(public val viewpoint: Viewpoint) :
MapViewpointOperation()
Expand All @@ -65,7 +65,7 @@ public sealed class MapViewpointOperation {
* @property viewpoint the new viewpoint
* @property durationSeconds the duration of the animation in seconds
* @property curve the animation curve to apply
* @since 200.3.0
* @since 200.4.0
*/
public class Animate(
public val viewpoint: Viewpoint,
Expand All @@ -78,7 +78,7 @@ public sealed class MapViewpointOperation {
*
* @property center the location on which the map should be centered
* @property scale the new map scale
* @since 200.3.0
* @since 200.4.0
*/
public class Center(
public val center: Point,
Expand All @@ -92,7 +92,7 @@ public sealed class MapViewpointOperation {
* different to that of the composable [MapView], it will be reprojected appropriately
* @property paddingInDips a distance around the geometry to include in the Viewpoint when zooming,
* in density-independent pixels
* @since 200.3.0
* @since 200.4.0
*/
public class SetBoundingGeometry(
public val boundingGeometry: Geometry,
Expand All @@ -103,7 +103,7 @@ public sealed class MapViewpointOperation {
* Animates the rotation of the map view to the provided angle.
*
* @property angleDegrees the new map rotation angle, in degrees counter-clockwise
* @since 200.3.0
* @since 200.4.0
*/
public class Rotate(
public val angleDegrees: Double
Expand All @@ -113,7 +113,7 @@ public sealed class MapViewpointOperation {
* Animates the map view to zoom to a scale.
*
* @property scale the new map scale
* @since 200.3.0
* @since 200.4.0
*/
public class Scale(
public val scale: Double
Expand All @@ -123,7 +123,7 @@ public sealed class MapViewpointOperation {
* Animates the map view's viewpoint to the viewpoint of the bookmark.
*
* @property bookmark bookmark to set
* @since 200.3.0
* @since 200.4.0
*/
public class SetBookmark(
public val bookmark: Bookmark
Expand All @@ -138,7 +138,7 @@ public sealed class MapViewpointOperation {
* to complete.
*
* @param mapView the view-based MapView to execute this operation on
* @since 200.3.0
* @since 200.4.0
*/
internal suspend fun MapViewpointOperation.execute(mapView: com.arcgismaps.mapping.view.MapView) {
when (this) {
Expand Down