geoadmin / mf-geoadmin3

Legacy source code of map.geo.admin.ch
https://map.geo.admin.ch
Other
227 stars 72 forks source link

showTooltip Parameter does not work #4474

Closed gjn closed 5 years ago

gjn commented 6 years ago

showTooltip=false still shows tooltip when clicking the map. It should not, as noted in the help of geoadmin.

https://map.geo.admin.ch/?showTooltip=false&lang=en&topic=ech&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.swisstlm3d-wanderwege,ch.kantone.cadastralwebmap-farbe&layers_visibility=false,true&E=2638855.95&N=1229318.83&zoom=7

gjn commented 6 years ago

Or Am I misunderstadning the parameter?

procrastinatio commented 6 years ago

Apparently, the showTooltiphas no effect on WMS layer, as ,ch.kantone.cadastralwebmap-farbe, ans GeoJSON, as bikesharing

davidoesch commented 5 years ago

ping @gjn this works as defined see procastrinatio

procrastinatio commented 5 years ago

See also https://github.com/geoadmin/mf-geoadmin3/issues/4487

pakb commented 5 years ago

showTooltip is only taken into account if the URL is using a layerBodId=featureId syntax, and not with a layers=...&X=...&Y=... syntax.

working as intended with tooltip on : https://map.geo.admin.ch/?ch.bav.haltestellen-oev=8500010&showTooltip=true working as intended with tooltip off : https://map.geo.admin.ch/?ch.bav.haltestellen-oev=8500010&showTooltip=false param showTooltip ignored : https://map.geo.admin.ch/?showTooltip=true&layers=ch.bav.haltestellen-oev&E=2611363.00&N=1266308.00&zoom=9

looks good to me, but maybe I misunderstood something in the doc?

pakb commented 5 years ago

@gjn do you mean that, if showTooltip=false, any click on anything in this instance of map should not show a tooltip? Isn't it an init phase only param?

davidoesch commented 5 years ago

ping @gjn

gjn commented 5 years ago

Yes, I was wrong. showTooltip is for initial load of map only.

We would need another parameter to dusable tooltip altogether.

I propose 'disableTooltip' parameter (default = false). This feature has been asked mainly from iframe users like meteoschweiz.

I'lk adapt the op.