The support forum is temporarily read-only. For urgent requests, please email contact[at]psyberia.net

[closed] How to configure aqx file to open two maps simultaneously?

Any question about the app? Ask it here
Post Reply
Jochem
Posts: 15
Joined: Wed Oct 09, 2019 6:36 am

[closed] How to configure aqx file to open two maps simultaneously?

Post by Jochem »

Hi,

I'm creating aqx files to view open data from the governmental geoportal of the Netherlands. Some maps are best used as layer on top of another map. For myself it is no problem to just open a map and then add one ore more layers. However, when I will share the aqx files, other users might not be aware what maps to combine and how. Is there a way to configure the aqx file in such way that a map is opened together with a second map as layer on top, instead of opening them one by one?

For example, the railway information is supplied in 5 layers, which the WMS tile server can combine into one layer (1st map in code below). However, I can't add the Orthophoto (2nd map in code below) in the same way since it uses a different URL. When using the WMTS tile server, all have the same URL. However, the WMTS protocol seems to support just a single layer for one GetTile command.

Kind regards, Jochem

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<aqx version="9">

  <name>Netherlands Maps by pdok.nl</name>
    
  <source id="railway" layer="true">
  
    <name>Railways</name>
    
    <zoom-levels z="10,11,12,13,14,15,16,17,18">
    
      <clear-color r="255" g="255" b="255" />

      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/spoorwegen/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=spooras,wissel,kruising,station,overweg&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&styles=spoorwegen:Spooras,spoorwegen:Wissel,spoorwegen:Kruising,spoorwegen:Station,spoorwegen:Overweg]]></server>

    </zoom-levels>
    
  </source>

  <source id="ortho">
 
    <name>Orthophoto</name>
    
    <zoom-levels z="10,11,12,13,14,15,16,17,18">
    
      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/luchtfoto/rgb/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=Actueel_ortho25&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&STYLES=default]]></server>

    </zoom-levels>
    
  </source>

</aqx>
Psyberia-Support
Site Admin
Posts: 6408
Joined: Wed Apr 14, 2010 9:41 pm

Re: How to configure aqx file to open two maps simultaneously?

Post by Psyberia-Support »

Hi Jochem,

Here is how to define a map made of 2 other maps from the same file:

Code: Select all

	<composite-source id="composite1" type="hybrid">
		<name>Railway Map</name>
		<layer id="ortho"/>
		<layer id="railway"/>
	</composite-source>
Let me know if you have any troubles
Do you like AlpineQuest ? Leave a small comment on Google Play !
Jochem
Posts: 15
Joined: Wed Oct 09, 2019 6:36 am

Re: How to configure aqx file to open two maps simultaneously?

Post by Jochem »

Hi,

Thanks for the quick and helpful response. It works fine.

Just a minor issue I noticed when using the <preview-location> is that it seems that only the first, bottom, layer is shown in the preview.

Speaking of the preview and now getting really into minor details: I find it hard to select a nice area of a map for the preview, as it is unpredictable what area I will get. For instance, when I select the same preview coordinates and only change the zoom level (see code below), sometimes I get a preview of the area north of the coordinates and sometimes an area south of the coordinates.

There's no need to put a lot of effort in this, but if there is some easy explanation or solution for this, I'm interested.

Kind Regards, Jochem

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<aqx version="9">

  <name>Netherlands Maps by pdok.nl</name>
    
  <source id="railway1">
  
    <name>Railways 1</name>

    <preview-location>5.1154,52.0874,8</preview-location>

    <zoom-levels z="8">
    
      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/spoorwegen/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=spooras,wissel,kruising,station&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&styles=spoorwegen:Spooras,spoorwegen:Wissel,spoorwegen:Kruising,spoorwegen:Station]]></server>

    </zoom-levels>

  </source>

  <source id="railway2">
  
    <name>Railways 2</name>
    
    <preview-location>5.1154,52.0874,9</preview-location>

    <zoom-levels z="9">

      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/spoorwegen/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=spooras,wissel,kruising,station&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&styles=spoorwegen:Spooras,spoorwegen:Wissel,spoorwegen:Kruising,spoorwegen:Station]]></server>

    </zoom-levels>

  </source>

  <source id="railway3">
  
    <name>Railways 3</name>
    
    <preview-location>5.1154,52.0874,10</preview-location>

    <zoom-levels z="10">
    
      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/spoorwegen/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=spooras,wissel,kruising,station&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&styles=spoorwegen:Spooras,spoorwegen:Wissel,spoorwegen:Kruising,spoorwegen:Station]]></server>

    </zoom-levels>

  </source>
 
 <source id="railway4">
  
    <name>Railways 4</name>
    
    <preview-location>5.1154,52.0874,11</preview-location>

    <zoom-levels z="11">
    
      <bbox-crs-code>EPSG:4326</bbox-crs-code>
      
      <server><![CDATA[https://geodata.nationaalgeoregister.nl/spoorwegen/wms?service=wms&REQUEST=GetMap&VERSION=1.1.1&FORMAT=image/png&BBOX={$bbox}&LAYERS=spooras,wissel,kruising,station&SRS=EPSG:4326&WIDTH=256&HEIGHT=256&styles=spoorwegen:Spooras,spoorwegen:Wissel,spoorwegen:Kruising,spoorwegen:Station]]></server>

    </zoom-levels>

  </source>

</aqx>
Psyberia-Support
Site Admin
Posts: 6408
Joined: Wed Apr 14, 2010 9:41 pm

Re: How to configure aqx file to open two maps simultaneously?

Post by Psyberia-Support »

Hi again,
Concerning the preview, yes when you specify a preview location only the base layer is shown.
Also, as you've seen, the preview location is approximate. The preview is actually based on tiles, and the application will choose the one that contain the specified location.

However here is something that can fix your 2 problems: instead of using a preview location, you can specify a preview URL (for example on a public dropbox or drive):

Code: Select all

<preview-url>https://any-url</preview-url>
Size >= 512 x 256px (w x h) recommended.
Do you like AlpineQuest ? Leave a small comment on Google Play !
Post Reply