Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Add an approximate location view. #381

Merged
merged 3 commits into from
Aug 21, 2020
Merged

Conversation

fabian-guerra
Copy link
Contributor

Introduces a new approximate location view when MGLLocationManager.accuracyAuthorization is set to CLAccuracyAuthorizationReducedAccuracy.

approximatelocatiion

if (_approximateLayer && (_oldZoom != self.mapView.zoomLevel || _oldHorizontalAccuracy != self.userLocation.location.horizontalAccuracy))
{
CGFloat borderWidth = 2;
if (self.mapView.zoomLevel < 7) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this zoom level value into a const in case we have to change in the future
maybe like const int maxApproximateZoomLevel = 7 <-- or w.e the correct obj-c syntax is

Copy link
Contributor

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to mention this approximate location halo in the changelog, as a heads-up to an application or downstream SDK that may need to update its custom user location annotation view similarly.

@fabian-guerra fabian-guerra merged commit a11720b into master Aug 21, 2020
@fabian-guerra fabian-guerra deleted the fabian-accuracy-reduced-view branch August 21, 2020 15:37
@knov knov mentioned this pull request Aug 27, 2020
[self updatePitch];
if (@available(iOS 14, *)) {
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000
if (self.mapView.locationManager.accuracyAuthorization == CLAccuracyAuthorizationFullAccuracy) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accuracyAuthorization is optional and PassiveLocationManager in Navigation SDK hasn't implemented this property in 1.0 release. This leads to crashes with Nav SDK 1.0 and Maps SDK 6.2.0 on iOS 14.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@1ec5 1ec5 Sep 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Successfully merging this pull request may close these issues.

4 participants