visible


URI

<tempLayer_uri>/visible[.<format>]

Supported methods

GET, PUT, HEAD

Parent resource

tempLayer

Introduction

As a child resource of the tempLayer resource, the visible resource is used to identify if the temporary layer is visible. By implementing the PUT request on the visible resource, you can modify the visibility of the layer.

Supported methods

Supported output formats: rjson, json, html, xml.

GIS Services Resource Hierarchy

root maps map tempLayersSet tempLayers tempLayers visible

HTTP request methods

Implement the HTTP request on the following URI, where supermapiserver is the name of the server, WorldMap is the name of the map (mapName), 1 is the ID of a temporary layer set (tempLayersID) in WorldMap, Capitasl@world@@WorldMap represents the WorldMap sublayer in the temporary layer set, and you will get the representation of the visible resource of the temporary layer in rjson format.

http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/1/Capitals@World@@WorldMap/visible.rjson

GET Request

Gets the description of the layer visibility. Returning true: visible, false: invisible.

Request parameters

Field Type Definition
_cache boolean [Optional parameters]
Whether to use cache, the default is True. False means close all the caches.

Response structure

Implement the GET request on the visible resource and you will get a boolean value that indicates if the layer is visible.

Example of response

Implement the GET request on the visible resource with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/1/Capitals@World@@WorldMap/visible.rjson and you will get a boolean value indicating whether the layer Capitals@world is visible as shown below.

true

PUT request

Modifies the visibility of the layer.

Request parameters

To implement the PUT request to modify the visibility of the layer, certain parameters must be included in the PUT request body.If the parameters are legitimate, the server will modify the visibility of the layer according to the parameters.

The parameter here is a boolean value that indicates if the layer is visible.

Response structure

Implement the PUT request on the visible resource, the response is shown as below. (The representation is in the entity body of the response message):

Name Type Description
succeed boolean

Whether the modify visibility of the temporary layer is successful. If not, there would be an error message.

error HttpError The error message. If the modification is successful, the field will be absent.

Example of response

Implement the PUT request on the visible resource with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/tempLayersSet/1/Capitals@World@@/WorldMap/visible.rjson and you will get the response as shown below:

false

Then change the layer Capitals@world to invisible. If successful, the response in rjson format is shown as below.

{

    "succeed": true

}

HEAD request

Asks for the response identical to the one that would correspond to a GET request, but without the response body. This is useful for retrieving meta-information written in response headers, without having to transport the entire content. The meta-information includes the media-type, content-encoding, transfer-encoding, content-length, etc.

HEAD request can be used to check if the visible resource exists, or if the resource can be accessed by clients. It can also determine if the visible resource supports an output format <format> if performed on a URI with .<format> included.

See