Overlaying your own caches with ArcGIS Online services in the .NET Web ADF |
|
Release 9.3.1 |
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 WGS 1984 Web Mercator or WGS 1984 Web Mercator (Auxiliary Sphere) (for the current services), or WGS 1984 (for the legacy services). If you choose to not use a matching coordinate system, your map will need to be projected on the fly, thereby slowing performance.
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 ArcGIS Online services have worldwide coverage at a large variety of scales. You do not need to create your cache using all these scales, but where possible, the scale levels you use should match the ones used by ArcGIS Online services.
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 tiling scheme of the service you'll be overlaying (Microsoft Virtual Earth/Google Maps for current ArcGIS Online services, ArcGIS Online for legacy services). This will populate all of the high-precision scale values automatically. You can then add and remove scales as needed.
The basemap services from ArcGIS Online use the JPG image format, while the reference overlay caches use PNGs. (You can use the Directory of Services page to see which caches are considered basemaps and which are reference overlays.) Although the JPG format displays faster than other formats, it does not support transparency. Therefore, any basemap 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.) 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.