A map service provides access to the contents of a map document (.mxd) or a published map document (.pmf). To create a map service, you need to first create the map document, then publish it as a service. Optionally, you can create a map cache and associate it with the service for faster navigation.
You must use ArcGIS Desktop to create the map document. The ArcGIS Desktop Help contains many topics on using ArcMap to create map documents. A good starting place is An overview of ArcMap.
Creating a map for a service involves different considerations than preparing a printed map. Map service users generally cannot see all of the map at once, and will need to pan and zoom to view their areas of interest.
Using a cached map service is always the fastest way to serve map services. This is because the map is only rendered once, at the time the cache is created. However, creating a map is not always practical for dynamic or changing data. See the topic What is a cached map service? for help with understanding when and how to create a map cache.
When it is not appropriate to create a map cache, follow the tips below for preparing map documents for best performance as GIS services.
Set scale-dependent rendering for data layers—Use scale-dependent rendering to ensure that unneeded layers do not draw when the map is zoomed out. Data-intensive or detailed layers may be more appropriate only when the map is zoomed in to a larger scale.
Remove unused layers and data frames —Check both the page layout and data views and ensure that your map document is clear of data frames and layers that are unrelated to the map's purpose. For example, if the page layout view contains data frames that will not be shown in any application that uses the service, remove the data frames.
Use definition queries—A definition query can act as a filter to limit the amount of data on the map. For example, if you are creating a map of a state and your feature class contains data for the entire country, you can use a definition query to display only those features that fall within the state boundaries.
Simplify layer symbology—Complex symbols take longer to draw. Use simple line and fill symbols where possible, avoiding symbology that contains multiple layers, complicated dash patterns, hash lines, or outlines. Highway shield symbols may also slow drawing performance.
An easy way to simplify some of the symbology in your map is to use the ESRI_Optimized style. This style contains both line and fill symbols that are designed to perform better while still maintaining a close visual appearance to their counterparts within the default ESRI style. See the topic Organizing style contents in the ArcGIS Desktop Help to learn how to work with this style.
Remember:If you can make a map cache, you don't need to simplify your symbology. This is because the map gets drawn only once, when the cache is created. Once the cache is ready, you'll have a collection of map images that the server can return very quickly.
Use annotation instead of labels—Since labels require the computer to make placement decisions, it's generally faster to use an annotation layer.
Simplify labels—If your map contains labels, use the label and feature conflict weights sparingly. Halos, offsets, and other label effects will also slow down performance.
Set scale-dependent rendering for labels—When a map is zoomed out, more labels need to be drawn, which takes time. Examine your map document and determine if some labels do not need to be shown at smaller scales.
The ArcGIS Desktop Help contains additional performance and design tips in the topic Displaying layers in interactive maps.
As of ArcGIS Server 9.2, Service Pack 2, you can consume map services with rotated data frames in .NET Web applications built with Manager or the Web ADF. When you create a Web application in Manager, you specify which service's coordinate system and extent the map will use. This service, known as the Primary Map Resource, also determines the rotation of the map.
When using map services with rotated data frames, if your Primary Map Resource is rotated, you cannot use non-rotatable service types, such as ArcIMS and WMS, in the same map. If you set the non-rotatable service as the Primary Map Resource, the Web ADF will un-rotate on the fly your rotated service so that it lines up with the non-rotatable service.
Note: Maps with rotated data frames cannot be cached using the caching tools available in ArcCatalog.
To make the map document available as a service, follow the steps in Publishing a GIS resource to the server. When prompted to choose a resource, browse to the map document you created.
When you publish a map service, you have the option to enable capabilities which create additional services that work from or with the map service. Some capabilities require that your map document contain specific types of layers.
This table lists the capabilities that are available with map services, and any special requirements for enabling the capability. This help system contains topics on each of the service types created by these capabilities, which you can access by clicking on the capability name below:
Capability | What it does | Special requirements? |
Mapping | Provides access to the contents of a map document | This capability is always enabled for any map document. |
WMS | Uses a map document to create a service compliant with the Open Geospatial Consortiom's (OGC) Web Map Service (WMS) specification | None |
Mobile Data Access | Allows extraction of data from a map document to a mobile device | None |
KML | Uses a map document to create Keyhole Markup Language (KML) features | None |
Geodata Access | Allows an end user to perform replication and data extraction in ArcMap | Requires a layer from a geodatabase. Creates a geodata service that works with the map service. |
Geoprocessing | Provides access to geoprocessing models from a tool layer. A tool layer represents a model that has been dragged and dropped from ArcToolbox into a map document's Table of Contents. | Requires a tool layer. Creates a geoprocessing service that works with the map service. |
Network Analysis | Solves transportation network analysis problems using the Network Analyst extension | Requires a network analysis layer referencing a network dataset |
A map cache is a collection of pre-rendered map tiles that can be used for display of a map service. As mentioned above, cached services display quickly because the map image does not have to be rendered on the fly; the cost of rendering the image is paid only once when the cache is created.
The map service needs to be created and started before you can create the cache. You can access the cache generation tool through the Service Properties page in ArcCatalog. For detailed instructions see Creating a map cache.
Once you've created the map service, it will be available to both local and Internet clients of the GIS server. All map services can be viewed with ArcGIS Server, ArcGIS Explorer, and ArcGIS Desktop. In some cases, enabling additional capabilities on the service will allow additional types of clients to access it. For example, enabling the KML capability allows you to view the service in Google Earth (as KML).
ArcGIS Server's Web ADF includes a Map control that you can use to display a map service in a Web application. The Map control supports navigation shortcuts such as panning and scroll wheel zoom, and can also be buddied to a Toolbar control to support map query and advanced navigation. If you don't want or need the map control, you can still connect to and work with a map service programmatically using the libraries included with ArcGIS Server and the Web ADF. For more information, see the ArcGIS Server Developer Help.
You can obtain ArcGIS Explorer for free from the ESRI Web site or with the ArcGIS Server product, and use it as a client for your ArcGIS Server services. ArcGIS Server map services can be added to both two and three-dimensional maps in ArcGIS Explorer.
Both ArcMap and ArcGlobe support adding ArcGIS Server maps services as data. Additionally, you can use ArcCatalog to preview and administer a map service.
If you are accessing a Web-enabled map service using ArcGIS Desktop, the Binary messaging format must be enabled for the service. Messaging formats are set at the root folder level, so to change the messaging format for a service you must use ArcCatalog or Manager to edit to the root folder's properties. By default, both Binary and SOAP messaging formats are enabled.