-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
If the first layer loaded is a basemap layer zoom to user's country #63215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
So eg if you start a new project by loading a OSM layer, we zoom to the user's country instead of the globe. This is done by checking the user's operating system locale country and matching to the QGIS world map dataset. There's no location services, reverse geocoding, ip matching or anything privacy sensitive happening!
🪟 Windows Qt6 buildsDownload Windows Qt6 builds of this PR for testing. 🍎 MacOS Qt6 buildsDownload MacOS Qt6 builds of this PR for testing. |
This will obviously not be very handy for:
I think I'd rather have a default extent for new projects, similar to how we have default crs for new projects. |
@uclaros , I think there's space for both ideas. Even a user configurable default extent setting would benefit from a nicer default than the whole world as a starting point :) |
Only global basemaps get the flag, there's no risk there
Those aren't mutually exclusive. This is intended to improve the immediate out-of-the-box user experience, and doesn't rely on any user configuration or knowledge at all. Sure, it doesn't work in all situations... But it's a safe move that WILL improve the situation for a lot of new users. (A user configured default new project extent will only be useful for experienced users, or those with corporate deployments setting this for them) We can always extend later with location services based refined default location, if we decide that it's appropriate and has no user privacy risks. |
This is true for google 3d tiles, but I can see that any xyz_ vectortile and wms get the flag too.
To me, this is removing the minor inconvenience of having to zoom for some users while introducing the minor inconvenience of having to zoom out and potentially zoom in again for some others. The good thing is that users with enUS will not be affected after all, since QT calls the country |
I'm not very keen on introducing this new default behaviour either. I also worry that it could also be an issue for people in illegally occupied or disputed territories. |
@uclaros @agiudiceandrea I would very much like to hear your proposed solutions to improve the first run user experience in this regard. Do you have alternative ideas to advance? |
why not just have pop up that ask the user if he want to zoom or not ? |
I find that zooming to the first opened dataset's extent is good and expected behavior.
Two more things that could slightly improve the experience is fixing some behaviors that are probably bugs:
![]()
![]() |
A nice quality-of-life improvement for 4.0!
Now eg if you start a new project by loading a OSM layer, we zoom to the user's country instead of the globe. This is done by
checking the user's operating system locale country and matching to the QGIS world map dataset. There's no location services,
reverse geocoding, ip matching or anything privacy sensitive happening!
If the first loaded layer is NOT a basemap then we retain the existing logic of zooming to its extent instead.
Peek.2025-09-17.13-46.mp4