From f50a27bc8a2bf92515c71a4abf9fd42eb337b46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 16 Jun 2015 09:45:10 -0700 Subject: Corrected bundledStyleURLs doc comment Per https://github.com/mapbox/mapbox-gl-native/commit/f46328655e027bf490692fcde4aab770912aac8d#commitcomment-11695358. --- include/mbgl/ios/MGLMapView.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index f59aa7269d..26a5051d41 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -170,7 +170,7 @@ IB_DESIGNABLE @property (nonatomic, nullable) NSString *styleID; @property (nonatomic, nullable) NSString *mapID __attribute__((unavailable("Use styleID."))); -/** Returns the URLs to the styles bundled with the library. */ +/** URLs of the styles bundled with the library. */ @property (nonatomic, readonly) NSArray *bundledStyleURLs; /** URL of the style currently displayed in the receiver. -- cgit v1.2.1 From e3e73220c14950ff6f49094f00affa3e7db34ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 16 Jun 2015 16:32:57 -0700 Subject: Audited shape annotation classes for nullability Audited various classes to match MapKit. Also, `-[MGLAnnotation title]` is nullable because titles are optional for shape annotations. --- include/mbgl/ios/MGLAnnotation.h | 2 +- include/mbgl/ios/MGLMultiPoint.h | 4 ++++ include/mbgl/ios/MGLOverlay.h | 4 ++++ include/mbgl/ios/MGLPointAnnotation.h | 4 ++++ include/mbgl/ios/MGLPolygon.h | 4 ++++ include/mbgl/ios/MGLPolyline.h | 4 ++++ include/mbgl/ios/MGLShape.h | 8 ++++++-- 7 files changed, 27 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/ios/MGLAnnotation.h b/include/mbgl/ios/MGLAnnotation.h index 70460f6492..18388d8485 100644 --- a/include/mbgl/ios/MGLAnnotation.h +++ b/include/mbgl/ios/MGLAnnotation.h @@ -21,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN /** The string containing the annotation’s title. * * Although this property is optional, if you support the selection of annotations in your map view, you are expected to provide this property. This string is displayed in the callout for the associated annotation. */ -@property (nonatomic, readonly, copy) NSString *title; +@property (nonatomic, readonly, copy, nullable) NSString *title; /** The string containing the annotation’s subtitle. * diff --git a/include/mbgl/ios/MGLMultiPoint.h b/include/mbgl/ios/MGLMultiPoint.h index 8da956b539..1fc7ef6dcf 100644 --- a/include/mbgl/ios/MGLMultiPoint.h +++ b/include/mbgl/ios/MGLMultiPoint.h @@ -3,6 +3,8 @@ #import "MGLShape.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLMultiPoint` class is an abstract superclass used to define shapes composed of multiple points. You should not create instances of this class directly. Instead, you should create instances of the `MGLPolyline` or `MGLPolygon` classes. However, you can use the method and properties of this class to access information about the specific points associated with the line or polygon. */ @interface MGLMultiPoint : MGLShape @@ -15,3 +17,5 @@ - (void)getCoordinates:(CLLocationCoordinate2D *)coords range:(NSRange)range; @end + +NS_ASSUME_NONNULL_END diff --git a/include/mbgl/ios/MGLOverlay.h b/include/mbgl/ios/MGLOverlay.h index 686aefc2be..4a07339b29 100644 --- a/include/mbgl/ios/MGLOverlay.h +++ b/include/mbgl/ios/MGLOverlay.h @@ -4,6 +4,8 @@ #import "MGLAnnotation.h" #import "MGLTypes.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLOverlay` protocol defines a specific type of annotation that represents both a point and an area on a map. Overlay objects are essentially data objects that contain the geographic data needed to represent the map area. For example, overlays can take the form of common shapes such as rectangles and circles. They can also describe polygons and other complex shapes. * * You use overlays to layer more sophisticated content on top of a map view. For example, you could use an overlay to show the boundaries of a national park or trace a bus route along city streets. Mapbox GL defines several concrete classes that conform to this protocol and define standard shapes. @@ -29,3 +31,5 @@ - (BOOL)intersectsOverlayBounds:(MGLCoordinateBounds)overlayBounds; @end + +NS_ASSUME_NONNULL_END diff --git a/include/mbgl/ios/MGLPointAnnotation.h b/include/mbgl/ios/MGLPointAnnotation.h index d3d1a8f0e9..ed50002751 100644 --- a/include/mbgl/ios/MGLPointAnnotation.h +++ b/include/mbgl/ios/MGLPointAnnotation.h @@ -3,6 +3,8 @@ #import "MGLShape.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLPointAnnotation` class defines a concrete annotation object located at a specified point. You can use this class, rather than define your own, in situations where all you want to do is associate a point on the map with a title. */ @interface MGLPointAnnotation : MGLShape @@ -10,3 +12,5 @@ @property (nonatomic, assign) CLLocationCoordinate2D coordinate; @end + +NS_ASSUME_NONNULL_END diff --git a/include/mbgl/ios/MGLPolygon.h b/include/mbgl/ios/MGLPolygon.h index bd6907dbe7..c2fef6de62 100644 --- a/include/mbgl/ios/MGLPolygon.h +++ b/include/mbgl/ios/MGLPolygon.h @@ -4,6 +4,8 @@ #import "MGLMultiPoint.h" #import "MGLOverlay.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLPolygon` class represents a shape consisting of one or more points that define a closed polygon. The points are connected end-to-end in the order they are provided. The first and last points are connected to each other to create the closed shape. */ @interface MGLPolygon : MGLMultiPoint @@ -15,3 +17,5 @@ count:(NSUInteger)count; @end + +NS_ASSUME_NONNULL_END diff --git a/include/mbgl/ios/MGLPolyline.h b/include/mbgl/ios/MGLPolyline.h index a49fae07c6..7cbbadeca6 100644 --- a/include/mbgl/ios/MGLPolyline.h +++ b/include/mbgl/ios/MGLPolyline.h @@ -4,6 +4,8 @@ #import "MGLMultiPoint.h" #import "MGLOverlay.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLPolyline` class represents a shape consisting of one or more points that define connecting line segments. The points are connected end-to-end in the order they are provided. The first and last points are not connected to each other. */ @interface MGLPolyline : MGLMultiPoint @@ -15,3 +17,5 @@ count:(NSUInteger)count; @end + +NS_ASSUME_NONNULL_END diff --git a/include/mbgl/ios/MGLShape.h b/include/mbgl/ios/MGLShape.h index 6693d2b302..afc2dbb5a5 100644 --- a/include/mbgl/ios/MGLShape.h +++ b/include/mbgl/ios/MGLShape.h @@ -2,13 +2,17 @@ #import "MGLAnnotation.h" +NS_ASSUME_NONNULL_BEGIN + /** The `MGLShape` class is an abstract class that defines the basic properties for all shape-based annotation objects. This class must be subclassed and cannot be used as is. Subclasses are responsible for defining the geometry of the shape and providing an appropriate value for the coordinate property inherited from the `MGLAnnotation` protocol. */ @interface MGLShape : NSObject /** The title of the shape annotation. The default value of this property is `nil`. */ -@property (nonatomic, copy) NSString *title; +@property (nonatomic, copy, nullable) NSString *title; /** The subtitle of the shape annotation. The default value of this property is `nil`. */ -@property (nonatomic, copy) NSString *subtitle; +@property (nonatomic, copy, nullable) NSString *subtitle; @end + +NS_ASSUME_NONNULL_END -- cgit v1.2.1 From 4f3fc3c2c975e1d02f3cdd2041e413c9bc159cb4 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Wed, 17 Jun 2015 15:02:29 +0300 Subject: Support shape annotations on GLFWView Add different random triangles count by using the keys 7, 8, 9 or 0. Q will clear all the annotations. W will remove one annotation. --- include/mbgl/platform/default/glfw_view.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/mbgl/platform/default/glfw_view.hpp b/include/mbgl/platform/default/glfw_view.hpp index 094974b59c..9a7e29fe29 100644 --- a/include/mbgl/platform/default/glfw_view.hpp +++ b/include/mbgl/platform/default/glfw_view.hpp @@ -37,7 +37,15 @@ public: void fps(); private: + mbgl::LatLng makeRandomPoint() const; + void addRandomPointAnnotations(int count); + void addRandomShapeAnnotations(int count); + + void clearAnnotations(); + void popAnnotation(); + + mbgl::AnnotationIDs annotationIDs; private: bool fullscreen = false; -- cgit v1.2.1 From afb7095ecc1cbe9c3e7a15f3e6e6723db080ade1 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Fri, 19 Jun 2015 11:07:24 -0700 Subject: refs #1759: remove header docs for now-unavailable API --- include/mbgl/ios/MGLAccountManager.h | 2 -- include/mbgl/ios/MGLMapView.h | 1 - 2 files changed, 3 deletions(-) (limited to 'include') diff --git a/include/mbgl/ios/MGLAccountManager.h b/include/mbgl/ios/MGLAccountManager.h index 2efabf8941..9bfb3b497e 100644 --- a/include/mbgl/ios/MGLAccountManager.h +++ b/include/mbgl/ios/MGLAccountManager.h @@ -21,8 +21,6 @@ NS_ASSUME_NONNULL_BEGIN /** @name Providing User Metrics Opt-Out */ -/** Certain Mapbox plans require the collection of user metrics. If you aren't using a preference switch in an existing or new `Settings.bundle` in your application, set this value to `YES` to indicate that you are providing a metrics opt-out for users within your app's interface directly. -* @param showsOptOut Whether your application's interface provides a user opt-out preference. The default value is `NO`, meaning a `Settings.bundle` is expected for providing a user opt-out preference. */ + (void)setMapboxMetricsEnabledSettingShownInApp:(BOOL)showsOptOut __attribute__((unavailable("Set MGLMapboxMetricsEnabledSettingShownInApp in Info.plist."))); /** Whether in-app user metrics opt-out is configured. If set to the default value of `NO`, a user opt-out preference is expected in a `Settings.bundle` that shows in the application's section within the system Settings app. */ diff --git a/include/mbgl/ios/MGLMapView.h b/include/mbgl/ios/MGLMapView.h index 26a5051d41..fb6c11cc4b 100644 --- a/include/mbgl/ios/MGLMapView.h +++ b/include/mbgl/ios/MGLMapView.h @@ -42,7 +42,6 @@ IB_DESIGNABLE /** @name Authorizing Access */ -/** Mapbox API access token for the map view. */ @property (nonatomic, nullable) NSString *accessToken __attribute__((unavailable("Use +[MGLAccountManager accessToken] and +[MGLAccountManager setAccessToken:]."))); #pragma mark - Managing Constraints -- cgit v1.2.1