Tips and best practices for map caches |
|
Release 9.3 |
The tips below can help you achieve the best appearance and performance for your map caches. The tips are arranged in the following categories:
If possible, choose the scales you want to cache before you start designing the map. Work at those scales as you create the map in ArcMap. For quick reference, you can manually load those scales into the drop-down list of scales in ArcMap.
Before caching your map, do a visual check of the source map document at each scale that you plan to cache. Make sure that the appropriate layers appear with effective symbology and labeling at each scale. If you need to change the symbology of a layer based on scale, you can copy the layer and paste it back into the ArcMap table of contents. Set a scale range on each copy of the layer and symbolize appropriately for that scale range.
The images below show an ArcMap document that has been symbolized for viewing at two scales. The author of this map copied and pasted the Interstates and Cities layers back into the data frame, then symbolized a "Zoomed in" and "Zoomed out" version for each layer.
In the zoomed out map, the author set a definition query to limit the visible cities to those with a population of more than 50,000. Also, the author symbolized the Interstates layer with a thin line.
In the zoomed in map, the author removed the definition query so that all cities are visible. However, the author added label rules that symbolize larger cities with a larger font. The author also changed the Interstate symbolization to use a thicker cartographic line symbol.
The author set scale ranges on both the "Zoomed in" and "Zoomed out" layers to ensure that only one of the layers is visible at any given scale. The Rivers and Lakes, County Boundaries, Parks, and State Background layers use the same symbol whether zoomed in or out, so the author did not create copies of these layers.
If you're creating a map that you intend to cache at many scale levels, you will need to repeat this process, potentially creating many copies of layers in your map document. Use group layers to keep them organized.
Use the Maplex labeling engine in your map document. This will give you the best possible label placement while caching.
Set X Offset and Y Offset values on text symbols to 0. Using text symbol offsets may result in periodic inadvertent label truncation. Use the label engine's offset ability instead.
Explicitly define a data frame background color not used elsewhere in your map (RGB 254,255,255 is a good choice). Otherwise, any symbols and text that happen to be the same as the background color may be rendered improperly when the background is interpreted as transparent in certain browsers.
You can explicitly set the background color in ArcMap. The background will render as transparent in environments that support PNG 24 transparency.
Before starting a large caching job, make a test cache of a small area at all scale levels. You can do this by setting a custom full extent on the source map document that covers a small geographic area. When you've created the cache for this small area, examine the tiles to make sure they look and perform the way you expect. One way to do this is to create a simple Web Mapping Application in Manager that uses the service.
When you're satisfied with the test cache, delete it, reset the full extent to the original extent, and cache the whole map.
Make sure you've created enough scales. Web application users can only see the map at the scales you cache.
ArcMap users see resampled cache tiles when they are in between scales. Caching too few scales causes more resampling and possible distortion of features.
When creating caches that will overlay each other in a Web application, use the same tiling scheme if possible. It's not required that you create all the caches at all the same scale levels. However, you should match as many scales as possible.
In the image below, three caches with different scale ranges share the same scales where possible. Shared scales are circled in red:
Although you should try to match tiling schemes when building your caches, you do not need to match image format. After importing a tiling scheme file, you can change the image format before you create the cache. Use these guidelines to choose the appropriate image type for each individual cache:
After the cache is created, if you don't want to continue storing all of the source data on your server, you can remove some of the layers from the source map document. Leave at least one layer in the map document (a suggestion is a simple feature class with one feature covering the map extent), and leave the map document in the coordinate system used to create the cache. After you restart the service, you can safely remove the source data off the server for any layers you removed. As long as the service name and the cache name stay the same, users will continue to see the cache when they view the service.
Keep in mind that if you use this technique, users will not get any meaningful results when they query the service. If you want to maintain some queryable layers, you should leave them in the map document and leave the source data for those layers on the server.