From d7c28bfa62e310ac47699fd31293d48c837fa57d Mon Sep 17 00:00:00 2001 From: Felipe Date: Thu, 16 Feb 2023 22:54:29 -0300 Subject: [PATCH] Add GMaps link on points popups (#8) Co-authored-by: Felipe Contreras Salinas Reviewed-on: https://oolong.ludwig.dog/pitbuster/huellas/pulls/8 --- ts-client/client.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ts-client/client.ts b/ts-client/client.ts index a118efc..12e5d59 100644 --- a/ts-client/client.ts +++ b/ts-client/client.ts @@ -1,5 +1,5 @@ import * as L from 'leaflet-contextmenu'; -import { Feature, FeatureCollection } from 'geojson'; +import { Feature, FeatureCollection, Point } from 'geojson'; interface PlaceModel { id: number | null; @@ -282,6 +282,11 @@ async function setupMap(): Promise { popupStr += "
  • Horario: " + feature.properties.open_hours + "
  • "; if (feature.properties.description) popupStr += "
  • " + feature.properties.description + "
  • "; + + const lnglat = (feature.geometry as Point).coordinates; + popupStr += "GMaps" popupStr += ""; layer.bindPopup(popupStr);