Closed UnoRed1 closed 5 years ago
I don't know what do you mean with empty layer. You have to put some data in QGIS project and reference it in database table projects. Some notes:
Eqwc.settings.numZoomLevels = 22; It works. Thanks!
Is it possible to limit the scale in the opposite direction to 1: 565?
I want to limit the maximum zoom of 1:71, and the minimum zoom is 1: 565.
It should, just put lower number
If set Eqwc.settings.numZoomLevels = 4;
The zoom range is from 1: 591995847 to 1: 73999481.
In the QWC in GlobalOptions.js there are such parameters: maxScale: 250, minScale: 80000,
Are there any similar parameters in EQWC?
It isn't, I will check reason and add it if needed. Did you set your start extent from QGIS project properties https://github.com/uprel/gisapp/wiki/5.1.-QGIS#ows-server---wms-capabilities And then set restrict_to_start_extent for that project in gisapp to true.
I set up the "Advertised extent" and set "Use layer ids as names" in the properties of the QGIS project. Then in the "projects" table, set "restrict_to_start_extent" = TRUE.
restrict_to_start_extent is working, but I still can zoom out far.
The ability to limit the scale will be useful. Please add this feature if possible.
Can you confirm whether you are using only qgis project and no baselayers from database.
I only use the QGIS project. I disabled baselayers in the "projects" table.
I have another second project that uses baselayer OSM.
I want to make the scale limit only for the first project.
To limit zoom out for projects without baselayers and with set restriction to start extent = true follow this:
geoExtMap.map.getResolution()
Add maxResolution: VALUE FROM CONSOLE
It works, but in DEBUG mode on the map my vector layers from the PostgreSQL database are not displayed.
Do I need to update gisapp?
No, it should be working. Do you get any errors in console window (when you open developers window with F12)?
I rechecked.
I have two projects. One with the baselayer, the other without the baselayer.
I wanted to set maxScale/minScale for a project without a baselayer. It works well in Debug Mode. All layers are displayed.
But in a project where there is a baselayer, no other layers are displayed. Neither from PostgreSQL, nor from the disk.
In the browser console, only " util.js:229 Google Maps API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys " But this message appears in both cases. And when Debug mode is on and when it is off.
OK, so no errors. More possible reasons for your problem, but nr. 1 to check is that you must save your QGIS project in same coordinate system than your base layer (same EPSG code). You don't get errors for that but data is just not positioned correctly. Can you open table for your layers and see attributes or nothing? If nothing then maybe some permissions issue. Check Apache and PostgreSQL logs in that case.
The QGIS project is saved in EPSG: 3857. Baselayer - OSM_Mapnik. Attribute tables are opened - they contain data.
"Zoom to layer extent" does not work. As if the layers have become invisible.
And if you zoom to one of the feature from table. What happens?
Something is with your data. Check PostgreSQL log file for any errors
My layers are just invisible. On the screen only baselayer.
In postgresql.log: An existing connection was forcibly closed by the remote host.
But this message appears in both cases. And when it works and when it does not work.
OK, no errors also here. Still you have to explore this more to understand where is the problem. I would:
Excuse me. I did not understand. How to do this:
clear all cache here http://localhost/gisapp/admin/cache.php
Can you open this page? Just change localhost if necessary, to IP of your server. When page is opened, hit on top of page "Clear all cache"
Since commit 3123ca1ef0c944c2490fcefe452f793d2b64a0c7 restrict to start extent option will also block zooming out map. Workaround described above is not needed anymore. This will be included in release 1.8
The maximum scale is 1: 282. How to do more?
I disabled the OSM layer in the Project table. This layer is not needed.
I tried to create an empty layer and set numZoomLevels. But it did not help. Infinite "LoadingMap" ...