<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>>>> Zac Spitzer <zac.spitzer@ennoble.com.au> 31/05/2010 6:29 p.m. >>><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 <SansonR@asurequality.com> wrote:<BR>> This is a resend, as I have not had any responses. Tiles I request from an<BR>> ArcGIS Server cache using Layer.XYZ are not lining up with other layers<BR>> requested from the same server via Layer.WMS or Layer.ArcGIS93Rest.<BR>><BR>> Instead of making use of tileOrigin (which doesn't seem to get used), we<BR>> make sure the Origin as reported by ArcGIS is contained within the<BR>> maxExtent, and then use restrictedExtent to constrain the map area to the<BR>> are we want OL to work within:<BR>><BR>> var mapoptions = {<BR>> //tileOrigin: new OpenLayers.LonLat(-4020900,19998100), //Origin as<BR>> reported by ArcGIS<BR>> maxExtent: new OpenLayers.Bounds(-4020900, 4674128.11975, 2568710.79993,<BR>> 19998100), //contains the AGS origin<BR>> restrictedExtent: new OpenLayers.Bounds(1018697.71047, 4674128.11975,<BR>> 2568710.79993, 6296981.53325),<BR>> resolutions: new Array(3175.0063500127, 793.751587503175,<BR>> 264.583862501058, 198.437896875794, 132.291931250529, 66.1459656252646,<BR>> 26.4583862501058, 19.8437896875794, 13.2291931250529, 9.26043518753704,<BR>> 6.61459656252646, 5.29167725002117, 3.96875793751588, 2.64583862501058,<BR>> 1.98437896875794, 1.32291931250529),<BR>> tileSize: new OpenLayers.Size(256,256),<BR>> units: 'm',<BR>> projection: new OpenLayers.Projection('EPSG:2193'),<BR>> fractionalZoom: false<BR>> };<BR>> var map = new OpenLayers.Map( 'map',mapoptions );<BR>> var nzcoastwms = new OpenLayers.Layer.WMS( "Coastline",<BR>><BR>> "http://ws-esrimt/arcgis/services/mapservice_asurequality_prod/MapServer/WMSServer",<BR>> {layers: ['0'], format: "image/png"},<BR>> {isBaseLayer: true, singleTile:true, visibility:<BR>> true,<BR>> attribution:"LINZ data Crown copyright reserved"}<BR>> );<BR>> var topoxyz = new OpenLayers.Layer.XYZ( "Topo",<BR>><BR>> "http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}",<BR>> {isBaseLayer: false, sphericalMercator: false//,<BR>> tileOrigin: new OpenLayers.LonLat(-4020900,19998100)<BR>> });<BR>> map.addLayers([nzcoastwms,topoxyz]);<BR>> Doing this above, requests the correct tiles, but it seems the requested<BR>> tiles are displaced in a north-south direction. The displacement seems<BR>> different depending on zoom level. The latter is sometimes displaced to the<BR>> north, and sometimes to the south, depending on Zoom level. I have<BR>> previously verified the WMS layer is in the correct location.<BR>><BR>> Many thanks,<BR>><BR>> Robert Sanson<BR>><BR>> This message has been scanned for malware by SurfControl plc.<BR>> www.surfcontrol.com<BR>><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>><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>