Appearance
Edit Layer Style API
API Information
- Request Path:
/analysis/task/edit/layer/style - Request Method:
POST - Content-Type:
application/json
Request Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | String | Yes | User authentication token |
| Content-Type | String | Yes | Must be set to application/json |
Request Parameters
| Parameter | Type | Required | Description | Constraints |
|---|---|---|---|---|
| layer | String | Yes | Layer Name | |
| style | Style | Yes | layer |
Style Object
| Field | Type | Description |
|---|---|---|
| fill | String | fill color |
| fillOpa | Float | fill opacity |
| stroke | String | stroke color |
| strokeOpa | Float | stroke opacity |
| strokeWt | Float | stroke width |
Request Body Example
json
{
"layer": "v2_aiidfzdiazedhzhfghd",
"style": {
"fill": "#D62424",
"fillOpa": 0.8,
"stroke": "#FFFFFF",
"strokeOpa": 0.8,
"strokeWt": 1
}
}Response Body Structure
CommonResponse Object
| Field | Type | Description |
|---|---|---|
| code | Integer | Response status code |
| message | String | Response message |
| data | Boolean | Style edit result, true indicates success |
Response Examples
Success Response
json
{
"code": 200,
"message": "success",
"data": true
}Failure Response
json
{
"code": 404,
"message": "Layer not found",
"data": false
}Error Code Description
| Error Code | Description |
|---|---|
| 200 | Success |
| 400 | Request parameter error |
| 401 | Unauthorized |
| 404 | Layer not found |
| 500 | Server internal error |
Usage Instructions
- This API is used to edit layer styling for analysis task results
- User authentication is required
- Task ID and layer ID must be provided
- Returns boolean indicating style edit success
Notes
- Task ID and layer ID are required
- Style parameters can include colors, opacity, labels, etc.
- User authentication token must be included in request headers