summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wagner <ianthetechie@gmail.com>2017-07-27 22:28:41 -0400
committerJason Wray <jason@mapbox.com>2017-07-31 16:26:28 -0400
commitaa04438515ddc6cfc3b862964d3ce23131f4d4cf (patch)
tree9cd9d3f41974940cfb38b028a2cff5fad523c6ef
parent9a9c43308526dcb043981b68cc5d6e3aae8d987b (diff)
downloadqtlocation-mapboxgl-aa04438515ddc6cfc3b862964d3ce23131f4d4cf.tar.gz
Set location to nil until the user's location is determined
The documentation for the `location` property states that "This property contains `nil` if the map view is not currently showing the user location or if the user’s location has not yet been determined." The iOS SDK presently returns a garbage value, which has some rather annoying consequences when the value should logically be nullable. This change should rectify the issue.
-rw-r--r--platform/ios/src/MGLUserLocation.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/ios/src/MGLUserLocation.m b/platform/ios/src/MGLUserLocation.m
index 1c9649c09e..84d2297b6d 100644
--- a/platform/ios/src/MGLUserLocation.m
+++ b/platform/ios/src/MGLUserLocation.m
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_END
{
if (self = [super init])
{
- _location = [[CLLocation alloc] initWithLatitude:MAXFLOAT longitude:MAXFLOAT];
+ _location = nil;
_mapView = mapView;
}