kartoza / SAGTA

SAGTA Map downloader and other
GNU General Public License v3.0
0 stars 1 forks source link

overview map broken #43

Closed gubuntu closed 2 years ago

gubuntu commented 2 years ago

The overview map is supposed to show the whole country, not be zoomed in like this

Screenshot 2022-03-03 at 16 43 46

this is on the hybrid map on the staging site.

check all the other maps too.

seabilwe commented 2 years ago

Problem

The overview map is supposed to show the whole country, not be zoomed in.

From what I can gather, the overview map is taking the extent of the layer in the map canvas, and not showing the full extent of South Africa. The Lizmap configurations for both staging and production are the same.

From this link: https://docs.lizmap.com/3.2/en/publish/advanced_lizmap_config.html, Lizmap is supposed to automatically take up the extent of the layer in the Overview group.

Here are some of the tickets I came across where individuals had a similar issue. https://github.com/3liz/lizmap-web-client/issues/686 https://github.com/3liz/lizmap-web-client/issues/692 https://github.com/3liz/lizmap-web-client/issues/768

Solution

https://gis.stackexchange.com/questions/88859/how-to-show-world-map-with-lizmap In this case, the extents for the both staging and production are the same as well. The group settings for the overview map in staging and production are the same.

Another alternative could be to remove the overview group in staging for all three projects and add it again to see if it will make a difference with fixing the extent.

seabilwe commented 2 years ago

Solution 2

Another alternative could be to remove the overview group in staging for all three projects and add it again to see if it will make a difference with fixing the extent.

I have used the alternative method, but the overview map remains in its zoomed extent (i.e., when viewing the staging site).

@gubuntu @NyakudyaA

seabilwe commented 2 years ago

From what @NyakudyaA was able to find

The overview map is somehow linked to map scales defined in the project. As shown in the picture, this is with a final scale of, 45000000 defined in the scales. overview

With a max scale defined as, 250000 you are only able to preview the following max-scale

It seems they might have been some changes in the code in which overview maps are being interpreted. It could be that in prior versions the extent of the overview was being defined using the extent defined in the project properties in QGIS Server tab, but now it is linked directly to the maximum visible scale. So if your maximum scale is 5k you will never be able to see the full extent of SA because SA will look like a dot at that scale.

gubuntu commented 2 years ago

If it really is a change in LizMap code please log a bug report

seabilwe commented 2 years ago

Bug reported: https://github.com/3liz/lizmap-web-client/issues/2837

NyakudyaA commented 2 years ago

@gubuntu It seems like https://www.3liz.com/en/news/lizmap-web-client-3-5.html specifies that this change was sponsored and activated in lizmap 3.5. Should we keep it as it is or remove it considering that this won't change going forward

gubuntu commented 2 years ago

@NyakudyaA @seabilwe I think disable the overview map if you can't figure out a way to make it useful in our context

gubuntu commented 2 years ago

This is fixed so keep disabled until 3.5.3 deployed then re-enable

https://github.com/3liz/lizmap-web-client/issues/2837#issuecomment-1090100503

seabilwe commented 2 years ago

@NyakudyaA , if I'm not mistaken LizMap is now at 3.6.0, is it safe to add the overview map back again?

NyakudyaA commented 2 years ago

On staging, it should already be using a version that allows us to have the overview. I will also update staging to 3.6 and test if nothing is broken as well

NyakudyaA commented 2 years ago

![Uploading over-view.png…]()