qgis / qwc2-demo-app

QWC2 demo application
Other
243 stars 155 forks source link

How do I center to extent defined in qgs file #382

Closed ndethi closed 2 years ago

ndethi commented 2 years ago

How do i make themesConfig.json pick the extent defined in the qgs file and have it center the extent instead of centering the entire map, which leaves the extent a drift to the right of the viewport?

Tried editing the config.json file to no avail? Alternatively where would I pass $st parameter on default load of page so it loads the search result by default on visiting the client?

manisandro commented 2 years ago

The themesConfig.js script (or the counterpart in the qwc-config-generator) will read the extent specified in the QGIS project properties if one is set:

image

So you can specify your desired extent there.