You can overwrite a map service that has been published to a stand-alone ArcGIS Server 10.6 or later site. Reasons to overwrite a map service include updating source data, changing map or layer properties (such as layer symbology), editing the item description, and setting different configuration properties. When you overwrite a map service, any maps that use the service in client applications are updated.
Overwriting a map service is similar to publishing a map service. You can change most of the properties of a map service when you overwrite it, including properties of the map as well as configuration settings. You can't change the name of the service or its location (the service URL). If you are overwriting a cached map service, see the Cached map service considerations section below. You can also use ArcPy to overwrite a map service to a stand-alone server. To learn more, see Automate publishing services.
- Open the ArcGIS Pro project that contains the map that you published as a map service.
Typically, you overwrite a map service with the same map (modified or not) that you previously published from ArcGIS Pro. However, you can overwrite a map service with a different map, either in the same project or in a different project, as long as the project contains a publisher or administrator connection to the server.
- Optionally, make changes to the map or its layers.
- In the Catalog pane, on the Project tab, expand Servers and browse to the map service you want to overwrite.
- Right-click the service and click Overwrite .
- On the Select Map dialog box, browse to the map you want to use to overwrite the service, select it, and click OK.
The Overwrite Map Service pane appears. On the General tab, under Service Details, the name of the map service is displayed. You cannot change this name. Under the name, you can use the item description from the published service (the default) or update the item description from the map you are using to overwrite the service.
- Accept the default Use the item description from the service item description or click Use the item description from the map.
The default option preserves the item description of the current service. The other option overwrites it.
- Optionally, modify the information in the Summary and Tags fields.
The fields may be empty if you used the item description from the map in the previous step.
You can enter a maximum of 128 tags.
- Optionally, under Data, change the option to reference registered data or copy all data to the server.
For information about the data options, hover over the Information icon .
- Optionally, click the Configuration tab at the top of the pane and change capabilities or service properties of the service.
For information about capabilities and service properties, see Configure a map service.
- Optionally, click the Content tab to view the new service structure and its sublayers.
- Under Finish Publishing, click Analyze to review any errors and warnings.
Errors and warnings are listed on the Messages tab. Right-click a message to open its help topic or take corrective action in the software. Errors must be resolved before you can overwrite your map service. Resolving warnings is recommended but not required.
Note:Analyzer help topics refer to the web layer that corresponds to the service type being published. For example, you may see references to map image layers for an analyzer issued for your map service.
- Once you have resolved any errors, and optionally resolved any warnings, click Publish .
- When the service is successfully overwritten, click the Manage the map service link at the bottom of the pane to access the service REST endpoint.
If you configured the service to draw using tiles from a cache, click the Jobs button under Finish Publishing to view the cache status in the Job Status pane.
Cached map service considerations
When you overwrite a map service that is drawn using tiles from a cache (a cached map service), you can keep the existing cache. If you keep the existing cache, you can change many configuration properties of the service. For example, you can increase the visible range of the service by publishing additional levels of detail at either end of the range. However, you can't change the tiling scheme, image format, compression, or cache directory.
Cache extent settings made when you published the map service previously are not preserved. By default, when you overwrite the service, the map extent is cached. Optionally, you can cache tiles for an area of interest. In either case, tiles are cached only for the levels of detail that you select on the Build Tiles and Calculate dialog box.
Also, if you keep the existing cache, the map you use to overwrite the service must have the same spatial reference as the service and a spatial extent that overlaps the service.
If you do not keep the existing cache, you can change all configuration properties of the service, including the tiling scheme and cache directory. Essentially, this is the same as publishing a new map service, except that the service URL does not change.
Also, if you do not keep the existing cache, the tiles that were built for the previously published map service are disassociated from the service and new tiles are built. The old tiles are associated with an automatically generated service named <service_name>_<timestamp>. You can delete this service from the server at your convenience.
Follow the steps below to access the Keep existing cache setting:
- At the top of the Overwrite Map Service pane, click the Configuration tab.
- Under Capabilities, next to Map, click the Configure Service Properties button .
- Under Layer Drawing, check or uncheck the Keep existing cache box.