From 354ca8d1d7f92010b9d5f931c8effe09d858e6d5 Mon Sep 17 00:00:00 2001 From: Markus Koch Date: Sun, 19 Apr 2020 09:12:37 +0200 Subject: Center map on marker when clicking it --- htdocs/mapscript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mapscript.js b/htdocs/mapscript.js index 877846d..4bdec93 100644 --- a/htdocs/mapscript.js +++ b/htdocs/mapscript.js @@ -120,7 +120,7 @@ function load_geojson(name, url, iconname, iconcolor, active=1, style={}) { permanent: true, direction: "center", className: "city-names" - }).openTooltip(); + }).openTooltip().on('click', jump_to_marker); }; pointToLayer = function(feature, latlng) { label = String(feature.properties.name) -- cgit v1.2.3