<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>I was able to fix the problem by changing the way ArcGIS server
generates a cache. The problem we had was ArcGIS by default wasn’t always
creating the next level of tiles at half the scale of the previous tiles. For
example it would create the tiles for a level at 100,00 then create tiles for
scale 51,000. We manually set it to 50,000 and by half for each successive level
and everything worked.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:#1F497D'>I haven’t installed 9.3 or even looked at the REST api
yet. We’re accessing all of our ArcGIS services as WMS.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> matthewsnape (via
Nabble) [mailto:<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2089431&i=0" target="_top" rel="nofollow">ml-user+149283-433700537@...</a>] <br>
<b>Sent:</b> Friday, December 26, 2008 5:55 AM<br>
<b>To:</b> Burgoon, David<br>
<b>Subject:</b> Re: ArcGIS server 9.2 support for OL<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Hi Dave,<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>I don't think the value of ymin really matters. Just
set it slightly below the minimum y of your data extents. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Have you tried any of the code that targets the 9.3 api?
I had a go with the code in this sandbox. <a href="http://trac.openlayers.org/browser/sandbox/august/openlayers/openlayers-2.6?rev=7819" target="_top" rel="nofollow">http://trac.openlayers.org/browser/sandbox/august/openlayers/openlayers-2.6?rev=7819</a> Annoyingly
I was getting exactly the same issues with maxextents. <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<div>
<p class=MsoNormal>2008/12/26 Burgoon, David (via Nabble) <<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1877782&i=0" target="_top" rel="nofollow">ml-user%2B121715-20876752@...</a>><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>I'm trying to access ArcGis
server map cache from Openlayers. I've seen the threads on mailing list about
this topic, yet I'm still having the following issue: the cached images are
only aligned correctly for some of the map zoom levels. So, my map has 10 zoom
levels. The cached tiles align correctly for levels 1-4, do not align correctly
for levels 5-7, and align correctly for levels 8-10. <br>
I tried to implement following posted fix for changing the extent at different
zoom levels, but I dont know where to get the value for this.ymin variable. <br>
Also, it's been stated that the maxExtent should be perfect fit for tiles; but
is there a standard equation to use to calculate this perfect fit for ArcGis
map cache? Any help would be greatly appreciated. <br>
Dave <br>
<br>
<o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><b>matthewsnape wrote:<o:p></o:p></b></p>
</div>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>I have been using a previous
version of the code extensively and can confirm that it works. We
certainly had trouble with the extents issue. I found that the extents
had to be different for each zoom level. I used the following code to calculate
the correct extents, added to the start of the geturl and setmap functions: <br>
<br>
var res = this.map.getResolution(); <br>
var tile_height = res*512; <br>
var yorigin = this.maxExtent.top; <br>
var ydiff = yorigin-this.ymin; <br>
var tilecount = ydiff/tile_height; <br>
var tilecountr = Math.ceil(tilecount); <br>
var coverage = tilecountr*tile_height; <br>
var yminorigin = yorigin-coverage; <br>
this.maxExtent.bottom = yminorigin; <br>
<br>
Because you need a fixed number of tiles to cover the map, the bottom tile will
overlap the edge of the map extents. At different resolutions the amount
of overlap changes. This code calculates the y co-ordinate of the bottom
of the map extents, depending on your resolution. It uses an addittional
attribute "ymin" to store the minimum y value of the data extents,
allowing maxExtent.bottom to change as appropriate. <o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><o:p> </o:p></p>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=1 width="100%" noshade style='color:#CCCCCC' align=center>
</div>
<div>
<p class=MsoNormal><span style='font-size:8.5pt;font-family:"Tahoma","sans-serif";
color:#666666'>This email is a reply to your post @ <a href="http://n2.nabble.com/ArcGIS-server-9.2-support-for-OL-tp1835765p1877782.html" target="_top" rel="nofollow">http://n2.nabble.com/ArcGIS-server-9.2-support-for-OL-tp1835765p1877782.html</a><br>
You can reply by email or by visting the link above.<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/ArcGIS-server-9.2-support-for-OL-tp1835765p2089431.html">RE: ArcGIS server 9.2 support for OL</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Dev-f1832264.html">OpenLayers Dev mailing list archive</a> at Nabble.com.<br>