diff options
author | Jordan Kiley <jmkiley@users.noreply.github.com> | 2017-10-06 11:40:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-06 11:40:22 -0700 |
commit | a5a495a9007963c36df541289a1ec504a759aca1 (patch) | |
tree | 946c69988dc8f5abea5f53039eb7259f739270c1 /platform | |
parent | 94312acd8b00bd05009f21ed8e0bbfaec65d5a01 (diff) | |
download | qtlocation-mapboxgl-a5a495a9007963c36df541289a1ec504a759aca1.tar.gz |
[ios, macos] Added layer to the code snippet (#10149)
Diffstat (limited to 'platform')
-rw-r--r-- | platform/darwin/src/MGLImageSource.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLImageSource.h b/platform/darwin/src/MGLImageSource.h index 21487d9739..5088f6bac0 100644 --- a/platform/darwin/src/MGLImageSource.h +++ b/platform/darwin/src/MGLImageSource.h @@ -38,8 +38,11 @@ MGL_EXPORT bottomLeft: CLLocationCoordinate2D(latitude: 37.936, longitude: -80.425), bottomRight: CLLocationCoordinate2D(latitude: 37.936, longitude: -71.516), topRight: CLLocationCoordinate2D(latitude: 46.437, longitude: -71.516)) - let source = MGLImageSource(identifier: "radar", coordinateQuad: coordinates, url: URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif")!) + let source = MGLImageSource(identifier: "radar-source", coordinateQuad: coordinates, url: URL(string: "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif")!) mapView.style?.addSource(source) + + let layer = MGLRasterStyleLayer(identifier: "radar-layer", source: source) + style.addLayer(layer) ``` */ MGL_EXPORT |