feat: render island-green sidewalk surfaces with native material

This commit is contained in:
que01 committed 2026-10-22 16:50:53 +08:00
1 parent 0f1850f740
commit a8f9979517
2 files changed
+20 -1

No files matched your search

+13 -1
View File
@@ -12,7 +12,19 @@ const LAYER_REGISTRY = Object.freeze([
role: 'surface',
materialLayer: 'intersection_surface',
},
{ key: 'sidewalkSurface', source: 'sidewalk_surface', role: 'surface', materialLayer: 'sidewalks' },
{
key: 'sidewalkSurface',
source: 'sidewalk_surface',
role: 'surface',
materialLayer: 'sidewalks',
splitBy: {
prop: 'kind',
cases: [
{ match: 'island-green', material: 'native_island_green' },
{ default: true, material: 'sidewalks' },
],
},
},
{
key: 'laneSeparators',
source: 'lane_separators',
+7
View File
@@ -63,6 +63,13 @@ assert.deepEqual(
['lane_centerlines', 'connectors'],
);
assert.equal(manifest.layers.find((layer) => layer.source === 'center_lines').splitBy.cases[0].match, 'white');
assert.deepEqual(manifest.layers.find((layer) => layer.source === 'sidewalk_surface').splitBy, {
prop: 'kind',
cases: [
{ match: 'island-green', material: 'native_island_green' },
{ default: true, material: 'sidewalks' },
],
});
const fixture = path.join(__dirname, 'fixtures', 'fengshu-er-road.osm');
assert.ok(fs.existsSync(fixture));
assert.throws(() => compiler.compiler.validateInput({ id: 'area' }), /RoadCompilerInput/);