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

Commit

Permalink
Fix missing examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ericrwolfe committed Dec 21, 2016
1 parent 036bc75 commit c58f64d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 34 deletions.
13 changes: 1 addition & 12 deletions platform/darwin/src/MGLRasterSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!--EXAMPLE: MGLRasterSource-->
```
*/
@interface MGLRasterSource : MGLTileSource
Expand Down
12 changes: 1 addition & 11 deletions platform/darwin/src/MGLShapeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!--EXAMPLE: MGLShapeSource-->
```
*/
@interface MGLShapeSource : MGLSource
Expand Down
12 changes: 1 addition & 11 deletions platform/darwin/src/MGLVectorSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<!--EXAMPLE: MGLVectorSource-->
```
*/
@interface MGLVectorSource : MGLTileSource
Expand Down

0 comments on commit c58f64d

Please sign in to comment.