URI
<map_uri>/area[.<format>]
Supported methods
Parent resource
ERROR: Variable (map_link) is undefined.
Introduction
The area resource, as a child resource of the map resource, is an algorithm resource for measuring the area on the map according to the given parameters. The parameters must be included in the URI and cannot be put inside the request body.
Supported methods
- GET: Measures the area on the map (mapName ) according to the given parameters and returns the measuring result.
- HEAD: Gets the metadata information of the area resource. Verifies that the area resource exists, the parameters are legitimate and the client has the permission to access the resource.
Supported output formats: rjson, json, html, xml.
GIS Services Resource Hierarchy

HTTP request methods
Implement the HTTP request on the following URI and return the response in rjson format. In the URI below, supermapiserver is the name of the server, and WorldMap is the map name ({mapName}).
http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/area.rjson
GET Request
Measures the specified area on the map according to the given parameters.
Request parameters
The parameters point2Ds & unit must be included in the URI and cannot be put inside the request body.
Field | Type | Definition |
point2Ds | Point2D[] | Points set for measuring. |
unit | Unit | The unit of the expected result. |
prjCoordSys | PrjCoordSys | Optional Request the coordinate system of the map. The system will perform projection transformation if the coordinate system set by this parameter is different from the map's original coordinate system, and the area on the target projected coordinate system will be returned. When using this parameter, you should construct it with the fields in PrjCoordSys, input coordinate system by just pass epsgCode is also supported, such as: prjCoordSys={"epsgCode":3857}. |
_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 area resource. The response is as follows:
Name | Type | Description |
area | double | The area. |
unit | Unit | The unit for the distance. |
Example usage
Implement the GET request on the area resource with http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/area.rjson?point2Ds=[{"x": 23.00,"y":34.00},{"x": 53.55,"y":12.66},{"x": 73.88,"y":12.6}]&unit=METER and get the response in rjson format, as showed below:
{
"area": 3.1575909302391533E12,
"distance": -1,
"unit": "METER"
}
To get the area of a specific coordinate system, implement GET request like the following:
http://supermapiserver:8090/iserver/services/map-world/rest/maps/WorldMap/area.rjson?point2Ds=[{"x":23.00,"y":34.00},{"x": 53.55,"y":12.66},{"x": 73.88,"y":12.6}]&unit=METER&prjCoordSys={"epsgCode":3857}
{
"area": 216.00460000000004,
"distance": -1,
"unit": "METER"
}
HEAD request
Returns the same HTTP response header as GET does, but no response entity is included. HEAD request can be used to get metadata from the response message header without transporting the entire response content. Metadata includes information about the media type, character encoding, compression encoding, the length of the entity content, etc. The HEAD operation of the image resource can also have request parameters similar to those in the GET operation.
The HEAD request helps check the existence of the area resource and whether it can be accessed by the client. By implementing the HEAD request on the URI, with .<format> appended to the end, we can quickly get to know whether the area resource supports the representation in <format> or not.
See
- ERROR: Variable (map_link) is undefined.
- Constructing REST Requests
- Status Codes
- SuperMap iServer REST API Output Formats
- GIS Services Resource Hierarchy