I think you have a false premise. This Google is always faster. I assume that your building application is from scratch and the application does not have access to the cache. Otherwise, GoogleMaps may also take more than 3 seconds. Obviously, I donβt know the exact features, but I just think that when you use GoogleMaps, you use it as a user, and now, when you are developing your own application, you think of it as a developer, i.e. Be more meticulous about it.
Also, to have the best of comparisons, make sure you set desiredAccuracy to BestForNavigation , distanceFilter to 0 and activityType to .automotive . This is usually what navigation apps do.
Leo's comment is also important: make sure you update the interface from the main queue
And as experienced Core-Location users: a programmer and Paulw11 already mentioned:
When you call startUpdatingLocation in the location manager, you must give it time to get the position. You should not immediately call stopUpdatingLocation . We let it work for a maximum of 10 seconds or until we get a non-cached location with high accuracy.
Honey source share