maps


URI

<portal_uri>/maps[.<format>]

Supported methods

GET, POST, DELETE, HEAD

Parent resource

portal

Child resources

map, mapShareSettings, bottomMap

Introduction

The maps resource is the list of all the maps that the current user is allowed to view. It supports creating a new map, and delete maps in a batch.

Supported Methods:

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

Resource hierarchy

HTTP request methods

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

http://supermapiportal:8090/iportal/web/maps.rjson

GET request

Gets the list of all the maps that the current user is allowed to view.

Request parameter

If no query parameters are set, it will return the list of all the maps on the first page that the current user can access. To query with the specified conditions, you should set the following parameters according to your needs and include them in URI.

Name Type Description

userNames

String[] Filter by map creator.
tags String[] Filter by map tag.
suggest Boolean Whether it is the default basemap.
sourceTypes SourceType[] Filter by map source, including SUPERMAP_REST, MAPVIEWER, WMS, WMTS.
mapStatus ViewerMapStatus [Deprecated] Filter by map status. This parameter is outdated and not used any more in 8C and higher versions.
keywords String[] Filter by keyword.
epsgCode int Gets the map of the specified projection.
orderBy OrderBy[] Sort field. Multiple fields can be used in sorting.
currentPage int Page number.
pageSize int Size of each page.
dirIds Integer[] Filter by directory id.
isNotInDir Boolean Filter by whether the maps are grouped. By default, the value is false. If the value is true, then the list of all the ungrouped maps will be returned. If the value is false, then the list of all the maps will be returned.
Ungrouped means the map is not added to the catalog.
updateStart Long Query all the maps that are updated at this time and after this time. If this parameter value is null or less than 0, then the start time is infinite.
updateEnd Long Query all the maps that are updated at this time and before this time. If this parameter value is null or less than 0, then the end time is infinite.
visitStart Long Query all the maps that are accessed at this time and after this time. If this parameter value is null or less than 0, then the start time is infinite.
visitEnd Long Query all the maps that are accessed at this time and before this time. If this parameter value is null or less than 0, then the start time is infinite.
filterFields FilterFields[] Field filtering for keyword queries. Field names need to be capitalized. For example, to filter based on the keyword of the map creator, you need to set keywords=["admin"]&filterFields=["NICKNAME"].
checkStatus CheckStatus Filter according to audit status.
createStart Long

Query maps created at this time value or after this time value. If the value is null or less than 0, the start time for map queries is not limited.

createEnd Long

Query maps created earlier than or at this time value. If the value is null or less than 0, the end time for map queries is not limited.

Response structure

Execute a GET request on the maps resource, the list of all the maps that the current user is allowed to view will be returned. It includes the following fields:

Field Type Description
content List<ViewerMap> Page content.
currentPage int The current page number.
pageSize int The size of each page.
searchParameter SearchParameter The search parameter for the current page.
total int The total record number.
totalPage int The total number of pages.

Response example

Exectue a GET request on maps resource http://localhost:8090/iportal/web/maps.rjson, the returned representation in rjson format will be as follows:

If you want to get the specified map list information, for example, filter according to the map creator's key characters, you need to set keywords=["admin"]&filterFields=["NICKNAME"], that is ,execute GET request on maps resource: http://localhost:8090/iportal/web/maps.rjson?keywords=["admin"]&filterFields=["NICKNAME"], the returned rjson format representation will be as follows:

POST request

Creates a new map.

Request parameter

To send a POST request, the following parameters need to be included in the request body.

Name Type Description

units

String The map unit. By default, it is "degrees". It can be 'degrees' (or 'dd'), ‘m’, 'ft', 'km', 'mi', 'inches'.
level Integer Zoon level.
center Point2D The center of the map.
controls List<String> The set of map controls.
description String Map description info.
epsgCode Integer The EPSG code of the projection.
extent Rectangle2D The map extent.
id Integer The unique map idenfication.
status ViewerMapStatus [Deprecated] The map status of SAVE or PUBLISH. This parameter is outdated and not used any more in 8C and higher versions.
tags List<String> The map tag.
layers List<Layer> The list of map layers.
title String Map name.
thumbnail String The path of map thumbnail.
sourceType SourceType The type of map source.
isDefaultBottomMap Boolean Whether it is the default basemap.
authorizeSetting List<IportalAuthorizeEntity> The authorization info. It can be null, which means the map is private.
searchSetting String The filter settings for POI searching on specified layers.

Response structure

The structure for the resource representation returned should be:

Field Type Description
newResourceID String The id of the new created map.
newResourceLocation String The URI of the new created map.
succeed boolean Whether the new map is created successfully.
customResult Map<String,Object> The result of the custom operation, such as: the state of the map audit result.

Response example

Execute a POST request on the maps resource: http://localhost:8090/iportal/web/maps.rjson to create a new map with the following request body:

Then the returned result in rjson format will be:

{

    "newResourceID": "2049385603",

    "succeed": true,

    "customResult": {

        "checkStatus": "SUCCESSFUL"

    },

    "newResourceLocation": "http://rdc.ispeco.com/web/maps/2049385603"

}

DELETE request

Deletes maps. The URL should include the id array of the maps to be deleted.

Response structure

The structure for the resource representation returned should be:

Field Type Description
succeed boolean Whether the map is deleted successfully.
error Httperror Error message. This field will not be created if the map is deleted successfully.

Response example

The returned rjson format representation after executing the DELETE request on the maps resource http://localhost:8090/iportal/web/maps.rjson?ids=[1,2], to delete the maps with id being "1" and "2" in a batch:

{ "succeed": true}

HEAD request

Returns the same HTTP response header as the GET request, but no response entity, which can be used to retrieve the meta data contained in response message header without having to transmit the entire response content. Meta data information includes media type, character coding, compression coding, entity content length, etc.

HEAD request is used to determine whether the maps resource exists, or if the user has the authority to access it. By executing an HEAD request with a .<format> URI, you can quickly determine whether the maps resource supports the <format> representation.

See