If the amount of file data you upload exceeds the limit of the data amount of the SuperMap RESTDATA service, the RESTMAP service will be used to build the layer. The HostedTileLayer object defines the properties required by the layer constructed in this way.
Note: The data volume limit of SuperMap RESTDATA service is: the number of point features does not exceed 100,000, the number of line features does not exceed 20,000, and the number of area features does not exceed 10,000.
Attribute | Type | Description |
layerType |
string |
[Required] The layer type. Fixed constant: "HOSTED_TILE". |
name |
string |
[Required] The layer name. |
visible |
boolean |
[Required] The visibility of the layer. |
serverId |
string |
[Required] The generated data item id for the uploaded data in iPortal. |
opacity |
number |
[Optional] The opacity of the layer. The maximum value is 1 and the minimum value is 0. |
visibleScale |
[Optional] Stores the visible scale range of the current layer. |
|
autoUpdateTime |
number |
[Optional] The time for the layer data to be automatically refreshed, in milliseconds. |
Use the file upload method to add a "Beijing-Tianjin area map", and use the RESTMAP service to construct a layer conforming to the WebMap specification.
{
"layers": [
{
"layerType": "HOSTED_TILE",
"name": "Beijing-Tianjin area map",
"visible": true,
"serverId":"123",
"visibleScale": {
"maxScale": "1:2256.999",
"minScale": "1:591658710.909"
},
"autoUpdateTime": 720000,
"opacity": 0.85
}
],
}