<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>Thank you very much for your reply. Your message helped me get much closer to getting it working (I think). First, I had an error in my bbox where I had a negative latitude value for the bottom instead of a positive 40.75. I adjusted my origin to reflect the left/top of my tile data bbox -77.92/40.85 (instead of the world). I also adjusted the rows and cols parameters to a value of 256. The last change I made was to adjust my getTileUrl function to match the TMS scheme for url's {z}/{x}/{y}.jpeg I am now getting tiles back that show my data. The only issue now is that the tiles do not seem to match up on my map. More specifically, some of the rows seem mix-matched. Do you have any ideas on why that may be?</div><div><br></div><div>Thanks again,</div><div>Scott</div><div><br></div><div>Here is my tilecache layer config:</div><div><br></div><div><font size="2"><span style="font-family: Arial;">[centreimagerygeogarc]<br>type=WMSLayer<br>url={myurl}<br>extension=jpeg<br>layers={mylayer}<br>bbox=-77.92,40.75,-77.79,40.85<br>resolutions=0.000144444444444444444,0.000031747816880420907984514989617448,0.000015873908440210453992257494808724,0.00000011023547527923926383512149172725<br>srs=EPSG:4326<br>extent_type=loose</span></font></div><div><br></div><div><br></div><div>and my code:</div><div><br></div><div><br></div><div><div>this.tileInfo = new esri.layers.TileInfo({</div><div> "rows" : 256,</div><div> "cols" : 256,</div><div> "dpi" : 72,</div><div> "format" : "JPEG",</div><div> "compressionQuality" : 0,</div><div> "origin" : {</div><div> "x" : -77.92,</div><div> "y" : 40.85</div><div> },</div><div> "spatialReference" : {</div><div> "wkid" : 4326</div><div> },</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>"lods" : [</div><div><span class="Apple-tab-span" style="white-space:pre">                </span> {"level" : 0, "resolution" : 0.00014444444444444444444444444444444, "scale": 45497.4416},</div><div> {"level" : 1, "resolution" : 0.000031747816880420907984514989617448, "scale": 10000},</div><div> {"level" : 2, "resolution" : 0.000015873908440210453992257494808724, "scale": 5000},</div><div> {"level" : 3, "resolution" : 0.00000011023547527923926383512149172725, "scale": 2500}</div><div> ]</div><div> });</div><div><br></div><div> this.loaded = true;</div><div> this.onLoad(this);</div><div> },</div><div><br></div><div> getTileUrl: function(level, row, col) {</div><div> return {myserverurl} +</div><div> level + "/" +</div><div> col.toString() + "/" +</div><div> row.toString() + "." +</div><div> "jpeg";</div><div> }</div></div><div><br></div><div><br></div><div><br><br><div>
<div>********************************************* </div>Scott Pezanowski
<div></div>
<div></div>
<div></div>email: scottpez@hotmail.com
<div></div>*********************************************</div><br><br><br><br>> Date: Mon, 14 Dec 2009 10:50:05 -0500<br>> To: scottpez@hotmail.com<br>> CC: tilecache@openlayers.org<br>> Subject: Re: [Tilecache] tilecache layer in arcgis server javascript api<br>> From: crschmidt@metacarta.com<br>> <br>> On Mon, Dec 14, 2009 at 08:15:11AM -0500, Scott Pezanowski wrote:<br>> > <br>> > Hi,<br>> > 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>> > http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/layers_custom_tiled.html<br>> > It seems I need to add the scale and resolutions of my zoom levels. However, I am having difficulty doing this.<br>> > <br>> > This is what my tileinfo looks like:<br>> > <br>> > 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>> > <br>> > I used this link to compute my resolutions by hand:<br>> > http://code.google.com/p/xenia/wiki/TileCache<br>> > 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>> > 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>> <br>> Not entirely sure why you think the tile URLs should look like 0/0/1.jpg when<br>> you've given your origin as -180, -90. Also, you didn't include your tilecache<br>> config. Can you include your tilecache config, and explain why you<br>> think the origin should be what it is?<br>> <br>> -- Chris<br>> <br>> > Thanks in advance for any help on what I may be doing wrong.<br>> > Scott<br>> > <br>> > <br>> > ********************************************* Scott Pezanowski <br>> > <br>> > <br>> > email: scottpez@hotmail.com <br>> > *********************************************<br>> > <br>> >                                            <br>> > _______________________________________________<br>> > Tilecache mailing list<br>> > Tilecache@openlayers.org<br>> > http://openlayers.org/mailman/listinfo/tilecache<br>> <br>> <br>> -- <br>> Christopher Schmidt<br>> MetaCarta<br></div>                                            </body>
</html>