You are viewing the documentation for an older major version of the AWS SDK for JavaScript.
The modular AWS SDK for JavaScript (v3), the latest major version of AWS SDK for JavaScript, is now stable and recommended for general use. For more information, see the Migration Guide and API Reference.

Class: AWS.Location

Inherits:
AWS.Service show all
Identifier:
location
API Version:
2020-11-19
Defined in:
(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Suite of geospatial services including Maps, Places, Routes, Tracking, and Geofencing

Sending a Request Using Location

var location = new AWS.Location();
location.associateTrackerConsumer(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the Location object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var location = new AWS.Location({apiVersion: '2020-11-19'});

You can also set the API version globally in AWS.config.apiVersions using the location service identifier:

AWS.config.apiVersions = {
  location: '2020-11-19',
  // other service API versions
};

var location = new AWS.Location();

Version:

  • 2020-11-19

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

new AWS.Location(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Examples:

Constructing a Location object

var location = new AWS.Location({apiVersion: '2020-11-19'});

Options Hash (options):

  • params (map)

    An optional map of parameters to bind to every request sent by this service object. For more information on bound parameters, see "Working with Services" in the Getting Started Guide.

  • endpoint (String|AWS.Endpoint)

    The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like 'https://{service}.{region}.amazonaws.com' or an Endpoint object.

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

    the AWS credentials to sign requests with. You can either specify this object, or specify the accessKeyId and secretAccessKey options directly.

  • credentialProvider (AWS.CredentialProviderChain)

    the provider chain used to resolve credentials if no static credentials property is set.

  • region (String)

    the region to send service requests to. See AWS.Location.region for more information.

  • maxRetries (Integer)

    the maximum amount of retries to attempt with a request. See AWS.Location.maxRetries for more information.

  • maxRedirects (Integer)

    the maximum amount of redirects to follow with a request. See AWS.Location.maxRedirects for more information.

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

    whether input parameters should be validated against the operation description before sending the request. Defaults to true. Pass a map to enable any of the following specific validation features:

    • min [Boolean] — Validates that a value meets the min constraint. This is enabled by default when paramValidation is set to true.
    • max [Boolean] — Validates that a value meets the max constraint.
    • pattern [Boolean] — Validates that a string value matches a regular expression.
    • enum [Boolean] — Validates that a string value matches one of the allowable enum values.
  • computeChecksums (Boolean)

    whether to compute checksums for payload bodies when the service accepts it (currently supported in S3 only)

  • convertResponseTypes (Boolean)

    whether types are converted when parsing response data. Currently only supported for JSON based services. Turning this off may improve performance on large response payloads. Defaults to true.

  • correctClockSkew (Boolean)

    whether to apply a clock skew correction and retry requests that fail because of an skewed client clock. Defaults to false.

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

    whether the provided endpoint addresses an individual bucket (false if it addresses the root API endpoint). Note that setting this configuration option requires an endpoint to be provided explicitly to the service constructor.

  • s3DisableBodySigning (Boolean)

    whether S3 body signing should be disabled when using signature version v4. Body signing can only be disabled when using https. Defaults to true.

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

    when region is set to 'us-east-1', whether to send s3 request to global endpoints or 'us-east-1' regional endpoints. This config is only applicable to S3 client. Defaults to legacy

  • s3UseArnRegion (Boolean)

    whether to override the request region with the region inferred from requested resource's ARN. Only available for S3 buckets Defaults to true

  • retryDelayOptions (map)

    A set of options to configure the retry delay on retryable errors. Currently supported options are:

    • base [Integer] — The base number of milliseconds to use in the exponential backoff for operation retries. Defaults to 100 ms for all services except DynamoDB, where it defaults to 50ms.
    • customBackoff [function] — A custom function that accepts a retry count and error and returns the amount of time to delay in milliseconds. If the result is a non-zero negative value, no further retry attempts will be made. The base option will be ignored if this option is supplied. The function is only called for retryable errors.
  • httpOptions (map)

    A set of options to pass to the low-level HTTP request. Currently supported options are:

    • proxy [String] — the URL to proxy requests through
    • agent [http.Agent, https.Agent] — the Agent object to perform HTTP requests with. Used for connection pooling. Defaults to the global agent (http.globalAgent) for non-SSL connections. Note that for SSL connections, a special Agent object is used in order to enable peer certificate verification. This feature is only available in the Node.js environment.
    • connectTimeout [Integer] — Sets the socket to timeout after failing to establish a connection with the server after connectTimeout milliseconds. This timeout has no effect once a socket connection has been established.
    • timeout [Integer] — Sets the socket to timeout after timeout milliseconds of inactivity on the socket. Defaults to two minutes (120000).
    • xhrAsync [Boolean] — Whether the SDK will send asynchronous HTTP requests. Used in the browser environment only. Set to false to send requests synchronously. Defaults to true (async on).
    • xhrWithCredentials [Boolean] — Sets the "withCredentials" property of an XMLHttpRequest object. Used in the browser environment only. Defaults to false.
  • apiVersion (String, Date)

    a String in YYYY-MM-DD format (or a date) that represents the latest possible API version that can be used in all services (unless overridden by apiVersions). Specify 'latest' to use the latest possible version.

  • apiVersions (map<String, String|Date>)

    a map of service identifiers (the lowercase service class name) with the API version to use when instantiating a service. Specify 'latest' for each individual that can use the latest available version.

  • logger (#write, #log)

    an object that responds to .write() (like a stream) or .log() (like the console object) in order to log information about requests

  • systemClockOffset (Number)

    an offset value in milliseconds to apply to all signing times. Use this to compensate for clock skew when your system may be out of sync with the service time. Note that this configuration option can only be applied to the global AWS.config object and cannot be overridden in service-specific configuration. Defaults to 0 milliseconds.

  • signatureVersion (String)

    the signature version to sign requests with (overriding the API configuration). Possible values are: 'v2', 'v3', 'v4'.

  • signatureCache (Boolean)

    whether the signature to sign requests with (overriding the API configuration) is cached. Only applies to the signature version 'v4'. Defaults to true.

  • dynamoDbCrc32 (Boolean)

    whether to validate the CRC32 checksum of HTTP response bodies returned by DynamoDB. Default: true.

  • useAccelerateEndpoint (Boolean)

    Whether to use the S3 Transfer Acceleration endpoint with the S3 service. Default: false.

  • clientSideMonitoring (Boolean)

    whether to collect and publish this client's performance metrics of all its API requests.

  • endpointDiscoveryEnabled (Boolean|undefined)

    whether to call operations with endpoints given by service dynamically. Setting this

  • endpointCacheSize (Number)

    the size of the global cache storing endpoints from endpoint discovery operations. Once endpoint cache is created, updating this setting cannot change existing cache size. Defaults to 1000

  • hostPrefixEnabled (Boolean)

    whether to marshal request parameters to the prefix of hostname. Defaults to true.

  • stsRegionalEndpoints ('legacy'|'regional')

    whether to send sts request to global endpoints or regional endpoints. Defaults to 'legacy'.

Property Details

endpointAWS.Endpoint (readwrite)

Returns an Endpoint object representing the endpoint URL for service requests.

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

associateTrackerConsumer(params = {}, callback) ⇒ AWS.Request

Creates an association between a geofence collection and a tracker resource. This allows the tracker resource to communicate location data to the linked geofence collection.

You can associate up to five geofence collections to each tracker resource.

Note: Currently not supported — Cross-account configurations, such as creating associations between a tracker resource in one account and a geofence collection in another account.

Service Reference:

Examples:

Calling the associateTrackerConsumer operation

var params = {
  ConsumerArn: 'STRING_VALUE', /* required */
  TrackerName: 'STRING_VALUE' /* required */
};
location.associateTrackerConsumer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConsumerArn — (String)

      The Amazon Resource Name (ARN) for the geofence collection to be associated to tracker resource. Used when you need to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollectionConsumer

    • TrackerName — (String)

      The name of the tracker resource to be associated with a geofence collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchDeleteDevicePositionHistory(params = {}, callback) ⇒ AWS.Request

Deletes the position history of one or more devices from a tracker resource.

Examples:

Calling the batchDeleteDevicePositionHistory operation

var params = {
  DeviceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TrackerName: 'STRING_VALUE' /* required */
};
location.batchDeleteDevicePositionHistory(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceIds — (Array<String>)

      Devices whose position history you want to delete.

      • For example, for two devices: “DeviceIds” : [DeviceId1,DeviceId2]

    • TrackerName — (String)

      The name of the tracker resource to delete the device position history from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Errors — (Array<map>)

        Contains error details for each device history that failed to delete.

        • DeviceIdrequired — (String)

          The ID of the device for this position.

        • Errorrequired — (map)

          Contains the batch request error details associated with the request.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchDeleteGeofence(params = {}, callback) ⇒ AWS.Request

Deletes a batch of geofences from a geofence collection.

Note: This operation deletes the resource permanently.

Service Reference:

Examples:

Calling the batchDeleteGeofence operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  GeofenceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
location.batchDeleteGeofence(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The geofence collection storing the geofences to be deleted.

    • GeofenceIds — (Array<String>)

      The batch of geofences to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Errors — (Array<map>)

        Contains error details for each geofence that failed to delete.

        • Errorrequired — (map)

          Contains details associated to the batch error.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

        • GeofenceIdrequired — (String)

          The geofence associated with the error message.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchEvaluateGeofences(params = {}, callback) ⇒ AWS.Request

Evaluates device positions against the geofence geometries from a given geofence collection.

This operation always returns an empty response because geofences are asynchronously evaluated. The evaluation determines if the device has entered or exited a geofenced area, and then publishes one of the following events to Amazon EventBridge:

  • ENTER if Amazon Location determines that the tracked device has entered a geofenced area.

  • EXIT if Amazon Location determines that the tracked device has exited a geofenced area.

Note: The last geofence that a device was observed within is tracked for 30 days after the most recent device position update.

Service Reference:

Examples:

Calling the batchEvaluateGeofences operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  DevicePositionUpdates: [ /* required */
    {
      DeviceId: 'STRING_VALUE', /* required */
      Position: [ /* required */
        'NUMBER_VALUE',
        /* more items */
      ],
      SampleTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
    },
    /* more items */
  ]
};
location.batchEvaluateGeofences(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The geofence collection used in evaluating the position of devices against its geofences.

    • DevicePositionUpdates — (Array<map>)

      Contains device details for each device to be evaluated against the given geofence collection.

      • DeviceIdrequired — (String)

        The device associated to the position update.

      • Positionrequired — (Array<Float>)

        The latest device position defined in WGS 84 format: [X or longitude, Y or latitude].

      • SampleTimerequired — (Date)

        The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Errors — (Array<map>)

        Contains error details for each device that failed to evaluate its position against the given geofence collection.

        • DeviceIdrequired — (String)

          The device associated with the position evaluation error.

        • Errorrequired — (map)

          Contains details associated to the batch error.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

        • SampleTimerequired — (Date)

          Specifies a timestamp for when the error occurred in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchGetDevicePosition(params = {}, callback) ⇒ AWS.Request

Lists the latest device positions for requested devices.

Service Reference:

Examples:

Calling the batchGetDevicePosition operation

var params = {
  DeviceIds: [ /* required */
    'STRING_VALUE',
    /* more items */
  ],
  TrackerName: 'STRING_VALUE' /* required */
};
location.batchGetDevicePosition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceIds — (Array<String>)

      Devices whose position you want to retrieve.

      • For example, for two devices: device-ids=DeviceId1&device-ids=DeviceId2

    • TrackerName — (String)

      The tracker resource retrieving the device position.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DevicePositions — (Array<map>)

        Contains device position details such as the device ID, position, and timestamps for when the position was received and sampled.

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • ReceivedTimerequired — (Date)

          The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • SampleTimerequired — (Date)

          The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • Errors — (Array<map>)

        Contains error details for each device that failed to send its position to the tracker resource.

        • DeviceIdrequired — (String)

          The ID of the device that didn't return a position.

        • Errorrequired — (map)

          Contains details related to the error code.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchPutGeofence(params = {}, callback) ⇒ AWS.Request

A batch request for storing geofence geometries into a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

Service Reference:

Examples:

Calling the batchPutGeofence operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  Entries: [ /* required */
    {
      GeofenceId: 'STRING_VALUE', /* required */
      Geometry: { /* required */
        Polygon: [
          [
            [
              'NUMBER_VALUE',
              /* more items */
            ],
            /* more items */
          ],
          /* more items */
        ]
      }
    },
    /* more items */
  ]
};
location.batchPutGeofence(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The geofence collection storing the geofences.

    • Entries — (Array<map>)

      The batch of geofences to be stored in a geofence collection.

      • GeofenceIdrequired — (String)

        The identifier for the geofence to be stored in a given geofence collection.

      • Geometryrequired — (map)

        Contains the polygon details to specify the position of the geofence.

        Note: Each geofence polygon can have a maximum of 1,000 vertices.
        • Polygon — (Array<Array<Array<Float>>>)

          An array of 1 or more linear rings. A linear ring is an array of 4 or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form: [longitude, latitude].

          The first linear ring is an outer ring, describing the polygon's boundary. Subsequent linear rings may be inner or outer rings to describe holes and islands. Outer rings must list their vertices in counter-clockwise order around the ring's center, where the left side is the polygon's exterior. Inner rings must list their vertices in clockwise order, where the left side is the polygon's interior.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Errors — (Array<map>)

        Contains additional error details for each geofence that failed to be stored in a geofence collection.

        • Errorrequired — (map)

          Contains details associated to the batch error.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

        • GeofenceIdrequired — (String)

          The geofence associated with the error message.

      • Successes — (Array<map>)

        Contains each geofence that was successfully stored in a geofence collection.

        • CreateTimerequired — (Date)

          The timestamp for when the geofence was stored in a geofence collection in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

        • GeofenceIdrequired — (String)

          The geofence successfully stored in a geofence collection.

        • UpdateTimerequired — (Date)

          The timestamp for when the geofence was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

batchUpdateDevicePosition(params = {}, callback) ⇒ AWS.Request

Uploads position update data for one or more devices to a tracker resource. Amazon Location uses the data when it reports the last known device position and position history. Amazon Location retains location data for 30 days.

Note: Position updates are handled based on the PositionFiltering property of the tracker. When PositionFiltering is set to TimeBased, updates are evaluated against linked geofence collections, and location data is stored at a maximum of one position per 30 second interval. If your update frequency is more often than every 30 seconds, only one update per 30 seconds is stored for each unique device ID. When PositionFiltering is set to DistanceBased filtering, location data is stored and evaluated against linked geofence collections only if the device has moved more than 30 m (98.4 ft).

Service Reference:

Examples:

Calling the batchUpdateDevicePosition operation

var params = {
  TrackerName: 'STRING_VALUE', /* required */
  Updates: [ /* required */
    {
      DeviceId: 'STRING_VALUE', /* required */
      Position: [ /* required */
        'NUMBER_VALUE',
        /* more items */
      ],
      SampleTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789 /* required */
    },
    /* more items */
  ]
};
location.batchUpdateDevicePosition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TrackerName — (String)

      The name of the tracker resource to update.

    • Updates — (Array<map>)

      Contains the position update details for each device.

      • DeviceIdrequired — (String)

        The device associated to the position update.

      • Positionrequired — (Array<Float>)

        The latest device position defined in WGS 84 format: [X or longitude, Y or latitude].

      • SampleTimerequired — (Date)

        The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Errors — (Array<map>)

        Contains error details for each device that failed to update its position.

        • DeviceIdrequired — (String)

          The device associated with the failed location update.

        • Errorrequired — (map)

          Contains details related to the error code such as the error code and error message.

          • Code — (String)

            The error code associated with the batch request error.

            Possible values include:
            • "AccessDeniedError"
            • "ConflictError"
            • "InternalServerError"
            • "ResourceNotFoundError"
            • "ThrottlingError"
            • "ValidationError"
          • Message — (String)

            A message with the reason for the batch request error.

        • SampleTimerequired — (Date)

          The timestamp at which the device position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

calculateRoute(params = {}, callback) ⇒ AWS.Request

Calculates a route given the following required parameters: DeparturePostiton and DestinationPosition. Requires that you first create a route calculator resource

By default, a request that doesn't specify a departure time uses the best time of day to travel with the best traffic conditions when calculating the route.

Additional options include:

  • Specifying a departure time using either DepartureTime or DepartureNow. This calculates a route based on predictive traffic data at the given time.

    Note: You can't specify both DepartureTime and DepartureNow in a single request. Specifying both parameters returns an error message.
  • Specifying a travel mode using TravelMode. This lets you specify an additional route preference such as CarModeOptions if traveling by Car, or TruckModeOptions if traveling by Truck.

Service Reference:

Examples:

Calling the calculateRoute operation

var params = {
  CalculatorName: 'STRING_VALUE', /* required */
  DeparturePosition: [ /* required */
    'NUMBER_VALUE',
    /* more items */
  ],
  DestinationPosition: [ /* required */
    'NUMBER_VALUE',
    /* more items */
  ],
  CarModeOptions: {
    AvoidFerries: true || false,
    AvoidTolls: true || false
  },
  DepartNow: true || false,
  DepartureTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  DistanceUnit: Kilometers | Miles,
  IncludeLegGeometry: true || false,
  TravelMode: Car | Truck | Walking,
  TruckModeOptions: {
    AvoidFerries: true || false,
    AvoidTolls: true || false,
    Dimensions: {
      Height: 'NUMBER_VALUE',
      Length: 'NUMBER_VALUE',
      Unit: Meters | Feet,
      Width: 'NUMBER_VALUE'
    },
    Weight: {
      Total: 'NUMBER_VALUE',
      Unit: Kilograms | Pounds
    }
  },
  WaypointPositions: [
    [
      'NUMBER_VALUE',
      /* more items */
    ],
    /* more items */
  ]
};
location.calculateRoute(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CalculatorName — (String)

      The name of the route calculator resource that you want to use to calculate a route.

    • CarModeOptions — (map)

      Specifies route preferences when traveling by Car, such as avoiding routes that use ferries or tolls.

      Requirements: TravelMode must be specified as Car.

      • AvoidFerries — (Boolean)

        Avoids ferries when calculating routes.

        Default Value: false

        Valid Values: false | true

      • AvoidTolls — (Boolean)

        Avoids tolls when calculating routes.

        Default Value: false

        Valid Values: false | true

    • DepartNow — (Boolean)

      Sets the time of departure as the current time. Uses the current time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

      Default Value: false

      Valid Values: false | true

    • DeparturePosition — (Array<Float>)

      The start position for the route. Defined in WGS 84 format: [longitude, latitude].

      • For example, [-123.115, 49.285]

      Note: If you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road. If Esri is the provider for your route calculator, specifying a route that is longer than 400 km returns a 400 RoutesValidationException error.

      Valid Values: [-180 to 180,-90 to 90]

    • DepartureTime — (Date)

      Specifies the desired time of departure. Uses the given time to calculate a route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

      Note: Setting a departure time in the past returns a 400 ValidationException error.
      • In ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. For example, 2020–07-2T12:15:20.000Z+01:00

    • DestinationPosition — (Array<Float>)

      The finish position for the route. Defined in WGS 84 format: [longitude, latitude].

      • For example, [-122.339, 47.615]

      Note: If you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road.

      Valid Values: [-180 to 180,-90 to 90]

    • DistanceUnit — (String)

      Set the unit system to specify the distance.

      Default Value: Kilometers

      Possible values include:
      • "Kilometers"
      • "Miles"
    • IncludeLegGeometry — (Boolean)

      Set to include the geometry details in the result for each path between a pair of positions.

      Default Value: false

      Valid Values: false | true

    • TravelMode — (String)

      Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility.

      The TravelMode you specify determines how you specify route preferences:

      • If traveling by Car use the CarModeOptions parameter.

      • If traveling by Truck use the TruckModeOptions parameter.

      Default Value: Car

      Possible values include:
      • "Car"
      • "Truck"
      • "Walking"
    • TruckModeOptions — (map)

      Specifies route preferences when traveling by Truck, such as avoiding routes that use ferries or tolls, and truck specifications to consider when choosing an optimal road.

      Requirements: TravelMode must be specified as Truck.

      • AvoidFerries — (Boolean)

        Avoids ferries when calculating routes.

        Default Value: false

        Valid Values: false | true

      • AvoidTolls — (Boolean)

        Avoids ferries when calculating routes.

        Default Value: false

        Valid Values: false | true

      • Dimensions — (map)

        Specifies the truck's dimension specifications including length, height, width, and unit of measurement. Used to avoid roads that can't support the truck's dimensions.

        • Height — (Float)

          The height of the truck.

          • For example, 4.5.

        • Length — (Float)

          The length of the truck.

          • For example, 15.5.

        • Unit — (String)

          Specifies the unit of measurement for the truck dimensions.

          Default Value: Meters

          Possible values include:
          • "Meters"
          • "Feet"
        • Width — (Float)

          The width of the truck.

          • For example, 4.5.

      • Weight — (map)

        Specifies the truck's weight specifications including total weight and unit of measurement. Used to avoid roads that can't support the truck's weight.

        • Total — (Float)

          The total weight of the truck.

          • For example, 3500.

        • Unit — (String)

          The unit of measurement to use for the truck weight.

          Default Value: Kilograms

          Possible values include:
          • "Kilograms"
          • "Pounds"
    • WaypointPositions — (Array<Array<Float>>)

      Specifies an ordered list of up to 23 intermediate positions to include along a route between the departure position and destination position.

      • For example, from the DeparturePosition [-123.115, 49.285], the route follows the order that the waypoint positions are given [[-122.757, 49.0021],[-122.349, 47.620]]

      Note: If you specify a waypoint position that's not located on a road, Amazon Location moves the position to the nearest road. Specifying more than 23 waypoints returns a 400 ValidationException error. If Esri is the provider for your route calculator, specifying a route that is longer than 400 km returns a 400 RoutesValidationException error.

      Valid Values: [-180 to 180,-90 to 90]

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Legs — (Array<map>)

        Contains details about each path between a pair of positions included along a route such as: StartPosition, EndPosition, Distance, DurationSeconds, Geometry, and Steps. The number of legs returned corresponds to one fewer than the total number of positions in the request.

        For example, a route with a departure position and destination position returns one leg with the positions snapped to a nearby road:

        • The StartPosition is the departure position.

        • The EndPosition is the destination position.

        A route with a waypoint between the departure and destination position returns two legs with the positions snapped to a nearby road:

        • Leg 1: The StartPosition is the departure position . The EndPosition is the waypoint positon.

        • Leg 2: The StartPosition is the waypoint position. The EndPosition is the destination position.

        • Distancerequired — (Float)

          The distance between the leg's StartPosition and EndPosition along a calculated route.

          • The default measurement is Kilometers unless the request specifies a DistanceUnit of Miles.

        • DurationSecondsrequired — (Float)

          The estimated travel time between the leg's StartPosition and EndPosition. The travel mode and departure time that you specify in the request determines the calculated time.

        • EndPositionrequired — (Array<Float>)

          The terminating position of the leg. Follows the format [longitude,latitude].

          Note: If the EndPosition isn't located on a road, it's snapped to a nearby road.
        • Geometry — (map)

          Contains the calculated route's path as a linestring geometry.

          • LineString — (Array<Array<Float>>)

            An ordered list of positions used to plot a route on a map.

            The first position is closest to the start position for the leg, and the last position is the closest to the end position for the leg.

            • For example, [[-123.117, 49.284],[-123.115, 49.285],[-123.115, 49.285]]

        • StartPositionrequired — (Array<Float>)

          The starting position of the leg. Follows the format [longitude,latitude].

          Note: If the StartPosition isn't located on a road, it's snapped to a nearby road.
        • Stepsrequired — (Array<map>)

          Contains a list of steps, which represent subsections of a leg. Each step provides instructions for how to move to the next step in the leg such as the step's start position, end position, travel distance, travel duration, and geometry offset.

          • Distancerequired — (Float)

            The travel distance between the step's StartPosition and EndPosition.

          • DurationSecondsrequired — (Float)

            The estimated travel time, in seconds, from the step's StartPosition to the EndPosition. . The travel mode and departure time that you specify in the request determines the calculated time.

          • EndPositionrequired — (Array<Float>)

            The end position of a step. If the position the last step in the leg, this position is the same as the end position of the leg.

          • GeometryOffset — (Integer)

            Represents the start position, or index, in a sequence of steps within the leg's line string geometry. For example, the index of the first step in a leg geometry is 0.

            Included in the response for queries that set IncludeLegGeometry to True.

          • StartPositionrequired — (Array<Float>)

            The starting position of a step. If the position is the first step in the leg, this position is the same as the start position of the leg.

      • Summary — (map)

        Contains information about the whole route, such as: RouteBBox, DataSource, Distance, DistanceUnit, and DurationSeconds.

        • DataSourcerequired — (String)

          The data provider of traffic and road network data used to calculate the route. Indicates one of the available providers:

          • Esri

          • Here

          For more information about data providers, see Amazon Location Service data providers.

        • Distancerequired — (Float)

          The total distance covered by the route. The sum of the distance travelled between every stop on the route.

          Note: If Esri is the data source for the route calculator, the route distance can’t be greater than 400 km. If the route exceeds 400 km, the response is a 400 RoutesValidationException error.
        • DistanceUnitrequired — (String)

          The unit of measurement for the distance.

          Possible values include:
          • "Kilometers"
          • "Miles"
        • DurationSecondsrequired — (Float)

          The total travel time for the route measured in seconds. The sum of the travel time between every stop on the route.

        • RouteBBoxrequired — (Array<Float>)

          Specifies a geographical box surrounding a route. Used to zoom into a route when displaying it in a map. For example, [min x, min y, max x, max y].

          The first 2 bbox parameters describe the lower southwest corner:

          • The first bbox position is the X coordinate or longitude of the lower southwest corner.

          • The second bbox position is the Y coordinate or latitude of the lower southwest corner.

          The next 2 bbox parameters describe the upper northeast corner:

          • The third bbox position is the X coordinate, or longitude of the upper northeast corner.

          • The fourth bbox position is the Y coordinate, or latitude of the upper northeast corner.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createGeofenceCollection(params = {}, callback) ⇒ AWS.Request

Creates a geofence collection, which manages and stores geofences.

Service Reference:

Examples:

Calling the createGeofenceCollection operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  Description: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  PricingPlanDataSource: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createGeofenceCollection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      A custom name for the geofence collection.

      Requirements:

      • Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

      • Must be a unique geofence collection name.

      • No spaces allowed. For example, ExampleGeofenceCollection.

    • Description — (String)

      An optional description for the geofence collection.

    • KmsKeyId — (String)

      A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

    • PricingPlan — (String)

      Specifies the pricing plan for the geofence collection.

      For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • PricingPlanDataSource — (String)

      Specifies the data provider for the geofence collection.

      • Required value for the following pricing plans: MobileAssetTracking | MobileAssetManagement

      For more information about Data Providers, and Pricing plans, see the Amazon Location Service product page.

      Note: Amazon Location Service only uses PricingPlanDataSource to calculate billing for your geofence collection. Your data won't be shared with the data provider, and will remain in your AWS account or Region unless you move it.

      Valid Values: Esri | Here

    • Tags — (map<String>)

      Applies one or more tags to the geofence collection. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource

      • Each resource tag must be unique with a maximum of one value.

      • Maximum key length: 128 Unicode characters in UTF-8

      • Maximum value length: 256 Unicode characters in UTF-8

      • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CollectionArn — (String)

        The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollection

      • CollectionName — (String)

        The name for the geofence collection.

      • CreateTime — (Date)

        The timestamp for when the geofence collection was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createMap(params = {}, callback) ⇒ AWS.Request

Creates a map resource in your AWS account, which provides map tiles of different styles sourced from global location data providers.

Service Reference:

Examples:

Calling the createMap operation

var params = {
  Configuration: { /* required */
    Style: 'STRING_VALUE' /* required */
  },
  MapName: 'STRING_VALUE', /* required */
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  Description: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createMap(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Configuration — (map)

      Specifies the map style selected from an available data provider.

      • Stylerequired — (String)

        Specifies the map style selected from an available data provider.

        Valid Esri map styles:

        • VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector basemap with a dark gray, neutral background with minimal colors, labels, and features that's designed to draw attention to your thematic content.

        • RasterEsriImagery – The Esri Imagery map style. A raster basemap that provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide.

        • VectorEsriLightGrayCanvas – The Esri Light Gray Canvas map style, which provides a detailed vector basemap with a light gray, neutral background style with minimal colors, labels, and features that's designed to draw attention to your thematic content.

        • VectorEsriTopographic – The Esri Light map style, which provides a detailed vector basemap with a classic Esri map style.

        • VectorEsriStreets – The Esri World Streets map style, which provides a detailed vector basemap for the world symbolized with a classic Esri street map style. The vector tile layer is similar in content and style to the World Street Map raster map.

        • VectorEsriNavigation – The Esri World Navigation map style, which provides a detailed basemap for the world symbolized with a custom navigation map style that's designed for use during the day in mobile devices.

        Valid HERE Technologies map styles:

        • VectorHereBerlin – The HERE Berlin map style is a high contrast detailed base map of the world that blends 3D and 2D rendering.

          Note: When using HERE as your data provider, and selecting the Style VectorHereBerlin, you may not use HERE Technologies maps for Asset Management. See the AWS Service Terms for Amazon Location Service.
    • Description — (String)

      An optional description for the map resource.

    • MapName — (String)

      The name for the map resource.

      Requirements:

      • Must contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

      • Must be a unique map resource name.

      • No spaces allowed. For example, ExampleMap.

    • PricingPlan — (String)

      Specifies the pricing plan for your map resource.

      For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • Tags — (map<String>)

      Applies one or more tags to the map resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource

      • Each resource tag must be unique with a maximum of one value.

      • Maximum key length: 128 Unicode characters in UTF-8

      • Maximum value length: 256 Unicode characters in UTF-8

      • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the map resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • MapArn — (String)

        The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:maps/ExampleMap

      • MapName — (String)

        The name of the map resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createPlaceIndex(params = {}, callback) ⇒ AWS.Request

Creates a place index resource in your AWS account, which supports functions with geospatial data sourced from your chosen data provider.

Service Reference:

Examples:

Calling the createPlaceIndex operation

var params = {
  DataSource: 'STRING_VALUE', /* required */
  IndexName: 'STRING_VALUE', /* required */
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  DataSourceConfiguration: {
    IntendedUse: SingleUse | Storage
  },
  Description: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createPlaceIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSource — (String)

      Specifies the data provider of geospatial data.

      Note: This field is case-sensitive. Enter the valid values as shown. For example, entering HERE returns an error.

      Valid values include:

      For additional information , see Data providers on the Amazon Location Service Developer Guide.

    • DataSourceConfiguration — (map)

      Specifies the data storage option requesting Places.

      • IntendedUse — (String)

        Specifies how the results of an operation will be stored by the caller.

        Valid values include:

        • SingleUse specifies that the results won't be stored.

        • Storage specifies that the result can be cached or stored in a database.

        Default value: SingleUse

        Possible values include:
        • "SingleUse"
        • "Storage"
    • Description — (String)

      The optional description for the place index resource.

    • IndexName — (String)

      The name of the place index resource.

      Requirements:

      • Contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).

      • Must be a unique place index resource name.

      • No spaces allowed. For example, ExamplePlaceIndex.

    • PricingPlan — (String)

      Specifies the pricing plan for your place index resource.

      For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • Tags — (map<String>)

      Applies one or more tags to the place index resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource

      • Each resource tag must be unique with a maximum of one value.

      • Maximum key length: 128 Unicode characters in UTF-8

      • Maximum value length: 256 Unicode characters in UTF-8

      • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the place index resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • IndexArn — (String)

        The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex

      • IndexName — (String)

        The name for the place index resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createRouteCalculator(params = {}, callback) ⇒ AWS.Request

Creates a route calculator resource in your AWS account.

You can send requests to a route calculator resource to estimate travel time, distance, and get directions. A route calculator sources traffic and road network data from your chosen data provider.

Service Reference:

Examples:

Calling the createRouteCalculator operation

var params = {
  CalculatorName: 'STRING_VALUE', /* required */
  DataSource: 'STRING_VALUE', /* required */
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  Description: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createRouteCalculator(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CalculatorName — (String)

      The name of the route calculator resource.

      Requirements:

      • Can use alphanumeric characters (A–Z, a–z, 0–9) , hyphens (-), periods (.), and underscores (_).

      • Must be a unique Route calculator resource name.

      • No spaces allowed. For example, ExampleRouteCalculator.

    • DataSource — (String)

      Specifies the data provider of traffic and road network data.

      Note: This field is case-sensitive. Enter the valid values as shown. For example, entering HERE returns an error. Route calculators that use Esri as a data source only calculate routes that are shorter than 400 km.

      Valid values include:

      For additional information , see Data providers on the Amazon Location Service Developer Guide.

    • Description — (String)

      The optional description for the route calculator resource.

    • PricingPlan — (String)

      Specifies the pricing plan for your route calculator resource.

      For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • Tags — (map<String>)

      Applies one or more tags to the route calculator resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

      • For example: { "tag1" : "value1", "tag2" : "value2"}

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource

      • Each resource tag must be unique with a maximum of one value.

      • Maximum key length: 128 Unicode characters in UTF-8

      • Maximum value length: 256 Unicode characters in UTF-8

      • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CalculatorArn — (String)

        The Amazon Resource Name (ARN) for the route calculator resource. Use the ARN when you specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

      • CalculatorName — (String)

        The name of the route calculator resource.

        • For example, ExampleRouteCalculator.

      • CreateTime — (Date)

        The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • For example, 2020–07-2T12:15:20.000Z+01:00

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

createTracker(params = {}, callback) ⇒ AWS.Request

Creates a tracker resource in your AWS account, which lets you retrieve current and historical location of devices.

Service Reference:

Examples:

Calling the createTracker operation

var params = {
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  TrackerName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  PositionFiltering: TimeBased | DistanceBased,
  PricingPlanDataSource: 'STRING_VALUE',
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createTracker(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      An optional description for the tracker resource.

    • KmsKeyId — (String)

      A key identifier for an AWS KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

    • PositionFiltering — (String)

      Specifies the position filtering for the tracker resource.

      Valid values:

      • TimeBased - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

      • DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map.

      This field is optional. If not specified, the default value is TimeBased.

      Possible values include:
      • "TimeBased"
      • "DistanceBased"
    • PricingPlan — (String)

      Specifies the pricing plan for the tracker resource.

      For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • PricingPlanDataSource — (String)

      Specifies the data provider for the tracker resource.

      • Required value for the following pricing plans: MobileAssetTracking | MobileAssetManagement

      For more information about Data Providers, and Pricing plans, see the Amazon Location Service product page.

      Note: Amazon Location Service only uses PricingPlanDataSource to calculate billing for your tracker resource. Your data will not be shared with the data provider, and will remain in your AWS account or Region unless you move it.

      Valid values: Esri | Here

    • Tags — (map<String>)

      Applies one or more tags to the tracker resource. A tag is a key-value pair helps manage, identify, search, and filter your resources by labelling them.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource

      • Each resource tag must be unique with a maximum of one value.

      • Maximum key length: 128 Unicode characters in UTF-8

      • Maximum value length: 256 Unicode characters in UTF-8

      • Can use alphanumeric characters (A–Z, a–z, 0–9), and the following characters: + - = . _ : / @.

    • TrackerName — (String)

      The name for the tracker resource.

      Requirements:

      • Contain only alphanumeric characters (A-Z, a-z, 0-9) , hyphens (-), periods (.), and underscores (_).

      • Must be a unique tracker resource name.

      • No spaces allowed. For example, ExampleTracker.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • TrackerArn — (String)

        The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

      • TrackerName — (String)

        The name of the tracker resource.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteGeofenceCollection(params = {}, callback) ⇒ AWS.Request

Deletes a geofence collection from your AWS account.

Note: This operation deletes the resource permanently. If the geofence collection is the target of a tracker resource, the devices will no longer be monitored.

Service Reference:

Examples:

Calling the deleteGeofenceCollection operation

var params = {
  CollectionName: 'STRING_VALUE' /* required */
};
location.deleteGeofenceCollection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The name of the geofence collection to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteMap(params = {}, callback) ⇒ AWS.Request

Deletes a map resource from your AWS account.

Note: This operation deletes the resource permanently. If the map is being used in an application, the map may not render.

Service Reference:

Examples:

Calling the deleteMap operation

var params = {
  MapName: 'STRING_VALUE' /* required */
};
location.deleteMap(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MapName — (String)

      The name of the map resource to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deletePlaceIndex(params = {}, callback) ⇒ AWS.Request

Deletes a place index resource from your AWS account.

Note: This operation deletes the resource permanently.

Service Reference:

Examples:

Calling the deletePlaceIndex operation

var params = {
  IndexName: 'STRING_VALUE' /* required */
};
location.deletePlaceIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IndexName — (String)

      The name of the place index resource to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteRouteCalculator(params = {}, callback) ⇒ AWS.Request

Deletes a route calculator resource from your AWS account.

Note: This operation deletes the resource permanently.

Service Reference:

Examples:

Calling the deleteRouteCalculator operation

var params = {
  CalculatorName: 'STRING_VALUE' /* required */
};
location.deleteRouteCalculator(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CalculatorName — (String)

      The name of the route calculator resource to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

deleteTracker(params = {}, callback) ⇒ AWS.Request

Deletes a tracker resource from your AWS account.

Note: This operation deletes the resource permanently. If the tracker resource is in use, you may encounter an error. Make sure that the target resource isn't a dependency for your applications.

Service Reference:

Examples:

Calling the deleteTracker operation

var params = {
  TrackerName: 'STRING_VALUE' /* required */
};
location.deleteTracker(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TrackerName — (String)

      The name of the tracker resource to be deleted.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeGeofenceCollection(params = {}, callback) ⇒ AWS.Request

Retrieves the geofence collection details.

Service Reference:

Examples:

Calling the describeGeofenceCollection operation

var params = {
  CollectionName: 'STRING_VALUE' /* required */
};
location.describeGeofenceCollection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The name of the geofence collection.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CollectionArn — (String)

        The Amazon Resource Name (ARN) for the geofence collection resource. Used when you need to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollection

      • CollectionName — (String)

        The name of the geofence collection.

      • CreateTime — (Date)

        The timestamp for when the geofence resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

      • Description — (String)

        The optional description for the geofence collection.

      • KmsKeyId — (String)

        A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource

      • PricingPlan — (String)

        The pricing plan selected for the specified geofence collection.

        For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

        Possible values include:
        • "RequestBasedUsage"
        • "MobileAssetTracking"
        • "MobileAssetManagement"
      • PricingPlanDataSource — (String)

        The specified data provider for the geofence collection.

      • Tags — (map<String>)

        Displays the key, value pairs of tags associated with this resource.

      • UpdateTime — (Date)

        The timestamp for when the geofence collection was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeMap(params = {}, callback) ⇒ AWS.Request

Retrieves the map resource details.

Service Reference:

Examples:

Calling the describeMap operation

var params = {
  MapName: 'STRING_VALUE' /* required */
};
location.describeMap(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MapName — (String)

      The name of the map resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Configuration — (map)

        Specifies the map tile style selected from a partner data provider.

        • Stylerequired — (String)

          Specifies the map style selected from an available data provider.

          Valid Esri map styles:

          • VectorEsriDarkGrayCanvas – The Esri Dark Gray Canvas map style. A vector basemap with a dark gray, neutral background with minimal colors, labels, and features that's designed to draw attention to your thematic content.

          • RasterEsriImagery – The Esri Imagery map style. A raster basemap that provides one meter or better satellite and aerial imagery in many parts of the world and lower resolution satellite imagery worldwide.

          • VectorEsriLightGrayCanvas – The Esri Light Gray Canvas map style, which provides a detailed vector basemap with a light gray, neutral background style with minimal colors, labels, and features that's designed to draw attention to your thematic content.

          • VectorEsriTopographic – The Esri Light map style, which provides a detailed vector basemap with a classic Esri map style.

          • VectorEsriStreets – The Esri World Streets map style, which provides a detailed vector basemap for the world symbolized with a classic Esri street map style. The vector tile layer is similar in content and style to the World Street Map raster map.

          • VectorEsriNavigation – The Esri World Navigation map style, which provides a detailed basemap for the world symbolized with a custom navigation map style that's designed for use during the day in mobile devices.

          Valid HERE Technologies map styles:

          • VectorHereBerlin – The HERE Berlin map style is a high contrast detailed base map of the world that blends 3D and 2D rendering.

            Note: When using HERE as your data provider, and selecting the Style VectorHereBerlin, you may not use HERE Technologies maps for Asset Management. See the AWS Service Terms for Amazon Location Service.
      • CreateTime — (Date)

        The timestamp for when the map resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • DataSource — (String)

        Specifies the data provider for the associated map tiles.

      • Description — (String)

        The optional description for the map resource.

      • MapArn — (String)

        The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:maps/ExampleMap

      • MapName — (String)

        The map style selected from an available provider.

      • PricingPlan — (String)

        The pricing plan selected for the specified map resource.

         <p>For additional details and restrictions on each pricing plan option, see <a href="https://aws.amazon.com/location/pricing/&quot;&gt;Amazon Location Service pricing</a>.</p> 
        Possible values include:
        • "RequestBasedUsage"
        • "MobileAssetTracking"
        • "MobileAssetManagement"
      • Tags — (map<String>)

        Tags associated with the map resource.

      • UpdateTime — (Date)

        The timestamp for when the map resource was last update in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describePlaceIndex(params = {}, callback) ⇒ AWS.Request

Retrieves the place index resource details.

Service Reference:

Examples:

Calling the describePlaceIndex operation

var params = {
  IndexName: 'STRING_VALUE' /* required */
};
location.describePlaceIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IndexName — (String)

      The name of the place index resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the place index resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • DataSource — (String)

        The data provider of geospatial data. Indicates one of the available providers:

        • Esri

        • Here

        For additional details on data providers, see Amazon Location Service data providers.

      • DataSourceConfiguration — (map)

        The specified data storage option for requesting Places.

        • IntendedUse — (String)

          Specifies how the results of an operation will be stored by the caller.

          Valid values include:

          • SingleUse specifies that the results won't be stored.

          • Storage specifies that the result can be cached or stored in a database.

          Default value: SingleUse

          Possible values include:
          • "SingleUse"
          • "Storage"
      • Description — (String)

        The optional description for the place index resource.

      • IndexArn — (String)

        The Amazon Resource Name (ARN) for the place index resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:place-index/ExamplePlaceIndex

      • IndexName — (String)

        The name of the place index resource being described.

      • PricingPlan — (String)

        The pricing plan selected for the specified place index resource.

        For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

        Possible values include:
        • "RequestBasedUsage"
        • "MobileAssetTracking"
        • "MobileAssetManagement"
      • Tags — (map<String>)

        Tags associated with place index resource.

      • UpdateTime — (Date)

        The timestamp for when the place index resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeRouteCalculator(params = {}, callback) ⇒ AWS.Request

Retrieves the route calculator resource details.

Service Reference:

Examples:

Calling the describeRouteCalculator operation

var params = {
  CalculatorName: 'STRING_VALUE' /* required */
};
location.describeRouteCalculator(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CalculatorName — (String)

      The name of the route calculator resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CalculatorArn — (String)

        The Amazon Resource Name (ARN) for the Route calculator resource. Use the ARN when you specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:route-calculator/ExampleCalculator

      • CalculatorName — (String)

        The name of the route calculator resource being described.

      • CreateTime — (Date)

        The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • For example, 2020–07-2T12:15:20.000Z+01:00

      • DataSource — (String)

        The data provider of traffic and road network data. Indicates one of the available providers:

        • Esri

        • Here

        For more information about data providers, see Amazon Location Service data providers.

      • Description — (String)

        The optional description of the route calculator resource.

      • PricingPlan — (String)

        The pricing plan selected for the specified route calculator resource.

        For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

        Possible values include:
        • "RequestBasedUsage"
        • "MobileAssetTracking"
        • "MobileAssetManagement"
      • Tags — (map<String>)

        Tags associated with route calculator resource.

      • UpdateTime — (Date)

        The timestamp when the route calculator resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • For example, 2020–07-2T12:15:20.000Z+01:00

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

describeTracker(params = {}, callback) ⇒ AWS.Request

Retrieves the tracker resource details.

Service Reference:

Examples:

Calling the describeTracker operation

var params = {
  TrackerName: 'STRING_VALUE' /* required */
};
location.describeTracker(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • TrackerName — (String)

      The name of the tracker resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • Description — (String)

        The optional description for the tracker resource.

      • KmsKeyId — (String)

        A key identifier for an AWS KMS customer managed key assigned to the Amazon Location resource.

      • PositionFiltering — (String)

        The position filtering method of the tracker resource.

        Possible values include:
        • "TimeBased"
        • "DistanceBased"
      • PricingPlan — (String)

        The pricing plan selected for the specified tracker resource.

        For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

        Possible values include:
        • "RequestBasedUsage"
        • "MobileAssetTracking"
        • "MobileAssetManagement"
      • PricingPlanDataSource — (String)

        The specified data provider for the tracker resource.

      • Tags — (map<String>)

        The tags associated with the tracker resource.

      • TrackerArn — (String)

        The Amazon Resource Name (ARN) for the tracker resource. Used when you need to specify a resource across all AWS.

        • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

      • TrackerName — (String)

        The name of the tracker resource.

      • UpdateTime — (Date)

        The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

disassociateTrackerConsumer(params = {}, callback) ⇒ AWS.Request

Removes the association between a tracker resource and a geofence collection.

Note: Once you unlink a tracker resource from a geofence collection, the tracker positions will no longer be automatically evaluated against geofences.

Service Reference:

Examples:

Calling the disassociateTrackerConsumer operation

var params = {
  ConsumerArn: 'STRING_VALUE', /* required */
  TrackerName: 'STRING_VALUE' /* required */
};
location.disassociateTrackerConsumer(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ConsumerArn — (String)

      The Amazon Resource Name (ARN) for the geofence collection to be disassociated from the tracker resource. Used when you need to specify a resource across all AWS.

      • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollectionConsumer

    • TrackerName — (String)

      The name of the tracker resource to be dissociated from the consumer.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDevicePosition(params = {}, callback) ⇒ AWS.Request

Retrieves a device's most recent position according to its sample time.

Note: Device positions are deleted after 30 days.

Service Reference:

Examples:

Calling the getDevicePosition operation

var params = {
  DeviceId: 'STRING_VALUE', /* required */
  TrackerName: 'STRING_VALUE' /* required */
};
location.getDevicePosition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceId — (String)

      The device whose position you want to retrieve.

    • TrackerName — (String)

      The tracker resource receiving the position update.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DeviceId — (String)

        The device whose position you retrieved.

      • Position — (Array<Float>)

        The last known device position.

      • ReceivedTime — (Date)

        The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • SampleTime — (Date)

        The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getDevicePositionHistory(params = {}, callback) ⇒ AWS.Request

Retrieves the device position history from a tracker resource within a specified range of time.

Note: Device positions are deleted after 30 days.

Service Reference:

Examples:

Calling the getDevicePositionHistory operation

var params = {
  DeviceId: 'STRING_VALUE', /* required */
  TrackerName: 'STRING_VALUE', /* required */
  EndTimeExclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  NextToken: 'STRING_VALUE',
  StartTimeInclusive: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789
};
location.getDevicePositionHistory(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DeviceId — (String)

      The device whose position history you want to retrieve.

    • EndTimeExclusive — (Date)

      Specify the end time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be the time that the request is made.

      Requirement:

      • The time specified for EndTimeExclusive must be after the time for StartTimeInclusive.

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

    • StartTimeInclusive — (Date)

      Specify the start time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. By default, the value will be 24 hours prior to the time that the request is made.

      Requirement:

      • The time specified for StartTimeInclusive must be before EndTimeExclusive.

    • TrackerName — (String)

      The tracker resource receiving the request for the device position history.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • DevicePositions — (Array<map>)

        Contains the position history details for the requested device.

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • ReceivedTimerequired — (Date)

          The timestamp for when the tracker resource received the device position in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • SampleTimerequired — (Date)

          The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getGeofence(params = {}, callback) ⇒ AWS.Request

Retrieves the geofence details from a geofence collection.

Service Reference:

Examples:

Calling the getGeofence operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  GeofenceId: 'STRING_VALUE' /* required */
};
location.getGeofence(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The geofence collection storing the target geofence.

    • GeofenceId — (String)

      The geofence you're retrieving details for.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the geofence collection was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

      • GeofenceId — (String)

        The geofence identifier.

      • Geometry — (map)

        Contains the geofence geometry details describing a polygon.

        • Polygon — (Array<Array<Array<Float>>>)

          An array of 1 or more linear rings. A linear ring is an array of 4 or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form: [longitude, latitude].

          The first linear ring is an outer ring, describing the polygon's boundary. Subsequent linear rings may be inner or outer rings to describe holes and islands. Outer rings must list their vertices in counter-clockwise order around the ring's center, where the left side is the polygon's exterior. Inner rings must list their vertices in clockwise order, where the left side is the polygon's interior.

      • Status — (String)

        Identifies the state of the geofence. A geofence will hold one of the following states:

        • ACTIVE — The geofence has been indexed by the system.

        • PENDING — The geofence is being processed by the system.

        • FAILED — The geofence failed to be indexed by the system.

        • DELETED — The geofence has been deleted from the system index.

        • DELETING — The geofence is being deleted from the system index.

      • UpdateTime — (Date)

        The timestamp for when the geofence collection was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMapGlyphs(params = {}, callback) ⇒ AWS.Request

Retrieves glyphs used to display labels on a map.

Service Reference:

Examples:

Calling the getMapGlyphs operation

var params = {
  FontStack: 'STRING_VALUE', /* required */
  FontUnicodeRange: 'STRING_VALUE', /* required */
  MapName: 'STRING_VALUE' /* required */
};
location.getMapGlyphs(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FontStack — (String)

      A comma-separated list of fonts to load glyphs from in order of preference. For example, Noto Sans Regular, Arial Unicode.

      Valid fonts stacks for Esri styles:

      • VectorEsriDarkGrayCanvas – Ubuntu Medium Italic | Ubuntu Medium | Ubuntu Italic | Ubuntu Regular | Ubuntu Bold

      • VectorEsriLightGrayCanvas – Ubuntu Italic | Ubuntu Regular | Ubuntu Light | Ubuntu Bold

      • VectorEsriTopographic – Noto Sans Italic | Noto Sans Regular | Noto Sans Bold | Noto Serif Regular | Roboto Condensed Light Italic

      • VectorEsriStreets – Arial Regular | Arial Italic | Arial Bold

      • VectorEsriNavigation – Arial Regular | Arial Italic | Arial Bold

      Valid font stacks for HERE Technologies styles:

      • VectorHereBerlin – Fira GO Regular | Fira GO Bold

    • FontUnicodeRange — (String)

      A Unicode range of characters to download glyphs for. Each response will contain 256 characters. For example, 0–255 includes all characters from range U+0000 to 00FF. Must be aligned to multiples of 256.

    • MapName — (String)

      The map resource associated with the glyph file.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Blob — (Buffer(Node.js), Typed Array(Browser))

        The blob's content type.

      • ContentType — (String)

        The map glyph content type. For example, application/octet-stream.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMapSprites(params = {}, callback) ⇒ AWS.Request

Retrieves the sprite sheet corresponding to a map resource. The sprite sheet is a PNG image paired with a JSON document describing the offsets of individual icons that will be displayed on a rendered map.

Service Reference:

Examples:

Calling the getMapSprites operation

var params = {
  FileName: 'STRING_VALUE', /* required */
  MapName: 'STRING_VALUE' /* required */
};
location.getMapSprites(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • FileName — (String)

      The name of the sprite file. Use the following file names for the sprite sheet:

      For the JSON document contain image offsets. Use the following file names:

    • MapName — (String)

      The map resource associated with the sprite file.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Blob — (Buffer(Node.js), Typed Array(Browser))

        Contains the body of the sprite sheet or JSON offset file.

      • ContentType — (String)

        The content type of the sprite sheet and offsets. For example, the sprite sheet content type is image/png, and the sprite offset JSON document is application/json.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMapStyleDescriptor(params = {}, callback) ⇒ AWS.Request

Retrieves the map style descriptor from a map resource.

The style descriptor contains specifications on how features render on a map. For example, what data to display, what order to display the data in, and the style for the data. Style descriptors follow the Mapbox Style Specification.

Service Reference:

Examples:

Calling the getMapStyleDescriptor operation

var params = {
  MapName: 'STRING_VALUE' /* required */
};
location.getMapStyleDescriptor(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MapName — (String)

      The map resource to retrieve the style descriptor from.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Blob — (Buffer(Node.js), Typed Array(Browser))

        Contains the body of the style descriptor.

      • ContentType — (String)

        The style descriptor's content type. For example, application/json.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

getMapTile(params = {}, callback) ⇒ AWS.Request

Retrieves a vector data tile from the map resource. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level.

The origin (0, 0) is the top left of the map. Increasing the zoom level by 1 doubles both the X and Y dimensions, so a tile containing data for the entire world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0, 1/0/1, 1/1/0, 1/1/1).

Service Reference:

Examples:

Calling the getMapTile operation

var params = {
  MapName: 'STRING_VALUE', /* required */
  X: 'STRING_VALUE', /* required */
  Y: 'STRING_VALUE', /* required */
  Z: 'STRING_VALUE' /* required */
};
location.getMapTile(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MapName — (String)

      The map resource to retrieve the map tiles from.

    • X — (String)

      The X axis value for the map tile.

    • Y — (String)

      The Y axis value for the map tile.

    • Z — (String)

      The zoom value for the map tile.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Blob — (Buffer(Node.js), Typed Array(Browser))

        Contains Mapbox Vector Tile (MVT) data.

      • ContentType — (String)

        The map tile's content type. For example, application/vnd.mapbox-vector-tile.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listDevicePositions(params = {}, callback) ⇒ AWS.Request

A batch request to retrieve all device positions.

Service Reference:

Examples:

Calling the listDevicePositions operation

var params = {
  TrackerName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listDevicePositions(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the number of entries returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

    • TrackerName — (String)

      The tracker resource containing the requested devices.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Contains details about each device's last known position. These details includes the device ID, the time when the position was sampled on the device, the time that the service received the update, and the most recent coordinates.

        • DeviceIdrequired — (String)

          The ID of the device for this position.

        • Positionrequired — (Array<Float>)

          The last known device position. Empty if no positions currently stored.

        • SampleTimerequired — (Date)

          The timestamp at which the device position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGeofenceCollections(params = {}, callback) ⇒ AWS.Request

Lists geofence collections in your AWS account.

Service Reference:

Examples:

Calling the listGeofenceCollections operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listGeofenceCollections(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the number of resources returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Lists the geofence collections that exist in your AWS account.

        • CollectionNamerequired — (String)

          The name of the geofence collection.

        • CreateTimerequired — (Date)

          The timestamp for when the geofence collection was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

        • Descriptionrequired — (String)

          The description for the geofence collection

        • PricingPlanrequired — (String)

          The pricing plan for the specified geofence collection.

          For additional details and restrictions on each pricing plan option, see the Amazon Location Service pricing page.

          Possible values include:
          • "RequestBasedUsage"
          • "MobileAssetTracking"
          • "MobileAssetManagement"
        • PricingPlanDataSource — (String)

          The specified data provider for the geofence collection.

        • UpdateTimerequired — (Date)

          Specifies a timestamp for when the resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listGeofences(params = {}, callback) ⇒ AWS.Request

Lists geofences stored in a given geofence collection.

Service Reference:

Examples:

Calling the listGeofences operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  NextToken: 'STRING_VALUE'
};
location.listGeofences(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The name of the geofence collection storing the list of geofences.

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Contains a list of geofences stored in the geofence collection.

        • CreateTimerequired — (Date)

          The timestamp for when the geofence was stored in a geofence collection in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

        • GeofenceIdrequired — (String)

          The geofence identifier.

        • Geometryrequired — (map)

          Contains the geofence geometry details describing a polygon.

          • Polygon — (Array<Array<Array<Float>>>)

            An array of 1 or more linear rings. A linear ring is an array of 4 or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form: [longitude, latitude].

            The first linear ring is an outer ring, describing the polygon's boundary. Subsequent linear rings may be inner or outer rings to describe holes and islands. Outer rings must list their vertices in counter-clockwise order around the ring's center, where the left side is the polygon's exterior. Inner rings must list their vertices in clockwise order, where the left side is the polygon's interior.

        • Statusrequired — (String)

          Identifies the state of the geofence. A geofence will hold one of the following states:

          • ACTIVE — The geofence has been indexed by the system.

          • PENDING — The geofence is being processed by the system.

          • FAILED — The geofence failed to be indexed by the system.

          • DELETED — The geofence has been deleted from the system index.

          • DELETING — The geofence is being deleted from the system index.

        • UpdateTimerequired — (Date)

          The timestamp for when the geofence was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listMaps(params = {}, callback) ⇒ AWS.Request

Lists map resources in your AWS account.

Service Reference:

Examples:

Calling the listMaps operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listMaps(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the number of resources returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Contains a list of maps in your AWS account

        • CreateTimerequired — (Date)

          The timestamp for when the map resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • DataSourcerequired — (String)

          Specifies the data provider for the associated map tiles.

        • Descriptionrequired — (String)

          The description for the map resource.

        • MapNamerequired — (String)

          The name of the associated map resource.

        • PricingPlanrequired — (String)

          The pricing plan for the specified map resource.

          For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

          Possible values include:
          • "RequestBasedUsage"
          • "MobileAssetTracking"
          • "MobileAssetManagement"
        • UpdateTimerequired — (Date)

          The timestamp for when the map resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listPlaceIndexes(params = {}, callback) ⇒ AWS.Request

Lists place index resources in your AWS account.

Service Reference:

Examples:

Calling the listPlaceIndexes operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listPlaceIndexes(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the maximum number of results returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Lists the place index resources that exist in your AWS account

        • CreateTimerequired — (Date)

          The timestamp for when the place index resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • DataSourcerequired — (String)

          The data provider of geospatial data. Indicates one of the available providers:

          • Esri

          • Here

          For additional details on data providers, see Amazon Location Service data providers.

        • Descriptionrequired — (String)

          The optional description for the place index resource.

        • IndexNamerequired — (String)

          The name of the place index resource.

        • PricingPlanrequired — (String)

          The pricing plan for the specified place index resource.

          For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

          Possible values include:
          • "RequestBasedUsage"
          • "MobileAssetTracking"
          • "MobileAssetManagement"
        • UpdateTimerequired — (Date)

          The timestamp for when the place index resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listRouteCalculators(params = {}, callback) ⇒ AWS.Request

Lists route calculator resources in your AWS account.

Service Reference:

Examples:

Calling the listRouteCalculators operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listRouteCalculators(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional maximum number of results returned in a single call.

      Default Value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default Value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Lists the route calculator resources that exist in your AWS account

        • CalculatorNamerequired — (String)

          The name of the route calculator resource.

        • CreateTimerequired — (Date)

          The timestamp when the route calculator resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

          • For example, 2020–07-2T12:15:20.000Z+01:00

        • DataSourcerequired — (String)

          The data provider of traffic and road network data. Indicates one of the available providers:

          • Esri

          • Here

          For more information about data providers, see Amazon Location Service data providers.

        • Descriptionrequired — (String)

          The optional description of the route calculator resource.

        • PricingPlanrequired — (String)

          The pricing plan for the specified route calculator resource.

          For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

          Possible values include:
          • "RequestBasedUsage"
          • "MobileAssetTracking"
          • "MobileAssetManagement"
        • UpdateTimerequired — (Date)

          The timestamp when the route calculator resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

          • For example, 2020–07-2T12:15:20.000Z+01:00

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a subsequent request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTagsForResource(params = {}, callback) ⇒ AWS.Request

Returns a list of tags that are applied to the specified Amazon Location resource.

Service Reference:

Examples:

Calling the listTagsForResource operation

var params = {
  ResourceArn: 'STRING_VALUE' /* required */
};
location.listTagsForResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the resource whose tags you want to retrieve.

      • Format example: arn:aws:geo:region:account-id:resourcetype/ExampleResource

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Tags — (map<String>)

        Tags that have been applied to the specified resource. Tags are mapped from the tag key to the tag value: "TagKey" : "TagValue".

        • Format example: {"tag1" : "value1", "tag2" : "value2"}

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTrackerConsumers(params = {}, callback) ⇒ AWS.Request

Lists geofence collections currently associated to the given tracker resource.

Service Reference:

Examples:

Calling the listTrackerConsumers operation

var params = {
  TrackerName: 'STRING_VALUE', /* required */
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listTrackerConsumers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the number of resources returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

    • TrackerName — (String)

      The tracker resource whose associated geofence collections you want to list.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • ConsumerArns — (Array<String>)

        Contains the list of geofence collection ARNs associated to the tracker resource.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

listTrackers(params = {}, callback) ⇒ AWS.Request

Lists tracker resources in your AWS account.

Service Reference:

Examples:

Calling the listTrackers operation

var params = {
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listTrackers(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • MaxResults — (Integer)

      An optional limit for the number of resources returned in a single call.

      Default value: 100

    • NextToken — (String)

      The pagination token specifying which page of results to return in the response. If no token is provided, the default page is the first page.

      Default value: null

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Entries — (Array<map>)

        Contains tracker resources in your AWS account. Details include tracker name, description and timestamps for when the tracker was created and last updated.

        • CreateTimerequired — (Date)

          The timestamp for when the tracker resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • Descriptionrequired — (String)

          The description for the tracker resource.

        • PricingPlanrequired — (String)

          The pricing plan for the specified tracker resource.

          For additional details and restrictions on each pricing plan option, see Amazon Location Service pricing.

          Possible values include:
          • "RequestBasedUsage"
          • "MobileAssetTracking"
          • "MobileAssetManagement"
        • PricingPlanDataSource — (String)

          The specified data provider for the tracker resource.

        • TrackerNamerequired — (String)

          The name of the tracker resource.

        • UpdateTimerequired — (Date)

          The timestamp at which the device's position was determined. Uses ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • NextToken — (String)

        A pagination token indicating there are additional pages available. You can use the token in a following request to fetch the next set of results.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

putGeofence(params = {}, callback) ⇒ AWS.Request

Stores a geofence geometry in a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request.

Service Reference:

Examples:

Calling the putGeofence operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  GeofenceId: 'STRING_VALUE', /* required */
  Geometry: { /* required */
    Polygon: [
      [
        [
          'NUMBER_VALUE',
          /* more items */
        ],
        /* more items */
      ],
      /* more items */
    ]
  }
};
location.putGeofence(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The geofence collection to store the geofence in.

    • GeofenceId — (String)

      An identifier for the geofence. For example, ExampleGeofence-1.

    • Geometry — (map)

      Contains the polygon details to specify the position of the geofence.

      Note: Each geofence polygon can have a maximum of 1,000 vertices.
      • Polygon — (Array<Array<Array<Float>>>)

        An array of 1 or more linear rings. A linear ring is an array of 4 or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form: [longitude, latitude].

        The first linear ring is an outer ring, describing the polygon's boundary. Subsequent linear rings may be inner or outer rings to describe holes and islands. Outer rings must list their vertices in counter-clockwise order around the ring's center, where the left side is the polygon's exterior. Inner rings must list their vertices in clockwise order, where the left side is the polygon's interior.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CreateTime — (Date)

        The timestamp for when the geofence was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

      • GeofenceId — (String)

        The geofence identifier entered in the request.

      • UpdateTime — (Date)

        The timestamp for when the geofence was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

searchPlaceIndexForPosition(params = {}, callback) ⇒ AWS.Request

Reverse geocodes a given coordinate and returns a legible address. Allows you to search for Places or points of interest near a given position.

Service Reference:

Examples:

Calling the searchPlaceIndexForPosition operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  Position: [ /* required */
    'NUMBER_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE'
};
location.searchPlaceIndexForPosition(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • IndexName — (String)

      The name of the place index resource you want to use for the search.

    • MaxResults — (Integer)

      An optional paramer. The maximum number of results returned per request.

      Default value: 50

    • Position — (Array<Float>)

      Specifies a coordinate for the query defined by a longitude, and latitude.

      • The first position is the X coordinate, or longitude.

      • The second position is the Y coordinate, or latitude.

      For example, position=xLongitude&position=yLatitude .

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        Returns a list of Places closest to the specified position. Each result contains additional information about the Places returned.

        • Placerequired — (map)

          Contains details about the relevant point of interest.

          • AddressNumber — (String)

            The numerical portion of an address, such as a building number.

          • Country — (String)

            A country/region specified using ISO 3166 3-digit country/region code. For example, CAN.

          • Geometryrequired — (map)

            Places uses a point geometry to specify a location or a Place.

            • Point — (Array<Float>)

              A single point geometry specifies a location for a Place using WGS 84 coordinates:

              • x — Specifies the x coordinate or longitude.

              • y — Specifies the y coordinate or latitude.

          • Label — (String)

            The full name and address of the point of interest such as a city, region, or country. For example, 123 Any Street, Any Town, USA.

          • Municipality — (String)

            A name for a local area, such as a city or town name. For example, Toronto.

          • Neighborhood — (String)

            The name of a community district. For example, Downtown.

          • PostalCode — (String)

            A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.

          • Region — (String)

            A name for an area or geographical division, such as a province or state name. For example, British Columbia.

          • Street — (String)

            The name for a street or a road to identify a location. For example, Main Street.

          • SubRegion — (String)

            A country, or an area that's part of a larger region . For example, Metro Vancouver.

      • Summary — (map)

        Contains a summary of the request.

        • DataSourcerequired — (String)

          The data provider of geospatial data. Indicates one of the available providers:

          • Esri

          • HERE

          For additional details on data providers, see Amazon Location Service data providers.

        • MaxResults — (Integer)

          An optional parameter. The maximum number of results returned per request.

          Default value: 50

        • Positionrequired — (Array<Float>)

          The position given in the reverse geocoding request.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

searchPlaceIndexForText(params = {}, callback) ⇒ AWS.Request

Geocodes free-form text, such as an address, name, city, or region to allow you to search for Places or points of interest.

Includes the option to apply additional parameters to narrow your list of results.

Note: You can search for places near a given position using BiasPosition, or filter results within a bounding box using FilterBBox. Providing both parameters simultaneously returns an error.

Service Reference:

Examples:

Calling the searchPlaceIndexForText operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  Text: 'STRING_VALUE', /* required */
  BiasPosition: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterBBox: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterCountries: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE'
};
location.searchPlaceIndexForText(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BiasPosition — (Array<Float>)

      Searches for results closest to the given position. An optional parameter defined by longitude, and latitude.

      • The first bias position is the X coordinate, or longitude.

      • The second bias position is the Y coordinate, or latitude.

      For example, bias=xLongitude&bias=yLatitude.

    • FilterBBox — (Array<Float>)

      Filters the results by returning only Places within the provided bounding box. An optional parameter.

      The first 2 bbox parameters describe the lower southwest corner:

      • The first bbox position is the X coordinate or longitude of the lower southwest corner.

      • The second bbox position is the Y coordinate or latitude of the lower southwest corner.

      For example, bbox=xLongitudeSW&bbox=yLatitudeSW.

      The next bbox parameters describe the upper northeast corner:

      • The third bbox position is the X coordinate, or longitude of the upper northeast corner.

      • The fourth bbox position is the Y coordinate, or longitude of the upper northeast corner.

      For example, bbox=xLongitudeNE&bbox=yLatitudeNE

    • FilterCountries — (Array<String>)

      Limits the search to the given a list of countries/regions. An optional parameter.

      • Use the ISO 3166 3-digit country code. For example, Australia uses three upper-case characters: AUS.

    • IndexName — (String)

      The name of the place index resource you want to use for the search.

    • MaxResults — (Integer)

      An optional parameter. The maximum number of results returned per request.

      The default: 50

    • Text — (String)

      The address, name, city, or region to be used in the search. In free-form text format. For example, 123 Any Street.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • Results — (Array<map>)

        A list of Places closest to the specified position. Each result contains additional information about the specific point of interest.

        • Placerequired — (map)

          Contains details about the relevant point of interest.

          • AddressNumber — (String)

            The numerical portion of an address, such as a building number.

          • Country — (String)

            A country/region specified using ISO 3166 3-digit country/region code. For example, CAN.

          • Geometryrequired — (map)

            Places uses a point geometry to specify a location or a Place.

            • Point — (Array<Float>)

              A single point geometry specifies a location for a Place using WGS 84 coordinates:

              • x — Specifies the x coordinate or longitude.

              • y — Specifies the y coordinate or latitude.

          • Label — (String)

            The full name and address of the point of interest such as a city, region, or country. For example, 123 Any Street, Any Town, USA.

          • Municipality — (String)

            A name for a local area, such as a city or town name. For example, Toronto.

          • Neighborhood — (String)

            The name of a community district. For example, Downtown.

          • PostalCode — (String)

            A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.

          • Region — (String)

            A name for an area or geographical division, such as a province or state name. For example, British Columbia.

          • Street — (String)

            The name for a street or a road to identify a location. For example, Main Street.

          • SubRegion — (String)

            A country, or an area that's part of a larger region . For example, Metro Vancouver.

      • Summary — (map)

        Contains a summary of the request. Contains the BiasPosition, DataSource, FilterBBox, FilterCountries, MaxResults, ResultBBox, and Text.

        • BiasPosition — (Array<Float>)

          Contains the coordinates for the bias position entered in the geocoding request.

        • DataSourcerequired — (String)

          The data provider of geospatial data. Indicates one of the available providers:

          • Esri

          • HERE

          For additional details on data providers, see Amazon Location Service data providers.

        • FilterBBox — (Array<Float>)

          Contains the coordinates for the optional bounding box coordinated entered in the geocoding request.

        • FilterCountries — (Array<String>)

          Contains the country filter entered in the geocoding request.

        • MaxResults — (Integer)

          Contains the maximum number of results indicated for the request.

        • ResultBBox — (Array<Float>)

          A bounding box that contains the search results within the specified area indicated by FilterBBox. A subset of bounding box specified using FilterBBox.

        • Textrequired — (String)

          The address, name, city or region to be used in the geocoding request. In free-form text format. For example, Vancouver.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

tagResource(params = {}, callback) ⇒ AWS.Request

Assigns one or more tags (key-value pairs) to the specified Amazon Location Service resource.

 <p>Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.</p> <p>You can use the <code>TagResource</code> operation with an Amazon Location Service resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the tags already associated with the resource. If you specify a tag key that's already associated with the resource, the new tag value that you specify replaces the previous value for that tag. </p> <p>You can associate up to 50 tags with a resource.</p> 

Service Reference:

Examples:

Calling the tagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  Tags: { /* required */
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.tagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the resource whose tags you want to update.

      • Format example: arn:aws:geo:region:account-id:resourcetype/ExampleResource

    • Tags — (map<String>)

      Tags that have been applied to the specified resource. Tags are mapped from the tag key to the tag value: "TagKey" : "TagValue".

      • Format example: {"tag1" : "value1", "tag2" : "value2"}

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

untagResource(params = {}, callback) ⇒ AWS.Request

Removes one or more tags from the specified Amazon Location resource.

Service Reference:

Examples:

Calling the untagResource operation

var params = {
  ResourceArn: 'STRING_VALUE', /* required */
  TagKeys: [ /* required */
    'STRING_VALUE',
    /* more items */
  ]
};
location.untagResource(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • ResourceArn — (String)

      The Amazon Resource Name (ARN) of the resource from which you want to remove tags.

      • Format example: arn:aws:geo:region:account-id:resourcetype/ExampleResource

    • TagKeys — (Array<String>)

      The list of tag keys to remove from the specified resource.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateGeofenceCollection(params = {}, callback) ⇒ AWS.Request

Updates the specified properties of a given geofence collection.

Service Reference:

Examples:

Calling the updateGeofenceCollection operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  PricingPlanDataSource: 'STRING_VALUE'
};
location.updateGeofenceCollection(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CollectionName — (String)

      The name of the geofence collection to update.

    • Description — (String)

      Updates the description for the geofence collection.

    • PricingPlan — (String)

      Updates the pricing plan for the geofence collection.

      For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • PricingPlanDataSource — (String)

      Updates the data provider for the geofence collection.

      A required value for the following pricing plans: MobileAssetTracking| MobileAssetManagement

      For more information about data providers and pricing plans, see the Amazon Location Service product page.

      Note: This can only be updated when updating the PricingPlan in the same request. Amazon Location Service uses PricingPlanDataSource to calculate billing for your geofence collection. Your data won't be shared with the data provider, and will remain in your AWS account and Region unless you move it.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CollectionArn — (String)

        The Amazon Resource Name (ARN) of the updated geofence collection. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:geofence-collection/ExampleGeofenceCollection

      • CollectionName — (String)

        The name of the updated geofence collection.

      • UpdateTime — (Date)

        The time when the geofence collection was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateMap(params = {}, callback) ⇒ AWS.Request

Updates the specified properties of a given map resource.

Service Reference:

Examples:

Calling the updateMap operation

var params = {
  MapName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement
};
location.updateMap(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      Updates the description for the map resource.

    • MapName — (String)

      The name of the map resource to update.

    • PricingPlan — (String)

      Updates the pricing plan for the map resource.

      For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • MapArn — (String)

        The Amazon Resource Name (ARN) of the updated map resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:maps/ExampleMap

      • MapName — (String)

        The name of the updated map resource.

      • UpdateTime — (Date)

        The timestamp for when the map resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updatePlaceIndex(params = {}, callback) ⇒ AWS.Request

Updates the specified properties of a given place index resource.

Service Reference:

Examples:

Calling the updatePlaceIndex operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  DataSourceConfiguration: {
    IntendedUse: SingleUse | Storage
  },
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement
};
location.updatePlaceIndex(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • DataSourceConfiguration — (map)

      Updates the data storage option for the place index resource.

      • IntendedUse — (String)

        Specifies how the results of an operation will be stored by the caller.

        Valid values include:

        • SingleUse specifies that the results won't be stored.

        • Storage specifies that the result can be cached or stored in a database.

        Default value: SingleUse

        Possible values include:
        • "SingleUse"
        • "Storage"
    • Description — (String)

      Updates the description for the place index resource.

    • IndexName — (String)

      The name of the place index resource to update.

    • PricingPlan — (String)

      Updates the pricing plan for the place index resource.

      For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • IndexArn — (String)

        The Amazon Resource Name (ARN) of the upated place index resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:place- index/ExamplePlaceIndex

      • IndexName — (String)

        The name of the updated place index resource.

      • UpdateTime — (Date)

        The timestamp for when the place index resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateRouteCalculator(params = {}, callback) ⇒ AWS.Request

Updates the specified properties for a given route calculator resource.

Service Reference:

Examples:

Calling the updateRouteCalculator operation

var params = {
  CalculatorName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement
};
location.updateRouteCalculator(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • CalculatorName — (String)

      The name of the route calculator resource to update.

    • Description — (String)

      Updates the description for the route calculator resource.

    • PricingPlan — (String)

      Updates the pricing plan for the route calculator resource.

      For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • CalculatorArn — (String)

        The Amazon Resource Name (ARN) of the updated route calculator resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:route- calculator/ExampleCalculator

      • CalculatorName — (String)

        The name of the updated route calculator resource.

      • UpdateTime — (Date)

        The timestamp for when the route calculator was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.

updateTracker(params = {}, callback) ⇒ AWS.Request

Updates the specified properties of a given tracker resource.

Service Reference:

Examples:

Calling the updateTracker operation

var params = {
  TrackerName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PositionFiltering: TimeBased | DistanceBased,
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  PricingPlanDataSource: 'STRING_VALUE'
};
location.updateTracker(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • Description — (String)

      Updates the description for the tracker resource.

    • PositionFiltering — (String)

      Updates the position filtering for the tracker resource.

      Valid values:

      • TimeBased - Location updates are evaluated against linked geofence collections, but not every location update is stored. If your update frequency is more often than 30 seconds, only one update per 30 seconds is stored for each unique device ID.

      • DistanceBased - If the device has moved less than 30 m (98.4 ft), location updates are ignored. Location updates within this distance are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and device positions to retrieve. Distance-based filtering can also reduce the jitter effect when displaying device trajectory on a map.

      Possible values include:
      • "TimeBased"
      • "DistanceBased"
    • PricingPlan — (String)

      Updates the pricing plan for the tracker resource.

      For more information about each pricing plan option restrictions, see Amazon Location Service pricing.

      Possible values include:
      • "RequestBasedUsage"
      • "MobileAssetTracking"
      • "MobileAssetManagement"
    • PricingPlanDataSource — (String)

      Updates the data provider for the tracker resource.

      A required value for the following pricing plans: MobileAssetTracking| MobileAssetManagement

      For more information about data providers and pricing plans, see the Amazon Location Service product page

      Note: This can only be updated when updating the PricingPlan in the same request. Amazon Location Service uses PricingPlanDataSource to calculate billing for your tracker resource. Your data won't be shared with the data provider, and will remain in your AWS account and Region unless you move it.
    • TrackerName — (String)

      The name of the tracker resource to update.

Callback (callback):

  • function(err, data) { ... }

    Called when a response from the service is returned. If a callback is not supplied, you must call AWS.Request.send() on the returned request object to initiate the request.

    Context (this):

    • (AWS.Response)

      the response object containing error, data properties, and the original request object.

    Parameters:

    • err (Error)

      the error object returned from the request. Set to null if the request is successful.

    • data (Object)

      the de-serialized data returned from the request. Set to null if a request error occurs. The data object has the following properties:

      • TrackerArn — (String)

        The Amazon Resource Name (ARN) of the updated tracker resource. Used to specify a resource across AWS.

        • Format example: arn:aws:geo:region:account-id:tracker/ExampleTracker

      • TrackerName — (String)

        The name of the updated tracker resource.

      • UpdateTime — (Date)

        The timestamp for when the tracker resource was last updated in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

    a handle to the operation request for subsequent event callback registration.