<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Chris,<div><br></div><div>I think I discovered my last issue. The ArcGIS api seems to be putting the rows in reverse order. Either top-down or bottom up, depending on the reverse of TMS. For my initial zoom level, I subtracted the row number from the total number of rows (3 rows), and my map looks good. Is there a way to find the number of rows for a given scale level?</div><div><br></div><div>Thanks,</div><div>Scott<br><br><div>
<div>********************************************* </div>Scott Pezanowski 
<div></div>
<div></div>
<div></div>email: scottpez@hotmail.com&nbsp; 
<div></div>*********************************************</div><br><br><br><br>&gt; Date: Mon, 14 Dec 2009 10:50:05 -0500<br>&gt; To: scottpez@hotmail.com<br>&gt; CC: tilecache@openlayers.org<br>&gt; Subject: Re: [Tilecache] tilecache layer in arcgis server javascript api<br>&gt; From: crschmidt@metacarta.com<br>&gt; <br>&gt; On Mon, Dec 14, 2009 at 08:15:11AM -0500, Scott Pezanowski wrote:<br>&gt; &gt; <br>&gt; &gt; Hi,<br>&gt; &gt; I am wondering if anyone has been able to get a custom tile cached layer from TileCache to display correctly in the ArcGIS server javascript api? Or can someone direct me on the proper configuration. This page describes creating a custom tiled layer in the api:<br>&gt; &gt; http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html<br>&gt; &gt; It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this.<br>&gt; &gt; <br>&gt; &gt; This is what my tileinfo looks like:<br>&gt; &gt; <br>&gt; &gt; this.tileInfo = new esri.layers.TileInfo({            "rows" : 512,            "cols" : 512,            "dpi" : 72,            "format" : "JPEG",            "compressionQuality" : 0,            "origin" : {              "x" : -180,              "y" : 90            },            "spatialReference" : {              "wkid" : 4326            },                "lods" : [              {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416},                  {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000},              {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000},              {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500}            ]          });<br>&gt; &gt; <br>&gt; &gt; I used this link to compute my resolutions by hand:<br>&gt; &gt; http://code.google.com/p/xenia/wiki/TileCache<br>&gt; &gt; I actually do seem to be getting back tiles; However, all of them are outside the range of my data and I simply get white tiles. My data bounding box is -77.92,-40.75,-77.79,40.85.<br>&gt; &gt; My tile urls look something like this    /0/1216/1380.jpeg   when I think they should look more like this     /0/0/1.jpeg<br>&gt; <br>&gt; Not entirely sure why you think the tile URLs should look like 0/0/1.jpg when<br>&gt; you've given your origin as -180, -90. Also, you didn't include your tilecache<br>&gt; config. Can you include your tilecache config, and explain why you<br>&gt; think the origin should be what it is?<br>&gt; <br>&gt; -- Chris<br>&gt; <br>&gt; &gt; Thanks in advance for any help on what I may be doing wrong.<br>&gt; &gt; Scott<br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; ********************************************* Scott Pezanowski <br>&gt; &gt; <br>&gt; &gt; <br>&gt; &gt; email: scottpez@hotmail.com  <br>&gt; &gt; *********************************************<br>&gt; &gt; <br>&gt; &gt;                                                <br>&gt; &gt; _______________________________________________<br>&gt; &gt; Tilecache mailing list<br>&gt; &gt; Tilecache@openlayers.org<br>&gt; &gt; http://openlayers.org/mailman/listinfo/tilecache<br>&gt; <br>&gt; <br>&gt; -- <br>&gt; Christopher Schmidt<br>&gt; MetaCarta<br></div>                                               </body>
</html>