Skip to content

Commit

Permalink
feat: Import visibility (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw authored Aug 9, 2022
1 parent 9980279 commit 920c869
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -14340,7 +14340,7 @@ Object {
},
"properties": Object {
"name": "SF Marina Harbor Master",
"visibility": "0",
"visibility": false,
},
"type": "Feature",
},
Expand Down Expand Up @@ -14390,7 +14390,7 @@ Object {
},
"properties": Object {
"name": "SF Marina Harbor Master",
"visibility": "0",
"visibility": false,
},
"type": "Feature",
},
Expand Down Expand Up @@ -14433,7 +14433,7 @@ Object {
},
"properties": Object {
"name": "SF Marina Harbor Master",
"visibility": "0",
"visibility": false,
},
"type": "Feature",
},
Expand Down Expand Up @@ -14476,7 +14476,7 @@ Object {
},
"properties": Object {
"name": "SF Marina Harbor Master",
"visibility": "0",
"visibility": false,
},
"type": "Feature",
},
Expand Down
4 changes: 4 additions & 0 deletions lib/kml/placemark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ export function getPlacemark(
),
};

if (feature.properties?.visibility !== undefined) {
feature.properties.visibility = feature.properties.visibility !== "0";
}

const id = node.getAttribute("id");
if (id !== null && id !== "") feature.id = id;
return feature;
Expand Down

0 comments on commit 920c869

Please sign in to comment.