Descripción de fuentes de rótulo con nombre asignado
Descripción
Esta operación toma una fuente de rótulo con nombre asignado o una lista de fuentes de rótulo con nombre asignado como entrada en la solicitud y devuelve la descripción de sus fuentes de rótulo. Las partes de las fuentes de rótulo de la respuesta de esta descripción se pueden incorporar en la sección de capas de rótulo de la definición de un mapa, lo que después se puede utilizar en una solicitud de generación de mapas de REST o de generación de leyenda de mapa, por ejemplo, para ayudar a determinar la visibilidad de sus rótulos.
Formato de dirección URL de HTTP GET
Utilice una solicitud GET para una única fuente de rótulo con nombre asignado:
GET http://<server>:<port>/rest/Spatial/MappingService/labelSources/labelSourcePath.json
Formato de dirección URL de HTTP POST
Utilice una solicitud POST para varias fuentes de rótulo con nombre asignado:
POST http://<server>:<port>/rest/Spatial/MappingService/labelSources.json
{
"namedLabelSourcesList":[
"labelSourcePath1",
"labelSourcePath2"]
}
Devolución
Devuelve la descripción JSON de una o más fuentes de rótulo con nombre asignado.
Ejemplo: solicitud GET
http://<server>:<port>/rest/Spatial/MappingService/labelSources/Samples/NamedLabelSources/WorldCountriesLabelSource.json
Respuesta:
{
"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
}
}
}
Ejemplo: solicitud POST
Solicitud POST que describe varias fuentes de rótulo con nombre asignado:
http://<server>:<port>rest/Spatial/MappingService/labelSources.json
{
"namedLabelSourcesList":[
"/Samples/NamedLabelSources/WorldCountriesLabelSource",
"/Samples/NamedLabelSources/DCCitiesLabelSource"
]
}
Respuesta:
{
"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
}
}
]
}