FlowingCode / GoogleMapsAddon

Vaadin Addon based on Google Maps Web Component
https://www.flowingcode.com/en/open-source/
Apache License 2.0
20 stars 7 forks source link

'My location' marker #117

Closed mvysny closed 8 months ago

mvysny commented 9 months ago

The Google Maps Android app can show your location, the direction where you're looking, and update the location as you move in real time. It would be good for the JS library to feature such functionality, as a simple function call, e.g. "trackMyLocation()" would enable location tracking and would draw a dot on the map (optionally with the view orientation) and would automatically update the dot location.

Filed upstream as https://issuetracker.google.com/issues/327473324 since the functionality should be baked in the GoogleMaps JS library first.

Workaround is to implement this manually:

  1. Create a marker which shows current user location
  2. Use Viritin to track your location periodically
  3. Update the marker location based on the location updates.