In a previous post Design patterns for Web maps, we talked about strategies and challenges for displaying different types of map layers on the Web for the best performance. Caching is the fastest way to serve Web maps, but requires an initial time investment for cache creation. Also, datasets that change often and cover a broad extent cannot be cached and require a (typically slower) dynamically drawn service.
ArcGIS Server 9.3.1 addresses some of these performance challenges through a new drawing engine, developed for rendering ESRI map services as fast as possible. The faster dynamic drawing in 9.3.1 can speed up your dynamic map services that cannot be cached due to their oft-changing nature. It can also shorten the tile creation time for cached services.
All map services begin with a map document (MXD) that you create in ArcMap. A new toolbar in ArcMap, the Map Service Publishing Toolbar, does two things to help improve your map’s performance.
First, the toolbar helps you analyze your MXD for potential performance issues. At this stage you can identify bottlenecks that may not be directly related to the drawing engine. These could be things such as missing spatial and attribute indexes, or layers projecting on the fly.
Second, the toolbar gives you a way to create a map service definition (MSD), which is a new file type that works with the optimized drawing engine. The diagram below shows that either an MSD or an MXD can be published as a map service. In this post we’ll talk about when you would use each file type.
The rest of this article answers common questions about the 9.3.1 MSD-based map service and its related functionality.
What aspects of drawing are improved with the MSD-based map service?
First of all, it’s faster. With MSD-based services, complex symbology does not impose the same performance burden that it does with MXD-based services. Your maps should draw at speeds comparable to or faster than similar ArcIMS maps.
MSD-based services also support anti-aliasing which smoothes the edges of lines and text. This is something that was previously available only in cached map services (with a significant performance cost during cache creation). Anti-aliasing with MSD-based services is available over a range of quality levels, allowing you to get the visual benefits while maintaining control over performance. You also have the option to apply the anti-aliasing to the text only.
The quality of map images return by the MSD-based service is also superior to previous versions. MSD-based services produce less “salt and pepper” dithering because the PNG 8 and GIF palettes are chosen using the 256 most frequently-used colors in the map. Also, with PNG 32 services, true transparent values are used in the anti-aliasing, which means you won’t see artifacts from the background color.
What is the MSD file and can I edit it?
The map service definition (MSD) file is a new file used by the fast map service drawing engine introduced at ArcGIS Server 9.3.1. The MSD file always starts with an MXD map document. You use the Map Service Publishing Toolbar to analyze your MXD in ArcMap. Once you’ve addressed issues returned by the analysis, you use the same toolbar to either publish the service or save the MSD file.
ArcGIS Server is the only application that can read the MSD file.
Where is the MSD file created when I publish a service from the Map Service Publishing Toolbar?
When you publish a service using the Map Service Publishing Toolbar, an MSD file is created in your ArcGIS Server input directory. This is a new directory at 9.3.1 that is registered with ArcGIS Server as the default location of your MSD files. In a one-machine deployment, it’s located by default at c:arcgisserverarcgisinput.
The toolbar also allows you to save your MSD file to other locations.
Do I need to be an administrator to publish map services with the Map Service Publishing Toolbar?
You need to be a member of the agsadmin group on the GIS server in order to publish map services from the Map Service Publishing Toolbar. If you’re not a member of agsadmin, you should save the MSD in a location where the server administrator can access and publish it.
If I make changes to the MXD, do I have to create the MSD again?
Yes. Once you save an MSD file, it is no longer connected with its parent MXD. If you edit the MXD, you need to use the Map Service Publishing Toolbar to save an updated MSD. Once you’ve overwritten the old MSD, restart the map service to register the changes.
What capabilities (server object extensions) are supported for MSD-based map services?
The WMS and KML capabilities are available with MSD-based services, as well as the default Mapping capability. Custom server object extensions can also work with MSD-based services but they cannot access fine-grained ArcObjects; they must use the coarse-grained methods on MapServer and its related classes.
At 9.3.1 can I still publish an MXD as a map service?
Yes. You can still publish an ArcMap document (MXD) as a service. The service will not use the new drawing engine introduced at 9.3.1; it will use the traditional drawing engine from ArcGIS Server versions 9.3 and previous.
Can I cache an MSD-based service?
Absolutely. Cache tiles get created more quickly with an MSD-based service. Also, anti-aliasing works better with caching when you use MSD-based services. The anti-aliasing occurs faster than it does with MXD-based services, and you can control the level of anti-aliasing on both features and text.
What layer types are supported by the MSD-based map service?
The MSD-based map service supports the most commonly-used feature layers and rasters. Exceptions, such as CAD layers or TINs, should be placed in a separate, MXD-based map service. The Map Service Publishing Toolbar will log errors for any layers in your map document that would prevent you from publishing an MSD-based service.
What else is available / not available in MSD-based services?
The ArcGIS Server 9.3.1 Help topic Supported functionality in MSD-based map services contains a full list of layers, symbology, and functionality available in MSD-based map services. All symbols are available with the exception of chart symbols, representations, and 3D symbols. The Maplex labeling engine is not available.
How am I supposed to use MSD-based services if Maplex isn’t supported?
Use annotation layers, which are supported in MSD-based map services. Annotation gives you the benefit of the Maplex label placement without the server having to make computationally intensive label placement decisions on every map request. Creating cache tiles from the annotated map will cause the service to run even faster.
If you can’t make annotation and you need Maplex, your next best option for performance is to create a cache from an MXD-based service.
When publishing raster datasets, should I use MSD-based map services or should I use the ArcGIS Server Image extension?
In most circumstances, it’s faster to serve rasters through the ArcGIS Server Image extension instead of through map services (whether cached or dynamic). A cached map service may be a more scalable solution if your service will receive many hits at once, but a cache requires creation and maintenance of tiles. MSD-based services will speed up the tile creation if you decide to use a cached service.
When should I use anti-aliasing?
Choose anti-aliasing when you are creating a production-quality map for an Internet audience. Anti-aliased images have become a standard for Web 2.0 map appearance.
Be aware that high levels of anti-aliasing can slow performance. Use the Preview button on the Map Service Publishing Toolbar to get an idea of the visual and performance effects of the anti-aliasing. If the dynamic anti-aliasing is not fast enough, you can lower the quality of the anti-aliasing or you may consider caching the service.
What licensing do I need in order to use the Map Service Publishing Toolbar?
The Map Service Publishing Toolbar is available at all license levels of ArcGIS Desktop (ArcView, ArcEditor, and ArcInfo). You can use the toolbar to analyze and improve the performance of your map documents even if you won’t be publishing an MSD-based map service.
Contributed by Ty Fitzpatrick and Sterling Quinn of the ESRI software development team
Commenting is not enabled for this article.