- URL:
- https://<root>/<serviceName>/TopographicProductionServer/addProduct
- Methods:
POST- Required Capability:
- Requires a Professional or Professional Plus user type account and a Topographic Mapping server extension license.
- Version Introduced:
- 10.9
Description
The add operation adds a definition of a map product to the Topographic Production Service resource that can be used to generate a map.
Request parameters
| Parameter | Details |
|---|---|
(Required) | The JSON definition of a map product. Review each property's help topic to learn more. |
(Optional) |
The path to a raster on disk (server path) or the URL of an image service. |
(Optional) | A JSON array of additional layers to include in the final product. Syntax: |
(Required) | The response format. The default format is Values: |
Example usage
Add a map product definition to the service using the add REST operation.
Request URL and parameters:
https://organization.example.com/<context>/rest/services/SampleService/TopographicProductionServer/addProductproductDefinition=
{
"version": 0,
"name": "ExampleProduct",
"type": "MTM",
"gridType": "TM50",
"description": "Test Masking Product",
"sheetIDField": "NRN",
"featureDataset": "BM",
"extractionDatabase": "MTM.gdb",
"scale": "1:50,000",
"productVersions": [
{
"name": "TRD_4_5",
"template": "MTM50_Layout.pagx"
}
],
"resources": [
{
"name": "SourceWorkspace",
"type": 3,
"value": ""
},
{
"name": "AOILayer",
"type": 2,
"value": ""
},
{
"name": "SheetID",
"type": 1,
"value": ""
},
{
"name": "Layout",
"type": 6,
"value": ""
},
{
"name": "ProductFiles",
"type": 7,
"value": ""
}
],
"dataExtraction": [
{
"name": "MapService",
"type": 19,
"id": "MapService",
"description": "Test extract from Map Service",
"parameters": [
{
"name": "input_data",
"value": "https://organization.example.com/<context>/rest/services/PostGreTest/MapServer"
},
{
"name": "AOI",
"value": "[AOILayer]\\Extent"
},
{
"name": "buffer",
"value": "5 kilometers"
},
{
"name": "spatial_relationship",
"value": "esriSpatialRelIntersects"
},
{
"name": "DefinitionQuery",
"value": ""
},
{
"name": "includeDatasets",
"value": ""
},
{
"name": "excludedDatasets",
"value": ""
}
]
}
],
"operations": [
{
"name": "MapResource",
"type": 11,
"id": "62C3FFDE-F2C9-401E-9F57-50BECC3E15AP",
"description": "Update BaseMap DataSources",
"parameters": [
{
"name": "in_map",
"value": "BaseMap"
}
]
},
{
"name": "Grid",
"type": 4,
"id": "22C3FFDE-F4C9-401E-9F57-50BRCC3E15GN",
"description": "BaseMap Grid",
"toolName": "MakeGridsAndGraticulesLayer_topographic",
"validation": 2,
"properties": {
"type": "PropertySet",
"propertySetItems": [
"AddOutputToMap",
"BaseMap"
]
},
"parameters": [
{
"name": "in_grid_xml",
"value": "[GridLocator]\\BaseMap"
},
{
"name": "area_of_interest",
"value": "[AOILayer]"
},
{
"name": "target_feature_dataset",
"value": "[SourceWorkspace]\\BM_GRD"
},
{
"name": "out_layer_name",
"value": "BMGrid"
},
{
"name": "grid_name",
"value": "BMGrid"
},
{
"name": "configure_layout",
"value": "CONFIGURE_LAYOUT"
},
{
"name": "layout",
"value": "[Layout]"
},
{
"name": "map_frame",
"value": "BaseMap Map Frame"
}
]
},
{
"name": "CreateMasks",
"type": 7,
"id": "35C3FFRF-F2C9-401E-9F57-30BECC3E15KF",
"description": "Create Masks for Base Map",
"toolName": "MakeMasksFromRules_topographic",
"validation": 2,
"properties": {
"type": "PropertySet",
"propertySetItems": [
"MapName",
"BaseMap"
]
},
"parameters": [
{
"name": "in_map",
"value": "BaseMap"
},
{
"name": "rule_file",
"value": "[ProductFiles]\\MTM_Basemap_Masking_Rules.xml"
},
{
"name": "out_feature_dataset",
"value": "[SourceWorkspace]\\Masks"
}
]
},
{
"name": "ApplyMasks",
"type": 7,
"id": "93C3FFDE-F2C9-401K-9F57-50BRCC3E15RW",
"description": "Apply Masks for Base Map",
"toolName": "ApplyMasksFromRules_topographic",
"validation": 2,
"properties": {
"type": "PropertySet",
"propertySetItems": [
"MapName",
"BaseMap"
]
},
"parameters": [
{
"name": "in_map",
"value": "BaseMap"
},
{
"name": "rule_file",
"value": "[ProductFiles]\\MTM_Basemap_Masking_Rules.xml"
},
{
"name": "in_feature_dataset",
"value": "[SourceWorkspace]\\Masks"
}
]
}
]
}
raster=https://gisserver.example.com/server/rest/services/DEM/ImageServer
ancillaryLayers=
{
"layer": "https://gisserver.example.com/server/rest/services/SampleWorldCities/MapServer/1",
"featureClass": "",
"map": "BaseMap",
"layerIndex": "0"
}
f=jsonJSON Response syntax
The following is the syntax of a response:
{
"success": <true | false>
}JSON Response example
The following is an example response when the product is added successfully:
{
"productName": "ExampleProduct",
"success": true
}The following is an example error response:
{
"error": {
"code": -2147211754,
"message": "Map product ExampleProduct already exists. Map product names must be unique.",
"details": [
]
}
}