Skip to content
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

Different zoomlevels Mobile and Desktop #291

Open
vvmruder opened this issue Sep 24, 2021 · 1 comment
Open

Different zoomlevels Mobile and Desktop #291

vvmruder opened this issue Sep 24, 2021 · 1 comment

Comments

@vvmruder
Copy link

Hi

I was trying several things. But can't achieve what I wanted, so I ask here.

Problem:
Initial zoom level (extent+scales) of a Theme is defined once in the themes.json. The application starts well on the right extent. On desktop theme content is centered and zoomed well. On mobile devices (small screen) the application shows a small part of the map because the extent and max zoom level does not allow anything else. It would be nice to see the whole extent of the theme also on mobile. But this would mean to have a really zoomed out behavior on desktop. This is also connected to the home button which brings back the initial view.

Questions:

  1. Is there a solution already which I don't see?
  2. Could we think about offering different configs for mobile and desktop? At least regarding to the zoom levels?

Thank you for having a look.

Regards
Clemens

@chrisjsimpson
Copy link

chrisjsimpson commented Feb 1, 2022

Hi @vvmruder

Is there a solution already which I don't see?
I also have this question

At the moment I can see it can be overcome using the following method, which may be useful to you/others:

Important parameters for zoom:

"c" is for coordinates, e.g: c=-514492%2C6497455
Note: "%2C" is a space in urlencoding.

"s" is for scale.

Docs: https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#url-parameters

Important url parameters for zoom:

"c" is for coordinates, e.g: c=-514492%2C6497455
Note: "%2C" is a space in urlencoding.

"s" is for scale.

Docs: https://github.com/qgis/qwc2-demo-app/blob/master/doc/QWC2_Documentation.md#url-parameters

There's also preserveExtentOnThemeSwitch

If there's better ways I'm also missing please feel free to correct me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants