fix(library): view-bounded GeoJSON draws as the GeoJSON loader drew it

On the draw port, a Data Library dataset's polygon and line edges were
drawn as geodesics and every feature took the entry's colour. The loader
drew ground edges along rhumb lines and honoured a feature's own
simplestyle fill, fill-opacity, stroke, stroke-opacity and stroke-width,
with a colorBy fill over them. The library now uses local GeoJSON's
rhumb densifying and simplestyle reading for the same result.
This commit is contained in:
Sameh Khamis committed 2026-11-14 00:32:22 -08:00
1 parent 5f98f8bdf3
commit 667ca632ed
3 files changed
+78 -12

No files matched your search

+3 -3
View File
@@ -344,7 +344,7 @@ const given = (value) => value !== undefined && value !== null;
* properties (`stroke`, `stroke-opacity`, `stroke-width`), over the
* layer's colour and width.
*/
function strokeOf(properties, rgba) {
export function strokeOf(properties, rgba) {
let color = null;
let widthPx = FEATURE_LINE_WIDTH_PX;
if (properties) {
@@ -362,7 +362,7 @@ function strokeOf(properties, rgba) {
* A polygon's own fill as the GeoJSON loader read it (`fill` keeps the
* layer's fill alpha; `fill-opacity` sets the alpha).
*/
function fillOf(properties, fillColor) {
export function fillOf(properties, fillColor) {
let fill = null;
if (properties) {
if (given(properties.fill)) {
@@ -409,7 +409,7 @@ function* markerSymbols(features) {
* Ground `coordinates` as `{lon, lat}` degrees along the rhumb lines
* between them, as the GeoJSON loader drew its draped edges.
*/
function rhumbPositions(coordinates) {
export function rhumbPositions(coordinates) {
return densifyRhumb(
coordinates.map((c) => ({ lon: c[0] * RADIANS, lat: c[1] * RADIANS })),
RHUMB_GRANULARITY_M,