Package com.vaadin.flow.component.geolocation
@NullMarked
package com.vaadin.flow.component.geolocation
-
ClassDescriptionBrowser geolocation API for Flow applications.Whether the browser can read the user's location right now, and if so what permission state the origin has.Framework-internal port between the
Geolocationstatic API and whatever delivers actual position data — the browser in production, an in-memory driver in browserless tests.Handle to a watch session.Framework internal. Factory SPI that producesGeolocationClientinstances perUI, resolved viaLookupthe first timeGeolocationis used for a UI.A single point in the world, as reported by the browser.A failed location reading: the request did not produce aGeolocationPosition.Typed reasons why a geolocation request can fail.Tuning knobs for a geolocation request — controls the accuracy / battery / speed / freshness trade-off of a singleGeolocation.getPosition(com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationPosition>, com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.component.geolocation.GeolocationError>)orGeolocation.watchPosition(com.vaadin.flow.component.Component)call.Builder forGeolocationOptions.The initial state of a newly started watch session, held byGeolocationWatcher.positionSignal()until the browser reports its first position or error.A successful location reading: the coordinates the browser reported and the moment in time they were taken.The value held byGeolocationWatcher.positionSignal()— a successful reading, an error, or the initial "waiting for first reading" state.A handle to a geolocation watch session, returned byGeolocation.watchPosition(Component)and its overload.