[OpenLayers-Users] ArcGIS93Rest - Can't show specific layers

jstylee j_koch10 at hotmail.com
Thu Feb 9 16:50:30 EST 2012


Hello,

I've been trying to show only specific layers of an ArcGIS REST layer.  It
doesn't matter what layer IDs I pass to the layer variable, I get all the
layers from the REST service.  The map I that I want the layer on has a
EPSG:4326 projection, and the definition document of this particular REST
Layer states that the spatial reference is 102100 (3857).  So I've tried
instantiating a map with that projection (and other items specific t to this
Web Mercator spatial reference ) and matching the layer's srs with it.  Here
is my code:

var mapOptions = {
	projection: "EPSG:102100",
	units: "m",
	maxResolution: 156543.0339,
	maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34,
20037508.34)
	};
map = new OpenLayers.Map( 'map', mapOptions );

layer = new OpenLayers.Layer.ArcGIS93Rest( "ArcGIS Server Layer",

"http://maps.ngdc.noaa.gov/rest/services/web_mercator/world_reference_map/MapServer/export", 
	{
		layers: "show:149",
		srs: "EPSG:102100",
		transparent: true
	},
	{
		isBaseLayer: true,
		opacity: 0.7
	});

Does anybody know what could be wrong, or have any suggestions?

Thanks,


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/ArcGIS93Rest-Can-t-show-specific-layers-tp4381519p4381519.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list