Update generate-style-code and add sort key api for LineLayer and FillLayer. (#209)
This commit is contained in:
@@ -8,8 +8,8 @@ const _ = require('lodash');
|
||||
|
||||
// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008
|
||||
delete spec.layout_circle["circle-sort-key"]
|
||||
delete spec.layout_line["line-sort-key"]
|
||||
delete spec.layout_fill["fill-sort-key"]
|
||||
//delete spec.layout_line["line-sort-key"]
|
||||
//delete spec.layout_fill["fill-sort-key"]
|
||||
|
||||
require('../vendor/mapbox-gl-native/scripts/style-code');
|
||||
|
||||
@@ -383,6 +383,17 @@ for (const layer of layers) {
|
||||
writeIfModified(`MapboxGLAndroidSDKTestApp/src/androidTest/java/com/mapbox/mapboxsdk/testapp/style/${camelize(layer.type)}LayerTest.java`, layerJavaUnitTests(layer));
|
||||
}
|
||||
|
||||
// Jni
|
||||
const layerHpp = ejs.compile(fs.readFileSync('vendor/mapbox-gl-native/platform/android/src/style/layers/layer.hpp.ejs', 'utf8'), {strict: true});
|
||||
const layerCpp = ejs.compile(fs.readFileSync('vendor/mapbox-gl-native/platform/android/src/style/layers/layer.cpp.ejs', 'utf8'), {strict: true});
|
||||
|
||||
for (const layer of layers) {
|
||||
const layerFileName = layer.type.replace('-', '_');
|
||||
|
||||
writeIfModified(`vendor/mapbox-gl-native/platform/android/src/style/layers/${layerFileName}_layer.hpp`, layerHpp(layer));
|
||||
writeIfModified(`vendor/mapbox-gl-native/platform/android/src/style/layers/${layerFileName}_layer.cpp`, layerCpp(layer));
|
||||
}
|
||||
|
||||
// Java PropertyFactory
|
||||
const propertiesTemplate = ejs.compile(fs.readFileSync('MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/property_factory.java.ejs', 'utf8'), {strict: true});
|
||||
writeIfModified(
|
||||
|
||||
Reference in New Issue
Block a user