andreaordonselli / qgis2o.gis

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

zoom to extend #21

Open jukos opened 1 week ago

jukos commented 1 week ago

Hello, the function “zoom to extend” is not displayed. How can I display it? How can I display it on mobile? Best regards

Version 2.23

andreaordonselli commented 1 week ago

Do you mean "zoom to extent"? image

In desktop view it should be visible in each vector layer by default. In the smartphone view, since there is little space in the layerswitcher, I disabled it, do you want to re-enable it?

jukos commented 1 week ago

Do you mean "zoom to extent"?

Yes

In desktop view it should be visible in each vector layer by default.

Unfortunately not.

In the smartphone view, since there is little space in the layerswitcher, I disabled it, do you want to re-enable it?

Yes, I would like to see this to test it for myself.

andreaordonselli commented 1 week ago

You should send me your qgis project to understand why the "zoom to extent" button does not appear. To reactivate the elements in the smartphone view follow this issue https://github.com/andreaordonselli/qgis2o.gis/issues/15

To view "zoom to extent" you must write:

.ol-touch .layerExtent {
        display: inline-table;
        right: ..... px;
    }
jukos commented 1 week ago

It doesn't matter what I do. Different QGIS versions, different projects, new test project with one layer, tests on various browsers. No display of zoom to extent.

andreaordonselli commented 5 days ago

Many thanks for your report. The bug is expected to be fixed in the next release. For now you can find this code in the o.gis.js file and modify it

before:

    map.once('rendercomplete', function(layer) {
        setLayersExtent(); 
    });

after:

    map.once('rendercomplete', function(layer) {
        setLayersExtent(); 
        layerSwitcher.drawPanel(); 
    });