summaryrefslogtreecommitdiff
path: root/platform/android/scripts
diff options
context:
space:
mode:
authorIvo van Dongen <info@ivovandongen.nl>2017-01-17 17:43:49 +0200
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-02 09:44:42 -0800
commitf562ecdfc3a08f7b9b0c2be938f237852a82d374 (patch)
tree71c3ceb4b2a877d124f4b069fa80156d701a6125 /platform/android/scripts
parent8a5bff8ee630673c6ebc496322eab94a41ae9353 (diff)
downloadqtlocation-mapboxgl-f562ecdfc3a08f7b9b0c2be938f237852a82d374.tar.gz
[android] data driven style implementation
Diffstat (limited to 'platform/android/scripts')
-rw-r--r--platform/android/scripts/generate-style-code.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/platform/android/scripts/generate-style-code.js b/platform/android/scripts/generate-style-code.js
index 634a4ce802..b9e0d6dfd9 100644
--- a/platform/android/scripts/generate-style-code.js
+++ b/platform/android/scripts/generate-style-code.js
@@ -10,7 +10,7 @@ require('../../../scripts/style-code');
// Specification parsing //
// Collect layer types from spec
-const layers = Object.keys(spec.layer.type.values).map((type) => {
+var layers = Object.keys(spec.layer.type.values).map((type) => {
const layoutProperties = Object.keys(spec[`layout_${type}`]).reduce((memo, name) => {
if (name !== 'visibility') {
spec[`layout_${type}`][name].name = name;
@@ -34,6 +34,9 @@ const layers = Object.keys(spec.layer.type.values).map((type) => {
};
});
+// XXX Remove fill-extrusion layer for now
+layers = _(layers).filter(layer => layer.type != "fill-extrusion").value();
+
// Process all layer properties
const layoutProperties = _(layers).map('layoutProperties').flatten().value();
const paintProperties = _(layers).map('paintProperties').flatten().value();
@@ -212,6 +215,14 @@ global.propertyValueDoc = function (property, value) {
return doc;
};
+global.supportsZoomFunction = function (property) {
+ return property['zoom-function'] === true;
+};
+
+global.supportsPropertyFunction = function (property) {
+ return property['property-function'] === true;
+};
+
// Template processing //
// Java + JNI Layers (Peer model)