From ceabcf671cd6998148ee1ff381f9a86c370d35fc Mon Sep 17 00:00:00 2001 From: Birm Date: Thu, 20 Feb 2025 14:18:36 -0500 Subject: [PATCH] fix style presentation --- apps/port/xml2geo.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/port/xml2geo.js b/apps/port/xml2geo.js index d903e2e4..c9ee9ce4 100644 --- a/apps/port/xml2geo.js +++ b/apps/port/xml2geo.js @@ -63,10 +63,11 @@ function xml2geo() { maxY = Math.max(maxY, y); coordinates.push([x, y]); } - + let isFill = false; // **Detect Polygon vs. Polyline** if (regionType === 'Polygon') { coordinates.push(coordinates[0]); // Close the polygon by repeating the first point + isFill = true; } let boundRect = [[minX, minY], [minX, maxY], [maxX, maxY], [maxX, minY], [minX, minY]]; @@ -83,6 +84,10 @@ function xml2geo() { 'properties': { 'regionId': regionId, 'lineColor': hexColor, + 'style':{ + 'color': hexColor, + 'isFill': isFill, + }, 'group': region.parentNode.getAttribute('Name') || 'Ungrouped', }, 'bound': {