@tileflow/maps 0.1.0-alpha.15 → 0.1.0-alpha.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -22
- package/THIRD_PARTY_NOTICES.md +23 -0
- package/assets/streets/LICENSE-CC-BY-SA-3.0.txt +359 -0
- package/assets/streets/LICENSE-CC-BY-SA-4.0.txt +428 -0
- package/assets/streets/icons/oneway.svg +1 -8
- package/assets/streets/icons/transit-madrid-cercanias.svg +8 -0
- package/assets/streets/icons/transit-madrid-emt.svg +16 -0
- package/assets/streets/icons/transit-madrid-metro.svg +11 -0
- package/dist/index.js +217 -62
- package/docs/design-and-assets.md +23 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -8401,6 +8401,15 @@ import {
|
|
|
8401
8401
|
field as field9,
|
|
8402
8402
|
token as token6
|
|
8403
8403
|
} from "@tileflow/core";
|
|
8404
|
+
|
|
8405
|
+
// src/official/streets-transit-icons.ts
|
|
8406
|
+
var streetsTransitNetworks = [
|
|
8407
|
+
{ id: "transit-madrid-metro", networks: ["Metro de Madrid"] },
|
|
8408
|
+
{ id: "transit-madrid-cercanias", networks: ["Cercan\xEDas Madrid"] },
|
|
8409
|
+
{ id: "transit-madrid-emt", networks: ["EMT Madrid"] }
|
|
8410
|
+
];
|
|
8411
|
+
|
|
8412
|
+
// src/official/streets-poi.ts
|
|
8404
8413
|
var streetsPoiDiscColors = Object.freeze({
|
|
8405
8414
|
light: {
|
|
8406
8415
|
"arts-entertainment": "#F37CCC",
|
|
@@ -8658,7 +8667,9 @@ function streetsPoiImageTokens(variant) {
|
|
|
8658
8667
|
`poi.${category}`,
|
|
8659
8668
|
image2(id)
|
|
8660
8669
|
]),
|
|
8661
|
-
...Object.keys(streetsPoiPictograms).map((id) => [`poi.pictogram.${id}`, image2(id)])
|
|
8670
|
+
...Object.keys(streetsPoiPictograms).map((id) => [`poi.pictogram.${id}`, image2(id)]),
|
|
8671
|
+
// A network has one source SVG, shared by every time-of-day and palette variant.
|
|
8672
|
+
...streetsTransitNetworks.map(({ id }) => [`poi.network.${id}`, id])
|
|
8662
8673
|
]);
|
|
8663
8674
|
}
|
|
8664
8675
|
function streetsPoiImage() {
|
|
@@ -8683,7 +8694,7 @@ function streetsPoiImage() {
|
|
|
8683
8694
|
labels: [...labels8],
|
|
8684
8695
|
value: streetsPoiPictogramToken(id)
|
|
8685
8696
|
}));
|
|
8686
|
-
|
|
8697
|
+
const genericImage = expr10.match(
|
|
8687
8698
|
expr10.get(field9("mode")),
|
|
8688
8699
|
[firstMode, ...otherModes],
|
|
8689
8700
|
expr10.match(
|
|
@@ -8692,11 +8703,41 @@ function streetsPoiImage() {
|
|
|
8692
8703
|
token6.image("poi.landmark")
|
|
8693
8704
|
)
|
|
8694
8705
|
);
|
|
8706
|
+
const [firstNetwork, ...otherNetworks] = streetsTransitNetworks.map(({ id, networks }) => ({
|
|
8707
|
+
labels: [...networks],
|
|
8708
|
+
value: token6.image(`poi.network.${id}`)
|
|
8709
|
+
}));
|
|
8710
|
+
return expr10.case(
|
|
8711
|
+
[
|
|
8712
|
+
{
|
|
8713
|
+
when: expr10.eq(expr10.get(field9("poiCategory")), "transport"),
|
|
8714
|
+
value: expr10.match(
|
|
8715
|
+
expr10.get(field9("network")),
|
|
8716
|
+
[firstNetwork, ...otherNetworks],
|
|
8717
|
+
genericImage
|
|
8718
|
+
)
|
|
8719
|
+
}
|
|
8720
|
+
],
|
|
8721
|
+
genericImage
|
|
8722
|
+
);
|
|
8695
8723
|
}
|
|
8696
8724
|
|
|
8697
8725
|
// src/official/streets-themes.ts
|
|
8698
8726
|
import { defineTheme as defineTheme3, token as token7 } from "@tileflow/core";
|
|
8699
8727
|
|
|
8728
|
+
// src/official/streets-building-colors.ts
|
|
8729
|
+
function streetsBuildingColors(base, dark) {
|
|
8730
|
+
const rgb = [1, 3, 5].map((offset) => parseInt(base.slice(offset, offset + 2), 16));
|
|
8731
|
+
const gray = rgb.reduce((sum, value) => sum + value, 0) / 3;
|
|
8732
|
+
const hex2 = (values) => "#" + values.map((v) => Math.round(v).toString(16).padStart(2, "0")).join("").toUpperCase();
|
|
8733
|
+
return {
|
|
8734
|
+
"buildings.modelSurface": base,
|
|
8735
|
+
"buildings.modelSecondary": hex2(rgb.map((v) => v + (255 - v) * (dark ? 0.018 : 0.24))),
|
|
8736
|
+
"buildings.modelRoof": hex2(rgb.map((v) => (v * 0.8 + gray * 0.2) * 0.97)),
|
|
8737
|
+
"buildings.modelAccent": hex2(rgb.map((v) => v + (255 - v) * (dark ? 0.025 : 0.34)))
|
|
8738
|
+
};
|
|
8739
|
+
}
|
|
8740
|
+
|
|
8700
8741
|
// src/official/streets-cartography-colors.ts
|
|
8701
8742
|
var profiles = [
|
|
8702
8743
|
"default-dawn",
|
|
@@ -10064,6 +10105,21 @@ function streetsModelLighting(preset, family) {
|
|
|
10064
10105
|
}
|
|
10065
10106
|
|
|
10066
10107
|
// src/official/streets-road-colors.ts
|
|
10108
|
+
var streetsDayRoadFillColors = {
|
|
10109
|
+
"roads.major": "#AAB9C9",
|
|
10110
|
+
"roads.motorway": "#AAB9C9",
|
|
10111
|
+
"roads.trunk": "#AAB9C9",
|
|
10112
|
+
"roads.primary": "#AAB9C9",
|
|
10113
|
+
"roads.city.primary": "#D5DBDF",
|
|
10114
|
+
"roads.default": "#BDCCD9",
|
|
10115
|
+
"roads.minor": "#BDCCD9",
|
|
10116
|
+
"roads.secondary": "#BDCCD9",
|
|
10117
|
+
"roads.tertiary": "#BDCCD9",
|
|
10118
|
+
"roads.bridge": "#BDCCD9",
|
|
10119
|
+
"roads.city.secondary": "#DEE3E6",
|
|
10120
|
+
"roads.city.tertiary": "#E3E7E9",
|
|
10121
|
+
"roads.city.minor": "#DDE2E5"
|
|
10122
|
+
};
|
|
10067
10123
|
var standardRoadCasingProfiles = {
|
|
10068
10124
|
"default-dawn": {
|
|
10069
10125
|
generic: "#A49CA0",
|
|
@@ -10788,7 +10844,8 @@ function calibratedStreetsColors(preset, theme) {
|
|
|
10788
10844
|
function streetsPaletteColors(preset, colorTheme) {
|
|
10789
10845
|
const palette = {
|
|
10790
10846
|
...calibratedStreetsColors(preset, colorTheme),
|
|
10791
|
-
...streetsCartographyColors(colorTheme, preset)
|
|
10847
|
+
...streetsCartographyColors(colorTheme, preset),
|
|
10848
|
+
...colorTheme === "default" && preset === "day" ? streetsDayRoadFillColors : {}
|
|
10792
10849
|
};
|
|
10793
10850
|
return {
|
|
10794
10851
|
...palette,
|
|
@@ -10798,6 +10855,7 @@ function streetsPaletteColors(preset, colorTheme) {
|
|
|
10798
10855
|
"buildings.modelWood": palette["vegetation.tree.bark"],
|
|
10799
10856
|
"buildings.floodLight": !isDarkStreetsPreset(preset) ? "#FFFFFF" : colorTheme === "monochrome" ? "#E5E5E5" : colorTheme === "faded" ? "#F8E4C4" : "#F5CFA8",
|
|
10800
10857
|
...streetsModelLighting(preset, colorTheme).colors,
|
|
10858
|
+
...streetsBuildingColors(palette["buildings.extrusion"], isDarkStreetsPreset(preset)),
|
|
10801
10859
|
...streetsSkyTokens(preset, colorTheme).colors
|
|
10802
10860
|
};
|
|
10803
10861
|
}
|
|
@@ -11068,6 +11126,7 @@ var streetsVisual = {
|
|
|
11068
11126
|
pathTransition: token7.color("roads.path.transition"),
|
|
11069
11127
|
pathTunnel: token7.color("roads.path.tunnel"),
|
|
11070
11128
|
pedestrianSurface: token7.color("roads.pedestrian.surface"),
|
|
11129
|
+
primary: token7.color("roads.primary"),
|
|
11071
11130
|
rail: token7.color("roads.rail"),
|
|
11072
11131
|
railTransit: token7.color("roads.railTransit"),
|
|
11073
11132
|
sidewalkSurface: token7.color("roads.sidewalk.surface"),
|
|
@@ -11533,11 +11592,17 @@ var streetsOverviewPalette = {
|
|
|
11533
11592
|
admin1: streetsVisual.boundary.regional,
|
|
11534
11593
|
label: streetsVisual.label.country
|
|
11535
11594
|
};
|
|
11536
|
-
var detailedRoadTransitionStartZoom =
|
|
11595
|
+
var detailedRoadTransitionStartZoom = 13;
|
|
11537
11596
|
var detailedRoadZoom = 15;
|
|
11538
11597
|
function cityRoadColorStops(minZoom, cityColor, detailedColor) {
|
|
11539
11598
|
return [
|
|
11540
|
-
|
|
11599
|
+
// At regional scales the same classes connect towns. Do not wash them out
|
|
11600
|
+
// against vegetation; the source has no reliable urban/rural discriminator.
|
|
11601
|
+
...minZoom < 12 ? [
|
|
11602
|
+
[minZoom, detailedColor],
|
|
11603
|
+
[10, detailedColor]
|
|
11604
|
+
] : [],
|
|
11605
|
+
[12, cityColor],
|
|
11541
11606
|
[detailedRoadTransitionStartZoom, cityColor],
|
|
11542
11607
|
[detailedRoadZoom, detailedColor],
|
|
11543
11608
|
[22, detailedColor]
|
|
@@ -11555,7 +11620,7 @@ var roadBorderTotalWidth = 1;
|
|
|
11555
11620
|
var roadWidthInterpolationBase = 1.5;
|
|
11556
11621
|
var roadSurfaceColor = mapboxRoadPalette.road;
|
|
11557
11622
|
var roadCasingColor = mapboxRoadPalette.detailCasing;
|
|
11558
|
-
var primaryRoadSurfaceColor =
|
|
11623
|
+
var primaryRoadSurfaceColor = streetsVisual.road.primary;
|
|
11559
11624
|
var secondaryRoadSurfaceColor = mapboxRoadPalette.road;
|
|
11560
11625
|
var tertiaryRoadSurfaceColor = mapboxRoadPalette.road;
|
|
11561
11626
|
var buildingFillColor = mapboxBuildingPalette.fill;
|
|
@@ -11661,7 +11726,7 @@ function roadWidth(widths2, oneWayScale, rampWidths) {
|
|
|
11661
11726
|
[{ labels: [1, -1], value: width * oneWayScale }],
|
|
11662
11727
|
width
|
|
11663
11728
|
);
|
|
11664
|
-
const rampWidth = rampWidths
|
|
11729
|
+
const rampWidth = rampWidths ? sampleRoadWidth(rampWidths, level) : void 0;
|
|
11665
11730
|
const surfaceWidth = rampWidth === void 0 ? ordinaryWidth : expr12.case(
|
|
11666
11731
|
[{ when: expr12.eq(expr12.get(field11("ramp")), 1), value: rampWidth }],
|
|
11667
11732
|
ordinaryWidth
|
|
@@ -11678,6 +11743,27 @@ function roadWidth(widths2, oneWayScale, rampWidths) {
|
|
|
11678
11743
|
...widthStops.slice(1)
|
|
11679
11744
|
]);
|
|
11680
11745
|
}
|
|
11746
|
+
function sampleRoadWidth(widths2, level) {
|
|
11747
|
+
if (level <= widths2[0][0]) return widths2[0][1];
|
|
11748
|
+
for (let i = 1; i < widths2.length; i++) {
|
|
11749
|
+
const [end, endWidth] = widths2[i];
|
|
11750
|
+
if (level > end) continue;
|
|
11751
|
+
const [start, startWidth] = widths2[i - 1];
|
|
11752
|
+
const t = (roadWidthInterpolationBase ** (level - start) - 1) / (roadWidthInterpolationBase ** (end - start) - 1);
|
|
11753
|
+
return startWidth + t * (endWidth - startWidth);
|
|
11754
|
+
}
|
|
11755
|
+
return widths2.at(-1)[1];
|
|
11756
|
+
}
|
|
11757
|
+
function cityRoadWidths(widths2, at12, at14) {
|
|
11758
|
+
return [
|
|
11759
|
+
widths2[0],
|
|
11760
|
+
[10, sampleRoadWidth(widths2, 10)],
|
|
11761
|
+
[12, at12],
|
|
11762
|
+
[14, at14],
|
|
11763
|
+
[15, sampleRoadWidth(widths2, 15)],
|
|
11764
|
+
...widths2.filter(([level]) => level > 15)
|
|
11765
|
+
];
|
|
11766
|
+
}
|
|
11681
11767
|
function roadCasingWidth(major) {
|
|
11682
11768
|
return expr12.interpolate({ kind: "exponential", base: 1.5 }, expr12.zoom(), [
|
|
11683
11769
|
[
|
|
@@ -12274,6 +12360,36 @@ function streetsLabelRenderStack() {
|
|
|
12274
12360
|
})
|
|
12275
12361
|
};
|
|
12276
12362
|
}
|
|
12363
|
+
function cityRoadSurfaceColor(roadClass) {
|
|
12364
|
+
const detailedColor = roadClass === "primary" ? primaryRoadSurfaceColor : roadSurfaceColor;
|
|
12365
|
+
const stops = cityRoadColorStops(
|
|
12366
|
+
roadClass === "minor" ? 12 : roadClass === "primary" ? 5 : 8,
|
|
12367
|
+
streetsCityRoadPalette[roadClass],
|
|
12368
|
+
detailedColor
|
|
12369
|
+
);
|
|
12370
|
+
const outputs = stops.map(
|
|
12371
|
+
([level, color]) => [
|
|
12372
|
+
level,
|
|
12373
|
+
expr12.case(
|
|
12374
|
+
[
|
|
12375
|
+
{
|
|
12376
|
+
when: expr12.eq(expr12.get(field11("class")), `${roadClass}_construction`),
|
|
12377
|
+
value: roadSurfaceColor
|
|
12378
|
+
},
|
|
12379
|
+
{
|
|
12380
|
+
when: expr12.eq(expr12.get(field11("surface")), "unpaved"),
|
|
12381
|
+
value: level >= 12 && level < 15 ? streetsCityRoadPalette[roadClass] : roadSurfaceColor
|
|
12382
|
+
}
|
|
12383
|
+
],
|
|
12384
|
+
color
|
|
12385
|
+
)
|
|
12386
|
+
]
|
|
12387
|
+
);
|
|
12388
|
+
return expr12.interpolate({ kind: "linear" }, expr12.zoom(), [
|
|
12389
|
+
outputs[0],
|
|
12390
|
+
...outputs.slice(1)
|
|
12391
|
+
]);
|
|
12392
|
+
}
|
|
12277
12393
|
function streetsRoadEligibility() {
|
|
12278
12394
|
return Object.fromEntries(
|
|
12279
12395
|
["motorway", "trunk", "primary", "secondary", "tertiary"].flatMap(
|
|
@@ -12285,7 +12401,11 @@ function streetsRoadEligibility() {
|
|
|
12285
12401
|
kind: "all",
|
|
12286
12402
|
selectors: [
|
|
12287
12403
|
{ kind: "geometry", geometry: "line" },
|
|
12288
|
-
{
|
|
12404
|
+
{
|
|
12405
|
+
kind: "in",
|
|
12406
|
+
field: "class",
|
|
12407
|
+
values: [roadClass, `${roadClass}_construction`]
|
|
12408
|
+
},
|
|
12289
12409
|
{
|
|
12290
12410
|
kind: "compare",
|
|
12291
12411
|
field: "ramp",
|
|
@@ -12297,7 +12417,7 @@ function streetsRoadEligibility() {
|
|
|
12297
12417
|
fallback: { kind: "literal", value: true },
|
|
12298
12418
|
stops: [
|
|
12299
12419
|
{
|
|
12300
|
-
zoom:
|
|
12420
|
+
zoom: 13,
|
|
12301
12421
|
selector: {
|
|
12302
12422
|
kind: "all",
|
|
12303
12423
|
selectors: [
|
|
@@ -12312,7 +12432,10 @@ function streetsRoadEligibility() {
|
|
|
12312
12432
|
},
|
|
12313
12433
|
// Core places links before receiving carriageways. Streets owns only
|
|
12314
12434
|
// their reference-specific visibility threshold and palette/widths.
|
|
12315
|
-
style:
|
|
12435
|
+
style: {
|
|
12436
|
+
...phase === "rampFill" ? { minZoom: 12 } : {},
|
|
12437
|
+
...["primary", "secondary", "tertiary", "minor"].includes(roadClass) ? { color: cityRoadSurfaceColor(roadClass) } : {}
|
|
12438
|
+
},
|
|
12316
12439
|
target: `roads.classes.${roadClass}.surface.${phase}`
|
|
12317
12440
|
})
|
|
12318
12441
|
])
|
|
@@ -12332,6 +12455,16 @@ function streetsRoadRenderStack() {
|
|
|
12332
12455
|
}),
|
|
12333
12456
|
...parkPathRefinements(),
|
|
12334
12457
|
...streetsRoadEligibility(),
|
|
12458
|
+
minorSurfaceColor: refineRenderTarget5({
|
|
12459
|
+
renderer: "line",
|
|
12460
|
+
style: { color: cityRoadSurfaceColor("minor") },
|
|
12461
|
+
target: "roads.classes.minor.surface.fill"
|
|
12462
|
+
}),
|
|
12463
|
+
minorLinkColor: refineRenderTarget5({
|
|
12464
|
+
renderer: "line",
|
|
12465
|
+
style: { color: cityRoadSurfaceColor("minor") },
|
|
12466
|
+
target: "roads.classes.minor.surface.rampFill"
|
|
12467
|
+
}),
|
|
12335
12468
|
oneWayMarkers: refineRenderTarget5({
|
|
12336
12469
|
renderer: "symbol",
|
|
12337
12470
|
style: {
|
|
@@ -12454,7 +12587,14 @@ function cityRoadStyle(color, widths2, options = {}) {
|
|
|
12454
12587
|
surface: { casing, fill },
|
|
12455
12588
|
bridge: {
|
|
12456
12589
|
casing: { ...casing, cap: "butt", join: "miter", width: roadCasingWidth((minZoom ?? 0) < 12) },
|
|
12457
|
-
|
|
12590
|
+
// Local structures join their streets at z12; major structures take over
|
|
12591
|
+
// the continuous overview strokes at z13.
|
|
12592
|
+
fill: {
|
|
12593
|
+
...fill,
|
|
12594
|
+
cap: "round",
|
|
12595
|
+
join: "miter",
|
|
12596
|
+
minZoom: Math.max(minZoom ?? 0, minZoom === 12 ? 12 : 13)
|
|
12597
|
+
}
|
|
12458
12598
|
},
|
|
12459
12599
|
tunnel: tunnelVisible ? {
|
|
12460
12600
|
casing: {
|
|
@@ -12475,7 +12615,7 @@ function cityRoadStyle(color, widths2, options = {}) {
|
|
|
12475
12615
|
...fill,
|
|
12476
12616
|
cap: "butt",
|
|
12477
12617
|
join: "miter",
|
|
12478
|
-
minZoom: Math.max(minZoom ?? 0, 13),
|
|
12618
|
+
minZoom: Math.max(minZoom ?? 0, minZoom === 12 ? 12 : 13),
|
|
12479
12619
|
color: tunnelColor,
|
|
12480
12620
|
opacity: zoom10.linear([
|
|
12481
12621
|
[3, 0],
|
|
@@ -13195,12 +13335,16 @@ var streets = bindOfficialMapTheme(
|
|
|
13195
13335
|
),
|
|
13196
13336
|
primary: cityRoadStyle(
|
|
13197
13337
|
primaryRoadSurfaceColor,
|
|
13198
|
-
|
|
13199
|
-
[
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13338
|
+
cityRoadWidths(
|
|
13339
|
+
[
|
|
13340
|
+
[3, 0.8],
|
|
13341
|
+
[12, 3],
|
|
13342
|
+
[18, 28],
|
|
13343
|
+
[22, 280]
|
|
13344
|
+
],
|
|
13345
|
+
2,
|
|
13346
|
+
3.6
|
|
13347
|
+
),
|
|
13204
13348
|
{
|
|
13205
13349
|
casingColorStops: cityRoadCasingColorStops(5),
|
|
13206
13350
|
colorStops: cityRoadColorStops(
|
|
@@ -13217,12 +13361,16 @@ var streets = bindOfficialMapTheme(
|
|
|
13217
13361
|
),
|
|
13218
13362
|
secondary: cityRoadStyle(
|
|
13219
13363
|
secondaryRoadSurfaceColor,
|
|
13220
|
-
|
|
13221
|
-
[
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13364
|
+
cityRoadWidths(
|
|
13365
|
+
[
|
|
13366
|
+
[3, 0],
|
|
13367
|
+
[12, 2.2],
|
|
13368
|
+
[18, 26],
|
|
13369
|
+
[22, 260]
|
|
13370
|
+
],
|
|
13371
|
+
1.4,
|
|
13372
|
+
3
|
|
13373
|
+
),
|
|
13226
13374
|
{
|
|
13227
13375
|
casingColorStops: cityRoadCasingColorStops(8),
|
|
13228
13376
|
colorStops: cityRoadColorStops(
|
|
@@ -13238,12 +13386,16 @@ var streets = bindOfficialMapTheme(
|
|
|
13238
13386
|
),
|
|
13239
13387
|
tertiary: cityRoadStyle(
|
|
13240
13388
|
tertiaryRoadSurfaceColor,
|
|
13241
|
-
|
|
13242
|
-
[
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13389
|
+
cityRoadWidths(
|
|
13390
|
+
[
|
|
13391
|
+
[3, 0],
|
|
13392
|
+
[12, 2.2],
|
|
13393
|
+
[18, 26],
|
|
13394
|
+
[22, 260]
|
|
13395
|
+
],
|
|
13396
|
+
1.1,
|
|
13397
|
+
2.5
|
|
13398
|
+
),
|
|
13247
13399
|
{
|
|
13248
13400
|
casingColorStops: cityRoadCasingColorStops(8),
|
|
13249
13401
|
colorStops: cityRoadColorStops(
|
|
@@ -13259,12 +13411,16 @@ var streets = bindOfficialMapTheme(
|
|
|
13259
13411
|
),
|
|
13260
13412
|
minor: cityRoadStyle(
|
|
13261
13413
|
roadSurfaceColor,
|
|
13262
|
-
|
|
13263
|
-
[
|
|
13264
|
-
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
|
|
13414
|
+
cityRoadWidths(
|
|
13415
|
+
[
|
|
13416
|
+
[3, 0],
|
|
13417
|
+
[12, 0.5],
|
|
13418
|
+
[18, 20],
|
|
13419
|
+
[22, 200]
|
|
13420
|
+
],
|
|
13421
|
+
0.8,
|
|
13422
|
+
2.1
|
|
13423
|
+
),
|
|
13268
13424
|
{
|
|
13269
13425
|
casingColorStops: cityRoadCasingColorStops(12),
|
|
13270
13426
|
colorStops: cityRoadColorStops(12, streetsCityRoadPalette.minor, roadSurfaceColor),
|
|
@@ -13397,8 +13553,14 @@ var streets = bindOfficialMapTheme(
|
|
|
13397
13553
|
// stand beside the flat fill, so they require this mode.
|
|
13398
13554
|
mode: "flat",
|
|
13399
13555
|
threeDimensional: {
|
|
13556
|
+
edgeRadius: 1.5,
|
|
13557
|
+
groundOcclusion: 0.12,
|
|
13400
13558
|
// Models name pools, planting and timber with these parts to follow the map's colours.
|
|
13401
13559
|
modelColors: {
|
|
13560
|
+
surface: token9.color("buildings.modelSurface"),
|
|
13561
|
+
secondary: token9.color("buildings.modelSecondary"),
|
|
13562
|
+
roof: token9.color("buildings.modelRoof"),
|
|
13563
|
+
accent: token9.color("buildings.modelAccent"),
|
|
13402
13564
|
water: token9.color("buildings.modelWater"),
|
|
13403
13565
|
vegetation: token9.color("buildings.modelVegetation"),
|
|
13404
13566
|
wood: token9.color("buildings.modelWood")
|
|
@@ -13410,21 +13572,22 @@ var streets = bindOfficialMapTheme(
|
|
|
13410
13572
|
},
|
|
13411
13573
|
modelLighting: {
|
|
13412
13574
|
wall: {
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
|
|
13417
|
-
|
|
13418
|
-
|
|
13419
|
-
|
|
13420
|
-
|
|
13421
|
-
|
|
13422
|
-
color: token9.color("buildings.
|
|
13575
|
+
shading: "map",
|
|
13576
|
+
ambientOcclusion: 0.32,
|
|
13577
|
+
color: token9.color("buildings.modelSurface"),
|
|
13578
|
+
roughness: 1,
|
|
13579
|
+
metallic: 0
|
|
13580
|
+
},
|
|
13581
|
+
roof: {
|
|
13582
|
+
shading: "map",
|
|
13583
|
+
ambientOcclusion: 0.32,
|
|
13584
|
+
color: token9.color("buildings.modelRoof"),
|
|
13423
13585
|
roughness: 1,
|
|
13424
13586
|
metallic: 0
|
|
13425
13587
|
},
|
|
13426
|
-
roof: { color: token9.color("buildings.modelRoof"), roughness: 1, metallic: 0 },
|
|
13427
13588
|
window: {
|
|
13589
|
+
// Glass keeps its original role colour even on a shared stone part.
|
|
13590
|
+
partColorMix: 0,
|
|
13428
13591
|
roughness: 0,
|
|
13429
13592
|
metallic: 1,
|
|
13430
13593
|
emissiveStrength: token9.number("buildings.modelWindow.strength"),
|
|
@@ -13450,22 +13613,11 @@ var streets = bindOfficialMapTheme(
|
|
|
13450
13613
|
["unclassified", "door", "lamp", "logo"].map((role) => [
|
|
13451
13614
|
role,
|
|
13452
13615
|
{
|
|
13616
|
+
shading: "map",
|
|
13617
|
+
ambientOcclusion: 0.32,
|
|
13618
|
+
color: token9.color("buildings.modelSurface"),
|
|
13453
13619
|
roughness: 1,
|
|
13454
|
-
metallic: 0
|
|
13455
|
-
emissiveStrength: role === "door" ? token9.number("buildings.modelDoor.strength") : role === "logo" ? 0.6 : 0,
|
|
13456
|
-
colorMix: role === "logo" ? token9.number("buildings.modelLogo.mix") : 1,
|
|
13457
|
-
colorVariation: {
|
|
13458
|
-
hue: [10, 70],
|
|
13459
|
-
saturation: [
|
|
13460
|
-
token9.number("buildings.modelOther.saturation"),
|
|
13461
|
-
token9.number("buildings.modelOther.saturation")
|
|
13462
|
-
],
|
|
13463
|
-
lightness: [
|
|
13464
|
-
token9.number("buildings.modelOther.lightnessLow"),
|
|
13465
|
-
token9.number("buildings.modelOther.lightnessHigh")
|
|
13466
|
-
],
|
|
13467
|
-
space: "linear"
|
|
13468
|
-
}
|
|
13620
|
+
metallic: 0
|
|
13469
13621
|
}
|
|
13470
13622
|
])
|
|
13471
13623
|
)
|
|
@@ -14082,6 +14234,9 @@ var streets = bindOfficialMapTheme(
|
|
|
14082
14234
|
color: "category",
|
|
14083
14235
|
density: 2,
|
|
14084
14236
|
detailZoom: 18,
|
|
14237
|
+
// World also calls botanical collections gardens. Keep only the main destinations;
|
|
14238
|
+
// zooming in must not turn individual planting sections into named POIs.
|
|
14239
|
+
maxRankByType: { garden: 1 },
|
|
14085
14240
|
densityByCategory: {
|
|
14086
14241
|
lodging: 1,
|
|
14087
14242
|
"park-nature": 3,
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Map designs and assets
|
|
2
2
|
|
|
3
|
+
## Streets POIs
|
|
4
|
+
|
|
5
|
+
Transport POIs with a recognized `network` use that network's symbol. The initial catalog covers
|
|
6
|
+
`Metro de Madrid`, `Cercanías Madrid`, and `EMT Madrid`. Each network has one packaged SVG in a
|
|
7
|
+
24px cell, shared across all themes without recoloring the identity. Matching uses the source's
|
|
8
|
+
exact network value, including on older World tiles without `mode`; it never guesses from a
|
|
9
|
+
station name or applies a city logo to every station. Unknown or missing networks retain the
|
|
10
|
+
existing mode/type/category pictogram. Other railway services and intercity buses keep their
|
|
11
|
+
generic symbols. Sources and asset licenses are recorded in `THIRD_PARTY_NOTICES.md`.
|
|
12
|
+
|
|
13
|
+
POIs use World ranks with category density: parks and transport retain more detail than
|
|
14
|
+
businesses, hotels and religious sites. Gardens are limited to World filter ranks 0–1 at every
|
|
15
|
+
zoom, keeping principal destinations while suppressing botanical collections and other minor
|
|
16
|
+
garden POIs. World currently classifies both as `garden`, so some small independent gardens are
|
|
17
|
+
also omitted. Other park and landmark types keep their usual eligibility.
|
|
18
|
+
|
|
19
|
+
All categories share importance order; the two most important ranks precede streets. Discs need
|
|
20
|
+
names except parking and toilets. Native perspective and collisions select labels. See
|
|
21
|
+
[label placement](https://github.com/tileflow/tileflow-sdk/blob/main/packages/core/docs/cartographic-defaults.md#label-density-and-perspective).
|
|
22
|
+
Ordinary POI/transit names use 13 px, major destinations 18 px. World size rank zero alone does
|
|
23
|
+
not enlarge small parks. Text padding falls from 6 px to 4 px between z16 and z17; collision
|
|
24
|
+
determines which names fit.
|
|
25
|
+
|
|
3
26
|
## civica
|
|
4
27
|
|
|
5
28
|
`civica` is a self-contained civic print design named “Cívica”. Pale paper, warm stone blocks,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tileflow/maps",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.16",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Official themed Streets, Baedeker, Cívica, 1777, Siegfried, Soundings, and Blueprint maps for Tileflow.",
|
|
6
6
|
"type": "module",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"access": "public"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@tileflow/core": ">=0.1.0-alpha.
|
|
55
|
+
"@tileflow/core": ">=0.1.0-alpha.42 <0.1.0-beta.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@maplibre/maplibre-gl-style-spec": "24.8.5",
|
|
59
59
|
"@maplibre/maplibre-gl-style-spec-v6": "npm:@maplibre/maplibre-gl-style-spec@26.4.4",
|
|
60
|
-
"@tileflow/core": "0.1.0-alpha.
|
|
60
|
+
"@tileflow/core": "0.1.0-alpha.42"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
|
63
63
|
"build": "tsup src/index.ts --format esm --dts --clean --no-splitting",
|