Beschreibung benannter Beschriftungsquellen
Beschreibung
Bei diesem Vorgang wird eine benannte Beschriftungsquelle oder eine Liste mit benannten Beschriftungsquellen bei der Anforderung als Eingabe verwendet, und die Beschreibung dieser Beschriftungsquellen wird zurückgegeben. Die Beschriftungsquellenteile der sich hieraus ergebenden Antwort können in den Beschriftungslayer-Abschnitt einer Kartendefinition aufgenommen werden. Diese kann anschließend beispielsweise in einer REST-Anforderung „Render Map“ oder „Render Map Legend“ verwendet werden, um die Sichtbarkeit ihrer Beschriftungen zu ermitteln.
ACL-Autorisierungsfluss
Um die Beschreibung der Beschriftungsquellen aufzulisten, benötigt der Benutzer (oder die Rollen, zu denen er gehört) wie folgt die Ausführungsberechtigung für die benannten Layer:
- „EXECUTE“ für den Entitätstyp „Location Intelligence.Named Resources“
URL-Format von HTTP-GET-Anforderungen
Verwenden Sie eine GET-Anforderung für eine einzelne benannte Beschriftungsquelle:
GET http://<server>:<port>/rest/Spatial/MappingService/labelSources/labelSourcePath.json
URL-Format von HTTP-POST-Anforderungen
Verwenden Sie eine POST-Anforderung für mehrere benannte Beschriftungsquelle:
POST http://<server>:<port>/rest/Spatial/MappingService/labelSources.json
{
"namedLabelSourcesList":[
"labelSourcePath1",
"labelSourcePath2"]
}
Gibt zurück:
Gibt die JSON-Beschreibung von mindestens einer benannten Beschriftungsquelle zurück.
Beispiel: GET-Anforderung
http://<server>:<port>/rest/Spatial/MappingService/labelSources/Samples/NamedLabelSources/WorldCountriesLabelSource.json
Antwort:
{
"labelSourceDescription": {
"name": "/Samples/NamedLabelSources/WorldCountriesLabelSource",
"labelSource": {
"table": {
"type": "NamedTable",
"name": "/Samples/NamedTables/WorldcapTable"
},
"themeList": null,
"labelProperties": {
"style": {
"type": "MapBasicTextStyle",
"MapBasicFontStyle": {
"type": "MapBasicFontStyle",
"fontName": "Microsoft Sans Serif",
"style": 0,
"size": 12,
"foregroundColor": "0",
"backgroundColor": "16777215"
}
},
"angle": {
"value": 0,
"uom": "DEGREE"
},
"expression": null,
"horizontalAlignment": "CENTER",
"verticalAlignment": "MIDDLE",
"xOffset": null,
"yOffset": null,
"allowOverlap": true,
"allowOutOfView": false,
"allowDuplicate": "ALL",
"recalculationType": "OUT_OF_VIEW",
"labelRelativeOrientation": null,
"justification": "CENTER",
"referenceGeometry": null
},
"visibilityConstraintList": {
"visibilityConstraint": [
{
"type": "ZoomVisibilityConstraint",
"maxZoom": {
"value": 6000,
"uom": "MILE"
},
"minZoom": {
"value": 0,
"uom": "MILE"
}
}
]
},
"name": "World Countries",
"renderable": true
}
}
}
Beispiel: POST-Anforderung
POST-Anforderung, die mehrere benannte Beschriftungsquellen beschreibt:
http://<server>:<port>rest/Spatial/MappingService/labelSources.json
{
"namedLabelSourcesList":[
"/Samples/NamedLabelSources/WorldCountriesLabelSource",
"/Samples/NamedLabelSources/DCCitiesLabelSource"
]
}
Antwort:
{
"labelSourceDescriptions": [
{
"name": "/Samples/NamedLabelSources/WorldCountriesLabelSource",
"labelSource": {
"table": {
"type": "NamedTable",
"name": "/Samples/NamedTables/WorldcapTable"
},
"themeList": null,
"labelProperties": {
"style": {
"type": "MapBasicTextStyle",
"MapBasicFontStyle": {
"type": "MapBasicFontStyle",
"fontName": "Microsoft Sans Serif",
"style": 0,
"size": 12,
"foregroundColor": "0",
"backgroundColor": "16777215"
}
},
"angle": {
"value": 0,
"uom": "DEGREE"
},
"expression": null,
"horizontalAlignment": "CENTER",
"verticalAlignment": "MIDDLE",
"xOffset": null,
"yOffset": null,
"allowOverlap": true,
"allowOutOfView": false,
"allowDuplicate": "ALL",
"recalculationType": "OUT_OF_VIEW",
"labelRelativeOrientation": null,
"justification": "CENTER",
"referenceGeometry": null
},
"visibilityConstraintList": {
"visibilityConstraint": [
{
"type": "ZoomVisibilityConstraint",
"maxZoom": {
"value": 6000,
"uom": "MILE"
},
"minZoom": {
"value": 0,
"uom": "MILE"
}
}
]
},
"name": "World Countries",
"renderable": true
}
},
{
"name": "/Samples/NamedLabelSources/DCCitiesLabelSource",
"labelSource": {
"table": {
"type": "NamedTable",
"name": "/Samples/NamedTables/dcwashcities"
},
"themeList": null,
"labelProperties": {
"style": {
"type": "MapBasicTextStyle",
"MapBasicFontStyle": {
"type": "MapBasicFontStyle",
"fontName": "Verdana",
"style": 0,
"size": 7,
"foregroundColor": "0",
"backgroundColor": "15657438"
}
},
"angle": null,
"expression": null,
"horizontalAlignment": "CENTER",
"verticalAlignment": "MIDDLE",
"xOffset": null,
"yOffset": null,
"allowOverlap": false,
"allowOutOfView": false,
"allowDuplicate": "INTERLAYER",
"recalculationType": "OUT_OF_VIEW",
"labelRelativeOrientation": "PARALLEL",
"justification": "CENTER",
"referenceGeometry": null
},
"visibilityConstraintList": {
"visibilityConstraint": [
{
"type": "ZoomVisibilityConstraint",
"maxZoom": {
"value": 50,
"uom": "MILE"
},
"minZoom": {
"value": 0,
"uom": "MILE"
}
}
]
},
"name": "dcwash~cities",
"renderable": true
}
}
]
}