From 9b7d424f7b035ac7a09cdbeac5fb3fcb7a5b3b87 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Thu, 31 Oct 2024 15:11:25 -0600 Subject: [PATCH] Handle sources with . in name by replacing them with _ Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/tools/MapPaintUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/MapPaintUtils.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/MapPaintUtils.java index 2a80e5ca..439569eb 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/MapPaintUtils.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/tools/MapPaintUtils.java @@ -160,6 +160,7 @@ public static synchronized void addSourcesToPaintStyle(DataSet ds) { return; } List sources = ds.allPrimitives().stream().map(MapPaintUtils::getSourceValue).filter(Objects::nonNull) + .map(s -> s.replace('.', '_')) .distinct().collect(Collectors.toList()); if (!styleSource.isLoaded()) { styleSource.loadStyleSource();