Class: Service

new H.service.extension.geofencing.Service (opt_options) Deprecated : since 3.1.30.12

This class provides a functionality for the geofencing use case of the HERE Fleet Telematics API

It's not allowed to call the constructor directly (an IllegalOperationError is thrown). Instead an instance of this Service can be retrieved by calling the factory method H.service.Platform#getGeofencingService on a platform instance.

Name Type Description
opt_options H.service.Options optional

Configuration options for the service

Throws:
Example
// Assumption: the platform is instantiated
fleetService = platform.getGeofencingService();

Extends

Members

H.service.extension.geofencing.Service.CONFIG_KEY string Deprecated : since 3.1.63.0 staticconstant

The property name to use when specifying options for this service within the H.service.Platform.Options#servicesConfig.

H.service.extension.geofencing.Service.EntryPoint string Deprecated : since 3.1.63.0 static

List of available entry points. At the moment only proximity search entry point is available.

Properties:
Name Description
SEARCH_PROXIMITY

Methods

addEventListener (type, handler, opt_capture, opt_scope) inherited

This method adds a listener for a specific event.

Note that to prevent potential memory leaks, you must either call removeEventListener or dispose on the given object when you no longer need it.

Name Type Description
type string

The name of the event

handler function

An event handler function

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function

addOnDisposeCallback (callback, opt_scope) inherited

This method adds a callback which is triggered when the EventTarget object is being disposed.

Name Type Description
callback function

The callback function.

opt_scope Object optional

An optional scope for the callback function

dispatchEvent (evt) inherited

This method dispatches an event on the EventTarget object.

Name Type Description
evt H.util.Event | string

An object representing the event or a string with the event name

dispose () inherited

This method removes listeners from the given object. Classes that extend EventTarget may need to override this method in order to remove references to DOM Elements and additional listeners.

This method returns the configured service URL.

Returns:
Type Description
H.service.Url

removeEventListener (type, handler, opt_capture, opt_scope) inherited

This method removes a previously added listener from the EventTarget instance.

Name Type Description
type string

The name of the event

handler function

A previously added event handler

opt_capture boolean optional

true indicates that the method should listen in the capture phase (bubble otherwise)

opt_scope Object optional

An object defining the scope for the handler function

request (entryPoint, params, onResult, onError)H.util.ICancelable Deprecated : since 3.1.63.0

This method fetches resource with the provided name from the HERE Fleet Telematics API

Name Type Description
entryPoint H.service.extension.geofencing.Service.EntryPoint

The entry point of the HERE Fleet Telematics API.

params H.service.ServiceParameters

A key-value map of query parameters to use for the request.

onResult function(H.service.ServiceResult)

The callback which is called when result is returned

onError function(Error)

The callback which is called when error occurred (i.e request timeout, or server error)

Throws:

If passed arguments are invalid

Type
H.lang.InvalidArgumentError
Returns:
Type Description
H.util.ICancelable a handle that allows to cancel the request.
Example
// Search for geo fence geometries within a given radius around the asset position
// Assumption: the platform is instantiated
var fleetService = platform.getGeofencingService();
fleetService.request(
    H.service.extension.geofencing.Service.EntryPoint.SEARCH_PROXIMITY,
    {
      'layer_ids': ['LAYER1', 'LAYER2'],
      'proximity': '52.53,13.38,100',
      'key_attributes': ['NAME', 'NAME']
    },
    console.log, console.error);