Class: MapService

mapboxgl.supermap.MapService

The MapService class.

new mapboxgl.supermap.MapService(url, options)

MapService.js, line 6
Name Type Description
url string

The url of service.

options Object

The optional parameters.

Name Type Default Description
proxy string optional

Service agent address.

withCredentials boolean false optional

Request whether to carry a cookie.

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER optional

Type of server iServer|iPortal|online。

crossOrigin boolean optional

Whether to allow cross-domain requests.

headers Object optional

Request header.

Example
new mapboxgl.supermap.MapService(url)
 .getMapInfo(function(result){
    //doSomething
})

Extends

Events

inherited initialized

ServiceBase.js, line 23

Triggered after the constructor construct succeeds.

Properties:
Name Type Description
this Object

This object.

Methods

getMapInfo(callback){mapboxgl.supermap.MapService}

MapService.js, line 30

Get information of the map.

Name Type Description
callback RequestCallback

The callback of result data returned by the server side.

Returns:
Type Description
mapboxgl.supermap.MapService Get service information.

getTilesets(callback){mapboxgl.supermap.MapService}

MapService.js, line 51

Get information of tile sets.

Name Type Description
callback RequestCallback

The callback of result data returned by the server side.

Returns:
Type Description
mapboxgl.supermap.MapService Get service information.