WIP Add places to lists
This commit is contained in:
15
app/utils/place-mapping.js
Normal file
15
app/utils/place-mapping.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import { getLocalizedName } from './osm';
|
||||
|
||||
export function mapToStorageSchema(place) {
|
||||
return {
|
||||
title: place.title || getLocalizedName(place.osmTags, 'Untitled Place'),
|
||||
lat: place.lat,
|
||||
lon: place.lon,
|
||||
tags: [],
|
||||
url: place.osmTags?.website,
|
||||
osmId: String(place.osmId || place.id),
|
||||
osmType: place.osmType,
|
||||
osmTags: place.osmTags || {},
|
||||
description: place.description,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user