summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/mbgl/layermanager/background_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/circle_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/fill_extrusion_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/fill_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/heatmap_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/hillshade_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/layer_factory.hpp2
-rw-r--r--include/mbgl/layermanager/layer_manager.hpp2
-rw-r--r--include/mbgl/layermanager/line_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/location_indicator_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/raster_layer_factory.hpp1
-rw-r--r--include/mbgl/layermanager/symbol_layer_factory.hpp1
-rw-r--r--include/mbgl/style/layer.hpp3
-rw-r--r--include/mbgl/style/layers/background_layer.hpp3
-rw-r--r--include/mbgl/style/layers/circle_layer.hpp3
-rw-r--r--include/mbgl/style/layers/fill_extrusion_layer.hpp3
-rw-r--r--include/mbgl/style/layers/fill_layer.hpp3
-rw-r--r--include/mbgl/style/layers/heatmap_layer.hpp3
-rw-r--r--include/mbgl/style/layers/hillshade_layer.hpp3
-rw-r--r--include/mbgl/style/layers/layer.hpp.ejs3
-rw-r--r--include/mbgl/style/layers/line_layer.hpp3
-rw-r--r--include/mbgl/style/layers/location_indicator_layer.hpp3
-rw-r--r--include/mbgl/style/layers/raster_layer.hpp3
-rw-r--r--include/mbgl/style/layers/symbol_layer.hpp3
24 files changed, 26 insertions, 24 deletions
diff --git a/include/mbgl/layermanager/background_layer_factory.hpp b/include/mbgl/layermanager/background_layer_factory.hpp
index f2fa2f7a56..91619f1f9d 100644
--- a/include/mbgl/layermanager/background_layer_factory.hpp
+++ b/include/mbgl/layermanager/background_layer_factory.hpp
@@ -9,6 +9,7 @@ protected:
const style::LayerTypeInfo* getTypeInfo() const noexcept final;
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/circle_layer_factory.hpp b/include/mbgl/layermanager/circle_layer_factory.hpp
index aaf5fddfb6..560551251a 100644
--- a/include/mbgl/layermanager/circle_layer_factory.hpp
+++ b/include/mbgl/layermanager/circle_layer_factory.hpp
@@ -12,6 +12,7 @@ protected:
std::unique_ptr<GeometryTileLayer> tileLayer,
const std::vector<Immutable<style::LayerProperties>>& group) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
index fbaa5c1254..79fcb4d343 100644
--- a/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
+++ b/include/mbgl/layermanager/fill_extrusion_layer_factory.hpp
@@ -10,6 +10,7 @@ protected:
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/fill_layer_factory.hpp b/include/mbgl/layermanager/fill_layer_factory.hpp
index 09afb0dc3a..c3d67e1dc4 100644
--- a/include/mbgl/layermanager/fill_layer_factory.hpp
+++ b/include/mbgl/layermanager/fill_layer_factory.hpp
@@ -10,6 +10,7 @@ protected:
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/heatmap_layer_factory.hpp b/include/mbgl/layermanager/heatmap_layer_factory.hpp
index 2d0e1a5a02..c13ec9998a 100644
--- a/include/mbgl/layermanager/heatmap_layer_factory.hpp
+++ b/include/mbgl/layermanager/heatmap_layer_factory.hpp
@@ -10,6 +10,7 @@ protected:
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/hillshade_layer_factory.hpp b/include/mbgl/layermanager/hillshade_layer_factory.hpp
index 25b4f6c2c4..4095bb9d4f 100644
--- a/include/mbgl/layermanager/hillshade_layer_factory.hpp
+++ b/include/mbgl/layermanager/hillshade_layer_factory.hpp
@@ -9,6 +9,7 @@ protected:
const style::LayerTypeInfo* getTypeInfo() const noexcept final;
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/layer_factory.hpp b/include/mbgl/layermanager/layer_factory.hpp
index afa25bf92d..758aae7f04 100644
--- a/include/mbgl/layermanager/layer_factory.hpp
+++ b/include/mbgl/layermanager/layer_factory.hpp
@@ -34,6 +34,8 @@ public:
virtual std::unique_ptr<Bucket> createBucket(const BucketParameters&, const std::vector<Immutable<style::LayerProperties>>&) noexcept;
/// Returns a new Layout instance on success call; returns `nullptr` otherwise.
virtual std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>, const std::vector<Immutable<style::LayerProperties>>&) noexcept;
+ /// Returns the default value for the given source property
+ virtual style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept;
protected:
optional<std::string> getSource(const style::conversion::Convertible& value) const noexcept;
diff --git a/include/mbgl/layermanager/layer_manager.hpp b/include/mbgl/layermanager/layer_manager.hpp
index c6802dbb49..799c378ccb 100644
--- a/include/mbgl/layermanager/layer_manager.hpp
+++ b/include/mbgl/layermanager/layer_manager.hpp
@@ -44,6 +44,8 @@ public:
/// Returns a new Layout instance on success call; returns `nullptr` otherwise.
std::unique_ptr<Layout> createLayout(const LayoutParameters&, std::unique_ptr<GeometryTileLayer>,
const std::vector<Immutable<style::LayerProperties>>&) noexcept;
+ /// Returns the default value for the given layer type and property name.
+ style::StyleProperty getPropertyDefaultValue(const std::string& type, const std::string& property);
/**
* @brief a build-time flag to enable/disable annotations in mapbox-gl-native core.
diff --git a/include/mbgl/layermanager/line_layer_factory.hpp b/include/mbgl/layermanager/line_layer_factory.hpp
index 803f550e57..87b5a1c739 100644
--- a/include/mbgl/layermanager/line_layer_factory.hpp
+++ b/include/mbgl/layermanager/line_layer_factory.hpp
@@ -12,6 +12,7 @@ protected:
std::unique_ptr<GeometryTileLayer> tileLayer,
const std::vector<Immutable<style::LayerProperties>>& group) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/location_indicator_layer_factory.hpp b/include/mbgl/layermanager/location_indicator_layer_factory.hpp
index 8d8e3b9a40..4119229dd2 100644
--- a/include/mbgl/layermanager/location_indicator_layer_factory.hpp
+++ b/include/mbgl/layermanager/location_indicator_layer_factory.hpp
@@ -10,6 +10,7 @@ protected:
std::unique_ptr<style::Layer> createLayer(const std::string& id,
const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/raster_layer_factory.hpp b/include/mbgl/layermanager/raster_layer_factory.hpp
index d82137ee81..23db9707a2 100644
--- a/include/mbgl/layermanager/raster_layer_factory.hpp
+++ b/include/mbgl/layermanager/raster_layer_factory.hpp
@@ -9,6 +9,7 @@ protected:
const style::LayerTypeInfo* getTypeInfo() const noexcept final;
std::unique_ptr<style::Layer> createLayer(const std::string& id, const style::conversion::Convertible& value) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/layermanager/symbol_layer_factory.hpp b/include/mbgl/layermanager/symbol_layer_factory.hpp
index 38f382e96c..8a8ff0c534 100644
--- a/include/mbgl/layermanager/symbol_layer_factory.hpp
+++ b/include/mbgl/layermanager/symbol_layer_factory.hpp
@@ -12,6 +12,7 @@ protected:
std::unique_ptr<GeometryTileLayer> tileLayer,
const std::vector<Immutable<style::LayerProperties>>& group) noexcept final;
std::unique_ptr<RenderLayer> createRenderLayer(Immutable<style::Layer::Impl>) noexcept final;
+ style::StyleProperty getPropertyDefaultValue(const std::string& property) const noexcept final;
};
} // namespace mbgl
diff --git a/include/mbgl/style/layer.hpp b/include/mbgl/style/layer.hpp
index 333990a13b..1bd3071368 100644
--- a/include/mbgl/style/layer.hpp
+++ b/include/mbgl/style/layer.hpp
@@ -114,7 +114,7 @@ public:
// Dynamic properties
optional<conversion::Error> setProperty(const std::string& name, const conversion::Convertible& value);
StyleProperty getProperty(const std::string& name) const;
- StyleProperty getPropertyDefaultValue(const std::string& name) const;
+ static StyleProperty getPropertyDefaultValue(const std::string& name);
Value serialize() const override;
// Private implementation
@@ -146,7 +146,6 @@ protected:
virtual optional<conversion::Error> setPropertyInternal(const std::string& name,
const conversion::Convertible& value) = 0;
virtual StyleProperty getPropertyInternal(const std::string&) const = 0;
- virtual StyleProperty getPropertyDefaultValueInternal(const std::string&) const;
LayerObserver* observer;
mapbox::base::WeakPtrFactory<Layer> weakFactory {this};
diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp
index 2d4e57def0..a75fcaff0b 100644
--- a/include/mbgl/style/layers/background_layer.hpp
+++ b/include/mbgl/style/layers/background_layer.hpp
@@ -47,12 +47,11 @@ public:
Mutable<Impl> mutableImpl() const;
BackgroundLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp
index 9311da1c51..701d6dc145 100644
--- a/include/mbgl/style/layers/circle_layer.hpp
+++ b/include/mbgl/style/layers/circle_layer.hpp
@@ -101,12 +101,11 @@ public:
Mutable<Impl> mutableImpl() const;
CircleLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/fill_extrusion_layer.hpp b/include/mbgl/style/layers/fill_extrusion_layer.hpp
index de2055560f..d4c860403e 100644
--- a/include/mbgl/style/layers/fill_extrusion_layer.hpp
+++ b/include/mbgl/style/layers/fill_extrusion_layer.hpp
@@ -77,12 +77,11 @@ public:
Mutable<Impl> mutableImpl() const;
FillExtrusionLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp
index 35f0ffd755..056ca4c329 100644
--- a/include/mbgl/style/layers/fill_layer.hpp
+++ b/include/mbgl/style/layers/fill_layer.hpp
@@ -77,12 +77,11 @@ public:
Mutable<Impl> mutableImpl() const;
FillLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/heatmap_layer.hpp b/include/mbgl/style/layers/heatmap_layer.hpp
index 18d91e9067..9d24549f98 100644
--- a/include/mbgl/style/layers/heatmap_layer.hpp
+++ b/include/mbgl/style/layers/heatmap_layer.hpp
@@ -60,12 +60,11 @@ public:
Mutable<Impl> mutableImpl() const;
HeatmapLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/hillshade_layer.hpp b/include/mbgl/style/layers/hillshade_layer.hpp
index 97f0b60186..9e5b7a009f 100644
--- a/include/mbgl/style/layers/hillshade_layer.hpp
+++ b/include/mbgl/style/layers/hillshade_layer.hpp
@@ -65,12 +65,11 @@ public:
Mutable<Impl> mutableImpl() const;
HillshadeLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs
index f835d5fd9d..d20d148e77 100644
--- a/include/mbgl/style/layers/layer.hpp.ejs
+++ b/include/mbgl/style/layers/layer.hpp.ejs
@@ -69,12 +69,11 @@ public:
Mutable<Impl> mutableImpl() const;
<%- camelize(type) %>Layer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp
index f80da0b8c8..92d2159a23 100644
--- a/include/mbgl/style/layers/line_layer.hpp
+++ b/include/mbgl/style/layers/line_layer.hpp
@@ -120,12 +120,11 @@ public:
Mutable<Impl> mutableImpl() const;
LineLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/location_indicator_layer.hpp b/include/mbgl/style/layers/location_indicator_layer.hpp
index f8f567c84f..e111fc184d 100644
--- a/include/mbgl/style/layers/location_indicator_layer.hpp
+++ b/include/mbgl/style/layers/location_indicator_layer.hpp
@@ -104,12 +104,11 @@ public:
Mutable<Impl> mutableImpl() const;
LocationIndicatorLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp
index d6c73e48b8..9cee177cfc 100644
--- a/include/mbgl/style/layers/raster_layer.hpp
+++ b/include/mbgl/style/layers/raster_layer.hpp
@@ -77,12 +77,11 @@ public:
Mutable<Impl> mutableImpl() const;
RasterLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;
diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp
index 0427a06a4f..6a54e38d3c 100644
--- a/include/mbgl/style/layers/symbol_layer.hpp
+++ b/include/mbgl/style/layers/symbol_layer.hpp
@@ -282,12 +282,11 @@ public:
Mutable<Impl> mutableImpl() const;
SymbolLayer(Immutable<Impl>);
std::unique_ptr<Layer> cloneRef(const std::string& id) const final;
-
+ static StyleProperty getPropertyDefaultValue(const std::string&);
protected:
// Dynamic properties
optional<conversion::Error> setPropertyInternal(const std::string& name, const conversion::Convertible& value) final;
StyleProperty getPropertyInternal(const std::string& name) const final;
- StyleProperty getPropertyDefaultValueInternal(const std::string&) const final;
Value serialize() const final;
Mutable<Layer::Impl> mutableBaseImpl() const final;