-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Map Location Update with External Coordinates Source #12037
Comments
Hi, @rohit-aq. Thank you for using Mapbox. Are you overriding the |
I have to stop Mapview location manager update first otherwise it keeps
bringing back the source annotation to the original source.
To stop the default location update
/*
mapview.locationManager?.stopUpdatingHeading()
mapview.locationManager?.stopUpdatingLocation()
*/
and then update the pointer by following code
/*
let location = CLLocation.init(coordinate: currentLocation, altitude: 0.0,
horizontalAccuracy: 0.0, verticalAccuracy: 0.0, course: course, speed: 0.0,
timestamp: Date())
mapview.locationManager(mapview.locationManager, didUpdateLocations:
[location]) */
…On Fri, Jun 1, 2018 at 7:27 PM, Fabian Guerra Soto ***@***.*** > wrote:
Hi, @rohit-aq <https://github.com/rohit-aq>. Thank you for using Mapbox.
Are you overriding the MGLMapview.locationManager? or are you using a
different method to pass you CLLocation object?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12037 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AlG_cu46LmMONt7qdjlDgoUT6YxDqPemks5t4UgsgaJpZM4UUobX>
.
--
...
Thanks,
Rohit Kumar
Sr. Software Engineer
AstraQube
|
Wait, this workaround was provided in one of the Mapbox examples. There is
no other way I can update the map with the external coordinate and course.
See the Navigation Examples that you Mapbox has on Github.
…On Fri, Jun 1, 2018 at 7:58 PM, Fabian Guerra Soto ***@***.*** > wrote:
Hi, @rohit-aq <https://github.com/rohit-aq>. MGLMapview.locationManager
is not a public property you could use. You may want to take a look at this
ongoing PR #12013 <#12013>
tho.
This is not a bug. I am going to close this ticket.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#12037 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AlG_cjlj_fecx1_Vu76dAGrbsr2qxS4jks5t4U-ggaJpZM4UUobX>
.
--
...
Thanks,
Rohit Kumar
Sr. Software Engineer
AstraQube
|
Hi @rohit-aq, For the navigation sdk, we're doing a few hacks to make the location manager public. This is a necessary evil so we can simulate routes. Can you check out this guide I just put together? mapbox/mapbox-navigation-ios#1470 |
So is there a way we can provide Mapbox map coordinates from external source and still get the same effect as it shows with the default location manager. I am having hard time finding anything that moves and rotate the puck same way if the coordinates are from an external source say API and not form CLLocationManager. What is the workaround here? |
Poking around for a solution to use third part location. But according to the status of #12013 , seems it's still not implemented into stable release yet? @fabian-guerra |
Platform: iOS
Mapbox SDK version: 4.0.2
Steps to trigger behavior
Expected behavior
Map should navigate to the updated location
Actual behavior
Map goes to updated location and comes back to its original source as if it's getting the location update form Core Location as well.
The text was updated successfully, but these errors were encountered: