AQX Problem
Posted: Tue May 29, 2012 2:10 pm
Hi I am trying to define a mapsource in AQX format but always get parsing errors ( maybe there are redundant or not needed sections and maybe it will not work as intended but primarily I would like to understand the syntax (problems)
here my testfile:
<?xml version="1.0" encoding="utf-8" ?>
<aqx version="1">
<name>Bing Virtual Earth</name>
<description>http://www.bing.com</description>
<source id="BING_VE">
<name>Bing Virtual Earth</name>
<data-source>http://www.bing.com</data-source>
<copyright>Microsoft.com</copyright>
<level type="expr">
<zoom-values>1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19</zoom-values>
<expressions>
<expr set="nb_tiles">pow( 2, z )</expr>
<expr set="tile_id" type="int">quadtree( x, y, z )</expr>
<expr set="reverse_y" type="int">nb_tiles - y</expr>
<expr set="map_type">"a"</expr>
<expr set="url_append">"?g=45"</expr>
<expr set="server">"ortho.tiles.virtualearth.net/tiles"</expr>
</expressions>
<projection>
<projection-name>mercator</projection-name>
<projection-geoid>sphere</projection-geoid>
<projection-origin-x>0</projection-origin-x>
<projection-origin-y>0</projection-origin-y>
<projection-factor-x>nb_tiles / 360</projection-factor-x>
<projection-factor-y>nb_tiles / 360</projection-factor-y>
<projection-offset-x>nb_tiles / 2</projection-offset-x>
<projection-offset-y>nb_tiles / 2</projection-offset-y>
</projection>
<tiles>
<tiles-size-x>256</tiles-size-x>
<tiles-size-y>256</tiles-size-y>
</tiles>
<servers>
<max-threads>2</max-threads>
<server>http://{$map_type}0.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}1.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}2.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}3.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
</servers>
</level>
</source>
</aqx>
here my testfile:
<?xml version="1.0" encoding="utf-8" ?>
<aqx version="1">
<name>Bing Virtual Earth</name>
<description>http://www.bing.com</description>
<source id="BING_VE">
<name>Bing Virtual Earth</name>
<data-source>http://www.bing.com</data-source>
<copyright>Microsoft.com</copyright>
<level type="expr">
<zoom-values>1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19</zoom-values>
<expressions>
<expr set="nb_tiles">pow( 2, z )</expr>
<expr set="tile_id" type="int">quadtree( x, y, z )</expr>
<expr set="reverse_y" type="int">nb_tiles - y</expr>
<expr set="map_type">"a"</expr>
<expr set="url_append">"?g=45"</expr>
<expr set="server">"ortho.tiles.virtualearth.net/tiles"</expr>
</expressions>
<projection>
<projection-name>mercator</projection-name>
<projection-geoid>sphere</projection-geoid>
<projection-origin-x>0</projection-origin-x>
<projection-origin-y>0</projection-origin-y>
<projection-factor-x>nb_tiles / 360</projection-factor-x>
<projection-factor-y>nb_tiles / 360</projection-factor-y>
<projection-offset-x>nb_tiles / 2</projection-offset-x>
<projection-offset-y>nb_tiles / 2</projection-offset-y>
</projection>
<tiles>
<tiles-size-x>256</tiles-size-x>
<tiles-size-y>256</tiles-size-y>
</tiles>
<servers>
<max-threads>2</max-threads>
<server>http://{$map_type}0.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}1.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}2.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
<server>http://{$map_type}3.{$server}/{$map_type}{$tile_id}.jpg{$url_append}</server>
</servers>
</level>
</source>
</aqx>