如何在Openlayers中加载AGRC ArcGIS REST磁贴服务?

时间:2013-07-23 18:47:49

标签: openlayers arcgis-server

如何在OpenLayers中加载此服务http://mapserv.utah.gov/arcgis/rest/services/BaseMaps/Lite/MapServer?投影为26912(UTM Zone 12)。这是我尝试过的变种之一(没有成功):

var map = new OpenLayers.Map({
div : "rcp1_map",
projection: new OpenLayers.Projection("EPSG:26912")
});

var AGRCLite = new OpenLayers.Layer.XYZ( "AGRC Lite",
"http://mapserv.utah.gov/arcgis/rest/services/BaseMaps/Lite/MapServer/tile/${z}/${y}/${x}");
map.addLayer(AGRCLite);

在这种情况下使用XYZ方法:

var ESRIWorld = new OpenLayers.Layer.XYZ( "ESRI",
"http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/${z}/${y}/${x}",
{sphericalMercator: true} );

但我无法让它为AGRC服务工作。

任何帮助将不胜感激!

1 个答案:

答案 0 :(得分:0)

看看这个资源: OpenLayer / Blog sathyaprasad 使用OpenLayers.Layer.ArcGIS93Rest类必须为希望的投影中提供的缓存服务提供技巧。