This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] add raster-dem source type and hillshade layer type (#10642)
- Loading branch information
Showing
84 changed files
with
4,661 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
// This file is generated. Do not edit. | ||
|
||
#pragma once | ||
|
||
#include <mbgl/style/layer.hpp> | ||
#include <mbgl/style/filter.hpp> | ||
#include <mbgl/style/property_value.hpp> | ||
#include <mbgl/style/data_driven_property_value.hpp> | ||
|
||
#include <mbgl/util/color.hpp> | ||
|
||
namespace mbgl { | ||
namespace style { | ||
|
||
class TransitionOptions; | ||
|
||
class HillshadeLayer : public Layer { | ||
public: | ||
HillshadeLayer(const std::string& layerID, const std::string& sourceID); | ||
~HillshadeLayer() final; | ||
|
||
// Source | ||
const std::string& getSourceID() const; | ||
|
||
// Visibility | ||
void setVisibility(VisibilityType) final; | ||
|
||
// Zoom range | ||
void setMinZoom(float) final; | ||
void setMaxZoom(float) final; | ||
|
||
// Paint properties | ||
|
||
static PropertyValue<float> getDefaultHillshadeIlluminationDirection(); | ||
PropertyValue<float> getHillshadeIlluminationDirection() const; | ||
void setHillshadeIlluminationDirection(PropertyValue<float>); | ||
void setHillshadeIlluminationDirectionTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeIlluminationDirectionTransition() const; | ||
|
||
static PropertyValue<HillshadeIlluminationAnchorType> getDefaultHillshadeIlluminationAnchor(); | ||
PropertyValue<HillshadeIlluminationAnchorType> getHillshadeIlluminationAnchor() const; | ||
void setHillshadeIlluminationAnchor(PropertyValue<HillshadeIlluminationAnchorType>); | ||
void setHillshadeIlluminationAnchorTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeIlluminationAnchorTransition() const; | ||
|
||
static PropertyValue<float> getDefaultHillshadeExaggeration(); | ||
PropertyValue<float> getHillshadeExaggeration() const; | ||
void setHillshadeExaggeration(PropertyValue<float>); | ||
void setHillshadeExaggerationTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeExaggerationTransition() const; | ||
|
||
static PropertyValue<Color> getDefaultHillshadeShadowColor(); | ||
PropertyValue<Color> getHillshadeShadowColor() const; | ||
void setHillshadeShadowColor(PropertyValue<Color>); | ||
void setHillshadeShadowColorTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeShadowColorTransition() const; | ||
|
||
static PropertyValue<Color> getDefaultHillshadeHighlightColor(); | ||
PropertyValue<Color> getHillshadeHighlightColor() const; | ||
void setHillshadeHighlightColor(PropertyValue<Color>); | ||
void setHillshadeHighlightColorTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeHighlightColorTransition() const; | ||
|
||
static PropertyValue<Color> getDefaultHillshadeAccentColor(); | ||
PropertyValue<Color> getHillshadeAccentColor() const; | ||
void setHillshadeAccentColor(PropertyValue<Color>); | ||
void setHillshadeAccentColorTransition(const TransitionOptions&); | ||
TransitionOptions getHillshadeAccentColorTransition() const; | ||
|
||
// Private implementation | ||
|
||
class Impl; | ||
const Impl& impl() const; | ||
|
||
Mutable<Impl> mutableImpl() const; | ||
HillshadeLayer(Immutable<Impl>); | ||
std::unique_ptr<Layer> cloneRef(const std::string& id) const final; | ||
}; | ||
|
||
template <> | ||
inline bool Layer::is<HillshadeLayer>() const { | ||
return getType() == LayerType::Hillshade; | ||
} | ||
|
||
} // namespace style | ||
} // namespace mbgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#pragma once | ||
|
||
#include <mbgl/style/sources/raster_source.hpp> | ||
#include <mbgl/util/tileset.hpp> | ||
#include <mbgl/util/variant.hpp> | ||
|
||
namespace mbgl { | ||
|
||
class AsyncRequest; | ||
|
||
namespace style { | ||
|
||
class RasterDEMSource : public RasterSource { | ||
public: | ||
RasterDEMSource(std::string id, variant<std::string, Tileset> urlOrTileset, uint16_t tileSize); | ||
|
||
}; | ||
|
||
template <> | ||
inline bool Source::is<RasterDEMSource>() const { | ||
return getType() == SourceType::RasterDEM; | ||
} | ||
|
||
} // namespace style | ||
} // namespace mbgl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.