mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
fix(import): keep KML points visible when remote icons are blocked
This commit is contained in:
1 parent
ae51f9aee9
commit
c58ff5c215
6 files changed
+146
-4
No files matched your search
@@ -493,7 +493,17 @@ export function sanitizeKmlDocument(doc, resolveLocal = () => null) {
|
||||
const local = resolveLocal(value);
|
||||
if (local) href.textContent = local;
|
||||
else if (/^data:image\/(png|jpeg|gif|webp|bmp);/i.test(value)) continue;
|
||||
else drop(href);
|
||||
else {
|
||||
const icon = href.parentNode;
|
||||
// An empty Icon explicitly hides the billboard in Cesium. Remove the
|
||||
// blocked icon definition so the loader supplies its local default pin.
|
||||
// Authored empty Icons (with no blocked href) still mean no marker.
|
||||
drop(
|
||||
icon?.localName === 'Icon' && icon.parentNode?.localName === 'IconStyle'
|
||||
? icon
|
||||
: href,
|
||||
);
|
||||
}
|
||||
}
|
||||
for (const overlay of elementsNamed(doc, 'GroundOverlay')) {
|
||||
if (!elementsNamed(overlay, 'href').length) drop(overlay);
|
||||
|
||||
Reference in new issue
Block a user