[OpenLayers-Users] OpenLayers.Layer.XYZ - not applying tileOrigin?
Robert Sanson
SansonR at asurequality.com
Tue May 11 20:36:19 EDT 2010
I seems to be having a problem with OpenLayers 2.9.1 not calculating the
correct tile. Our ArcGIS server cache starts its origin way up north
(19998100) and west of our max extent (-4020900), so the start tile for
resolution 0 is .../tile/0/16/6, but OpenLayers is sending a request for
...tile/0/0/0
Here is my code:
var mapoptions = {
maxExtent: new OpenLayers.Bounds(1018697.71047,
4674128.11975, 2568710.79993, 6296981.53325),
resolutions: new Array(3175.0063500127,
793.751587503175, 264.583862501058, 198.437896875794, 132.291931250529,
66.1459656252646, 26.4583862501058, 19.8437896875794, 13.2291931250529,
9.26043518753704, 6.61459656252646, 5.29167725002117, 3.96875793751588,
2.64583862501058, 1.98437896875794, 1.32291931250529),
tileOrigin: new OpenLayers.LonLat(-4020900,19998100),
tileSize: new OpenLayers.Size(256,256),
units: 'm',
projection: new OpenLayers.Projection('EPSG:2193'),
fractionalZoom: false
};
var map = new OpenLayers.Map( 'map',mapoptions );
var topoxyz = new OpenLayers.Layer.XYZ( "Topo",
"http://ws-esrimt/ArcGIS/rest/services/mapservice_topography_vector_prod/MapServer/tile/${z}/${y}/${x}",
{isBaseLayer: false, sphericalMercator: false});
Any way I can get OL to calculate the correct offset?
Many thanks,
Robert
>>> M**k <mc.prins at gmail.com> 12/05/2010 2:03 a.m. >>>
we use XYZ; see http://gisdemo.agro.nl/OL/OSM_AGS2.htm
_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users
This message has been scanned for malware by SurfControl plc. www.surfcontrol.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100512/d0d7fd4a/attachment.html
More information about the Users
mailing list