Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
en:help:v2:maps:on-demand-create [2021/05/03 18:00] – [Basic example] alpinequest | en:help:v2:maps:on-demand-create [2021/07/22 21:55] – alpinequest |
---|
<description>© OpenStreetMap</description> | <description>© OpenStreetMap</description> |
| |
<source id="MAP01"> | <source id="MAP_UID"> |
<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"> |
Note that the application will recognize the ''**{$x}**'', ''**{$y}**'' and ''**{$z}**'' variable and replace them with correct values. | Note that the application will recognize the ''**{$x}**'', ''**{$y}**'' and ''**{$z}**'' variable and replace them with correct values. |
| |
The source ''"**id**"'' field must be unique in the file, and should contain only characters and numbers. It is used internally by the application to identify the data storage of the map. | The source ''"**id**"'' field must be unique in the file, and should only contain characters and numbers. It is used internally by the application to identify the data storage of the map. |
| |
\\ | \\ |
<description>© OpenStreetMap</description> | <description>© OpenStreetMap</description> |
| |
<source id="MAP01" type="topo"> | <source id="MAP_UID" type="topo"> |
| |
<name>Standard Mapnik</name> | <name>Standard Mapnik</name> |
The ''**<user-agent>**'' and ''**<referer>**'' tags allow you to specify what is sent in the HTTP get headers when contacting the map server. | The ''**<user-agent>**'' and ''**<referer>**'' tags allow you to specify what is sent in the HTTP get headers when contacting the map server. |
| |
| \\ |
| |
==== Map layer ==== | ===== Map layer ===== |
\\ | \\ |
The difference between regular maps and map layers is that a map layer is added over the current map when being selected. This is usually used for maps having a transparent background. Here is how to define a map layer: | The difference between regular maps and map layers is that a map layer is added over the current map when being selected. This is usually used for maps having a transparent background. Here is how to define a map layer: |
| |
<code xml> | <code xml> |
<source id="LAYER01" layer="true" opacity="50"> | <source id="MAP_UID" layer="true" opacity="50"> |
<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"> |
| |
<code xml> | <code xml> |
<source id="MAP02"> | <source id="MAP_UID"> |
<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[https://map.example.com/tiles/{$q}]]></server> | <server><![CDATA[https://map.example.com/tiles/{$q}]]></server> |
| </zoom-levels> |
| </source> |
| </code> |
| |
| \\ |
| |
| ===== Force a particular map projection ===== |
| \\ |
| By default, the application uses the "WGS 84 / Pseudo-Mercator" (EPSG:3857) map projection. You can force a different map projection using the ''**<projection-code>**'' tag: |
| |
| <code xml> |
| <source id="MAP_UID_1"> |
| <name>KKJ/4 Projection</name> |
| <zoom-levels z="3,5,7,8,9,10,11,12,13,14,15,16,17"> |
| <projection-code>EPSG:2394</projection-code> |
| <server><![CDATA[https://map.example.com/tiles/{$z}/{$x}/{$y}]]></server> |
| </zoom-levels> |
| </source> |
| </code> |
| |
| In case you want to use map projection which is not known by the application, you can import its WKT definition: |
| |
| <code xml> |
| <import-ogc-wkt-def code="MY_2394_DEF">PROJCS["KKJ / Finland zone 4",GEOGCS["KKJ",DATUM["Kartastokoordinaattijarjestelma_1966",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],AUTHORITY["EPSG","6123"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4123"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",30],PARAMETER["scale_factor",1],PARAMETER["false_easting",4500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2394"],AXIS["Y",EAST],AXIS["X",NORTH]]</import-ogc-wkt-def> |
| <source id="MAP_UID_2"> |
| <name>KKJ/4 Projection</name> |
| <zoom-levels z="3,5,7,8,9,10,11,12,13,14,15,16,17"> |
| <projection-code>MY_2394_DEF</projection-code> |
| <server><![CDATA[https://map.example.com/tiles/{$z}/{$x}/{$y}]]></server> |
</zoom-levels> | </zoom-levels> |
</source> | </source> |
| |
<code xml> | <code xml> |
<source id="MAP04"> | <source id="MAP_UID"> |
<name>WMS Map Example</name> | <name>WMS 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"> |
<import-ogc-wkt-def code="EPSG:4218">GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]]</import-ogc-wkt-def> | <import-ogc-wkt-def code="EPSG:4218">GEOGCS["Bogota 1975",DATUM["Bogota_1975",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[307,304,-318,0,0,0,0],AUTHORITY["EPSG","6218"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4218"]]</import-ogc-wkt-def> |
| |
<source id="MAP05"> | <source id="MAP_UID"> |
<name>WMTS Map Example</name> | <name>WMTS Map Example</name> |
| |
| |
<code xml> | <code xml> |
<source id="MAP03"> | <source id="MAP_UID"> |
<name>Custom Variables Map Example</name> | <name>Custom Variables 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"> |
<param name="key">8451-5814-5311</param> | <param name="key">8451-5814-5311</param> |
| |
<source id="MAP01"> | <source id="MAP_UID_1"> |
<name>Map 1</name> | <name>Map 1</name> |
<zoom-levels z="5,6,7,8,9,10,11,12,13,14,15"> | <zoom-levels z="5,6,7,8,9,10,11,12,13,14,15"> |
</source> | </source> |
| |
<source id="MAP02"> | <source id="MAP_UID_2"> |
<name>Map 2</name> | <name>Map 2</name> |
<zoom-levels z="5,6,7,8,9,10,11,12,13,14,15"> | <zoom-levels z="5,6,7,8,9,10,11,12,13,14,15"> |