Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:help:v2:maps:on-demand-create [2019/05/01 09:45]
alpinequest
en:help:v2:maps:on-demand-create [2019/11/04 16:57] (current)
alpinequest
Line 3: Line 3:
 ====== How to create a custom map? ====== ====== How to create a custom map? ======
 \\ \\
-The application uses an XML based format for its maps configuration. Files must have an ''"​**.aqx**"'' ​extention ​and be placed in the ''"​**[application folder]/cache/​custom-maps/​**"''​ folder.+The application uses an XML based format for its maps configuration. Files must have an ''"​**.aqx**"'' ​extension ​and be placed in the ''"​**[application folder]/datastore/​custom-maps/​**"''​ folder ​(you may need to create the ''"​**custom-maps**"''​ sub-folder if it doesn'​t exist).
  
 See [[en:​help:​v2:​settings:​storage#​how_to_locate_the_application_folder|how to locate the application folder here]]. See [[en:​help:​v2:​settings:​storage#​how_to_locate_the_application_folder|how to locate the application folder here]].
Line 23: Line 23:
     <​name>​Standard Mapnik</​name>​     <​name>​Standard Mapnik</​name>​
     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​
-      <​server><​![CDATA[http://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​+      <​server><​![CDATA[https://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​
     </​zoom-levels>​     </​zoom-levels>​
   </​source>​   </​source>​
Line 62: Line 62:
       <​max-threads>​2</​max-threads>​       <​max-threads>​2</​max-threads>​
       <​user-agent>​MyApp</​user-agent>​       <​user-agent>​MyApp</​user-agent>​
-      <​referer><​![CDATA[http://​www.openstreetmap.org/​]]></​referer>​+      ​<​key-url><​![CDATA[https://​www.openstreetmap.org/​key]]></​key-url>​ 
 +      ​<​referer><​![CDATA[https://​www.openstreetmap.org/​]]></​referer>​
       ​       ​
-      <​server><​![CDATA[http://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​ +      <​server><​![CDATA[https://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​ 
-      <​server><​![CDATA[http://​b.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​ +      <​server><​![CDATA[https://​b.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​ 
-      <​server><​![CDATA[http://​c.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​+      <​server><​![CDATA[https://​c.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​
       ​       ​
     </​zoom-levels>​     </​zoom-levels>​
Line 92: Line 93:
     <​name>​Map Layer Example</​name>​     <​name>​Map Layer Example</​name>​
     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​
-      <​server><​![CDATA[http://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​+      <​server><​![CDATA[https://​a.tile.openstreetmap.org/​{$z}/​{$x}/​{$y}.png]]></​server>​
     </​zoom-levels>​     </​zoom-levels>​
   </​source>​   </​source>​
Line 109: Line 110:
     <​name>​Quadtree Map Example</​name>​     <​name>​Quadtree Map Example</​name>​
     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​
-      <​server><​![CDATA[http://​map.example.com/​tiles/​{$q}]]></​server>​+      <​server><​![CDATA[https://​map.example.com/​tiles/​{$q}]]></​server>​
     </​zoom-levels>​     </​zoom-levels>​
   </​source>​   </​source>​
Line 125: Line 126:
     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​
       <​expression set="​my_variable"​ type="​int">​iif( z>10, x*y, x+y )</​expression>​       <​expression set="​my_variable"​ type="​int">​iif( z>10, x*y, x+y )</​expression>​
-      <​server><​![CDATA[http://​map.example.com/​tiles/​{$my_variable}.png]]></​server>​+      <​server><​![CDATA[https://​map.example.com/​tiles/​{$my_variable}.png]]></​server>​
     </​zoom-levels>​     </​zoom-levels>​
   </​source>​   </​source>​
Line 131: Line 132:
  
 The ''"​**set**"''​ attribute defines the name of the custom variable, the ''"​**type**"''​ attribute tells how to display the variable (either ''"​**int**"'',​ ''"​**long**"'',​ ''"​**float**"''​ or ''"​**double**"''​). The ''"​**set**"''​ attribute defines the name of the custom variable, the ''"​**type**"''​ attribute tells how to display the variable (either ''"​**int**"'',​ ''"​**long**"'',​ ''"​**float**"''​ or ''"​**double**"''​).
 +
 +Most common functions and operators can be used, for example ''"​**abs(x)**"'',​ ''"​**sqrt(x)**"'',​ ''"​**hypot(x,​y)**"'',​ ''"​**cos(x)**"'',​ ''"​**charat(str,​index)**"'',​ ''"​**replace(str,​target,​replace)**"'',​ ''"​**deg_to_rad(x)**"'',​ ''"​**dist_eucl(x1,​y1,​x2,​y2)**"'',​ ''"​**md5(str)**"'',​ ''"​**rand_uni()**"'',​ ''"​**quadtree(x,​y,​z)**"'',​ etc.
  
 \\ \\
Line 143: Line 146:
     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​     <​zoom-levels z="​3,​5,​7,​8,​9,​10,​11,​12,​13,​14,​15,​16,​17">​
       <​bbox-crs-code>​EPSG:​4326</​bbox-crs-code>​       <​bbox-crs-code>​EPSG:​4326</​bbox-crs-code>​
-      <​server><​![CDATA[http://​server.example.com/​wms/​Service?​REQUEST=GetMap&​VERSION=1.1.1&​LAYERS=layer&​FORMAT=image/​png&​BBOX={$bbox}&​SRS=EPSG:​4326&​WIDTH=256&​HEIGHT=256]]></​server>​+      <​server><​![CDATA[https://​server.example.com/​wms/​Service?​REQUEST=GetMap&​VERSION=1.1.1&​LAYERS=layer&​FORMAT=image/​png&​BBOX={$bbox}&​SRS=EPSG:​4326&​WIDTH=256&​HEIGHT=256]]></​server>​
     </​zoom-levels>​     </​zoom-levels>​
   </​source>​   </​source>​
Line 170: Line 173:
       <​projection-offset-y>​-800000.0</​projection-offset-y><​!-- optional, default is 0 -->       <​projection-offset-y>​-800000.0</​projection-offset-y><​!-- optional, default is 0 -->
       <​tiles-size>​256</​tiles-size><​!-- optional, default is 256 -->       <​tiles-size>​256</​tiles-size><​!-- optional, default is 256 -->
-      <​tiles-bounds>​104,​80,​527,​423</​tiles-bounds><​!-- optional --> +      <​tiles-bounds>​104,​80,​527,​423</​tiles-bounds><​!-- optional, expressed as "min x,min y,max x,max y" ​--> 
-      <​referer>​http://​server.example.com/​wmts/</​referer><​!-- optional, default is empty --> +      <​referer>​https://​server.example.com/​wmts/</​referer><​!-- optional, default is empty --> 
-      <​server>​http://​server.example.com/​wmts/​{$z}/​{$y}/​{$x}.png</​server>​+      <​server>​https://​server.example.com/​wmts/​{$z}/​{$y}/​{$x}.png</​server>​
     </​zoom-levels>​     </​zoom-levels>​
     ​     ​
Line 182: Line 185:
       <​tiles-size>​256</​tiles-size><​!-- optional, default is 256 -->       <​tiles-size>​256</​tiles-size><​!-- optional, default is 256 -->
       <​tiles-bounds>​208,​160,​1047,​839</​tiles-bounds><​!-- optional -->       <​tiles-bounds>​208,​160,​1047,​839</​tiles-bounds><​!-- optional -->
-      <​referer>​http://​server.example.com/​wmts/</​referer><​!-- optional, default is empty --> +      <​referer>​https://​server.example.com/​wmts/</​referer><​!-- optional, default is empty --> 
-      <​server>​http://​server.example.com/​wmts/​{$z}/​{$y}/​{$x}.png</​server>​+      <​server>​https://​server.example.com/​wmts/​{$z}/​{$y}/​{$x}.png</​server>​
     </​zoom-levels>​     </​zoom-levels>​
     ​     ​

Choose language:

Online help