<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Hi List,</font><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">New OpenLayers user here, so please bear with me. I&#39;ve searched and spent many hours but am still stuck. I&#39;m using the 2.9 release.</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">I have a set of image tiles in z/x/y directory format, i.e.root/7/0/0.png and so on. I&#39;m using gdal2tiles.py to take a png image of size 18432x18432 px to turn it into 8 zoom levels (0-7). Level 7 has 72 256x256 px tiles as expected. I just want a flat pixel by pixel projection. I have the files sat in an accessible web server i.e. no tilecache or mapserver etc, just plain GET /0/0/0.png</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">My script is very simple and is copied from the TMS example (that is the right one to use rather than ZYX etc?) plus the HTML is from the TMS example:</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div><div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">map = new OpenLayers.Map( &#39;map&#39;, 
 { 
 controls: [],
 maxResolution: 18432/256, 
 maxExtent: new OpenLayers.Bounds( 0, 0, 18432, 18432 ), 
 numZoomLevels:8,
 } 
);
                                                         
layer = new OpenLayers.Layer.TMS( &quot;TMS&quot;,
  &quot;<a href="http://192.168.10.1/simpletest1/">http://192.168.10.1/simpletest1/</a>&quot;, </font></span></div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  {serviceVersion: &#39;.&#39;, layername: &#39;.&#39;, type:&#39;png&#39;} );
                                                        
map.addLayer(layer);</font></span></div></div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">map.addControl(new OpenLayers.Control.MousePosition());
map.addControl(new OpenLayers.Control.MouseDefaults());
map.addControl(new OpenLayers.Control.KeyboardDefaults());</font></span></div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">if (!map.getCenter()) </font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">  map.zoomToMaxExtent();</font></div>
</span></div><div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>
</font></span></div><div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Problem 1:</font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">My projected coordinates seem incorrect, in that I move the mouse around and see my tiles correctly but not to the right transformation. The bottom left corner is 0,0, but the top right corner is just reading as 10368x10368. I was expecting 18432x18432? I have set up the maxExtent incorrectly? </font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Note: I did try to use a set of manual resolutions too:</font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">resolutions: [ 1, 0.5, 0.25, 0.125, 0.0625, 0.03125, 0.015625, 0.0078125]</font></span></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">..but I get other issues, i.e. something like -80, 80?</font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Problem 2:</font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">The code about asks for many extra tiles from about zoom level 2 onwards, i.e. An extra set of tiles above and to the right. Level 3 asks for a row of 3 extra, level 4 for 7 extra and so on. I expect this is related to (1)</font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><span class="Apple-style-span" style="white-space: normal; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></span></div>
<div><span class="Apple-style-span" style="white-space: pre; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div><div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">I&#39;d appreciate any help. Apologies if it&#39;s something stupid.</font></span></div>
<div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="white-space: pre;">PS Thanks for OpenLayers - loving it...</span></font></div>
<div><span class="Apple-style-span" style="white-space: pre;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></span></div>