Pre-configure QGIS with ADS OS Maps API WMS and WMTS

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:

  1. Export and Import via XML: Share pre-configured WMS connections using XML files.

  2. Edit the QGIS3.ini File: Directly modify user configuration files for quick updates.

Method 1: Export and Import WMS Connections via XML

Steps to Export WMS Connections

  1. Use the Data Source Manager

    1. Open QGIS

    2. Navigate to Layer > Data Source Manager > WMS/WMTS

    3. Click on the Connections dropdown, select the service you want to export, and click Save

      qgis-ltr-bin_wK3O0oecSz.png

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

  1. Open QGIS and go to Layer > Data Source Manager > WMS/WMTS.

  2. Click on the Connections dropdown and select Load

    qgis-ltr-bin_FBluydrT0g.png

     

  3. Select the XML file 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

  1. Open the QGIS3.ini file in a text editor as an administrator.

  2. If you have already configured the services, you will find them under the section [connections]. For example, you should see something similar to this

     

    Photos_d3kMuNixhX.png

     

  3. You can directly add the following lines to the QGIS3.ini file of your users. Make sure to replace the parameter your-organisation-name and your-API-key with 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=
  4. 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


    qgis-ltr-bin_WIJ5YKpI3V.png