Pre-configure QGIS with ADS OS Maps API WMS and WMTS
This guide provides useful methods to update the WMS list configuration for your QGIS users. As an administrator, after you initially set up the services on your QGIS following this guide, Configuring QGIS to use OS Maps API WMTS/WMS base maps you can share the configuration with your users by choosing one of the following methods.
Overview of Methods
There are several ways to update WMS configurations in QGIS:
Export and Import via XML: Share pre-configured WMS connections using XML files.
Edit the
QGIS3.iniFile: Directly modify user configuration files for quick updates.
Method 1: Export and Import WMS Connections via XML
Steps to Export WMS Connections
Use the Data Source Manager
Open QGIS
Navigate to Layer > Data Source Manager > WMS/WMTS
Click on the Connections dropdown, select the service you want to export, and click Save
Steps to Import WMS Connections
After creating the xml file, you can provide it to your users so they can load it in their QGIS application
Open QGIS and go to Layer > Data Source Manager > WMS/WMTS.
Click on the Connections dropdown and select Load
Select the
XMLfile you exported previously to import the WMS services.
Method 2: Modify the QGIS3.ini File
This method is suitable for administrators who have access to user profiles and want to update configurations directly.
Locate the QGIS3.ini File
The qgis3.ini usually resides under the default profile of the application, eg:
C:\Users\<username>\AppData\Roaming\QGIS\QGIS3\profiles\default\QGIS\QGIS3.ini
If users have custom profiles, replace default with their profile name.
Edit the File
Open the
QGIS3.inifile in a text editor as an administrator.If you have already configured the services, you will find them under the section
[connections].For example, you should see something similar to thisYou can directly add the following lines to the
QGIS3.inifile of your users. Make sure to replace the parameteryour-organisation-nameandyour-API-keywith your details.ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\authcfg= ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\dpi-mode=0 ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\http-header=@Variant(\0\0\0\b\0\0\0\0) ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\ignore-axis-orientation=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\ignore-get-feature-info-uri=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\ignore-get-map-uri=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\invert-axis-orientation=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\password= ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\reported-layer-extents=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\smooth-pixmap-transform=false ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\tile-pixel-ratio=1 ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\url="https://map.services.astuntechnology.com/your-organisation-name/osmaps/service?key=your-API-key" ows\items\wms\connections\items\ADS%20OS%20MAPS%20WMS\username=Be sure to clear the cache in Qgis and reload it for the change to take effect. You can clear the cache by going to Settings → Options → Network → Cache Settings → Clear Cache