Skip to content

Commit

Permalink
fix: type issue on geometry object #142
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Feb 13, 2024
1 parent fec1ca8 commit 9fb6070
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stores/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ export const mapStore = defineStore('map', {
})

if (siteStore().contribMode) {
const { coordinates } = feature.geometry as GeoJSON.Point
if (cleanProperties.metadata.osm_id && cleanProperties.metadata.osm_type) {
cleanProperties.editor_id = `https://www.openstreetmap.org/edit?node=${cleanProperties.metadata.osm_id}`
cleanProperties.osm_note = `https://www.openstreetmap.org/note/new#map=19/${feature.geometry.coordinates[1]}/${feature.geometry.coordinates[0]}&layers=N`
cleanProperties.osm_note = `https://www.openstreetmap.org/note/new#map=19/${coordinates[1]}/${coordinates[0]}&layers=N`
if (cleanProperties.editorial.popup_fields)
cleanProperties.editorial.popup_fields.push({ field: 'editor_id' }, { field: 'osm_note' })

Expand Down

0 comments on commit 9fb6070

Please sign in to comment.