Something went wrong. Try again.
your personal website on atproto - mirror blento.app
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445import type { CardDefinition } from '../../types';import CreateMapCardModal from './CreateMapCardModal.svelte';import MapCard from './MapCard.svelte';import MapCardSettings from './MapCardSettings.svelte';
export const MapCardDefinition = { type: 'mapLocation', contentComponent: MapCard, createNew: (item) => { item.w = 4; item.h = 4; item.mobileH = 8; item.mobileW = 8; },
creationModalComponent: CreateMapCardModal, allowSetColor: true, canHaveLabel: true, settingsComponent: MapCardSettings,
keywords: ['location', 'place', 'address', 'geo'], groups: ['Core'],
name: 'Map',
icon: `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="size-4"> <path stroke-linecap="round" stroke-linejoin="round" d="M9 6.75V15m6-6v8.25m.503 3.498 4.875-2.437c.381-.19.622-.58.622-1.006V4.82c0-.836-.88-1.38-1.628-1.006l-3.869 1.934c-.317.159-.69.159-1.006 0L9.503 3.252a1.125 1.125 0 0 0-1.006 0L3.622 5.689C3.24 5.88 3 6.27 3 6.695V19.18c0 .836.88 1.38 1.628 1.006l3.869-1.934c.317-.159.69-.159 1.006 0l4.994 2.497c.317.158.69.158 1.006 0Z" /></svg>`} as CardDefinition & { type: 'mapLocation' };
export function getZoomLevel(type: string | undefined): number { if ( ['house', 'building', 'address', 'street', 'road', 'residential', 'highway'].includes( type || '' ) ) { return 13; } if (['neighbourhood', 'suburb', 'quarter', 'district', 'postcode'].includes(type || '')) { return 12; } return 1;}