Select to view content in your preferred language

Duplicate labels in ArcGIS ServerREST map service when viewing through OpenLayers API

3732
2
04-14-2010 09:03 AM
ShiraBezalel
Occasional Contributor
I've created a very simple ArcGIS Server dynamic map service for a single polygon feature in an MXD. Labels are turned on for the layer with the setting "remove duplicate labels" (Placement Tab of the Placement Properties of Labels Tab). When I view the service in my OpenLayers demo app, the labels are duplicating. See attachment. Any idea how to prevent this label duplication? I only want one label per feature.

Relevant code snippet:

RBlabels= new OpenLayers.Layer.ArcGIS93Rest("RWQCBs with labels",
                    "http://eis.sfei.org/arcgis/rest/services/BasicLayers1/MapServer/export",
                    {layers: "show:0",
                    format: "PNG24",
                    srs:"EPSG:102113",
                    transparent: "true"},
                    {isBaseLayer: false});
0 Kudos
2 Replies
MichaelSmith
New Contributor
You are not requesting as a Single Tile. Try replacing your {  "isBaseLayer": false } config with this

{ "isBaseLayer": false, "transitionEffect": "resize", "singleTile": true}
0 Kudos
ShiraBezalel
Occasional Contributor
Thanks. That worked.
0 Kudos