move render type to layer top level

refs https://github.com/mapbox/mapbox-gl-style-spec/issues/80
This commit is contained in:
Konstantin Käfer
2014-07-09 18:43:28 -07:00
parent cd69784edb
commit d9bebe84a5
10 changed files with 181 additions and 278 deletions

View File

@@ -71,7 +71,8 @@ class StyleBucket {
public:
typedef std::shared_ptr<StyleBucket> Ptr;
BucketType type = BucketType::None;
StyleBucket(StyleLayerType type);
std::string name;
std::shared_ptr<Source> source;
std::string source_layer;

View File

@@ -61,6 +61,8 @@ public:
// The name of this layer.
const std::string id;
StyleLayerType type = StyleLayerType::Unknown;
// Bucket information, telling the renderer how to generate the geometries
// for this layer (feature property filters, tessellation instructions, ...).
std::shared_ptr<StyleBucket> bucket;

View File

@@ -9,19 +9,20 @@ namespace llmr {
// Stores a premultiplied color, with all four channels ranging from 0..1
typedef std::array<float, 4> Color;
enum class BucketType : uint8_t {
None,
enum class StyleLayerType : uint8_t {
Unknown,
Fill,
Line,
Icon,
Text,
Raster,
Default = None
Composite,
Background
};
BucketType parseBucketType(const std::string &type);
const char *stringifyBucketType(BucketType type);
std::ostream& operator<<(std::ostream&, BucketType type);
StyleLayerType parseStyleLayerType(const std::string &type);
const char *stringifyStyleLayerType(StyleLayerType type);
std::ostream& operator<<(std::ostream&, StyleLayerType type);
enum class WindingType : uint8_t {