From f7f499aa819ddb1ac486080c6bea5ec0b269cd75 Mon Sep 17 00:00:00 2001 From: KatKatKateryna Date: Thu, 3 Oct 2024 09:38:32 +0100 Subject: [PATCH] fix comment&object redirect --- pygeoapi/templates/collections/items/index.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygeoapi/templates/collections/items/index.html b/pygeoapi/templates/collections/items/index.html index 8ea5dcc..c680eca 100644 --- a/pygeoapi/templates/collections/items/index.html +++ b/pygeoapi/templates/collections/items/index.html @@ -404,6 +404,7 @@ ); geojson_data = split_polygons(geojson_data_original); + project_url = data['speckle_url'].split("/models")[0] var items = new L.GeoJSON(geojson_data, { filter: (feature) => { @@ -413,7 +414,7 @@ return new L.circleMarker(latlng) }, onEachFeature: function (feature, layer) { - var url = '{{ data['speckle_project_url'] }}/models/' + feature.id.split("_")[0] + var url = project_url + '/models/' + feature.id.split("_")[0] var html = '

' + feature['properties']['speckle_type'] + '

' + feature['properties']['id'].split("_")[0] + '
'; layer.bindPopup(html); @@ -439,7 +440,7 @@ return new L.marker(latlng) }, onEachFeature: function (feature, layer) { - var url = '{{ data['speckle_project_url'] }}/models/' + feature.properties.resource_id + '#threadId=' + feature.id; + var url = project_url + '/models/' + feature.properties.resource_id + '#threadId=' + feature.id; var html = 'Go to thread

' + feature['properties']['text_html'] + '

'; layer.bindPopup(html); }