<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.3243" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px">Yes. However, all the data is in New Zealand Transverse Mercator (2193), so there is no re-projection work being done.<BR><BR>&gt;&gt;&gt; Zac Spitzer &lt;zac.spitzer@ennoble.com.au&gt; 31/05/2010 6:29 p.m. &gt;&gt;&gt;<BR>have you included proj4js? otherwise I'm pretty sure setting the<BR>projection doesn't do anything<BR><BR>On 31 May 2010 09:34, Robert Sanson &lt;SansonR@asurequality.com&gt; wrote:<BR>&gt; This is a resend, as I have not had any responses. Tiles I request from an<BR>&gt; ArcGIS Server cache using Layer.XYZ are not lining up with other layers<BR>&gt; requested from the same server via Layer.WMS or Layer.ArcGIS93Rest.<BR>&gt;<BR>&gt; Instead of making use of tileOrigin (which doesn't seem to get used), we<BR>&gt; make sure the Origin as reported by ArcGIS is contained within the<BR>&gt; maxExtent, and then use restrictedExtent to constrain the map area to the<BR>&gt; are we want OL to work within:<BR>&gt;<BR>&gt; var mapoptions = {<BR>&gt;&nbsp;&nbsp; //tileOrigin: new OpenLayers.LonLat(-4020900,19998100), //Origin as<BR>&gt; reported by ArcGIS<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; maxExtent: new OpenLayers.Bounds(-4020900, 4674128.11975, 2568710.79993,<BR>&gt; 19998100), //contains the AGS origin<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; restrictedExtent: new OpenLayers.Bounds(1018697.71047, 4674128.11975,<BR>&gt; 2568710.79993, 6296981.53325),<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; resolutions: new Array(3175.0063500127, 793.751587503175,<BR>&gt; 264.583862501058, 198.437896875794, 132.291931250529, 66.1459656252646,<BR>&gt; 26.4583862501058, 19.8437896875794, 13.2291931250529, 9.26043518753704,<BR>&gt; 6.61459656252646, 5.29167725002117, 3.96875793751588, 2.64583862501058,<BR>&gt; 1.98437896875794, 1.32291931250529),<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; tileSize: new OpenLayers.Size(256,256),<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; units: 'm',<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection('EPSG:2193'),<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp; fractionalZoom: false<BR>&gt; };<BR>&gt; var map = new OpenLayers.Map( 'map',mapoptions );<BR>&gt; var nzcoastwms = new OpenLayers.Layer.WMS( "Coastline",<BR>&gt;<BR>&gt; "http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {layers: ['0'], format: "image/png"},<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {isBaseLayer: true, singleTile:true, visibility:<BR>&gt; true,<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; attribution:"LINZ data Crown copyright reserved"}<BR>&gt; );<BR>&gt; var topoxyz = new OpenLayers.Layer.XYZ( "Topo",<BR>&gt;<BR>&gt; "http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}",<BR>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {isBaseLayer: false, sphericalMercator: false//,<BR>&gt; tileOrigin: new OpenLayers.LonLat(-4020900,19998100)<BR>&gt; });<BR>&gt; map.addLayers([nzcoastwms,topoxyz]);<BR>&gt; Doing this above, requests the correct tiles, but it seems the requested<BR>&gt; tiles are displaced in a north-south direction. The displacement seems<BR>&gt; different depending on zoom level. The latter is sometimes displaced to the<BR>&gt; north, and sometimes to the south, depending on Zoom level. I have<BR>&gt; previously verified the WMS layer is in the correct location.<BR>&gt;<BR>&gt; Many thanks,<BR>&gt;<BR>&gt; Robert Sanson<BR>&gt;<BR>&gt; This message has been scanned for malware by SurfControl plc.<BR>&gt; www.surfcontrol.com<BR>&gt;<BR>&gt; _______________________________________________<BR>&gt; Users mailing list<BR>&gt; Users@openlayers.org<BR>&gt; <A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR>&gt;<BR>&gt;<BR><BR><BR><BR>-- <BR>Zac Spitzer<BR>Solution Architect / Director<BR>Ennoble Consultancy Australia<BR><A href="http://www.ennoble.com.au">http://www.ennoble.com.au</A><BR><A href="http://zacster.blogspot.com">http://zacster.blogspot.com</A><BR>+61 405 847 168<BR>_______________________________________________<BR>Users mailing list<BR>Users@openlayers.org<BR><A href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</A><BR><BR></BODY></HTML>