diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2020-05-18 18:25:03 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <thiago@mapbox.com> | 2020-05-26 20:35:05 +0300 |
commit | 3bf695ebd92f0703679fef469f4407b93e4b20a2 (patch) | |
tree | b945230f0ca78ed7fef0100fba0d2d203c0ecb25 /src/mbgl/style/layers/line_layer.cpp | |
parent | 5b3f7b3c9e7d6cb378fbaea24aac0c3ca2a60032 (diff) | |
download | qtlocation-mapboxgl-3bf695ebd92f0703679fef469f4407b93e4b20a2.tar.gz |
[core] Static default property values API for layers
Introduce
`style::StyleProperty LayerManager::getPropertyDefaultValue(const std::string& type, const std::string& property)`
Diffstat (limited to 'src/mbgl/style/layers/line_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/line_layer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp index cb12b05c7c..f5b5df9af7 100644 --- a/src/mbgl/style/layers/line_layer.cpp +++ b/src/mbgl/style/layers/line_layer.cpp @@ -800,10 +800,11 @@ StyleProperty LineLayer::getPropertyInternal(const std::string& name) const { return getLayerProperty(*this, name); } -StyleProperty LineLayer::getPropertyDefaultValueInternal(const std::string& name) const { +// static +StyleProperty LineLayer::getPropertyDefaultValue(const std::string& name) { const auto it = layerProperties.find(name.c_str()); if (it == layerProperties.end()) { - return {}; + return Layer::getPropertyDefaultValue(name); } switch (static_cast<Property>(it->second)) { |