summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-08-23 12:49:47 -0700
committerGitHub <noreply@github.com>2016-08-23 12:49:47 -0700
commit63cce78cf1597ba5879227f2298bda52e91e4e04 (patch)
treece01f8c70d8dc707469e08c892fd6a8c43d69ecd /src
parentfcb710fafecdafd511c2a09207b2de3077caa644 (diff)
downloadqtlocation-mapboxgl-63cce78cf1597ba5879227f2298bda52e91e4e04.tar.gz
[core] Add static getters for property default values (#6124)
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/layers/background_layer.cpp12
-rw-r--r--src/mbgl/style/layers/circle_layer.cpp28
-rw-r--r--src/mbgl/style/layers/fill_layer.cpp28
-rw-r--r--src/mbgl/style/layers/layer.cpp.ejs8
-rw-r--r--src/mbgl/style/layers/layer_properties.hpp.ejs8
-rw-r--r--src/mbgl/style/layers/line_layer.cpp56
-rw-r--r--src/mbgl/style/layers/raster_layer.cpp28
-rw-r--r--src/mbgl/style/layers/symbol_layer.cpp192
8 files changed, 352 insertions, 8 deletions
diff --git a/src/mbgl/style/layers/background_layer.cpp b/src/mbgl/style/layers/background_layer.cpp
index 42cd76d01f..e5747e07ce 100644
--- a/src/mbgl/style/layers/background_layer.cpp
+++ b/src/mbgl/style/layers/background_layer.cpp
@@ -37,6 +37,10 @@ std::unique_ptr<Layer> BackgroundLayer::Impl::cloneRef(const std::string& id_) c
// Paint properties
+PropertyValue<Color> BackgroundLayer::getDefaultBackgroundColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> BackgroundLayer::getBackgroundColor() const {
return impl->paint.backgroundColor.get();
}
@@ -45,6 +49,10 @@ void BackgroundLayer::setBackgroundColor(PropertyValue<Color> value, const optio
impl->paint.backgroundColor.set(value, klass);
}
+PropertyValue<std::string> BackgroundLayer::getDefaultBackgroundPattern() {
+ return { "" };
+}
+
PropertyValue<std::string> BackgroundLayer::getBackgroundPattern() const {
return impl->paint.backgroundPattern.get();
}
@@ -53,6 +61,10 @@ void BackgroundLayer::setBackgroundPattern(PropertyValue<std::string> value, con
impl->paint.backgroundPattern.set(value, klass);
}
+PropertyValue<float> BackgroundLayer::getDefaultBackgroundOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> BackgroundLayer::getBackgroundOpacity() const {
return impl->paint.backgroundOpacity.get();
}
diff --git a/src/mbgl/style/layers/circle_layer.cpp b/src/mbgl/style/layers/circle_layer.cpp
index 96cc0b610c..271a573f0b 100644
--- a/src/mbgl/style/layers/circle_layer.cpp
+++ b/src/mbgl/style/layers/circle_layer.cpp
@@ -61,6 +61,10 @@ const Filter& CircleLayer::getFilter() const {
// Paint properties
+PropertyValue<float> CircleLayer::getDefaultCircleRadius() {
+ return { 5 };
+}
+
PropertyValue<float> CircleLayer::getCircleRadius() const {
return impl->paint.circleRadius.get();
}
@@ -69,6 +73,10 @@ void CircleLayer::setCircleRadius(PropertyValue<float> value, const optional<std
impl->paint.circleRadius.set(value, klass);
}
+PropertyValue<Color> CircleLayer::getDefaultCircleColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> CircleLayer::getCircleColor() const {
return impl->paint.circleColor.get();
}
@@ -77,6 +85,10 @@ void CircleLayer::setCircleColor(PropertyValue<Color> value, const optional<std:
impl->paint.circleColor.set(value, klass);
}
+PropertyValue<float> CircleLayer::getDefaultCircleBlur() {
+ return { 0 };
+}
+
PropertyValue<float> CircleLayer::getCircleBlur() const {
return impl->paint.circleBlur.get();
}
@@ -85,6 +97,10 @@ void CircleLayer::setCircleBlur(PropertyValue<float> value, const optional<std::
impl->paint.circleBlur.set(value, klass);
}
+PropertyValue<float> CircleLayer::getDefaultCircleOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> CircleLayer::getCircleOpacity() const {
return impl->paint.circleOpacity.get();
}
@@ -93,6 +109,10 @@ void CircleLayer::setCircleOpacity(PropertyValue<float> value, const optional<st
impl->paint.circleOpacity.set(value, klass);
}
+PropertyValue<std::array<float, 2>> CircleLayer::getDefaultCircleTranslate() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> CircleLayer::getCircleTranslate() const {
return impl->paint.circleTranslate.get();
}
@@ -101,6 +121,10 @@ void CircleLayer::setCircleTranslate(PropertyValue<std::array<float, 2>> value,
impl->paint.circleTranslate.set(value, klass);
}
+PropertyValue<TranslateAnchorType> CircleLayer::getDefaultCircleTranslateAnchor() {
+ return { TranslateAnchorType::Map };
+}
+
PropertyValue<TranslateAnchorType> CircleLayer::getCircleTranslateAnchor() const {
return impl->paint.circleTranslateAnchor.get();
}
@@ -109,6 +133,10 @@ void CircleLayer::setCircleTranslateAnchor(PropertyValue<TranslateAnchorType> va
impl->paint.circleTranslateAnchor.set(value, klass);
}
+PropertyValue<CirclePitchScaleType> CircleLayer::getDefaultCirclePitchScale() {
+ return { CirclePitchScaleType::Map };
+}
+
PropertyValue<CirclePitchScaleType> CircleLayer::getCirclePitchScale() const {
return impl->paint.circlePitchScale.get();
}
diff --git a/src/mbgl/style/layers/fill_layer.cpp b/src/mbgl/style/layers/fill_layer.cpp
index 44894aff33..36febd77e8 100644
--- a/src/mbgl/style/layers/fill_layer.cpp
+++ b/src/mbgl/style/layers/fill_layer.cpp
@@ -61,6 +61,10 @@ const Filter& FillLayer::getFilter() const {
// Paint properties
+PropertyValue<bool> FillLayer::getDefaultFillAntialias() {
+ return { true };
+}
+
PropertyValue<bool> FillLayer::getFillAntialias() const {
return impl->paint.fillAntialias.get();
}
@@ -69,6 +73,10 @@ void FillLayer::setFillAntialias(PropertyValue<bool> value, const optional<std::
impl->paint.fillAntialias.set(value, klass);
}
+PropertyValue<float> FillLayer::getDefaultFillOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> FillLayer::getFillOpacity() const {
return impl->paint.fillOpacity.get();
}
@@ -77,6 +85,10 @@ void FillLayer::setFillOpacity(PropertyValue<float> value, const optional<std::s
impl->paint.fillOpacity.set(value, klass);
}
+PropertyValue<Color> FillLayer::getDefaultFillColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> FillLayer::getFillColor() const {
return impl->paint.fillColor.get();
}
@@ -85,6 +97,10 @@ void FillLayer::setFillColor(PropertyValue<Color> value, const optional<std::str
impl->paint.fillColor.set(value, klass);
}
+PropertyValue<Color> FillLayer::getDefaultFillOutlineColor() {
+ return { {} };
+}
+
PropertyValue<Color> FillLayer::getFillOutlineColor() const {
return impl->paint.fillOutlineColor.get();
}
@@ -93,6 +109,10 @@ void FillLayer::setFillOutlineColor(PropertyValue<Color> value, const optional<s
impl->paint.fillOutlineColor.set(value, klass);
}
+PropertyValue<std::array<float, 2>> FillLayer::getDefaultFillTranslate() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> FillLayer::getFillTranslate() const {
return impl->paint.fillTranslate.get();
}
@@ -101,6 +121,10 @@ void FillLayer::setFillTranslate(PropertyValue<std::array<float, 2>> value, cons
impl->paint.fillTranslate.set(value, klass);
}
+PropertyValue<TranslateAnchorType> FillLayer::getDefaultFillTranslateAnchor() {
+ return { TranslateAnchorType::Map };
+}
+
PropertyValue<TranslateAnchorType> FillLayer::getFillTranslateAnchor() const {
return impl->paint.fillTranslateAnchor.get();
}
@@ -109,6 +133,10 @@ void FillLayer::setFillTranslateAnchor(PropertyValue<TranslateAnchorType> value,
impl->paint.fillTranslateAnchor.set(value, klass);
}
+PropertyValue<std::string> FillLayer::getDefaultFillPattern() {
+ return { "" };
+}
+
PropertyValue<std::string> FillLayer::getFillPattern() const {
return impl->paint.fillPattern.get();
}
diff --git a/src/mbgl/style/layers/layer.cpp.ejs b/src/mbgl/style/layers/layer.cpp.ejs
index 017691c8ec..16a137a008 100644
--- a/src/mbgl/style/layers/layer.cpp.ejs
+++ b/src/mbgl/style/layers/layer.cpp.ejs
@@ -76,6 +76,10 @@ const Filter& <%- camelize(type) %>Layer::getFilter() const {
// Layout properties
<% for (const property of layoutProperties) { -%>
+PropertyValue<<%- propertyType(property) %>> <%- camelize(type) %>Layer::getDefault<%- camelize(property.name) %>() {
+ return { <%- defaultValue(property) %> };
+}
+
PropertyValue<<%- propertyType(property) %>> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const {
return impl->layout.<%- camelizeWithLeadingLowercase(property.name) %>.get();
}
@@ -87,6 +91,10 @@ void <%- camelize(type) %>Layer::set<%- camelize(property.name) %>(PropertyValue
// Paint properties
<% for (const property of paintProperties) { %>
+PropertyValue<<%- propertyType(property) %>> <%- camelize(type) %>Layer::getDefault<%- camelize(property.name) %>() {
+ return { <%- defaultValue(property) %> };
+}
+
PropertyValue<<%- propertyType(property) %>> <%- camelize(type) %>Layer::get<%- camelize(property.name) %>() const {
return impl->paint.<%- camelizeWithLeadingLowercase(property.name) %>.get();
}
diff --git a/src/mbgl/style/layers/layer_properties.hpp.ejs b/src/mbgl/style/layers/layer_properties.hpp.ejs
index 6ec92703f1..0c91ecba8c 100644
--- a/src/mbgl/style/layers/layer_properties.hpp.ejs
+++ b/src/mbgl/style/layers/layer_properties.hpp.ejs
@@ -36,14 +36,6 @@ public:
<% for (const property of paintProperties) { -%>
<% if (/-pattern$/.test(property.name) || property.name === 'line-dasharray') { -%>
PaintProperty<<%- propertyType(property) %>, CrossFadedPropertyEvaluator> <%- camelizeWithLeadingLowercase(property.name) %> { <%- defaultValue(property) %> };
-<% } else if (property.name === 'fill-outline-color') { -%>
- PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { {} };
-<% } else if (property.name.endsWith('color') && defaultValue(property) === '{ 0, 0, 0, 0 }') { -%>
- PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { {} };
-<% } else if (property.name.endsWith('color') && defaultValue(property) === '{ 0, 0, 0, 1 }') { -%>
- PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { Color::black() };
-<% } else if (property.name.endsWith('color') && defaultValue(property) === '{ 1, 1, 1, 1 }') { -%>
- PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { Color::white() };
<% } else { -%>
PaintProperty<<%- propertyType(property) %>> <%- camelizeWithLeadingLowercase(property.name) %> { <%- defaultValue(property) %> };
<% } -%>
diff --git a/src/mbgl/style/layers/line_layer.cpp b/src/mbgl/style/layers/line_layer.cpp
index 3ad72cda16..1594985b6b 100644
--- a/src/mbgl/style/layers/line_layer.cpp
+++ b/src/mbgl/style/layers/line_layer.cpp
@@ -58,6 +58,10 @@ const Filter& LineLayer::getFilter() const {
// Layout properties
+PropertyValue<LineCapType> LineLayer::getDefaultLineCap() {
+ return { LineCapType::Butt };
+}
+
PropertyValue<LineCapType> LineLayer::getLineCap() const {
return impl->layout.lineCap.get();
}
@@ -65,6 +69,10 @@ PropertyValue<LineCapType> LineLayer::getLineCap() const {
void LineLayer::setLineCap(PropertyValue<LineCapType> value) {
impl->layout.lineCap.set(value);
}
+PropertyValue<LineJoinType> LineLayer::getDefaultLineJoin() {
+ return { LineJoinType::Miter };
+}
+
PropertyValue<LineJoinType> LineLayer::getLineJoin() const {
return impl->layout.lineJoin.get();
}
@@ -72,6 +80,10 @@ PropertyValue<LineJoinType> LineLayer::getLineJoin() const {
void LineLayer::setLineJoin(PropertyValue<LineJoinType> value) {
impl->layout.lineJoin.set(value);
}
+PropertyValue<float> LineLayer::getDefaultLineMiterLimit() {
+ return { 2 };
+}
+
PropertyValue<float> LineLayer::getLineMiterLimit() const {
return impl->layout.lineMiterLimit.get();
}
@@ -79,6 +91,10 @@ PropertyValue<float> LineLayer::getLineMiterLimit() const {
void LineLayer::setLineMiterLimit(PropertyValue<float> value) {
impl->layout.lineMiterLimit.set(value);
}
+PropertyValue<float> LineLayer::getDefaultLineRoundLimit() {
+ return { 1 };
+}
+
PropertyValue<float> LineLayer::getLineRoundLimit() const {
return impl->layout.lineRoundLimit.get();
}
@@ -89,6 +105,10 @@ void LineLayer::setLineRoundLimit(PropertyValue<float> value) {
// Paint properties
+PropertyValue<float> LineLayer::getDefaultLineOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> LineLayer::getLineOpacity() const {
return impl->paint.lineOpacity.get();
}
@@ -97,6 +117,10 @@ void LineLayer::setLineOpacity(PropertyValue<float> value, const optional<std::s
impl->paint.lineOpacity.set(value, klass);
}
+PropertyValue<Color> LineLayer::getDefaultLineColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> LineLayer::getLineColor() const {
return impl->paint.lineColor.get();
}
@@ -105,6 +129,10 @@ void LineLayer::setLineColor(PropertyValue<Color> value, const optional<std::str
impl->paint.lineColor.set(value, klass);
}
+PropertyValue<std::array<float, 2>> LineLayer::getDefaultLineTranslate() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> LineLayer::getLineTranslate() const {
return impl->paint.lineTranslate.get();
}
@@ -113,6 +141,10 @@ void LineLayer::setLineTranslate(PropertyValue<std::array<float, 2>> value, cons
impl->paint.lineTranslate.set(value, klass);
}
+PropertyValue<TranslateAnchorType> LineLayer::getDefaultLineTranslateAnchor() {
+ return { TranslateAnchorType::Map };
+}
+
PropertyValue<TranslateAnchorType> LineLayer::getLineTranslateAnchor() const {
return impl->paint.lineTranslateAnchor.get();
}
@@ -121,6 +153,10 @@ void LineLayer::setLineTranslateAnchor(PropertyValue<TranslateAnchorType> value,
impl->paint.lineTranslateAnchor.set(value, klass);
}
+PropertyValue<float> LineLayer::getDefaultLineWidth() {
+ return { 1 };
+}
+
PropertyValue<float> LineLayer::getLineWidth() const {
return impl->paint.lineWidth.get();
}
@@ -129,6 +165,10 @@ void LineLayer::setLineWidth(PropertyValue<float> value, const optional<std::str
impl->paint.lineWidth.set(value, klass);
}
+PropertyValue<float> LineLayer::getDefaultLineGapWidth() {
+ return { 0 };
+}
+
PropertyValue<float> LineLayer::getLineGapWidth() const {
return impl->paint.lineGapWidth.get();
}
@@ -137,6 +177,10 @@ void LineLayer::setLineGapWidth(PropertyValue<float> value, const optional<std::
impl->paint.lineGapWidth.set(value, klass);
}
+PropertyValue<float> LineLayer::getDefaultLineOffset() {
+ return { 0 };
+}
+
PropertyValue<float> LineLayer::getLineOffset() const {
return impl->paint.lineOffset.get();
}
@@ -145,6 +189,10 @@ void LineLayer::setLineOffset(PropertyValue<float> value, const optional<std::st
impl->paint.lineOffset.set(value, klass);
}
+PropertyValue<float> LineLayer::getDefaultLineBlur() {
+ return { 0 };
+}
+
PropertyValue<float> LineLayer::getLineBlur() const {
return impl->paint.lineBlur.get();
}
@@ -153,6 +201,10 @@ void LineLayer::setLineBlur(PropertyValue<float> value, const optional<std::stri
impl->paint.lineBlur.set(value, klass);
}
+PropertyValue<std::vector<float>> LineLayer::getDefaultLineDasharray() {
+ return { { } };
+}
+
PropertyValue<std::vector<float>> LineLayer::getLineDasharray() const {
return impl->paint.lineDasharray.get();
}
@@ -161,6 +213,10 @@ void LineLayer::setLineDasharray(PropertyValue<std::vector<float>> value, const
impl->paint.lineDasharray.set(value, klass);
}
+PropertyValue<std::string> LineLayer::getDefaultLinePattern() {
+ return { "" };
+}
+
PropertyValue<std::string> LineLayer::getLinePattern() const {
return impl->paint.linePattern.get();
}
diff --git a/src/mbgl/style/layers/raster_layer.cpp b/src/mbgl/style/layers/raster_layer.cpp
index d4e121babe..fc966f2239 100644
--- a/src/mbgl/style/layers/raster_layer.cpp
+++ b/src/mbgl/style/layers/raster_layer.cpp
@@ -44,6 +44,10 @@ const std::string& RasterLayer::getSourceID() const {
// Paint properties
+PropertyValue<float> RasterLayer::getDefaultRasterOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> RasterLayer::getRasterOpacity() const {
return impl->paint.rasterOpacity.get();
}
@@ -52,6 +56,10 @@ void RasterLayer::setRasterOpacity(PropertyValue<float> value, const optional<st
impl->paint.rasterOpacity.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterHueRotate() {
+ return { 0 };
+}
+
PropertyValue<float> RasterLayer::getRasterHueRotate() const {
return impl->paint.rasterHueRotate.get();
}
@@ -60,6 +68,10 @@ void RasterLayer::setRasterHueRotate(PropertyValue<float> value, const optional<
impl->paint.rasterHueRotate.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterBrightnessMin() {
+ return { 0 };
+}
+
PropertyValue<float> RasterLayer::getRasterBrightnessMin() const {
return impl->paint.rasterBrightnessMin.get();
}
@@ -68,6 +80,10 @@ void RasterLayer::setRasterBrightnessMin(PropertyValue<float> value, const optio
impl->paint.rasterBrightnessMin.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterBrightnessMax() {
+ return { 1 };
+}
+
PropertyValue<float> RasterLayer::getRasterBrightnessMax() const {
return impl->paint.rasterBrightnessMax.get();
}
@@ -76,6 +92,10 @@ void RasterLayer::setRasterBrightnessMax(PropertyValue<float> value, const optio
impl->paint.rasterBrightnessMax.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterSaturation() {
+ return { 0 };
+}
+
PropertyValue<float> RasterLayer::getRasterSaturation() const {
return impl->paint.rasterSaturation.get();
}
@@ -84,6 +104,10 @@ void RasterLayer::setRasterSaturation(PropertyValue<float> value, const optional
impl->paint.rasterSaturation.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterContrast() {
+ return { 0 };
+}
+
PropertyValue<float> RasterLayer::getRasterContrast() const {
return impl->paint.rasterContrast.get();
}
@@ -92,6 +116,10 @@ void RasterLayer::setRasterContrast(PropertyValue<float> value, const optional<s
impl->paint.rasterContrast.set(value, klass);
}
+PropertyValue<float> RasterLayer::getDefaultRasterFadeDuration() {
+ return { 300 };
+}
+
PropertyValue<float> RasterLayer::getRasterFadeDuration() const {
return impl->paint.rasterFadeDuration.get();
}
diff --git a/src/mbgl/style/layers/symbol_layer.cpp b/src/mbgl/style/layers/symbol_layer.cpp
index c26123f0ec..7852969f7b 100644
--- a/src/mbgl/style/layers/symbol_layer.cpp
+++ b/src/mbgl/style/layers/symbol_layer.cpp
@@ -58,6 +58,10 @@ const Filter& SymbolLayer::getFilter() const {
// Layout properties
+PropertyValue<SymbolPlacementType> SymbolLayer::getDefaultSymbolPlacement() {
+ return { SymbolPlacementType::Point };
+}
+
PropertyValue<SymbolPlacementType> SymbolLayer::getSymbolPlacement() const {
return impl->layout.symbolPlacement.get();
}
@@ -65,6 +69,10 @@ PropertyValue<SymbolPlacementType> SymbolLayer::getSymbolPlacement() const {
void SymbolLayer::setSymbolPlacement(PropertyValue<SymbolPlacementType> value) {
impl->layout.symbolPlacement.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultSymbolSpacing() {
+ return { 250 };
+}
+
PropertyValue<float> SymbolLayer::getSymbolSpacing() const {
return impl->layout.symbolSpacing.get();
}
@@ -72,6 +80,10 @@ PropertyValue<float> SymbolLayer::getSymbolSpacing() const {
void SymbolLayer::setSymbolSpacing(PropertyValue<float> value) {
impl->layout.symbolSpacing.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultSymbolAvoidEdges() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getSymbolAvoidEdges() const {
return impl->layout.symbolAvoidEdges.get();
}
@@ -79,6 +91,10 @@ PropertyValue<bool> SymbolLayer::getSymbolAvoidEdges() const {
void SymbolLayer::setSymbolAvoidEdges(PropertyValue<bool> value) {
impl->layout.symbolAvoidEdges.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultIconAllowOverlap() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getIconAllowOverlap() const {
return impl->layout.iconAllowOverlap.get();
}
@@ -86,6 +102,10 @@ PropertyValue<bool> SymbolLayer::getIconAllowOverlap() const {
void SymbolLayer::setIconAllowOverlap(PropertyValue<bool> value) {
impl->layout.iconAllowOverlap.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultIconIgnorePlacement() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getIconIgnorePlacement() const {
return impl->layout.iconIgnorePlacement.get();
}
@@ -93,6 +113,10 @@ PropertyValue<bool> SymbolLayer::getIconIgnorePlacement() const {
void SymbolLayer::setIconIgnorePlacement(PropertyValue<bool> value) {
impl->layout.iconIgnorePlacement.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultIconOptional() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getIconOptional() const {
return impl->layout.iconOptional.get();
}
@@ -100,6 +124,10 @@ PropertyValue<bool> SymbolLayer::getIconOptional() const {
void SymbolLayer::setIconOptional(PropertyValue<bool> value) {
impl->layout.iconOptional.set(value);
}
+PropertyValue<AlignmentType> SymbolLayer::getDefaultIconRotationAlignment() {
+ return { AlignmentType::Viewport };
+}
+
PropertyValue<AlignmentType> SymbolLayer::getIconRotationAlignment() const {
return impl->layout.iconRotationAlignment.get();
}
@@ -107,6 +135,10 @@ PropertyValue<AlignmentType> SymbolLayer::getIconRotationAlignment() const {
void SymbolLayer::setIconRotationAlignment(PropertyValue<AlignmentType> value) {
impl->layout.iconRotationAlignment.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultIconSize() {
+ return { 1 };
+}
+
PropertyValue<float> SymbolLayer::getIconSize() const {
return impl->layout.iconSize.get();
}
@@ -114,6 +146,10 @@ PropertyValue<float> SymbolLayer::getIconSize() const {
void SymbolLayer::setIconSize(PropertyValue<float> value) {
impl->layout.iconSize.set(value);
}
+PropertyValue<IconTextFitType> SymbolLayer::getDefaultIconTextFit() {
+ return { IconTextFitType::None };
+}
+
PropertyValue<IconTextFitType> SymbolLayer::getIconTextFit() const {
return impl->layout.iconTextFit.get();
}
@@ -121,6 +157,10 @@ PropertyValue<IconTextFitType> SymbolLayer::getIconTextFit() const {
void SymbolLayer::setIconTextFit(PropertyValue<IconTextFitType> value) {
impl->layout.iconTextFit.set(value);
}
+PropertyValue<std::array<float, 4>> SymbolLayer::getDefaultIconTextFitPadding() {
+ return { {{ 0, 0, 0, 0 }} };
+}
+
PropertyValue<std::array<float, 4>> SymbolLayer::getIconTextFitPadding() const {
return impl->layout.iconTextFitPadding.get();
}
@@ -128,6 +168,10 @@ PropertyValue<std::array<float, 4>> SymbolLayer::getIconTextFitPadding() const {
void SymbolLayer::setIconTextFitPadding(PropertyValue<std::array<float, 4>> value) {
impl->layout.iconTextFitPadding.set(value);
}
+PropertyValue<std::string> SymbolLayer::getDefaultIconImage() {
+ return { "" };
+}
+
PropertyValue<std::string> SymbolLayer::getIconImage() const {
return impl->layout.iconImage.get();
}
@@ -135,6 +179,10 @@ PropertyValue<std::string> SymbolLayer::getIconImage() const {
void SymbolLayer::setIconImage(PropertyValue<std::string> value) {
impl->layout.iconImage.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultIconRotate() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getIconRotate() const {
return impl->layout.iconRotate.get();
}
@@ -142,6 +190,10 @@ PropertyValue<float> SymbolLayer::getIconRotate() const {
void SymbolLayer::setIconRotate(PropertyValue<float> value) {
impl->layout.iconRotate.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultIconPadding() {
+ return { 2 };
+}
+
PropertyValue<float> SymbolLayer::getIconPadding() const {
return impl->layout.iconPadding.get();
}
@@ -149,6 +201,10 @@ PropertyValue<float> SymbolLayer::getIconPadding() const {
void SymbolLayer::setIconPadding(PropertyValue<float> value) {
impl->layout.iconPadding.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultIconKeepUpright() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getIconKeepUpright() const {
return impl->layout.iconKeepUpright.get();
}
@@ -156,6 +212,10 @@ PropertyValue<bool> SymbolLayer::getIconKeepUpright() const {
void SymbolLayer::setIconKeepUpright(PropertyValue<bool> value) {
impl->layout.iconKeepUpright.set(value);
}
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconOffset() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> SymbolLayer::getIconOffset() const {
return impl->layout.iconOffset.get();
}
@@ -163,6 +223,10 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getIconOffset() const {
void SymbolLayer::setIconOffset(PropertyValue<std::array<float, 2>> value) {
impl->layout.iconOffset.set(value);
}
+PropertyValue<AlignmentType> SymbolLayer::getDefaultTextPitchAlignment() {
+ return { AlignmentType::Undefined };
+}
+
PropertyValue<AlignmentType> SymbolLayer::getTextPitchAlignment() const {
return impl->layout.textPitchAlignment.get();
}
@@ -170,6 +234,10 @@ PropertyValue<AlignmentType> SymbolLayer::getTextPitchAlignment() const {
void SymbolLayer::setTextPitchAlignment(PropertyValue<AlignmentType> value) {
impl->layout.textPitchAlignment.set(value);
}
+PropertyValue<AlignmentType> SymbolLayer::getDefaultTextRotationAlignment() {
+ return { AlignmentType::Viewport };
+}
+
PropertyValue<AlignmentType> SymbolLayer::getTextRotationAlignment() const {
return impl->layout.textRotationAlignment.get();
}
@@ -177,6 +245,10 @@ PropertyValue<AlignmentType> SymbolLayer::getTextRotationAlignment() const {
void SymbolLayer::setTextRotationAlignment(PropertyValue<AlignmentType> value) {
impl->layout.textRotationAlignment.set(value);
}
+PropertyValue<std::string> SymbolLayer::getDefaultTextField() {
+ return { "" };
+}
+
PropertyValue<std::string> SymbolLayer::getTextField() const {
return impl->layout.textField.get();
}
@@ -184,6 +256,10 @@ PropertyValue<std::string> SymbolLayer::getTextField() const {
void SymbolLayer::setTextField(PropertyValue<std::string> value) {
impl->layout.textField.set(value);
}
+PropertyValue<std::vector<std::string>> SymbolLayer::getDefaultTextFont() {
+ return { { "Open Sans Regular", "Arial Unicode MS Regular" } };
+}
+
PropertyValue<std::vector<std::string>> SymbolLayer::getTextFont() const {
return impl->layout.textFont.get();
}
@@ -191,6 +267,10 @@ PropertyValue<std::vector<std::string>> SymbolLayer::getTextFont() const {
void SymbolLayer::setTextFont(PropertyValue<std::vector<std::string>> value) {
impl->layout.textFont.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextSize() {
+ return { 16 };
+}
+
PropertyValue<float> SymbolLayer::getTextSize() const {
return impl->layout.textSize.get();
}
@@ -198,6 +278,10 @@ PropertyValue<float> SymbolLayer::getTextSize() const {
void SymbolLayer::setTextSize(PropertyValue<float> value) {
impl->layout.textSize.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextMaxWidth() {
+ return { 10 };
+}
+
PropertyValue<float> SymbolLayer::getTextMaxWidth() const {
return impl->layout.textMaxWidth.get();
}
@@ -205,6 +289,10 @@ PropertyValue<float> SymbolLayer::getTextMaxWidth() const {
void SymbolLayer::setTextMaxWidth(PropertyValue<float> value) {
impl->layout.textMaxWidth.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextLineHeight() {
+ return { 1.2 };
+}
+
PropertyValue<float> SymbolLayer::getTextLineHeight() const {
return impl->layout.textLineHeight.get();
}
@@ -212,6 +300,10 @@ PropertyValue<float> SymbolLayer::getTextLineHeight() const {
void SymbolLayer::setTextLineHeight(PropertyValue<float> value) {
impl->layout.textLineHeight.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextLetterSpacing() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getTextLetterSpacing() const {
return impl->layout.textLetterSpacing.get();
}
@@ -219,6 +311,10 @@ PropertyValue<float> SymbolLayer::getTextLetterSpacing() const {
void SymbolLayer::setTextLetterSpacing(PropertyValue<float> value) {
impl->layout.textLetterSpacing.set(value);
}
+PropertyValue<TextJustifyType> SymbolLayer::getDefaultTextJustify() {
+ return { TextJustifyType::Center };
+}
+
PropertyValue<TextJustifyType> SymbolLayer::getTextJustify() const {
return impl->layout.textJustify.get();
}
@@ -226,6 +322,10 @@ PropertyValue<TextJustifyType> SymbolLayer::getTextJustify() const {
void SymbolLayer::setTextJustify(PropertyValue<TextJustifyType> value) {
impl->layout.textJustify.set(value);
}
+PropertyValue<TextAnchorType> SymbolLayer::getDefaultTextAnchor() {
+ return { TextAnchorType::Center };
+}
+
PropertyValue<TextAnchorType> SymbolLayer::getTextAnchor() const {
return impl->layout.textAnchor.get();
}
@@ -233,6 +333,10 @@ PropertyValue<TextAnchorType> SymbolLayer::getTextAnchor() const {
void SymbolLayer::setTextAnchor(PropertyValue<TextAnchorType> value) {
impl->layout.textAnchor.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextMaxAngle() {
+ return { 45 };
+}
+
PropertyValue<float> SymbolLayer::getTextMaxAngle() const {
return impl->layout.textMaxAngle.get();
}
@@ -240,6 +344,10 @@ PropertyValue<float> SymbolLayer::getTextMaxAngle() const {
void SymbolLayer::setTextMaxAngle(PropertyValue<float> value) {
impl->layout.textMaxAngle.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextRotate() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getTextRotate() const {
return impl->layout.textRotate.get();
}
@@ -247,6 +355,10 @@ PropertyValue<float> SymbolLayer::getTextRotate() const {
void SymbolLayer::setTextRotate(PropertyValue<float> value) {
impl->layout.textRotate.set(value);
}
+PropertyValue<float> SymbolLayer::getDefaultTextPadding() {
+ return { 2 };
+}
+
PropertyValue<float> SymbolLayer::getTextPadding() const {
return impl->layout.textPadding.get();
}
@@ -254,6 +366,10 @@ PropertyValue<float> SymbolLayer::getTextPadding() const {
void SymbolLayer::setTextPadding(PropertyValue<float> value) {
impl->layout.textPadding.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultTextKeepUpright() {
+ return { true };
+}
+
PropertyValue<bool> SymbolLayer::getTextKeepUpright() const {
return impl->layout.textKeepUpright.get();
}
@@ -261,6 +377,10 @@ PropertyValue<bool> SymbolLayer::getTextKeepUpright() const {
void SymbolLayer::setTextKeepUpright(PropertyValue<bool> value) {
impl->layout.textKeepUpright.set(value);
}
+PropertyValue<TextTransformType> SymbolLayer::getDefaultTextTransform() {
+ return { TextTransformType::None };
+}
+
PropertyValue<TextTransformType> SymbolLayer::getTextTransform() const {
return impl->layout.textTransform.get();
}
@@ -268,6 +388,10 @@ PropertyValue<TextTransformType> SymbolLayer::getTextTransform() const {
void SymbolLayer::setTextTransform(PropertyValue<TextTransformType> value) {
impl->layout.textTransform.set(value);
}
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextOffset() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> SymbolLayer::getTextOffset() const {
return impl->layout.textOffset.get();
}
@@ -275,6 +399,10 @@ PropertyValue<std::array<float, 2>> SymbolLayer::getTextOffset() const {
void SymbolLayer::setTextOffset(PropertyValue<std::array<float, 2>> value) {
impl->layout.textOffset.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultTextAllowOverlap() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getTextAllowOverlap() const {
return impl->layout.textAllowOverlap.get();
}
@@ -282,6 +410,10 @@ PropertyValue<bool> SymbolLayer::getTextAllowOverlap() const {
void SymbolLayer::setTextAllowOverlap(PropertyValue<bool> value) {
impl->layout.textAllowOverlap.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultTextIgnorePlacement() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getTextIgnorePlacement() const {
return impl->layout.textIgnorePlacement.get();
}
@@ -289,6 +421,10 @@ PropertyValue<bool> SymbolLayer::getTextIgnorePlacement() const {
void SymbolLayer::setTextIgnorePlacement(PropertyValue<bool> value) {
impl->layout.textIgnorePlacement.set(value);
}
+PropertyValue<bool> SymbolLayer::getDefaultTextOptional() {
+ return { false };
+}
+
PropertyValue<bool> SymbolLayer::getTextOptional() const {
return impl->layout.textOptional.get();
}
@@ -299,6 +435,10 @@ void SymbolLayer::setTextOptional(PropertyValue<bool> value) {
// Paint properties
+PropertyValue<float> SymbolLayer::getDefaultIconOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> SymbolLayer::getIconOpacity() const {
return impl->paint.iconOpacity.get();
}
@@ -307,6 +447,10 @@ void SymbolLayer::setIconOpacity(PropertyValue<float> value, const optional<std:
impl->paint.iconOpacity.set(value, klass);
}
+PropertyValue<Color> SymbolLayer::getDefaultIconColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> SymbolLayer::getIconColor() const {
return impl->paint.iconColor.get();
}
@@ -315,6 +459,10 @@ void SymbolLayer::setIconColor(PropertyValue<Color> value, const optional<std::s
impl->paint.iconColor.set(value, klass);
}
+PropertyValue<Color> SymbolLayer::getDefaultIconHaloColor() {
+ return { {} };
+}
+
PropertyValue<Color> SymbolLayer::getIconHaloColor() const {
return impl->paint.iconHaloColor.get();
}
@@ -323,6 +471,10 @@ void SymbolLayer::setIconHaloColor(PropertyValue<Color> value, const optional<st
impl->paint.iconHaloColor.set(value, klass);
}
+PropertyValue<float> SymbolLayer::getDefaultIconHaloWidth() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getIconHaloWidth() const {
return impl->paint.iconHaloWidth.get();
}
@@ -331,6 +483,10 @@ void SymbolLayer::setIconHaloWidth(PropertyValue<float> value, const optional<st
impl->paint.iconHaloWidth.set(value, klass);
}
+PropertyValue<float> SymbolLayer::getDefaultIconHaloBlur() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getIconHaloBlur() const {
return impl->paint.iconHaloBlur.get();
}
@@ -339,6 +495,10 @@ void SymbolLayer::setIconHaloBlur(PropertyValue<float> value, const optional<std
impl->paint.iconHaloBlur.set(value, klass);
}
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultIconTranslate() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> SymbolLayer::getIconTranslate() const {
return impl->paint.iconTranslate.get();
}
@@ -347,6 +507,10 @@ void SymbolLayer::setIconTranslate(PropertyValue<std::array<float, 2>> value, co
impl->paint.iconTranslate.set(value, klass);
}
+PropertyValue<TranslateAnchorType> SymbolLayer::getDefaultIconTranslateAnchor() {
+ return { TranslateAnchorType::Map };
+}
+
PropertyValue<TranslateAnchorType> SymbolLayer::getIconTranslateAnchor() const {
return impl->paint.iconTranslateAnchor.get();
}
@@ -355,6 +519,10 @@ void SymbolLayer::setIconTranslateAnchor(PropertyValue<TranslateAnchorType> valu
impl->paint.iconTranslateAnchor.set(value, klass);
}
+PropertyValue<float> SymbolLayer::getDefaultTextOpacity() {
+ return { 1 };
+}
+
PropertyValue<float> SymbolLayer::getTextOpacity() const {
return impl->paint.textOpacity.get();
}
@@ -363,6 +531,10 @@ void SymbolLayer::setTextOpacity(PropertyValue<float> value, const optional<std:
impl->paint.textOpacity.set(value, klass);
}
+PropertyValue<Color> SymbolLayer::getDefaultTextColor() {
+ return { Color::black() };
+}
+
PropertyValue<Color> SymbolLayer::getTextColor() const {
return impl->paint.textColor.get();
}
@@ -371,6 +543,10 @@ void SymbolLayer::setTextColor(PropertyValue<Color> value, const optional<std::s
impl->paint.textColor.set(value, klass);
}
+PropertyValue<Color> SymbolLayer::getDefaultTextHaloColor() {
+ return { {} };
+}
+
PropertyValue<Color> SymbolLayer::getTextHaloColor() const {
return impl->paint.textHaloColor.get();
}
@@ -379,6 +555,10 @@ void SymbolLayer::setTextHaloColor(PropertyValue<Color> value, const optional<st
impl->paint.textHaloColor.set(value, klass);
}
+PropertyValue<float> SymbolLayer::getDefaultTextHaloWidth() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getTextHaloWidth() const {
return impl->paint.textHaloWidth.get();
}
@@ -387,6 +567,10 @@ void SymbolLayer::setTextHaloWidth(PropertyValue<float> value, const optional<st
impl->paint.textHaloWidth.set(value, klass);
}
+PropertyValue<float> SymbolLayer::getDefaultTextHaloBlur() {
+ return { 0 };
+}
+
PropertyValue<float> SymbolLayer::getTextHaloBlur() const {
return impl->paint.textHaloBlur.get();
}
@@ -395,6 +579,10 @@ void SymbolLayer::setTextHaloBlur(PropertyValue<float> value, const optional<std
impl->paint.textHaloBlur.set(value, klass);
}
+PropertyValue<std::array<float, 2>> SymbolLayer::getDefaultTextTranslate() {
+ return { {{ 0, 0 }} };
+}
+
PropertyValue<std::array<float, 2>> SymbolLayer::getTextTranslate() const {
return impl->paint.textTranslate.get();
}
@@ -403,6 +591,10 @@ void SymbolLayer::setTextTranslate(PropertyValue<std::array<float, 2>> value, co
impl->paint.textTranslate.set(value, klass);
}
+PropertyValue<TranslateAnchorType> SymbolLayer::getDefaultTextTranslateAnchor() {
+ return { TranslateAnchorType::Map };
+}
+
PropertyValue<TranslateAnchorType> SymbolLayer::getTextTranslateAnchor() const {
return impl->paint.textTranslateAnchor.get();
}