Skip to content

Commit

Permalink
fix: show geometry type as $type
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed May 25, 2022
1 parent 16a3fd7 commit 0f46557
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
selectedFeaturesData.push({
id: f.id,
layer: f.sourceLayer,
$type: f.type,
$type: f.geometry.type,
$id: f.id,
...f.properties,
data: f,
Expand Down
2 changes: 1 addition & 1 deletion src/components/MapPopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
{#if feature.id}
<PopupProperty name="$id" value={feature.id} />
{/if}
<PopupProperty name="$type" value={feature.type} />
<PopupProperty name="$type" value={feature.geometry.type} />
{#if feature.properties}
{#each Object.entries(feature.properties) as [name, value]}
<PopupProperty {name} {value} />
Expand Down

0 comments on commit 0f46557

Please sign in to comment.