summaryrefslogtreecommitdiff
path: root/proto
diff options
context:
space:
mode:
authorKonstantin Käfer <github@kkaefer.com>2014-01-08 12:10:46 +0100
committerKonstantin Käfer <github@kkaefer.com>2014-01-08 12:10:46 +0100
commit4f8556a6b80c41df8f8842a36ce13274c27b9ceb (patch)
tree51ead2bbe1e83bc7ba6d2fdcb355e131d1b1871b /proto
parent528eaf475e084508cb2d2d26df7d4136f1eb5e04 (diff)
downloadqtlocation-mapboxgl-4f8556a6b80c41df8f8842a36ce13274c27b9ceb.tar.gz
add protobuf encoding of style
Diffstat (limited to 'proto')
-rw-r--r--proto/style.proto61
1 files changed, 61 insertions, 0 deletions
diff --git a/proto/style.proto b/proto/style.proto
new file mode 100644
index 0000000000..cf6a8db6de
--- /dev/null
+++ b/proto/style.proto
@@ -0,0 +1,61 @@
+enum bucket_type {
+ fill = 1;
+ line = 2;
+ point = 3;
+}
+
+enum cap_type {
+ round = 1;
+}
+
+enum join_type {
+ butt = 1;
+ bevel = 2;
+}
+
+message bucket {
+ required string name = 1;
+ required bucket_type type = 2;
+
+ // Specify what data to pull into this bucket
+ required string source_name = 3;
+ required string source_layer = 4;
+ optional string source_field = 5;
+ repeated string source_values = 6;
+
+ // Specifies how the geometry for this bucket should be created
+ optional cap_type cap = 7;
+ optional join_type join = 8;
+ optional string font = 9;
+ optional float fontSize = 10;
+}
+
+message structure {
+ required string name = 1;
+ optional string bucket_name = 2;
+ repeated structure child_layers = 3;
+}
+
+message width {
+ optional string scaling = 1;
+ repeated float values = 2 [ packed = true ];
+}
+
+message layer {
+ required string layer_name = 1;
+ optional fixed32 color = 2; // rgba (=> rgb << 8 | 0xFF for opaque!)
+ optional bool antialias = 3;
+ optional width width = 4;
+}
+
+message class {
+ required string name = 1;
+ repeated layer layers = 2;
+}
+
+// root level object
+message style {
+ repeated bucket buckets = 1;
+ repeated structure structure = 2;
+ repeated class classes = 3;
+}