diff options
Diffstat (limited to 'platform/darwin/src/MGLRasterSource.h')
-rw-r--r-- | platform/darwin/src/MGLRasterSource.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLRasterSource.h b/platform/darwin/src/MGLRasterSource.h index 80b740692c..ac5be60105 100644 --- a/platform/darwin/src/MGLRasterSource.h +++ b/platform/darwin/src/MGLRasterSource.h @@ -36,6 +36,20 @@ extern MGL_EXPORT const MGLTileSourceOption MGLTileSourceOptionTileSize; `MGLRasterSource` object that you can use to initialize new style layers. You 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) + ``` */ MGL_EXPORT @interface MGLRasterSource : MGLTileSource |