Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update real time location #526

Open
medalawi opened this issue May 19, 2024 · 2 comments
Open

How to update real time location #526

medalawi opened this issue May 19, 2024 · 2 comments

Comments

@medalawi
Copy link

I'm new with this awesome plugin
I'm facing this problem:

Location on Android studio emulator update marker on app every 30 second when I play route
How to update marker position on map in Realtime when user move Thank you .

@liodali
Copy link
Owner

liodali commented May 19, 2024

we have 2 option

  • you can use our internal implementation to move the map and receive user location
              await controller.currentLocation();
              await controller.enableTracking(
                enableStopFollow: true,
                disableUserMarkerRotation: false,
                anchor: Anchor.right,
                useDirectionMarker: true,
              );
              // to disable tracking
              await controller.disabledTracking();
  • or use the manual follow
      // start receiving user location
      await controller.startLocationUpdating();
      // stop receiving user location
      await controller.stopLocationUpdating()
      
      use our `OSMMixinObserver` and call `onLocationChanged` and put your logic to move the map

@medalawi
Copy link
Author

a.mp4

here is what I got on both Osmixinobserver and internal implementation, Onlocationchanged print Geopoint every 30 second how to make it every 1 sec ? Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants