map


URI

<maps_uri>/{id}[.<format>]

Supported methods

GET, PUT, DELETE, HEAD

Parent resource

maps

Child resources

mapStatus, mapShareSetting, mapVisitCount

Introduction

Map resource. Support to view, change and delete.

Supported Methods:

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

Resource hierarchy

HTTP request methods

Execute the HTTP request on the following URI, where supermapiportal is the server name, with rjson being the output format.

http://supermapiportal:8090/iportal/web/maps/{id}.rjson

GET request

Get the specified map info.

Response structure

The structure of the response resource representation after executing the GET request on the map resource will be as follows:

Name Type Description
authorizeSetting List<IportalAuthorizeEntity> Authorization infomation.
center Point2D The map center.
controls List<String> The control set of map display.
createTime Long Created date.
description String Map description info.
epsgCode Integer The EPSG codes corresponding to the projected coordinate system.
extent Rectangle2D The map extent.
id Integer The map unique identifier.
isDefaultBottomMap Boolean Whether it is the default base map.
layers List<Layer> The map layer list.
level Integer The zoom level of the map.
nickname String User's nickname.
sourceType SourceType The source types of maps.
status ViewerMapStatus The map status save and publish. This parameter is expired, that is, SuperMap iPortal 8C or higher version won't use this parameter.
tags List<String> The map label.
thumbnail String The map thumbnail path.
title String Map name.

units

String Map unit. Default is degrees. Optional value is degrees (or dd), m, ft, km, mi and inches.

updateTime

Long Update time.

userName

String username

visitCount

Integer The map view counts.
checkStatus CheckStatus Filter according to audit status.

Response example

The returned rjson format representation after executing the GET request on the map resource http://localhost:8090/iportal/web/maps/3.rjson is as follows:

{

    "authorizeSetting": [

        {

            "aliasName": "admin",

            "entityId": null,

            "entityName": "admin",

            "entityType": "USER",

            "permissionType": "DELETE"

        }

    ],

    "center": {

        "x": 4503.62403215259,

        "y": -3861.91147219247

    },

    "centerString": "{\"x\":4503.624032152586,\"y\":-3861.9114721924716}",

    "checkStatus": "SUCCESSFUL",

    "checkTime": null,

    "checkUser": null,

    "checkUserNick": null,

    "controls": null,

    "controlsString": "",

    "createTime": 1489386722043,

    "description": null,

    "epsgCode": -1000,

    "extent": null,

    "extentString": "",

    "id": 3,

    "isDefaultBottomMap": false,

    "layers": [

        {

            "WMTSOption": null,

            "WMTSOptionString": "null",

            "bounds": {

                "bottom": -7668.24529207453,

                "left": 48.397189336313,

                "leftBottom": {

                    "x": 48.397189336313,

                    "y": -7668.24529207453

                },

                "right": 8958.85087496886,

                "rightTop": {

                    "x": 8958.85087496886,

                    "y": -55.5776523104111

                },

                "top": -55.5776523104111

            },

            "boundsString": "{\"top\":-55.577652310411075,\"left\":48.39718933631297,\"bottom\":-7668.245292074532,\"leftBottom\":{\"x\":48.39718933631297,\"y\":-7668.245292074532},\"right\":8958.850874968857,\"rightTop\":{\"x\":8958.850874968857,\"y\":-55.577652310411075}}",

            "cartoCSS": null,

            "datasourceName": null,

            "features": null,

            "featuresString": "null",

            "id": 3,

            "identifier": null,

            "isVisible": true,

            "layerType": null,

            "mapId": 3,

            "markers": null,

            "markersString": "null",

            "name": null,

            "opacity": 1,

            "prjCoordSys": {

                "coordSystem": null,

                "coordUnit": "METER",

                "distanceUnit": "METER",

                "epsgCode": -1000,

                "name": "Planar coordinate system---m",

                "projection": null,

                "projectionParam": null,

                "type": "PCS_NON_EARTH"

            },

            "prjCoordSysString": "{\"distanceUnit\":\"METER\",\"projectionParam\":null,\"epsgCode\":-1000,\"coordUnit\":\"METER\",\"name\":\"Planar coordinate system---m\",\"projection\":null,\"type\":\"PCS_NON_EARTH\",\"coordSystem\":null}",

            "scales": null,

            "scalesString": "null",

            "style": null,

            "styleString": "null",

            "subLayers": null,

            "subLayersString": "null",

            "themeSettings": null,

            "title": "Changchun city map",

            "type": "SUPERMAP_REST",

            "url": "http://192.168.112.122:8090/iserver/services/map-changchun/rest/maps/ChangchunMap",

            "wmtsOption": null,

            "zindex": null

        }

    ],

    "level": null,

    "nickname": "admin",

    "resolution": 0,

    "sourceType": "SUPERMAP_REST",

    "status": null,

    "tags": [

        "System map"

    ],

    "thumbnail": "http://192.168.120.40:8090/iportal/services/../resources/thumbnail/map3.png",

    "title": "Changchun city map",

    "units": null,

    "updateTime": 1489386722079,

    "userName": "admin",

    "verifyReason": null,

    "visitCount": 1

}

PUT request

Modifies the specified map info. Only the authorizated map can be edited, namely, "permissionType": "READWRITE".

Request parameter

Following arguments need to be transmitted in the request sent:

Name Type Description

units

String Map unit. Default is degrees. Optional value is degrees (or dd), m, ft, km, mi and inches.
level Integer The map scale.
center Point2D The map center.
controls List<String> The control set of map display.
description String Map description info.
epsgCode Integer The EPSG codes corresponding to the projected coordinate system.
extent Rectangle2D The map extent.
status ViewerMapStatus The map status save and publish. This parameter is expired, that is, SuperMap iPortal 8C or higher version won't use this parameter.
tags List<String> The map label.
layers List<Layer> The map layer list.
title String Map name.
thumbnail String The map thumbnail path.
sourceType SourceType The map source type.
authorizeSetting List<IportalAuthorizeEntity> The authorization info.

Response structure

The returned resource representation structure is as follows:

Field Type Description
succeed boolean Whether it is successful to modify the map.
error Httperror Error. If the modify the map successfully, it would not have this field.

Response example

Modify the map name. Execute the PUT request on the map   resource: http://localhost:8090/iportal/web/maps/4.rjson. The request body is as follows:

{

    "units": null,

    "level": 0,

    "center": {

        "id": "SuperMap.Geometry.Point_62",

        "x": 0,

        "y": -2.2351741790771E-08

    },

    "controls": [],

    "description": "No description",

    "epsgCode": 3857,

    "extent": {

        "left": -80306576.405087,

        "bottom": -51659201.196255,

        "right": 80306576.405087,

        "top": 51659201.196255

    },

    "thumbnail": "http://192.168.120.40:8091/iserver/services/map-china400/rest/maps/China/entireImage.png",

    "scale": 1.69016357160266E-09,

    "authorizeSetting": [

        {

            "permissionType": "DELETE",

            "aliasName": "admin",

            "entityType": "USER",

            "entityName": "admin",

            "entityId": null

        },

        {

            "permissionType": "READ",

            "aliasName": "GUEST",

            "entityType": "USER",

            "entityName": "GUEST",

            "entityId": null

        }

    ],

    "status": null,

    "title": "China_test",

    "tags": [

        "System map"

    ],

    "userName": "admin",

    "sourceType": "SUPERMAP_REST",

    "visitCount": 4,

    "resolution": 156543.033928045,

    "id": null,

    "layers": [

        {

            "title": "China",

            "url": "http://192.168.120.40:8091/iserver/services/map-china400/rest/maps/China",

            "opacity": 1,

            "zindex": 0,

            "type": "SUPERMAP_REST",

            "layerType": "BASE_LAYER",

            "name": null,

            "bounds": {

                "left": -20037508.342789,

                "bottom": -20037508.342789,

                "right": 20037508.342789,

                "top": 20037508.342789

            }

        }

    ]

}

The response result in rjson format returned is as follows:

{ "succeed": true}

DELETE request

Deletes the specified id map.

Response structure

The returned resource representation structure is as follows:

Field Type Description
succeed boolean Whether it is successful to delete the map.
error Httperror Error. If the delete the map successfully, it would not have this field.

Response example

Execute the GET request on the map resource http://localhost:8090/iportal/web/maps/8.rjson. Return rjson results:

{ "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 map resource exists, or if the map resource can be accessed by clients. It can also determine if the map resource supports an output format <format> if performed on a URI with .<format> included.

See