Geolocation

expect class Geolocation

GeoLocation API for accessing the browser's location data.

See Geolocation

actual external class Geolocation
actual external class Geolocation

Constructors

Link copied to clipboard
constructor()
constructor()

Functions

Link copied to clipboard
expect fun clearWatch(watchId: Int)

Clear an existing watch operation.

actual fun clearWatch(watchId: Int)
actual fun clearWatch(watchId: Int)
Link copied to clipboard
expect fun getCurrentPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object)

Returns the current position of the device.

actual fun getCurrentPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object)
actual fun getCurrentPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object)
Link copied to clipboard
expect fun watchPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object): Int

Starts watching the position of the device.

actual fun watchPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object): Int
actual fun watchPosition(success: (GeolocationPosition?) -> Unit, error: (GeolocationPositionError) -> Unit, options: Object): Int