From c91fd9ab2e71fd29aed27d53f73bbfbad58feae2 Mon Sep 17 00:00:00 2001 From: ehanoj Date: Wed, 24 Apr 2019 16:33:09 +0200 Subject: [PATCH 1/2] dynamic find and call DIV of OpenLayers selection --- examples/birmingham/js/init13.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/birmingham/js/init13.js b/examples/birmingham/js/init13.js index a7f31f778..793e7894b 100644 --- a/examples/birmingham/js/init13.js +++ b/examples/birmingham/js/init13.js @@ -144,7 +144,8 @@ function visualize(data){ //wgl.render(); // point selection - pw = new WGL.ui.PopupWin("#OpenLayers_Layer_Vector_32_svgRoot", "idt", "Accident Details", data.pts); + divname=$("[id$='_svgRoot']") // OpenLayers name DIV is dynamic by setup of OL, i.e. #OpenLayers_Layer_Vector_32_svgRoot + pw = new WGL.ui.PopupWin(divname, "idt", "Accident Details", data.pts); pw.setProp2html(function (t) { var d = (new Date(t.date*1000*60*60)); From 7a5fdc63a1ec2fd7e2f6d2bd477aba4378d6a6de Mon Sep 17 00:00:00 2001 From: ehanoj Date: Wed, 24 Apr 2019 16:40:07 +0200 Subject: [PATCH 2/2] hide unused function startDraw --- examples/birmingham/js/map.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/birmingham/js/map.js b/examples/birmingham/js/map.js index 8c05d4e6b..272542e02 100644 --- a/examples/birmingham/js/map.js +++ b/examples/birmingham/js/map.js @@ -167,10 +167,10 @@ initMap = function() { } } - function startDraw(event) { - vectors.removeFeatures([vectors.features[0]]); - report(event); - } + //function startDraw(event) { + // vectors.removeFeatures([vectors.features[0]]); + // report(event); + //} vectors.events.on({ "beforefeaturemodified" : report,