Page 1 of 1

AQX question

Posted: Sun Jun 10, 2012 12:35 pm
by furykid
Hi,

I would like to define an AQX file for [***] tiles.
In my application I calculate the tile url like in the code-snipped below, how can I define this in aqx syntax ( especially the xBase logic !)

Code: Select all

String url = [***]/images/amap/
String xBase=""

if (Z > 13) {
                            xBase = Integer
                                    .toString(
                                            X)
                                    .substring(0, Z - 12)
                                    + "/";
                        }
                        url.append(Z)
                                .append("/")
                                .append(xBase + Z)
                                .append("_")
                                .append(X)
                                .append("_")
                                .append(Y)
                                .append(".png");
                        return url.toString();



Re: AQX question

Posted: Sun Jun 10, 2012 10:16 pm
by Psyberia-Support
Hi,
I'm afraid it's not possible in the current version. I'll have a look at this map.
I'll try to add this support in the 1.3.1 version before putting it on the market,
Best regards

Re: AQX question

Posted: Mon Jun 11, 2012 8:17 am
by furykid
Hi,

this would be great!

I posted the wrong url ( has also changed in the near past)

http://[***]/images/amap/ (and 6,7,8) might work right now.

This is a nice topo map for austria!

Re: AQX question

Posted: Tue Jun 12, 2012 12:48 pm
by Psyberia-Support
Hi again,
I have added this map to the community map list (thanks for this suggestion).

You must have version 1.3.1 to see it.
Here is the file I created (I have just cleared the servers addresses):

Code: Select all

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

  <name>Austria Topo Map</name>

  <source id="AUS_BRG">
    <name>Austria Topo Map</name>
    <region>EURO</region>
    <type>TOPO</type>
    <outline>10.3828259,46.9523163 10.4284515,46.8025589 11.0218964,46.7095947 11.2032013,46.9128151 11.7393122,46.940136 12.0490913,46.9997673 12.1727629,46.8585587 12.3645744,46.6709671 13.2002592,46.4907761 14.5879631,46.3412209 14.9811916,46.5665627 15.5037947,46.5856018 15.7496367,46.6557655 16.0876331,46.6304131 16.0305996,46.8010864 16.3112621,46.9577789 16.5468998,46.9766769 16.5231991,47.3613586 16.74193,47.4491692 16.7248745,47.6282845 17.1363029,47.6712646 17.1985416,48.0008926 16.9148788,48.4115639 17.0136223,48.5226059 16.9415112,48.7186737 16.4660492,48.8585167 16.3430691,48.7738876 16.0956135,48.7908669 15.8903475,48.9014816 15.3349934,49.0239182 14.9352341,49.0488548 14.9065094,48.8264198 14.7679701,48.7945023 14.6521711,48.6514435 14.4337397,48.6530647 14.3173428,48.6179962 14.1428976,48.639286 14.1174631,48.693573 13.8505583,48.7971306 13.7619886,48.7385025 13.7781467,48.605423 13.7090273,48.5611916 13.5217152,48.6404991 13.3852701,48.56464 13.3700094,48.4221497 12.8804846,48.2465858 12.6955662,48.1130333 12.9214773,47.849823 12.8047819,47.7158585 12.5402699,47.6950111 12.2766571,47.7797928 12.0633125,47.6685791 11.6025124,47.6136055 11.0764818,47.4327812 10.9406357,47.568924 10.3921633,47.6173248 10.2994051,47.4356842 9.8445892,47.6377907 9.4735556,47.4906387 9.4705629,47.2681961 9.5818729,47.0464859 10.0611963,46.8153038 10.2519331,46.8464928</outline>

    <level type="osm">
      <zoom-values>5,7</zoom-values>
      <servers>
        <referer>http://www.openstreetmap.org/</referer>
        <server>http://otile1.mqcdn.com/tiles/1.0.0/osm/{$z}/{$x}/{$y}.png</server>
        <server>http://otile2.mqcdn.com/tiles/1.0.0/osm/{$z}/{$x}/{$y}.png</server>
        <server>http://otile3.mqcdn.com/tiles/1.0.0/osm/{$z}/{$x}/{$y}.png</server>
        <server>http://otile4.mqcdn.com/tiles/1.0.0/osm/{$z}/{$x}/{$y}.png</server>
      </servers>
    </level>

    <level type="expr">
      <zoom-values>9,11,13,15</zoom-values>

      <expressions>
        <expr set="nb_tiles">pow( 2, z )</expr>
        <expr set="ry">toLong( nb_tiles - y )</expr>
        <expr set="xbase">iif( ( z>13 ) && ( x > 0 ) , substr( toString( x ), 0, z-12 ) + "/", "" )</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>

      <servers>
        <referer>[***]</referer>
        <server>http://s1.[***]/images/amap/{$z}/{$xbase}{$z}_{$x}_{$ry}.png</server>
        <server>http://s2.[***]/images/amap/{$z}/{$xbase}{$z}_{$x}_{$ry}.png</server>
        <server>http://s3.[***]/images/amap/{$z}/{$xbase}{$z}_{$x}_{$ry}.png</server>
        <server>http://s4.[***]/images/amap/{$z}/{$xbase}{$z}_{$x}_{$ry}.png</server>
        <server>http://s5.[***]/images/amap/{$z}/{$xbase}{$z}_{$x}_{$ry}.png</server>
      </servers>

    </level>

  </source>

</aqx>

Re: AQX question

Posted: Tue Jun 12, 2012 8:57 pm
by furykid
Hi,
thank you very much !

Works great with the new 1.3.1 full version installed !