Making sure labels display properly in a cached map service is not always an easy task. During the caching process, labels are sometimes duplicated or the labels are incomplete. These issues tend to occur along cache tile boundaries. While ArcGIS Server 10’s compact cache reduces how often this problem occurs by storing tiles in bundles, the problem can still arise along the bundle boundaries. So, how can you avoid incomplete or duplicated labels in a cached map service?
ESRI does a good job describing a useful workflow if you have the time to work with annotation. The workflow involves using two tools new to ArcGIS 10: the Map Server Cache Tiling Scheme to Polygons tool and the Tiled Labels to Annotation tool. The product of this workflow is annotation for each layer of your map service at each scale of your map service. Once this annotation is created, you are can edit the annotation as you see fit before caching the service.
If you are not interested in creating annotation, you can still label your features using the default or Maplex labeling engines while making sure your labels are not placed on top of the cache bundle boundaries. To do this, use the workflow presented below.
1) Create a feature class that represents the cache bundle boundaries using the Map Server Cache Tiling Scheme to Polygons tool.
2) From the feature class created in step 1, use the Tile_Scale field to select and export to a new feature class all features tied to a given scale. In other words, if your cache has 5 scales then you will be creating 5 new feature classes, each representing the cache bundle boundaries at a different scale.
3) Add the feature classes you created in step 2 as layers to your service’s MXD. Make sure to symbolize the layers in such a way that the features do not show up when the cache is created.
3A) Set each cache boundary layer’s scale dependency to the cache scale it is associated with.
3B) Set each cache boundary layer’s feature weight to high by accessing the Placement Properties window from the Labels tab of the layer’s properties window.
4) Cache your map service.
While this workflow may provide labels of the same feature relatively close together along cache bundle boundaries, incomplete labels will not occur. Additionally, it is important to know that using the default or Maplex labeling engines to place labels will slow down the caching process. Therefore, if you have the time and budget to thoroughly work with annotation, it is probably best to work with annotation.