From 1e992ec7efd9a406a7d7677613b0cb395d9f69ba Mon Sep 17 00:00:00 2001 From: Just van den Broecke Date: Mon, 13 May 2019 13:09:18 +0200 Subject: [PATCH] Fix stale link in Map marker popup text (#116) Using the same convention as in table view id links on line 42: use the `data['items_path'] `. This always has the full URL base-path. Also will work later when behind a path-based proxy. --- pygeoapi/templates/items.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygeoapi/templates/items.html b/pygeoapi/templates/items.html index 90a7bd3..c3d6c21 100644 --- a/pygeoapi/templates/items.html +++ b/pygeoapi/templates/items.html @@ -82,8 +82,9 @@ var geojson_data = {{ data['features'] |to_json }}; var items = new L.GeoJSON(geojson_data, { onEachFeature: function (feature, layer) { - var html_ = '' + feature.id + ''; - layer.bindPopup(html_); + var url = '{{ data['items_path'] }}/' + feature.id + '?f=html'; + var html = '' + feature.id + ''; + layer.bindPopup(html); } });