Skip to content

Commit

Permalink
Revert "feat: Change the position parameter of MarkerState to a cle…
Browse files Browse the repository at this point in the history
…arer name. googlemaps#637"

This reverts commit 2aa9d4a.
  • Loading branch information
smith.jspiner committed Dec 14, 2024
1 parent d9ee53c commit 4511415
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ public class MarkerState private constructor(position: LatLng) {
/**
* Creates a new [MarkerState] object
*
* @param initialPosition the initial marker position
* @param position the initial marker position
*/
@StateFactoryMarker
public operator fun invoke(
initialPosition: LatLng = LatLng(0.0, 0.0)
): MarkerState = MarkerState(initialPosition)
position: LatLng = LatLng(0.0, 0.0)
): MarkerState = MarkerState(position)

/**
* The default saver implementation for [MarkerState]
Expand All @@ -182,15 +182,13 @@ public class MarkerState private constructor(position: LatLng) {
* Other use cases may be better served syncing [MarkerState.position] with a data model.
*
* This cannot be used to preserve info window visibility across configuration changes.
*
* @param initialPosition the initial marker position
*/
@Composable
public fun rememberMarkerState(
key: String? = null,
initialPosition: LatLng = LatLng(0.0, 0.0)
position: LatLng = LatLng(0.0, 0.0)
): MarkerState = rememberSaveable(key = key, saver = MarkerState.Saver) {
MarkerState(initialPosition)
MarkerState(position)
}

/**
Expand Down

0 comments on commit 4511415

Please sign in to comment.