Why might WMS GetMap requiring LAYERS to be a number?

05-20-2010 07:35 AM
New Contributor III
I have a GET request which looks like this ("Hotspot" is a valid layer name):

GET /arcgis/services/SmallvilleOGC/MapServer/WMSServer?SERVICE=WMS&map=SmallvilleOGC&VERSION=1.1.1&REQUEST=GetMap&FORMAT=image/png&SRS=EPSG:4326&BBOX=-82.6,34.7,-82.2,35.1&WIDTH=1024&HEIGHT=1024&TRANSPARENT=TRUE&LAYERS=Hotspot&STYLES= HTTP/1.1

Which results in an exception:

<ServiceExceptionReport version="1.1.1">
  <ServiceException code="LayerNotDefined">
Parameter 'layers' contains unacceptable layer name.

As a guess I tried SmallvilleOGC:Hotspot but received the same error.  When I change LAYERS=0 it returns an image!

Any idea as to why this might be the case?  It really is named "Hotspot" so it doesn't appear to be a typo:

Data Type: File Geodatabase Feature Class
Location: D:\Map\smallville\calixville.gdb
Feature Dataset: CalixTest
Feature Class: Hotspot
Feature Type: Simple
Geometry Type: Polygon

Thanks for any help you can offer.
Tags (2)
0 Kudos
2 Replies
Occasional Contributor
This is a mechanism to make sure that the layers can be requested with a unique identifier. By using the layer order, there will be no duplicate layer numbers, and no chance for confusion, since it is possible to publish a map that has multiple layers with the same name. In ArcGIS 10, there will be an option available to use the layer name if there are no duplicate names.
0 Kudos
New Contributor II

Neat. How do we fix this issue?

0 Kudos