Overlaying your own caches with ArcGIS Online services in the .NET Web ADF |
|
Release 9.3 |
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 services, 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.
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 services from 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 services.
Following is a list of the scales used by ArcGIS Online services. 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 you build your cache to overlay ArcGIS Online services, you don't have to enter these values into the caching tools. Instead, in the Caching tab of the Service Properties, choose to load an existing tiling scheme. Then choose the ArcGIS Online tiling scheme from the dropdown list. This will populate all of the high-precision scale values automatically. You can then add and remove scales as needed.
The base map services from 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 services from 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 target=_blank). 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 uses the same coordinate system as ArcGIS Online and is cached at scales that correspond with a sequential subset of the ArcGIS Online scales.