I'm using the New Zealand Topo50 maps for my basemaps from an ArcGIS map server at http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer. However, this service has a spatial reference of EPSG:2193
and the tiles are being projected over Europe instead of New Zealand.
I've noticed that vector feature layers, e.g. FeatureLayer
and ArcGISDynamicMapServiceLayer
, automatically add an output spatial reference to the request so that the returned features are in EPSG:3857
(Web Mercator). Raster layers don't seem to work the same though.
What can I do to have the basemap projected correctly?
My code:
var map = new Map("map", {
basemap: "topo"
});
var topo50Layer = new ArcGISDynamicMapServiceLayer(
"http://services.arcgisonline.co.nz/arcgis/rest/services/LINZ/geotiffs/MapServer"
);
map.addLayer(topo50Layer);