mf-geoadmin3 icon indicating copy to clipboard operation
mf-geoadmin3 copied to clipboard

Parameterized call of iFrame: For each layer a flag notooltip in stead of one global flag

Open davidoesch opened this issue 7 years ago • 7 comments

With notooltip=true its possible to globally disable the pop-up of Object-Windows, but its not possible to do that selectively for specific layers.

Feature Request: One flag per layer, analog to layers_visibility.

Use case: For some layer an Object-Window pop-up is the desired behaviour, for other layers the desired behaviour is an event to the parent window.

alternative: May be a better solution: Firering only one event, but in the event data should be contained a list of pairs (layerId/featureId)

your thoughts @gjn @procrastinatio

davidoesch avatar Sep 03 '18 12:09 davidoesch

There is no such thing as iframe parameters. The notooltip parameter also works in map.geo.admin.ch. Features are highlighted, but effetively no tooltip.

No tooltips https://map.geo.admin.ch/?topic=ech&lang=fr&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.bav.haltestellen-oev&E=2598628.26&N=1202194.59&zoom=9&notooltip=true

Same, with tooltips https://map.geo.admin.ch/?topic=ech&lang=fr&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.bav.haltestellen-oev&E=2598628.26&N=1202194.59&zoom=9

We already fire an event which returns a structured object: {layerId: "ch.bafu.hydroweb-messstationen_gefahren", featureId: "2179"}

You may then filter by layer (no effect on tooltips, on

https://codepen.io/procrastinatio/full/eLrGQM/

procrastinatio avatar Sep 12 '18 17:09 procrastinatio

Please read carefully. There is a feature request and there is a bug report:

  1. Feature-Request Skitourenguru adds many KML layers to the base map of Swisstopo. For some of them I want to open the Object-Information, if clicked, for some I don't want the Object-Information to be opened, if clicked. So the best solution would be one flag per layer (like layer-visibility).

  2. Bug-Report: If the user clicks on a location, where many features are stacked one over the other, I expect in the event to get a list of layerId/featureId. That's currently not the case. The event argument contains only one pair of layerId/featueId. You can test that on: https://www.skitourenguru.ch/index.php/skitourenguru2?AGREE=1&ID=100 Make a click somewhere in the map, where a colored triangle is stacked over a colored line. Set a breakpoint in the function onSwisstopoFeatureClick of Skitourenguru.js. You will always see only one pair of layerId/featueId and not two.

smug007 avatar Sep 23 '18 16:09 smug007

ping @procrastinatio @gjn -> can you check the bug report above? -> the feature request is one for RE4

the new event handling can be tested on "Mittlerweile habe ich Skitourenguru komplett umgebaut. ich benutze nun eine Kombination aus OpenTopoMap, Swisstopo-iFrame und Event-Handling. Du kannst dir das hier anschauen: https://www.skitourenguru.ch/index.php/skitourenguru2?AGREE=1 (durch Klick auf ein grünes Dreieck gelangst du zum iFrame mit EventHandling)"

davidoesch avatar Oct 07 '18 16:10 davidoesch

Where can I test the new event handling? On the public server the behavior is still the same: Only one pair of layerId/featueId and not two! Was there a CopyPaste-Error on your last comment.

smug007 avatar Oct 10 '18 13:10 smug007

There is a feature request and there is a bug report:

  1. Feature-Request Skitourenguru adds many KML layers to the base map of Swisstopo. For some of them I want to open the Object-Information, if clicked, for some I don't want the Object-Information to be opened, if clicked. So the best solution would be one flag per layer (like layer-visibility).

  2. Bug-Report: If the user clicks on a location, where many features are stacked one over the other, I expect in the event to get a list of layerId/featureId. That's currently not the case. The event argument contains only one pair of layerId/featueId. Right now that can't be tested anymore, as I switched back to showTooltip=true. If you want a producible scenario, please contact me.

smug007 avatar Nov 19 '18 07:11 smug007

Both, the feature-request and bug-report are still critical to the further development of Skitourenguru.

smug007 avatar Nov 26 '19 16:11 smug007

Prioritized we will look into again

davidoesch avatar Nov 26 '19 17:11 davidoesch