{"id":452,"date":"2025-02-12T11:35:56","date_gmt":"2025-02-12T11:35:56","guid":{"rendered":"https:\/\/www.acugis.com\/gis-tutorials\/?page_id=452"},"modified":"2025-02-12T11:35:56","modified_gmt":"2025-02-12T11:35:56","slug":"qwc2-basemap-switcher","status":"publish","type":"page","link":"https:\/\/www.acugis.com\/gis-tutorials\/qwc2-tutorials\/qwc2-basemap-switcher\/","title":{"rendered":"QWC2: Basemap Switcher"},"content":{"rendered":"\n<p>To use the Basemap switcher and select Basemap, follow below.<\/p>\n\n\n\n<p>In our demonstration, we&#8217;ll be using OpenStreetMap, Carto Light, and ESRI Satellite.<\/p>\n\n\n\n<p>Open t<strong>hemesConfig.json<\/strong> for the Tenant using vi or WinSCP or text editor<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/var\/www\/qwc2\/config-in\/TENANT_NAME\/themesConfig.json<\/pre>\n\n\n\n<p>Update <strong>defaultBackgroundLayers <\/strong>section:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"defaultBackgroundLayers\": [\n    {\n      \"name\": \"mapnik\",\n      \"visibility\": true\n    },\n    {\n      \"name\": \"carto\"\n    },\n    {\n      \"name\": \"esri\"\n    }\n  ],<\/pre>\n\n\n\n<p>Add\/Update <strong>backgroundLayers <\/strong>section:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"json\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"backgroundLayers\": [\n            {\n                \"name\": \"mapnik\",\n                \"title\": \"Open Street Map\",\n                \"type\": \"osm\",\n                \"source\": \"osm\",\n                \"thumbnail\": \"mapnik.jpg\",\n                \"attribution\": \"OpenStreetMap contributors\",\n                \"attributionUrl\": \"https:\/\/www.openstreetmap.org\/copyright\"\n            },\n            {\n                \"name\": \"carto\",\n                \"title\": \"Carto Light\",\n                \"type\": \"xyz\",\n                \"url\": \"https:\/\/{1-4}.basemaps.cartocdn.com\/light_all\/{z}\/{x}\/{y}.png\",\n                \"thumbnail\": \"carto.jpg\",\n                \"attribution\": \"CartoDB with OpenStreetMap contributors\",\n                \"attributionUrl\": \"https:\/\/www.openstreetmap.org\/copyright\"\n            },\n            {\n                \"name\": \"esri\",\n                \"title\": \"ESRI Satellite\",\n                \"type\": \"xyz\",\n                \"url\": \"https:\/\/server.arcgisonline.com\/ArcGIS\/rest\/services\/World_Imagery\/MapServer\/tile\/{z}\/{y}\/{x}.png\",\n                \"thumbnail\": \"esri.jpg\",\n                \"attribution\": \"ESRI with OpenStreetMap contributors\",\n                \"attributionUrl\": \"https:\/\/www.openstreetmap.org\/copyright\"\n            }\n        ],<\/pre>\n\n\n\n<p>Place the thumbnail image for your basemaps in:<\/p>\n\n\n\n<p><strong>\/var\/www\/qwc2\/html\/assets\/img\/mapthumbs<\/strong><\/p>\n\n\n\n<p>Run the QWC2 Configuration utility.<\/p>\n\n\n\n<p>Your Basemap switcher should now appear as below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"595\" height=\"154\" src=\"https:\/\/www.acugis.com\/gis-tutorials\/wp-content\/uploads\/2025\/02\/baselayers.png\" alt=\"\" class=\"wp-image-454\" srcset=\"https:\/\/www.acugis.com\/gis-tutorials\/wp-content\/uploads\/2025\/02\/baselayers.png 595w, https:\/\/www.acugis.com\/gis-tutorials\/wp-content\/uploads\/2025\/02\/baselayers-300x78.png 300w\" sizes=\"auto, (max-width: 595px) 100vw, 595px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>To use the Basemap switcher and select Basemap, follow below. In our demonstration, we&#8217;ll be using OpenStreetMap, Carto Light, and ESRI Satellite. Open themesConfig.json for the Tenant using vi or WinSCP or text editor Update defaultBackgroundLayers section: Add\/Update backgroundLayers section: Place the thumbnail image for your basemaps in: \/var\/www\/qwc2\/html\/assets\/img\/mapthumbs Run the QWC2 Configuration utility. Your &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.acugis.com\/gis-tutorials\/qwc2-tutorials\/qwc2-basemap-switcher\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;QWC2: Basemap Switcher&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":236,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-452","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/pages\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/comments?post=452"}],"version-history":[{"count":2,"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/pages\/452\/revisions"}],"predecessor-version":[{"id":455,"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/pages\/452\/revisions\/455"}],"up":[{"embeddable":true,"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/pages\/236"}],"wp:attachment":[{"href":"https:\/\/www.acugis.com\/gis-tutorials\/wp-json\/wp\/v2\/media?parent=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}