andreaordonselli / qgis2o.gis

Make O.GIS - Open Source WebGIS
https://opengis.it
GNU General Public License v2.0
14 stars 0 forks source link

Button "Legend" Tablet #23

Open jukos opened 1 week ago

jukos commented 1 week ago

Hello, I can see the “Legend” button on my tablet (Android 11; Chrome browser). It is not displayed on the smartphone. How can I hide “Legend” on my tablet? Best regards legend button tablet

andreaordonselli commented 1 week ago

If you produced the map using the latest version of the software, the problem should not arise. Can you please clear the tablet's browser cache and reopen the map?

jukos commented 1 week ago

I have deleted the entire browser cache and also restarted the tablet. No change. Of course, I can't say whether this is because the tablet is already a few years old. I don't want to rule it out. It is project-independent, because your demo map is also displayed with the legend button on the tablet. Version 2.23

andreaordonselli commented 1 week ago

It happens when Do you start the map or after opening / closing the layerswitcher?

andreaordonselli commented 1 week ago

Try making this change to the resources/o.gis/o.gis.js file Find this

if (!isSmallScreen && !hasTouchScreen) {
    $('.ol-layerswitcher > button').on('click', function() {
        toggleLegendAttribution();
    });
}

and replace with this

$('.ol-layerswitcher > button').on('click', function() {
    toggleLegendAttribution();
});
jukos commented 1 week ago

Excuse me, in which line of code can I find the code? (approximately)

It happens when Do you start the map or after opening / closing the layerswitcher?

Always visible.

jukos commented 1 week ago

The code is not available. I suspect a problem with 2.23? I found it in an older export test file. edit: That must have been version 2.22: No problems with the tablet display.

andreaordonselli commented 1 week ago

Please, check from line 1921 to 1925 in version 2.23

jukos commented 1 week ago

The code is missing. No code after row 1911

code end at row 1911

jukos commented 1 week ago

I have now redownloaded and reinstalled the extension. The code is now there. I will test.....

jukos commented 1 week ago

Works. Many thanks!

The cause must have been a faulty download of version 2.23. Sounds unlikely, but it was probably the case.