To get the full functional benefits of overlaying caches in the .NET Web Application Developer Framework (ADF), you must use ArcGIS Server 9.2, Service Pack 2. Previous 9.2 releases support overlaying caches with dynamic data, but Service Pack 2 contains the software enhancements necessary to overlay two or more cached services.
When you create any cache that will be used with an ArcGIS Online layer in the .NET Web ADF, the following items require attention:
You will achieve the fastest performance when your map is in the same coordinate system as the ArcGIS Online maps, which is GCS_WGS_84. If you choose to not use this coordinate system, one of the maps will need to be projected on the fly, thereby slowing performance.
To set the coordinate system of your map to GCS_WGS_84:
All of the data in your map will be projected on the fly to this coordinate system. When you cache the map, it will be cached in this coordinate system.
When overlaying map caches using the .NET Web ADF, the caches must have the same tile origin and tile size. This means that if you are creating a map cache that will overlay an ArcGIS Online layer, you must match your tile origin and tile size to the ones used by ArcGIS Online. The caches on ArcGIS Online are built with the following parameters:
Tile origin: -180, 90
Tile size: 512 X 512
You will achieve the performance benefit of both caches only when the two caches have matching scale levels. In the case of a scale level gap (when a scale level exists in one cache but not another), the overlaying image cannot be pulled from the cache and must be generated dynamically, thereby slowing performance. Image quality will also be degraded in this scenario because the dynamic image must be resampled from one of the existing scale levels.
In the diagram below, Cache A does not exist at Scale 3, therefore the .NET Web ADF will generate a dynamic image to overlay the image from Cache B at this scale.
Dynamic images are not created to match scales beyond the top or bottom scale of the cache. Therefore, for Cache A, a dynamic image will not be generated at Scale 5. Instead, Cache A will not be visible at Scale 5; only the cached image from Cache B will be displayed. Similarly, at Scale 1, only Cache A will be visible.
Many of the caches on ArcGIS Online have worldwide coverage at a large variety of scales. You do not need to create your cache using all of these scales, but where possible the scale levels you use should match the ones used by ArcGIS Online.
Following is a list of the scales used by ArcGIS Online. Each cache uses all of these scales or a sequential subset of them. (The high-precision values of the scales are necessary for the caches with worldwide coverage to appear seamless at 0 degrees longitude.) When building any cache that will overlay an ArcGIS Online layer, you should match the values exactly so that you can get the performance benefit of both caches. You may want to copy and paste these values into the Generate Map Server Cache tool (You can also get the tiling scheme from the ArcGIS Server Development Blog):
The base map caches on ArcGIS Online use the JPG image format, while the reference overlay caches use 24-bit PNGs. (You can use the Directory of Services page to see which caches are considered base maps and which are reference overlays.) Although the JPG format displays faster than other formats, it does not support transparency. Therefore, any base map caches on ArcGIS Online will obscure layers that are placed beneath them. Similarly, if you create your own JPG cache, you will not be able to see any layers you place beneath it.
When overlaying two PNG 24-based caches, be aware that PNG 24 images do not show transparency in Internet Explorer 6. (See the related Microsoft technical article at http://support.microsoft.com/kb/294714). In this scenario, the .NET Web ADF automatically converts the top PNG 24 image to a PNG 8, potentially slowing performance.
In .NET Web applications containing more than one map service, the Primary Map Resource determines which service will supply the coordinate system and zoom levels of the map. You may have noticed that when you build a Web application in Manager, there is a dropdown labeled "Use coordinate system and extent of:". The service you select here becomes the Primary Map Resource. If you use Visual Studio to build your Web applications, the Primary Map Resource is a property of the Map control.
In general, you should set the ArcGIS Online service as the Primary Map Resource. The only appropriate scenario to set a different service as the Primary Map Resource is if the service has been cached with the same coordinate system, tile origin, tile size, and DPI as ArcGIS Online.