Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add dcc.Geolocation
Recreated PR from old dash-core-components repo # 962
CHANGELOG.md
The Geolocation component uses the Geolocation API. This will cause the user's browser to ask for permission to access location data. If they accept, then the browser will use the best available functionality on the device to access this information (for example, GPS).
Component Properties
lat
latitude in degreeslon
longitude in degreesaccuracy
of the lat/lon in metersWhen available:
alt
altitude in metersalt_accuracy
in metersheading
in degreesspeed
in meters per secTrue
in a callback, the browser will update the position data and resetupdate_now
back to False. This can, for example, be used to update the position with a button click or an interval timer.Quickstart
Demo app
This app demos showing user's location on a map, getting the address based on the lat long position, live updates, and more!
(requires dash-bootstrap-components>=1.0.0 and geopy for displaying the address)