Read CSS colour names as the default renderer reads them

cssColor (src/render/color.js) now reads the colour names the default
renderer knows, in any case, upper-cased as it looks them up: its table,
with grey aliases, transparent and its lavendar_blush spelling, and no
rebeccapurple. The local GeoJSON layers read simplestyle fill, stroke and
marker colours through it, so a named colour no longer falls back to the
layer colour; submarine cables read their marker colours the same way.
This commit is contained in:
Sameh Khamis committed 2026-11-07 23:47:04 -08:00
1 parent 38e0750715
commit 85d4f4840c
4 files changed
+236 -7

No files matched your search

+6 -4
View File
@@ -58,10 +58,12 @@ an error naming it, as it does for a dataset it cannot load.
A selected feature is the context record its draw item carries as `meta`; the
layer no longer sets the viewer's `selectedEntity`.
Features keep their own simplestyle `fill`, `fill-opacity`, `stroke`,
`stroke-opacity`, `stroke-width`, `marker-color` and `marker-size`, given as hex,
`rgb()` or `hsl()` colours; a `marker-symbol` draws the plain pin. Polygons
with heights are drawn at them, outlined; points with heights stand their pin
on the stem's tip. Edges follow rhumb lines.
`stroke-opacity`, `stroke-width`, `marker-color` and `marker-size`, given as
hex, `rgb()` or `hsl()` colours or by the CSS colour names the default renderer
knows (it has no `rebeccapurple`, and spells `lavenderblush` `lavendar_blush`);
a `marker-symbol` draws the plain pin. Polygons with heights are drawn at them,
outlined; points with heights stand their pin on the stem's tip. Edges follow
rhumb lines.
`gods-eye-view/infrastructure/geojson` exports the lower-level
`createLocalGeoJsonLayer(options, services)` and existing infrastructure overlay