Maps API for JavaScript Developer's Guide

H.service.EnterpriseRoutingService

Class Summary

Extends: H.service.AbstractRestService

The service was deprecated and succeeded by Routing REST API (see H.service.RoutingService).
Deprecated:
since 3.0.12.5

[ For full details, see the Class Details ]

Method Summary

Table 1. Methods
Methods

calculateRoute (calculateRouteParams, onResult, onError)

This method sends a "calculateroute" request to the Enterprise Routing REST API and calls the onResult function when the service response becomes available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

getRoute (getRouteParams, onResult, onError)

This method sends a "getroute" request to Enterprise Routing REST API and calls the onResult callback function when the service response become available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

getLinkInfo (getLinkInfoParams, onResult, onError)

This method sends a "getlinkinfo" request to Enterprise Routing REST API and calls the onResult callback function when the service response become available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

calculateIsoline (calculateIsolineParams, onResult, onError)

This method sends a "calculateisoline" request to Enterprise Routing REST API and calls the onResult function when the service response becomes available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

configure (appId, appCode, useHTTPS, useCIT, opt_baseUrl) : {H.service.IConfigurable}

This method receives configuration parameters from the platform, that can be used by the object implementing the interface. The method must not be invoked directly.

Class Description

The service was deprecated and succeeded by Routing REST API (see H.service.RoutingService).

This class encapsulates Enterprise Routing REST API as a service stub. An instance of this class can be retrieved by calling the factory method on a platform instance. H.service.Platform#getEnterpriseRoutingService.

Example

// Assumption: the platform is instantiated
router = platform.getEnterpriseRoutingService();

var calculateIsoline = {
    'start': 'geo!52.5,13.4',
    'distance': '1000,2000',
    'mode': 'fastest;car;traffic:disabled'
  },
  onResult = function(result) {
    console.log(result.Response.isolines[0]);
  },
  onError = function(error) {
     console.log(error);
  };
router.calculateIsoline(calculateIsoline, onResult, onError);

Constructor Details

H.service.EnterpriseRoutingService(opt_options)

Parameters:
 
opt_options:
{H.service.EnterpriseRoutingService.Options=} [optional]
 
An object containing initialization options for EnterpriseRoutingService

Method Details

calculateRoute (calculateRouteParams, onResult, onError)

This method sends a "calculateroute" request to the Enterprise Routing REST API and calls the onResult function when the service response becomes available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

Please refer to the Routing REST API documentation for information on available parameters and the response object structure.

Parameters:
 
calculateRouteParams:
{H.service.ServiceParameters}
 
An object containing the service parameters to be sent with the routing request
onResult:
{function(H.service.ServiceResult)}
 
A function to be called when the Enterprise Routing REST API provides a response to the request
onError:
{function(Error)}
 
A function to be called if a communication error occurs during the JSON-P request

getRoute (getRouteParams, onResult, onError)

This method sends a "getroute" request to Enterprise Routing REST API and calls the onResult callback function when the service response become available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

Please refer to the Routing REST API documentation for information on available parameters and the response object structure.

Parameters:
 
getRouteParams:
{H.service.ServiceParameters}
 
An object containing the service parameters to be sent with the route request
onResult:
{function(H.service.ServiceResult)}
 
A function to be called once the Enterprise Routing REST API provides a response to the request
onError:
{function(Error)}
 
A function to be called if a communication error occurs during the JSON-P request

getLinkInfo (getLinkInfoParams, onResult, onError)

This method sends a "getlinkinfo" request to Enterprise Routing REST API and calls the onResult callback function when the service response become available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

Please refer to the Routing REST API documentation for information on available parameters and the response object structure.

Parameters:
 
getLinkInfoParams:
{H.service.ServiceParameters}
 
An object containing the service parameters to be sent with the request
onResult:
{function(H.service.ServiceResult)}
 
A function to be called when the Enterprise Routing REST API provides a response to the request
onError:
{function(Error)}
 
A function to be called if a communication error occurs during the JSON-P request

calculateIsoline (calculateIsolineParams, onResult, onError)

This method sends a "calculateisoline" request to Enterprise Routing REST API and calls the onResult function when the service response becomes available (providing a H.service.ServiceResult object) or the onError callback if a communication error occurs.

Please refer to the Routing REST API documentation for information on available parameters and the response object structure.

Parameters:
 
calculateIsolineParams:
{H.service.ServiceParameters}
 
An object containing the service parameters to be sent with the routing request.
onResult:
{function(H.service.ServiceResult)}
 
A function to be called when the Enterprise Routing REST API provides a response to the request.
onError:
{function(Error)}
 
A function to be called if a communication error occurs during the JSON-P request

configure (appId, appCode, useHTTPS, useCIT, opt_baseUrl) : {H.service.IConfigurable}

This method receives configuration parameters from the platform, that can be used by the object implementing the interface. The method must not be invoked directly.

Example

// assuming that the configurable object exists and the variable name is "configurable"
var platform = new H.service.Platform({
  'app_id': [your app_id],
  'app_code': [your app_code],
})
platform.configure(configurable);
Parameters:
 
appId:
{string}
 
The application ID to identify the client against the platform (mandatory)
appCode:
{string}
 
The application code to identify the client against the platform (mandatory)
useHTTPS:
{boolean}
 
The indicator whether secure communication is used (true), the default is false
useCIT:
{boolean}
 
A value indicating whether Customer Integration Testing ("CIT") is used (true), the default is false
opt_baseUrl:
{H.service.Url=} [optional]
 
The base URL of the platform, the default is http://api.here.com. Note that if the useHTTPS flag is set to true, the URL scheme specified in the opt_baseUrl is overridden to use HTTPS.
Returns:
 
{H.service.IConfigurable}
An instance of IConfigurable reflecting the new configuration