Class: NetworkAnalystServiceBase

SuperMap.NetworkAnalystServiceBase

The NetworkAnalystServiceBase class.

new SuperMap.NetworkAnalystServiceBase(url, options)

NetworkAnalystServiceBase.js, line 6

The NetworkAnalystServiceBase class.

Name Type Description
url string

The url of the service.

options Object

The optional parameter.

Extends

Members

The format of the query result.Two formats of iServerJSON and GeoJSON are currently supported. The parameter format is "ISERVER", "GEOJSON".

Default Value:
SuperMap.DataFormat.GEOJSON

Methods

inherited ajaxPolling()

CommonServiceBase.js, line 248

If the number of remaining requests failed is not 0 after the request fails, recapture the url and send request.

inherited calculatePollingTimes()

CommonServiceBase.js, line 266

Calculate how many times the remaining request failed.

destroy()

NetworkAnalystServiceBase.js, line 29

Disposes the resource. The property that references resource is set to null.

inherited getCredential(url){SuperMap.Credential}

CommonServiceBase.js, line 190

Get credential information.

Name Type Description
url string

The service url.

Returns:
Type Description
SuperMap.Credential The credential information object.

inherited getUrlCompleted(result)

CommonServiceBase.js, line 221

Execute this method after the request is successful.

Name Type Description
result Object

The result object returned by the server side.

inherited getUrlFailed(result)

CommonServiceBase.js, line 232

Execute this method after the request is failed.

Name Type Description
result Object

The result object returned by the server side.

inherited isServiceSupportPolling()

CommonServiceBase.js, line 293

Judge whether the service supports polling.

inherited request(options)

CommonServiceBase.js, line 144
Name Type Description
options Object

Optional parameters.

Name Type Default Description
method string 'GET' optional

Request method, including: "GET","POST","PUT","DELETE".

url string optional

The request URL.

params Object optional

The params are only applicable to the request sent by the GET method as a set of key value pairs added to the URL by query string.

data String optional

The data sent to the server.

success function

The callback function after the success request.

failure function

The callback function after the failure request.

scope Object optional

If the callback function is a common method of the object, set the scope of the object.

isInTheSameDomain boolean optional

Whether the request is in the current domain.

withCredentials boolean false optional

Request whether to carry a cookie.

serviceProcessCompleted(result)

NetworkAnalystServiceBase.js, line 38

Call this function when edited.

Name Type Description
result Object

The result object returned by server.

inherited serviceProcessFailed(result)

CommonServiceBase.js, line 317

Execute this method if process failed.

Name Type Description
result Object

The result object returned by the server side.

toGeoJSONResult(result){GeoJSONObject}

NetworkAnalystServiceBase.js, line 55

Transform the data that contain geometry to GeoJson.

Name Type Description
result Object

The result object returned by the server.

Returns:
Type Description
GeoJSONObject the GeoJson object.