summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Guerra Soto <fabian.guerra@mapbox.com>2019-04-24 09:12:45 -0700
committerGitHub <noreply@github.com>2019-04-24 09:12:45 -0700
commit88a652542715c595105589e8356754e11245e699 (patch)
treeafc5cd86e0de5f79cf3d1f5a543a4d3c08005930
parent261da437889670aaeb8849f1747e7deb6258caaa (diff)
downloadqtlocation-mapboxgl-88a652542715c595105589e8356754e11245e699.tar.gz
[ios] Make MGLLocationManager protocol swift friendly. (#14477)
Improved MGLLocationManager protocol bridging to swift. * [ios] Make MGLLocationManager protocol swift friendly. * [ios] Update changelog.
-rw-r--r--platform/darwin/src/MGLLocationManager.h26
-rw-r--r--platform/ios/CHANGELOG.md1
2 files changed, 24 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLLocationManager.h b/platform/darwin/src/MGLLocationManager.h
index d6cfab60d8..ecb9192981 100644
--- a/platform/darwin/src/MGLLocationManager.h
+++ b/platform/darwin/src/MGLLocationManager.h
@@ -31,7 +31,13 @@ NS_ASSUME_NONNULL_BEGIN
@see `CLLocationManager.distanceFilter`
*/
-@property(nonatomic, assign) CLLocationDistance distanceFilter;
+- (CLLocationDistance)distanceFilter;
+
+/**
+ Sets the minimum update distance in meters.
+ @param distanceFilter The distance filter in meters.
+ */
+- (void)setDistanceFilter:(CLLocationDistance) distanceFilter;
/**
Specifies the accuracy of the location data.
@@ -43,7 +49,14 @@ NS_ASSUME_NONNULL_BEGIN
@see `CLLocationManager.desiredAccuracy`
*/
-@property (nonatomic, assign) CLLocationAccuracy desiredAccuracy;
+- (CLLocationAccuracy)desiredAccuracy;
+
+/**
+ Sets the desired location accuracy.
+
+ @param desiredAccuracy The desired location accuracy.
+ */
+- (void)setDesiredAccuracy:(CLLocationAccuracy)desiredAccuracy;
/**
Specifies the type of user activity associated with the location updates.
@@ -56,7 +69,14 @@ NS_ASSUME_NONNULL_BEGIN
@see `CLLocationManager.activityType`
*/
-@property (nonatomic, assign) CLActivityType activityType;
+- (CLActivityType)activityType;
+
+/**
+ Sets the type of user activity associated with the location updates.
+
+ @param activityType The location's manager activity type.
+ */
+- (void)setActivityType:(CLActivityType)activityType;
@required
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index abdc0ed58c..02b5b710a7 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -8,6 +8,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fix a bug that wrong position of attribution dialog after rotation. ([#14185](https://github.com/mapbox/mapbox-gl-native/pull/14185))
* Speculatively fixed a bug where GL rendering could occur in the background. ([#14439](https://github.com/mapbox/mapbox-gl-native/pull/14439))
* Fixed a bug with jittery callout views when using sprite-based annotations. ([#14445](https://github.com/mapbox/mapbox-gl-native/pull/14445))
+* Improved `MGLLocationManager` optional protocol properties briding to Swift. ([#14477](https://github.com/mapbox/mapbox-gl-native/pull/14477))
## 4.10.0 - April 17, 2019