mapbox-maps-flutter
mapbox-maps-flutter copied to clipboard
How to center camera on user location?
I'm trying to get my location from the map to avoid using external libraries like geolocator
, but I can't find any option nor listener for the user location.
At the start of my view I want to center the camera at the current user location. Is there any way to do that in the current version of the plugin?
Have a look at this example: https://gist.github.com/hkben/844d46a829f667e91fa6e6078e8b019c Maybe it is helpful
Thanks! This is exactly what I was looking for!
I'd argue that there is a case for this being directly supported by this library since both the Android SDK and the iOS SDK support following the puck out of the box: Android Docs | iOS Docs
But viewport is not supported by the Flutter SDK yet.
@kamami Yeah, that's what I mean; I think this issue should remain open until this is supported in the Flutter SDK.
@kamami you refer to this package support for viewport or flutter framework itself?
This would be a good improvement as when using the timer approach to center the location we notice the map "jumping" every second instead of the smooth navigation when using mapbox in a native app.
@geisterfurz007 @kamami @serraojoao reopening to track when viewport will be implemented. There're no estimations when it'll become available yet, I'll keep you all updated.
@yunikkk I understand you can't give an estimate. But is there a ballpark figure you can say like if it takes some months, more than half a year, a year? This would really help for my project planning.
@yunikkk I understand you can't give an estimate. But is there a ballpark figure you can say like if it takes some months, more than half a year, a year? This would really help for my project planning.
@evil159 or @baleboy - do you folks know if the viewport API is planned anytime soon?
Unfortunately there is no committed timeline at the moment.
@baleboy thanks for your update. Is there perhaps a public roadmap of this package?