From 6e0ea0c586b7386b161ac2d9fe761f778b2538a1 Mon Sep 17 00:00:00 2001 From: mtmail Date: Mon, 19 Apr 2021 17:55:51 +0200 Subject: [PATCH] MapIcon: make sure title and url get updated when place changes (#131) --- src/components/MapIcon.svelte | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/MapIcon.svelte b/src/components/MapIcon.svelte index 46c01a2..3892c32 100644 --- a/src/components/MapIcon.svelte +++ b/src/components/MapIcon.svelte @@ -2,10 +2,9 @@ export let aPlace; - let sIcon = getIcon(aPlace.category, aPlace.type); - - let title = 'icon for ' + aPlace.category + ' ' + aPlace.type; - let url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png'; + $: sIcon = getIcon(aPlace.category, aPlace.type); + $: title = 'icon for ' + aPlace.category + ' ' + aPlace.type; + $: url = Nominatim_Config.Images_Base_Url + sIcon + '.p.20.png'; function getIcon(category, type) { // equivalent to PHP Nominatim::ClassTypes::getIcon -- 2.39.5