Skip to content

[Bug]: Info button for local baselayers does not work (JS Error) #5838

@meyerlor

Description

@meyerlor

What is the bug? (in English)

I have several orthofotos in my project configured as baselayer (COG .tif)- they work flawless and appear on the map when i switch for example from OpenStreeetMap to one of them. With OSM as Baselayer, i can click on the "i" button next to the "Baselayer" in the legend and the info-box pop's up (where i can control the transparency for example)

When i have an orthofoto active as baselayer, nothing happens when clicking on the "i" - but i do get an JS Error in the browser logs:

Uncaught TypeError: lizMap.mainLizmap.map.getActiveBaseLayer() is undefined
    uicreated switcher-layers-actions.js:390
    jQuery 10
        dispatch
        handle
        add
        add
        ke
        each
        each
        ke
        on
        r
    uicreated switcher-layers-actions.js:386
    triggerEvent OpenLayers.js:497
    init map.js:3599
    init map.js:3253
    <anonymous> map.js:3698
    jQuery 9
        e
        t
        setTimeout handler*Deferred/then/l/<
        c
        add
        then
        Deferred
        then
        ready
    <anonymous> map.js:3681
    <anonymous> map.js:3700
switcher-layers-actions.js:390:66
    uicreated switcher-layers-actions.js:390
    jQuery 10
    uicreated switcher-layers-actions.js:386
    triggerEvent OpenLayers.js:497
    init map.js:3599
    InterpretGeneratorResume self-hosted:1425
    AsyncFunctionNext self-hosted:800
    (Async: async)
    init map.js:3253
    <anonym> map.js:3698
    jQuery 9
    <anonym> map.js:3681
    <anonym> map.js:3700

Image

Steps to reproduce the issue

  1. Select a rasterimage as baselayer
  2. Click on th "i" next to "Baselayers" in the legend
  3. Nothing happens (See JS error)

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.8.10 - commit 396b587 396b58729
  • Lizmap plugin : 4.5.1
  • QGIS Desktop : 3.40.7
  • QGIS Server : 3.40.7
  • Py-QGIS-Server or QJazz : not used
  • QGIS Server plugin atlasprint : 3.4.2
  • QGIS Server plugin lizmap_server : 2.13.1
  • QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* altiProfil : 0.5.9 * altiProfilAdmin : 0.5.9
List of safeguards :
* Mode : normal
* Allow parent folder : no
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

  • I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

Operating system

ubuntu 24.04

Browsers

Firefox

Browsers version

firefox 120

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions