diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2018-01-25 10:46:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 10:46:27 -0800 |
commit | b6747a84f4ba6bd48ab2d461e04cffa7fc8d5348 (patch) | |
tree | e01efa0e57e6dc5a0a55db2f68bc964cb6fb1606 /platform/darwin/src/MGLRasterDEMSource.h | |
parent | a4546a84de28cfddfcb1e5a4ba8b0516a4b4dfa4 (diff) | |
download | qtlocation-mapboxgl-b6747a84f4ba6bd48ab2d461e04cffa7fc8d5348.tar.gz |
[ios, macos] Hook up hillshade style layers, raster DEM sources to iOS/macOS (#11036)
* [ios, macos] Finished implementing MGLHillshadeStyleLayer
* [macos] Added icon for hillshade layer
Also set the background layer icon to mirror in right-to-left locales.
* [ios, macos] Implemented raster DEM source
* [macos] Added Enhance Terrain debugging command
* [ios, macos] Simplified raster DEM source example
Diffstat (limited to 'platform/darwin/src/MGLRasterDEMSource.h')
-rw-r--r-- | platform/darwin/src/MGLRasterDEMSource.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLRasterDEMSource.h b/platform/darwin/src/MGLRasterDEMSource.h new file mode 100644 index 0000000000..d00912ca79 --- /dev/null +++ b/platform/darwin/src/MGLRasterDEMSource.h @@ -0,0 +1,37 @@ +#import "MGLFoundation.h" + +#import "MGLRasterSource.h" + +/** + `MGLRasterDEMSource` is a map content source that supplies rasterized + <a href="https://en.wikipedia.org/wiki/Digital_elevation_model">digital elevation model</a> + (DEM) tiles to be shown on the map. The location of and metadata about the + tiles are defined either by an option dictionary or by an external file that + conforms to the + <a href="https://github.com/mapbox/tilejson-spec/">TileJSON specification</a>. + A raster DEM source is added to an `MGLStyle` object along with one or more + `MGLHillshadeStyleLayer` objects. Use a hillshade style layer to control the + appearance of content supplied by the raster DEM source. + + Each + <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-raster-dem"><code>raster-dem</code></a> + source defined by the style JSON file is represented at runtime by an + `MGLRasterDEMSource` 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:]`. + + Currently, raster DEM sources only support the format used by + <a href="https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb">Mapbox Terrain-RGB</a>. + + ### Example + + ```swift + let terrainRGBURL = URL(string: "mapbox://mapbox.terrain-rgb")! + let source = MGLRasterDEMSource(identifier: "hills", configurationURL: terrainRGBURL) + mapView.style?.addSource(source) + ``` + */ +MGL_EXPORT +@interface MGLRasterDEMSource : MGLRasterSource + +@end |