From c58f64d55f22950153f6f387829b35e53753d852 Mon Sep 17 00:00:00 2001 From: Eric Wolfe Date: Tue, 20 Dec 2016 17:26:49 -0800 Subject: [PATCH] Fix missing examples --- platform/darwin/src/MGLRasterSource.h | 13 +------------ platform/darwin/src/MGLShapeSource.h | 12 +----------- platform/darwin/src/MGLVectorSource.h | 12 +----------- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/platform/darwin/src/MGLRasterSource.h b/platform/darwin/src/MGLRasterSource.h index 8ae206f78e5..3efd84f383c 100644 --- a/platform/darwin/src/MGLRasterSource.h +++ b/platform/darwin/src/MGLRasterSource.h @@ -36,18 +36,7 @@ extern const MGLTileSourceOption MGLTileSourceOptionTileSize; can also add and remove sources dynamically using methods such as `-[MGLStyle addSource:]` and `-[MGLStyle sourceWithIdentifier:]`. - ### Example ### - - ```swift - let source = MGLRasterSource(identifier: "clouds", tileURLTemplates: ["https://example.com/raster-tiles/{z}/{x}/{y}.png"], options: [ - .minimumZoomLevel: 9, - .maximumZoomLevel: 16, - .tileSize: 512, - .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) - ] - ]) - mapView.style.addSource(source) + ``` */ @interface MGLRasterSource : MGLTileSource diff --git a/platform/darwin/src/MGLShapeSource.h b/platform/darwin/src/MGLShapeSource.h index afe47901b90..0eb454437b5 100644 --- a/platform/darwin/src/MGLShapeSource.h +++ b/platform/darwin/src/MGLShapeSource.h @@ -75,17 +75,7 @@ extern const MGLShapeSourceOption MGLShapeSourceOptionSimplificationTolerance; Any vector style layer initialized with a shape source should have a `nil` value in its `sourceLayerIdentifier` property. - ### Example ### - - ```swift - var coordinates: [CLLocationCoordinate2D] = [ - CLLocationCoordinate2D(latitude: 37.77, longitude: -122.42), - CLLocationCoordinate2D(latitude: 38.91, longitude: -77.04), - ] - let polyline = MGLPolylineFeature(coordinates: &coordinates, count: UInt(coordinates.count)) - let shape = MGLShapeCollectionFeature(shapes: [polyline]) - let source = MGLShapeSource(identifier: "lines", shape: shape, options: nil) - mapView.style.addSource(source) + ``` */ @interface MGLShapeSource : MGLSource diff --git a/platform/darwin/src/MGLVectorSource.h b/platform/darwin/src/MGLVectorSource.h index 7a79ba2ce29..284a9a2581a 100644 --- a/platform/darwin/src/MGLVectorSource.h +++ b/platform/darwin/src/MGLVectorSource.h @@ -25,17 +25,7 @@ NS_ASSUME_NONNULL_BEGIN layer initialized with a vector source must have a non-`nil` value in its `sourceLayerIdentifier` property. - ### Example ### - - ```swift - let source = MGLVectorSource(identifier: "pois", tileURLTemplates: ["https://example.com/vector-tiles/{z}/{x}/{y}.mvt"], options: [ - .minimumZoomLevel: 9, - .maximumZoomLevel: 16, - .attributionInfos: [ - MGLAttributionInfo(title: NSAttributedString(string: "© Mapbox"), url: URL(string: "http://mapbox.com")) - ] - ]) - mapView.style.addSource(source) + ``` */ @interface MGLVectorSource : MGLTileSource