<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas:contacts" xmlns:st2="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (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]--><o:SmartTagType namespaceuri="urn:schemas:contacts" name="Sn"/>
<o:SmartTagType namespaceuri="urn:schemas:contacts" name="GivenName"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }st2\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";
        color:black;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:595.3pt 841.9pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[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]-->
</head>

<body bgcolor=white lang=EN-GB link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>We have been making heavy use of the AGS cache
code that was in the arcgis server sandbox.&nbsp; The biggest issue we have had
was with setting the extents.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>I found that the extents had to be different for each
zoom level. &nbsp;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. &nbsp;At different resolutions the amount
of overlap changes. &nbsp;This code calculates the y co-ordinate of the bottom
of the map extents, depending on your resolution. &nbsp;It uses an addittional
attribute &quot;ymin&quot; to store the minimum y value of the data extents,
allowing maxExtent.bottom to change as appropriate.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'>Once the extents issue is sorted the layer works well.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I also am in the process of writing some
code (which I will share) that pre generates the layer configuration from the xml
file in the cache directory.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
color=black face="Times New Roman"><span lang=EN-US style='font-size:12.0pt;
color:windowtext'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 color=black face=Tahoma><span lang=EN-US
style='font-size:10.0pt;font-family:Tahoma;color:windowtext;font-weight:bold'>From:</span></font></b><font
size=2 color=black face=Tahoma><span lang=EN-US style='font-size:10.0pt;
font-family:Tahoma;color:windowtext'> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b><st2:PersonName w:st="on"><st1:GivenName w:st="on">John</st1:GivenName>
 <st1:Sn w:st="on">Zastrow</st1:Sn></st2:PersonName><br>
<b><span style='font-weight:bold'>Sent:</span></b> 30 May 2008 13:26<br>
<b><span style='font-weight:bold'>Cc:</span></b> users@openlayers.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> [OpenLayers-Users] ESRI
ArcIMS and/or ArcGIS Server Support</span></font><font color=black><span
lang=EN-US style='color:windowtext'><o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt'>What's the status of
OpenLayers supporting ArcIMS and/or ArcGIS server output that is not WMS? Anyone?<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial'><a
href="http://openlayers.org/pipermail/users/2007-May/001571.html">http://openlayers.org/pipermail/users/2007-May/001571.html</a><u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial'><a
href="http://blog.davebouwman.net/2006/11/30/OpenLayersConnectorForArcGISServer.aspx">http://blog.davebouwman.net/2006/11/30/OpenLayersConnectorForArcGISServer.aspx</a><u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=black face=Arial><span style='font-size:10.0pt;font-family:Arial'><a
href="http://www.spatiallyadjusted.com/2006/11/30/dave-bouwman-on-a-openlayers-connector-for-arcgis-server/">http://www.spatiallyadjusted.com/2006/11/30/dave-bouwman-on-a-openlayers-connector-for-arcgis-server/</a><u1:p></u1:p></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=3 color=black face="Times New Roman"><span
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>


<P><FONT face=Arial color=#003366 size=1>This e-mail message and any attached 
file is the property of the sender and is sent in confidence to the addressee 
only. The contents are not to be disclosed to anyone other than the addressee. 
Unauthorised recipients are requested to preserve this confidentiality and to 
advise the sender immediately of any error in transmission. If you experience 
difficulty with opening any attachments to this message, or with sending a reply 
by email, please telephone on + 44-(0)1235 438151 or fax on + 44-(0)1235 
438188.<BR><BR>Any advice contained in this e-mail or any accompanying file 
attached hereto is for information purposes only. RPS do not take any 
responsibility for differences between the original and the transmission copy or 
any amendments made thereafter. If the addressee requires RPS to be responsible 
for the contents of this e-mail, RPS will be pleased to issue a signed hard copy 
of the document upon request.</FONT></P>
<P><FONT face=Arial color=#003366 size=1>RPS Group Plc, company number: 208 7786 
(England). Registered office: Centurion Court, 85 Milton Park Abingdon 
Oxfordshire OX14 4RY.<BR><BR>RPS Group Plc web link: <A 
href="http://www.rpsgroup.com/">http://www.rpsgroup.com</A></FONT></P>
</body>

</html>