Class: MeasureService

ol.supermap.MeasureService

The MeasureService class.

new ol.supermap.MeasureService(url, options)

MeasureService.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.

serverType SuperMap.ServerType SuperMap.ServerType.ISERVER optional

Type of server iServer|iPortal|online.

withCredentials boolean false optional

Request whether to carry a cookie.

crossOrigin boolean optional

Whether to allow cross-domain requests.

headers Object optional

Request header.

Extends

Methods

measure(params, type, callback){ol.supermap.MeasureService}

MeasureService.js, line 45

Measure distance or area.

Name Type Description
params SuperMap.MeasureParameters

The MeasureParameters class.

type string

The mode of measure.

callback RequestCallback

The callback of result data returned by the server side.

Returns:
Type Description
ol.supermap.MeasureService The measure result.

measureArea(params, callback)

MeasureService.js, line 35

Measure area.

Name Type Description
params SuperMap.MeasureParameters

The MeasureParameters class.

callback RequestCallback

The callback of result data returned by the server side.

measureDistance(params, callback)

MeasureService.js, line 25

Measure distance.

Name Type Description
params SuperMap.MeasureParameters

The MeasureParameters class.

callback RequestCallback

The callback of result data returned by the server side.