We announced the upcoming end-of-support for AWS SDK for JavaScript v2.
We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

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

  • useFipsEndpoint (Boolean)

    Enables FIPS compatible endpoints. Defaults to false.

  • useDualstackEndpoint (Boolean)

    Enables IPv6 dualstack endpoint. Defaults to false.

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 Amazon Web Services.

      • 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.
Note: Geofence evaluation uses the given device position. It does not account for the optional Accuracy of a DevicePositionUpdate.
Note: The DeviceID is used as a string to represent the device. You do not need to have a Tracker associated with the DeviceID.

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 */
      Accuracy: {
        Horizontal: 'NUMBER_VALUE' /* required */
      },
      PositionProperties: {
        '<PropertyMapKeyString>': 'STRING_VALUE',
        /* '<PropertyMapKeyString>': ... */
      }
    },
    /* 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.

      • Accuracy — (map)

        The accuracy of the device position.

        • Horizontalrequired — (Float)

          Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

      • 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].

      • PositionProperties — (map<String>)

        Associates one of more properties with the position update. A property is a key-value pair stored with the position update and added to any geofence event the update may trigger.

        Format: "key" : "value"

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

        • Accuracy — (map)

          The accuracy of the device position.

          • Horizontalrequired — (Float)

            Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • PositionProperties — (map<String>)

          The properties associated with the 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 */
        Circle: {
          Center: [ /* required */
            'NUMBER_VALUE',
            /* more items */
          ],
          Radius: 'NUMBER_VALUE' /* required */
        },
        Polygon: [
          [
            [
              'NUMBER_VALUE',
              /* more items */
            ],
            /* more items */
          ],
          /* more items */
        ]
      },
      GeofenceProperties: {
        '<PropertyMapKeyString>': 'STRING_VALUE',
        /* '<PropertyMapKeyString>': ... */
      }
    },
    /* 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.

      • GeofenceProperties — (map<String>)

        Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.

        Format: "key" : "value"

      • Geometryrequired — (map)

        Contains the details of the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.

        Note: Each geofence polygon can have a maximum of 1,000 vertices.
        • Circle — (map)

          A circle on the earth, as defined by a center point and a radius.

          • Centerrequired — (Array<Float>)

            A single point geometry, specifying the center of the circle, using WGS 84 coordinates, in the form [longitude, latitude].

          • Radiusrequired — (Float)

            The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).

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

          A polygon is a list of linear rings which are each made up of a list of vertices.

          Each vertex is a 2-dimensional point of the form: [longitude, latitude]. This is represented as an array of doubles of length 2 (so [double, double]).

          An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles ([[double, double], ...]).

          A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array of linear rings, which is represented as an array of arrays of arrays of doubles ([[[double, double], ...], ...]).

          A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

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 (up to 10 devices per batch). 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). When PositionFiltering is set to AccuracyBased filtering, location data is stored and evaluated against linked geofence collections only if the device has moved more than the measured accuracy. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is neither stored or evaluated if the device has moved less than 15 m. If PositionFiltering is set to AccuracyBased filtering, Amazon Location uses the default value { "Horizontal": 0} when accuracy is not provided on a DevicePositionUpdate.

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 */
      Accuracy: {
        Horizontal: 'NUMBER_VALUE' /* required */
      },
      PositionProperties: {
        '<PropertyMapKeyString>': 'STRING_VALUE',
        /* '<PropertyMapKeyString>': ... */
      }
    },
    /* 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, up to 10 devices.

      • Accuracy — (map)

        The accuracy of the device position.

        • Horizontalrequired — (Float)

          Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

      • 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].

      • PositionProperties — (map<String>)

        Associates one of more properties with the position update. A property is a key-value pair stored with the position update and added to any geofence event the update may trigger.

        Format: "key" : "value"

      • 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: DeparturePosition 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 DepartNow. This calculates a route based on predictive traffic data at the given time.

    Note: You can't specify both DepartureTime and DepartNow in a single request. Specifying both parameters returns a validation error.
  • Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes. This also lets you specify additional route preferences in CarModeOptions if traveling by Car, or TruckModeOptions if traveling by Truck.

    Note: If you specify walking for the travel mode and your data provider is Esri, the start and destination must be within 40km.

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 */
  ],
  ArrivalTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  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,
  Key: 'STRING_VALUE',
  OptimizeFor: FastestRoute | ShortestRoute,
  TravelMode: Car | Truck | Walking | Bicycle | Motorcycle,
  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: {})
    • ArrivalTime — (Date)

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

      Note: ArrivalTime is not supported Esri.
    • CalculatorName — (String)

      The name of the route calculator resource that you want to use to calculate the 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 World Geodetic System (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 the route. Otherwise, the best time of day to travel with the best traffic conditions is used to calculate the route.

      • 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 World Geodetic System (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

    • Key — (String)

      The optional API key to authorize the request.

    • OptimizeFor — (String)

      Specifies the distance to optimize for when calculating a route.

      Possible values include:
      • "FastestRoute"
      • "ShortestRoute"
    • TravelMode — (String)

      Specifies the mode of transport when calculating a route. Used in estimating the speed of travel and road compatibility. You can choose Car, Truck, Walking, Bicycle or Motorcycle as options for the TravelMode.

      Note: Bicycle and Motorcycle are only valid when using Grab as a data provider, and only within Southeast Asia. Truck is not available for Grab. For more details on the using Grab for routing, including areas of coverage, see GrabMaps in the Amazon Location Service Developer Guide.

      The TravelMode you specify also 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"
      • "Bicycle"
      • "Motorcycle"
    • 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 tolls 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.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 50 meters.
        • Length — (Float)

          The length of the truck.

          • For example, 15.5.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 300 meters.
        • 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.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 50 meters.
      • 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

          • Grab

          • 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 route distances.

          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.

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

Calculates a route matrix given the following required parameters: DeparturePositions and DestinationPositions. CalculateRouteMatrix calculates routes and returns the travel time and travel distance from each departure position to each destination position in the request. For example, given departure positions A and B, and destination positions X and Y, CalculateRouteMatrix will return time and distance for routes from A to X, A to Y, B to X, and B to Y (in that order). The number of results returned (and routes calculated) will be the number of DeparturePositions times the number of DestinationPositions.

Note: Your account is charged for each route calculated, not the number of requests.

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

Additional options include:

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

    Note: You can't specify both DepartureTime and DepartNow in a single request. Specifying both parameters returns a validation error.
  • Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes. This also lets you specify additional route preferences in CarModeOptions if traveling by Car, or TruckModeOptions if traveling by Truck.

Service Reference:

Examples:

Calling the calculateRouteMatrix operation

var params = {
  CalculatorName: 'STRING_VALUE', /* required */
  DeparturePositions: [ /* required */
    [
      'NUMBER_VALUE',
      /* more items */
    ],
    /* more items */
  ],
  DestinationPositions: [ /* required */
    [
      'NUMBER_VALUE',
      /* more items */
    ],
    /* 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,
  Key: 'STRING_VALUE',
  TravelMode: Car | Truck | Walking | Bicycle | Motorcycle,
  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
    }
  }
};
location.calculateRouteMatrix(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 the route matrix.

    • 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 the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.

      Default Value: false

      Valid Values: false | true

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

      The list of departure (origin) positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: [longitude, latitude]. For example, [-123.115, 49.285].

      Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.

      Note: For route calculators that use Esri as the data provider, if you specify a departure that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDeparturePositions.

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

    • DepartureTime — (Date)

      Specifies the desired time of departure. Uses the given time to calculate the route matrix. You can't set both DepartureTime and DepartNow. If neither is set, the best time of day to travel with the best traffic conditions is used to calculate the route matrix.

      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

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

      The list of destination positions for the route matrix. An array of points, each of which is itself a 2-value array defined in WGS 84 format: [longitude, latitude]. For example, [-122.339, 47.615]

      Depending on the data provider selected in the route calculator resource there may be additional restrictions on the inputs you can choose. See Position restrictions in the Amazon Location Service Developer Guide.

      Note: For route calculators that use Esri as the data provider, if you specify a destination that's not located on a road, Amazon Location moves the position to the nearest road. The snapped value is available in the result in SnappedDestinationPositions.

      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"
    • Key — (String)

      The optional API key to authorize the request.

    • 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 also determines how you specify route preferences:

      • If traveling by Car use the CarModeOptions parameter.

      • If traveling by Truck use the TruckModeOptions parameter.

      Note: Bicycle or Motorcycle are only valid when using Grab as a data provider, and only within Southeast Asia. Truck is not available for Grab. For more information about using Grab as a data provider, see GrabMaps in the Amazon Location Service Developer Guide.

      Default Value: Car

      Possible values include:
      • "Car"
      • "Truck"
      • "Walking"
      • "Bicycle"
      • "Motorcycle"
    • 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 tolls 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.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 50 meters.
        • Length — (Float)

          The length of the truck.

          • For example, 15.5.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 300 meters.
        • 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.

          Note: For routes calculated with a HERE resource, this value must be between 0 and 50 meters.
      • 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"

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:

      • RouteMatrix — (Array<Array<map>>)

        The calculated route matrix containing the results for all pairs of DeparturePositions to DestinationPositions. Each row corresponds to one entry in DeparturePositions. Each entry in the row corresponds to the route from that entry in DeparturePositions to an entry in DestinationPositions.

        • Distance — (Float)

          The total distance of travel for the route.

        • DurationSeconds — (Float)

          The expected duration of travel for the route.

        • Error — (map)

          An error corresponding to the calculation of a route between the DeparturePosition and DestinationPosition.

          • Coderequired — (String)

            The type of error which occurred for the route calculation.

            Possible values include:
            • "RouteNotFound"
            • "RouteTooLong"
            • "PositionsNotFound"
            • "DestinationPositionNotFound"
            • "DeparturePositionNotFound"
            • "OtherValidationError"
          • Message — (String)

            A message about the error that occurred for the route calculation.

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

        For routes calculated using an Esri route calculator resource, departure positions are snapped to the closest road. For Esri route calculator resources, this returns the list of departure/origin positions used for calculation of the RouteMatrix.

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

        The list of destination positions for the route matrix used for calculation of the RouteMatrix.

      • Summary — (map)

        Contains information about the route matrix, DataSource, DistanceUnit, RouteCount and ErrorCount.

        • DataSourcerequired — (String)

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

          • Esri

          • Grab

          • Here

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

        • DistanceUnitrequired — (String)

          The unit of measurement for route distances.

          Possible values include:
          • "Kilometers"
          • "Miles"
        • ErrorCountrequired — (Integer)

          The count of error results in the route matrix. If this number is 0, all routes were calculated successfully.

        • RouteCountrequired — (Integer)

          The count of cells in the route matrix. Equal to the number of DeparturePositions multiplied by the number of DestinationPositions.

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 */
  Description: 'STRING_VALUE',
  KmsKeyId: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  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 Amazon Web Services KMS customer managed key. Enter a key ID, key ARN, alias name, or alias ARN.

    • PricingPlan — (String)

      No longer used. If included, the only allowed value is RequestBasedUsage.

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

      This parameter is no longer used.

    • 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: + - = . _ : / @.

      • Cannot use "aws:" as a prefix for a key.

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 Amazon Web Services.

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

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

Creates an API key resource in your Amazon Web Services account, which lets you grant actions for Amazon Location resources to the API key bearer.

Note: For more information, see Using API keys.

Service Reference:

Examples:

Calling the createKey operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  Restrictions: { /* required */
    AllowActions: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    AllowResources: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    AllowReferers: [
      'STRING_VALUE',
      /* more items */
    ]
  },
  Description: 'STRING_VALUE',
  ExpireTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  NoExpiry: true || false,
  Tags: {
    '<TagKey>': 'STRING_VALUE',
    /* '<TagKey>': ... */
  }
};
location.createKey(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 API key resource.

    • ExpireTime — (Date)

      The optional timestamp for when the API key resource will expire in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ. One of NoExpiry or ExpireTime must be set.

    • KeyName — (String)

      A custom name for the API key resource.

      Requirements:

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

      • Must be a unique API key name.

      • No spaces allowed. For example, ExampleAPIKey.

    • NoExpiry — (Boolean)

      Optionally set to true to set no expiration time for the API key. One of NoExpiry or ExpireTime must be set.

    • Restrictions — (map)

      The API key restrictions for the API key resource.

      • AllowActionsrequired — (Array<String>)

        A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.

        The following are valid values for the actions.

        • Map actions

          • geo:GetMap* - Allows all actions needed for map rendering.

        • Place actions

          • geo:SearchPlaceIndexForText - Allows geocoding.

          • geo:SearchPlaceIndexForPosition - Allows reverse geocoding.

          • geo:SearchPlaceIndexForSuggestions - Allows generating suggestions from text.

          • GetPlace - Allows finding a place by place ID.

        • Route actions

          • geo:CalculateRoute - Allows point to point routing.

          • geo:CalculateRouteMatrix - Allows calculating a matrix of routes.

        Note: You must use these strings exactly. For example, to provide access to map rendering, the only valid action is geo:GetMap* as an input to the list. ["geo:GetMap*"] is valid but ["geo:GetMapTile"] is not. Similarly, you cannot use ["geo:SearchPlaceIndexFor*"] - you must list each of the Place actions separately.
      • AllowReferers — (Array<String>)

        An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.

        Requirements:

        • Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list $-._+!*(),;/?:@=&

        • May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.

        • May contain wildcard characters question mark (?) and asterisk ().

          Question mark (?) will replace any single character (including hexadecimal digits).

          Asterisk () will replace any multiple characters (including multiple hexadecimal digits).

        • No spaces allowed. For example, https://example.com.

      • AllowResourcesrequired — (Array<String>)

        A list of allowed resource ARNs that a API key bearer can perform actions on.

        • The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.

        • The resources must be in the same partition, region, and account-id as the key that is being created.

        • Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id delimited by colons (:).

        • No spaces allowed, even with wildcards. For example, arn:aws:geo:region:account-id:map/ExampleMap*.

        For more information about ARN format, see Amazon Resource Names (ARNs).

    • Tags — (map<String>)

      Applies one or more tags to the map resource. A tag is a key-value pair that 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: + - = . _ : / @.

      • Cannot use "aws:" as a prefix for a key.

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 API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • Key — (String)

        The key value/string of an API key. This value is used when making API calls to authorize the call. For example, see GetMapGlyphs.

      • KeyArn — (String)

        The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all Amazon Web Services.

        • Format example: arn:aws:geo:region:account-id:key/ExampleKey

      • KeyName — (String)

        The name of the API key resource.

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 Amazon Web Services account, which provides map tiles of different styles sourced from global location data providers.

Note: If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details.

Service Reference:

Examples:

Calling the createMap operation

var params = {
  Configuration: { /* required */
    Style: 'STRING_VALUE', /* required */
    CustomLayers: [
      'STRING_VALUE',
      /* more items */
    ],
    PoliticalView: 'STRING_VALUE'
  },
  MapName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  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 MapConfiguration, including the map style, for the map resource that you create. The map style defines the look of maps and the data provider for your map resource.

      • CustomLayers — (Array<String>)

        Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style. Default is unset.

        Note: Currenlty only VectorEsriNavigation supports CustomLayers. For more information, see Custom Layers.
      • PoliticalView — (String)

        Specifies the political view for the style. Leave unset to not use a political view, or, for styles that support specific political views, you can choose a view, such as IND for the Indian view.

        Default is unset.

        Note: Not all map resources or styles support political view styles. See Political views for more information.
      • Stylerequired — (String)

        Specifies the map style selected from an available data provider.

        Valid Esri map styles:

        • VectorEsriNavigation – The Esri 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. It also includes a richer set of places, such as shops, services, restaurants, attractions, and other points of interest. Enable the POI layer by setting it in CustomLayers to leverage the additional places data.

        • 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 Street 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.

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

        Valid HERE Technologies map styles:

        • VectorHereExplore – A default HERE map style containing a neutral, global map and its features including roads, buildings, landmarks, and water features. It also now includes a fully designed map of Japan.

        • RasterHereExploreSatellite – A global map containing high resolution satellite imagery.

        • HybridHereExploreSatellite – A global map displaying the road network, street names, and city labels over satellite imagery. This style will automatically retrieve both raster and vector tiles, and your charges will be based on total tiles retrieved.

          Note: Hybrid styles use both vector and raster tiles when rendering the map that you see. This means that more tiles are retrieved than when using either vector or raster tiles alone. Your charges will include all tiles retrieved.
        • VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast detailed base map of the world that blends 3D and 2D rendering.

          Note: The VectorHereContrast style has been renamed from VectorHereBerlin. VectorHereBerlin has been deprecated, but will continue to work in applications that use it.
        • VectorHereExploreTruck – A global map containing truck restrictions and attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments and icons on top of HERE Explore to support use cases within transport and logistics.

        Valid GrabMaps map styles:

        • VectorGrabStandardLight – The Grab Standard Light map style provides a basemap with detailed land use coloring, area names, roads, landmarks, and points of interest covering Southeast Asia.

        • VectorGrabStandardDark – The Grab Standard Dark map style provides a dark variation of the standard basemap covering Southeast Asia.

        Note: Grab provides maps only for countries in Southeast Asia, and is only available in the Asia Pacific (Singapore) Region (ap-southeast-1). For more information, see GrabMaps countries and area covered.

        Valid Open Data map styles:

        • VectorOpenDataStandardLight – The Open Data Standard Light map style provides a detailed basemap for the world suitable for website and mobile application use. The map includes highways major roads, minor roads, railways, water features, cities, parks, landmarks, building footprints, and administrative boundaries.

        • VectorOpenDataStandardDark – Open Data Standard Dark is a dark-themed map style that provides a detailed basemap for the world suitable for website and mobile application use. The map includes highways major roads, minor roads, railways, water features, cities, parks, landmarks, building footprints, and administrative boundaries.

        • VectorOpenDataVisualizationLight – The Open Data Visualization Light map style is a light-themed style with muted colors and fewer features that aids in understanding overlaid data.

        • VectorOpenDataVisualizationDark – The Open Data Visualization Dark map style is a dark-themed style with muted colors and fewer features that aids in understanding overlaid data.

    • 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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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: + - = . _ : / @.

      • Cannot use "aws:" as a prefix for a key.

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 Amazon Web Services.

        • Format example: arn:aws:geo:region:account-id:map/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 Amazon Web Services account. Use a place index resource to geocode addresses and other text queries by using the SearchPlaceIndexForText operation, and reverse geocode coordinates by using the SearchPlaceIndexForPosition operation, and enable autosuggestions by using the SearchPlaceIndexForSuggestions operation.

Note: If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details.

Service Reference:

Examples:

Calling the createPlaceIndex operation

var params = {
  DataSource: 'STRING_VALUE', /* required */
  IndexName: 'STRING_VALUE', /* required */
  DataSourceConfiguration: {
    IntendedUse: SingleUse | Storage
  },
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  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 geospatial data provider for the new place index.

      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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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 that helps you manage, identify, search, and filter your resources.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource.

      • Each tag key must be unique and must have exactly one associated 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: + - = . _ : / @

      • Cannot use "aws:" as a prefix for a key.

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 Amazon Web Services.

        • 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 Amazon Web Services 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.

Note: If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details.

Service Reference:

Examples:

Calling the createRouteCalculator operation

var params = {
  CalculatorName: 'STRING_VALUE', /* required */
  DataSource: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  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.

      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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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: + - = . _ : / @.

      • Cannot use "aws:" as a prefix for a key.

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 Amazon Web Services.

        • 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 Amazon Web Services account, which lets you retrieve current and historical location of devices.

Service Reference:

Examples:

Calling the createTracker operation

var params = {
  TrackerName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  EventBridgeEnabled: true || false,
  KmsKeyEnableGeospatialQueries: true || false,
  KmsKeyId: 'STRING_VALUE',
  PositionFiltering: TimeBased | DistanceBased | AccuracyBased,
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement,
  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.

    • EventBridgeEnabled — (Boolean)

      Whether to enable position UPDATE events from this tracker to be sent to EventBridge.

      Note: You do not need enable this feature to get ENTER and EXIT events for geofences with this tracker. Those events are always sent to EventBridge.
    • KmsKeyEnableGeospatialQueries — (Boolean)

      Enables GeospatialQueries for a tracker that uses a Amazon Web Services KMS customer managed key.

      This parameter is only used if you are using a KMS customer managed key.

      Note: If you wish to encrypt your data using your own KMS customer managed key, then the Bounding Polygon Queries feature will be disabled by default. This is because by using this feature, a representation of your device positions will not be encrypted using the your KMS managed key. The exact device position, however; is still encrypted using your managed key. You can choose to opt-in to the Bounding Polygon Quseries feature. This is done by setting the KmsKeyEnableGeospatialQueries parameter to true when creating or updating a Tracker.
    • KmsKeyId — (String)

      A key identifier for an Amazon Web Services 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 area are neither evaluated against linked geofence collections, nor stored. This helps control costs by reducing the number of geofence evaluations and historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.

      • AccuracyBased - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This can reduce the effects of GPS noise when displaying device trajectories on a map, and can help control your costs by reducing the number of geofence evaluations.

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

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

      No longer used. If included, the only allowed value is RequestBasedUsage.

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

      This parameter is no longer used.

    • 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: + - = . _ : / @.

      • Cannot use "aws:" as a prefix for a key.

    • 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 Amazon Web Services.

        • 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 Amazon Web Services 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.

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

Deletes the specified API key. The API key must have been deactivated more than 90 days previously.

Service Reference:

Examples:

Calling the deleteKey operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  ForceDelete: true || false
};
location.deleteKey(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: {})
    • ForceDelete — (Boolean)

      ForceDelete bypasses an API key's expiry conditions and deletes the key. Set the parameter true to delete the key or to false to not preemptively delete the API key.

      Valid values: true, or false.

      Required: No

      Note: This action is irreversible. Only use ForceDelete if you are certain the key is no longer in use.
    • KeyName — (String)

      The name of the API key to delete.

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 Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services 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 Amazon Web Services.

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

      • GeofenceCount — (Integer)

        The number of geofences in the geofence collection.

      • KmsKeyId — (String)

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

      • PricingPlan — (String)

        No longer used. Always returns RequestBasedUsage.

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

        No longer used. Always returns an empty string.

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

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

Retrieves the API key resource details.

Service Reference:

Examples:

Calling the describeKey operation

var params = {
  KeyName: 'STRING_VALUE' /* required */
};
location.describeKey(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: {})
    • KeyName — (String)

      The name of the API key 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 API key resource was created in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • Description — (String)

        The optional description for the API key resource.

      • ExpireTime — (Date)

        The timestamp for when the API key resource will expire in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

      • Key — (String)

        The key value/string of an API key.

      • KeyArn — (String)

        The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all Amazon Web Services.

        • Format example: arn:aws:geo:region:account-id:key/ExampleKey

      • KeyName — (String)

        The name of the API key resource.

      • Restrictions — (map)

        API Restrictions on the allowed actions, resources, and referers for an API key resource.

        • AllowActionsrequired — (Array<String>)

          A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.

          The following are valid values for the actions.

          • Map actions

            • geo:GetMap* - Allows all actions needed for map rendering.

          • Place actions

            • geo:SearchPlaceIndexForText - Allows geocoding.

            • geo:SearchPlaceIndexForPosition - Allows reverse geocoding.

            • geo:SearchPlaceIndexForSuggestions - Allows generating suggestions from text.

            • GetPlace - Allows finding a place by place ID.

          • Route actions

            • geo:CalculateRoute - Allows point to point routing.

            • geo:CalculateRouteMatrix - Allows calculating a matrix of routes.

          Note: You must use these strings exactly. For example, to provide access to map rendering, the only valid action is geo:GetMap* as an input to the list. ["geo:GetMap*"] is valid but ["geo:GetMapTile"] is not. Similarly, you cannot use ["geo:SearchPlaceIndexFor*"] - you must list each of the Place actions separately.
        • AllowReferers — (Array<String>)

          An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.

          Requirements:

          • Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list $-._+!*(),;/?:@=&

          • May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.

          • May contain wildcard characters question mark (?) and asterisk ().

            Question mark (?) will replace any single character (including hexadecimal digits).

            Asterisk () will replace any multiple characters (including multiple hexadecimal digits).

          • No spaces allowed. For example, https://example.com.

        • AllowResourcesrequired — (Array<String>)

          A list of allowed resource ARNs that a API key bearer can perform actions on.

          • The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.

          • The resources must be in the same partition, region, and account-id as the key that is being created.

          • Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id delimited by colons (:).

          • No spaces allowed, even with wildcards. For example, arn:aws:geo:region:account-id:map/ExampleMap*.

          For more information about ARN format, see Amazon Resource Names (ARNs).

      • Tags — (map<String>)

        Tags associated with the API key resource.

      • UpdateTime — (Date)

        The timestamp for when the API key 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.

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.

        • CustomLayers — (Array<String>)

          Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style. Default is unset.

          Note: Currenlty only VectorEsriNavigation supports CustomLayers. For more information, see Custom Layers.
        • PoliticalView — (String)

          Specifies the political view for the style. Leave unset to not use a political view, or, for styles that support specific political views, you can choose a view, such as IND for the Indian view.

          Default is unset.

          Note: Not all map resources or styles support political view styles. See Political views for more information.
        • Stylerequired — (String)

          Specifies the map style selected from an available data provider.

          Valid Esri map styles:

          • VectorEsriNavigation – The Esri 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. It also includes a richer set of places, such as shops, services, restaurants, attractions, and other points of interest. Enable the POI layer by setting it in CustomLayers to leverage the additional places data.

          • 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 Street 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.

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

          Valid HERE Technologies map styles:

          • VectorHereExplore – A default HERE map style containing a neutral, global map and its features including roads, buildings, landmarks, and water features. It also now includes a fully designed map of Japan.

          • RasterHereExploreSatellite – A global map containing high resolution satellite imagery.

          • HybridHereExploreSatellite – A global map displaying the road network, street names, and city labels over satellite imagery. This style will automatically retrieve both raster and vector tiles, and your charges will be based on total tiles retrieved.

            Note: Hybrid styles use both vector and raster tiles when rendering the map that you see. This means that more tiles are retrieved than when using either vector or raster tiles alone. Your charges will include all tiles retrieved.
          • VectorHereContrast – The HERE Contrast (Berlin) map style is a high contrast detailed base map of the world that blends 3D and 2D rendering.

            Note: The VectorHereContrast style has been renamed from VectorHereBerlin. VectorHereBerlin has been deprecated, but will continue to work in applications that use it.
          • VectorHereExploreTruck – A global map containing truck restrictions and attributes (e.g. width / height / HAZMAT) symbolized with highlighted segments and icons on top of HERE Explore to support use cases within transport and logistics.

          Valid GrabMaps map styles:

          • VectorGrabStandardLight – The Grab Standard Light map style provides a basemap with detailed land use coloring, area names, roads, landmarks, and points of interest covering Southeast Asia.

          • VectorGrabStandardDark – The Grab Standard Dark map style provides a dark variation of the standard basemap covering Southeast Asia.

          Note: Grab provides maps only for countries in Southeast Asia, and is only available in the Asia Pacific (Singapore) Region (ap-southeast-1). For more information, see GrabMaps countries and area covered.

          Valid Open Data map styles:

          • VectorOpenDataStandardLight – The Open Data Standard Light map style provides a detailed basemap for the world suitable for website and mobile application use. The map includes highways major roads, minor roads, railways, water features, cities, parks, landmarks, building footprints, and administrative boundaries.

          • VectorOpenDataStandardDark – Open Data Standard Dark is a dark-themed map style that provides a detailed basemap for the world suitable for website and mobile application use. The map includes highways major roads, minor roads, railways, water features, cities, parks, landmarks, building footprints, and administrative boundaries.

          • VectorOpenDataVisualizationLight – The Open Data Visualization Light map style is a light-themed style with muted colors and fewer features that aids in understanding overlaid data.

          • VectorOpenDataVisualizationDark – The Open Data Visualization Dark map style is a dark-themed style with muted colors and fewer features that aids in understanding overlaid data.

      • 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 Amazon Web Services.

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

      • MapName — (String)

        The map style selected from an available provider.

      • PricingPlan — (String)

        No longer used. Always returns RequestBasedUsage.

        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. Values can be one of the following:

        • Esri

        • Grab

        • Here

        For more information about 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 Amazon Web Services.

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

      • IndexName — (String)

        The name of the place index resource being described.

      • PricingPlan — (String)

        No longer used. Always returns RequestBasedUsage.

        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 Amazon Web Services.

        • 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

        • Grab

        • 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)

        Always returns RequestBasedUsage.

        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.

      • EventBridgeEnabled — (Boolean)

        Whether UPDATE events from this tracker in EventBridge are enabled. If set to true these events will be sent to EventBridge.

      • KmsKeyEnableGeospatialQueries — (Boolean)

        Enables GeospatialQueries for a tracker that uses a Amazon Web Services KMS customer managed key.

        This parameter is only used if you are using a KMS customer managed key.

        Note: If you wish to encrypt your data using your own KMS customer managed key, then the Bounding Polygon Queries feature will be disabled by default. This is because by using this feature, a representation of your device positions will not be encrypted using the your KMS managed key. The exact device position, however; is still encrypted using your managed key. You can choose to opt-in to the Bounding Polygon Quseries feature. This is done by setting the KmsKeyEnableGeospatialQueries parameter to true when creating or updating a Tracker.
      • KmsKeyId — (String)

        A key identifier for an Amazon Web Services 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"
        • "AccuracyBased"
      • PricingPlan — (String)

        Always returns RequestBasedUsage.

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

        No longer used. Always returns an empty string.

      • 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 Amazon Web Services.

        • 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 Amazon Web Services.

      • 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:

      • Accuracy — (map)

        The accuracy of the device position.

        • Horizontalrequired — (Float)

          Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

      • DeviceId — (String)

        The device whose position you retrieved.

      • Position — (Array<Float>)

        The last known device position.

      • PositionProperties — (map<String>)

        The properties associated with the 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,
  MaxResults: 'NUMBER_VALUE',
  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.

    • MaxResults — (Integer)

      An optional limit for the number of device positions 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

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

        • Accuracy — (map)

          The accuracy of the device position.

          • Horizontalrequired — (Float)

            Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • PositionProperties — (map<String>)

          The properties associated with the 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.

      • GeofenceProperties — (map<String>)

        User defined properties of the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.

        Format: "key" : "value"

      • Geometry — (map)

        Contains the geofence geometry details describing a polygon or a circle.

        • Circle — (map)

          A circle on the earth, as defined by a center point and a radius.

          • Centerrequired — (Array<Float>)

            A single point geometry, specifying the center of the circle, using WGS 84 coordinates, in the form [longitude, latitude].

          • Radiusrequired — (Float)

            The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).

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

          A polygon is a list of linear rings which are each made up of a list of vertices.

          Each vertex is a 2-dimensional point of the form: [longitude, latitude]. This is represented as an array of doubles of length 2 (so [double, double]).

          An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles ([[double, double], ...]).

          A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array of linear rings, which is represented as an array of arrays of arrays of doubles ([[[double, double], ...], ...]).

          A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

      • 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 */
  Key: 'STRING_VALUE'
};
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 font 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 | Arial Unicode MS Bold | Arial Unicode MS Regular

      Valid font stacks for HERE Technologies styles:

      • VectorHereContrast – Fira GO Regular | Fira GO Bold

      • VectorHereExplore, VectorHereExploreTruck, HybridHereExploreSatellite – Fira GO Italic | Fira GO Map | Fira GO Map Bold | Noto Sans CJK JP Bold | Noto Sans CJK JP Light | Noto Sans CJK JP Regular

      Valid font stacks for GrabMaps styles:

      • VectorGrabStandardLight, VectorGrabStandardDark – Noto Sans Regular | Noto Sans Medium | Noto Sans Bold

      Valid font stacks for Open Data styles:

      • VectorOpenDataStandardLight, VectorOpenDataStandardDark, VectorOpenDataVisualizationLight, VectorOpenDataVisualizationDark – Amazon Ember Regular,Noto Sans Regular | Amazon Ember Bold,Noto Sans Bold | Amazon Ember Medium,Noto Sans Medium | Amazon Ember Regular Italic,Noto Sans Italic | Amazon Ember Condensed RC Regular,Noto Sans Regular | Amazon Ember Condensed RC Bold,Noto Sans Bold | Amazon Ember Regular,Noto Sans Regular,Noto Sans Arabic Regular | Amazon Ember Condensed RC Bold,Noto Sans Bold,Noto Sans Arabic Condensed Bold | Amazon Ember Bold,Noto Sans Bold,Noto Sans Arabic Bold | Amazon Ember Regular Italic,Noto Sans Italic,Noto Sans Arabic Regular | Amazon Ember Condensed RC Regular,Noto Sans Regular,Noto Sans Arabic Condensed Regular | Amazon Ember Medium,Noto Sans Medium,Noto Sans Arabic Medium

      Note: The fonts used by the Open Data map styles are combined fonts that use Amazon Ember for most glyphs but Noto Sans for glyphs unsupported by Amazon Ember.
    • 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.

    • Key — (String)

      The optional API key to authorize the request.

    • 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 glyph, as binary blob.

      • CacheControl — (String)

        The HTTP Cache-Control directive for the value.

      • 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 */
  Key: 'STRING_VALUE'
};
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 containing image offsets. Use the following file names:

    • Key — (String)

      The optional API key to authorize the request.

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

      • CacheControl — (String)

        The HTTP Cache-Control directive for the value.

      • 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 */
  Key: 'STRING_VALUE'
};
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: {})
    • Key — (String)

      The optional API key to authorize the request.

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

      • CacheControl — (String)

        The HTTP Cache-Control directive for the value.

      • 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 */
  Key: 'STRING_VALUE'
};
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: {})
    • Key — (String)

      The optional API key to authorize the request.

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

      • CacheControl — (String)

        The HTTP Cache-Control directive for the value.

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

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

Finds a place by its unique ID. A PlaceId is returned by other search operations.

Note: A PlaceId is valid only if all of the following are the same in the original search request and the call to GetPlace.
  • Customer Amazon Web Services account
  • Amazon Web Services Region
  • Data provider specified in the place index resource

Service Reference:

Examples:

Calling the getPlace operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  PlaceId: 'STRING_VALUE', /* required */
  Key: 'STRING_VALUE',
  Language: 'STRING_VALUE'
};
location.getPlace(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 that you want to use for the search.

    • Key — (String)

      The optional API key to authorize the request.

    • Language — (String)

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English.

      This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

      For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the language parameter set to en. The city in the results will most likely be returned as Athens.

      If you set the language parameter to el, for Greek, then the city in the results will more likely be returned as Αθήνα.

      If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    • PlaceId — (String)

      The identifier of the place to find.

      While you can use PlaceID in subsequent requests, PlaceID is not intended to be a permanent identifier and the ID can change between consecutive API calls. Please see the following PlaceID behaviour for each data provider:

      • Esri: Place IDs will change every quarter at a minimum. The typical time period for these changes would be March, June, September, and December. Place IDs might also change between the typical quarterly change but that will be much less frequent.

      • HERE: We recommend that you cache data for no longer than a week to keep your data data fresh. You can assume that less than 1% ID shifts will release over release which is approximately 1 - 2 times per week.

      • Grab: Place IDs can expire or become invalid in the following situations.

        • Data operations: The POI may be removed from Grab POI database by Grab Map Ops based on the ground-truth, such as being closed in the real world, being detected as a duplicate POI, or having incorrect information. Grab will synchronize data to the Waypoint environment on weekly basis.

        • Interpolated POI: Interpolated POI is a temporary POI generated in real time when serving a request, and it will be marked as derived in the place.result_type field in the response. The information of interpolated POIs will be retained for at least 30 days, which means that within 30 days, you are able to obtain POI details by Place ID from Place Details API. After 30 days, the interpolated POIs(both Place ID and details) may expire and inaccessible from the Places Details API.

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:

      • Place — (map)

        Details about the result, such as its address and position.

        • AddressNumber — (String)

          The numerical portion of an address, such as a building number.

        • Categories — (Array<String>)

          The Amazon Location categories that describe this Place.

          For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

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

        • Interpolated — (Boolean)

          True if the result is interpolated from other known places.

          False if the Place is a known place.

          Not returned when the partner does not provide the information.

          For example, returns False for an address location that is found in the partner data, but returns True if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.

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

        • SubMunicipality — (String)

          An area that's part of a larger municipality. For example, Blissville is a submunicipality in the Queen County in New York.

          Note: This property is only returned for a place index that uses Esri as a data provider. The property is represented as a district.

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

        • SubRegion — (String)

          A county, or an area that's part of a larger region. For example, Metro Vancouver.

        • SupplementalCategories — (Array<String>)

          Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.

        • TimeZone — (map)

          The time zone in which the Place is located. Returned only when using HERE or Grab as the selected partner.

          • Namerequired — (String)

            The name of the time zone, following the IANA time zone standard. For example, America/Los_Angeles.

          • Offset — (Integer)

            The time zone's offset, in seconds, from UTC.

        • UnitNumber — (String)

          For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 123.

          Note: This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for SearchPlaceIndexForPosition.
        • UnitType — (String)

          For addresses with a UnitNumber, the type of unit. For example, Apartment.

          Note: This property is returned only for a place index that uses Esri as a data provider.

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 */
  FilterGeometry: {
    Polygon: [
      [
        [
          'NUMBER_VALUE',
          /* more items */
        ],
        /* more items */
      ],
      /* more items */
    ]
  },
  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: {})
    • FilterGeometry — (map)

      The geometry used to filter device positions.

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

        The set of arrays which define the polygon. A polygon can have between 4 and 1000 vertices.

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

        • Accuracy — (map)

          The accuracy of the device position.

          • Horizontalrequired — (Float)

            Estimated maximum distance, in meters, between the measured position and the true position of a device, along the Earth's surface.

        • DeviceIdrequired — (String)

          The ID of the device for this position.

        • Positionrequired — (Array<Float>)

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

        • PositionProperties — (map<String>)

          The properties associated with the position.

        • 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 Amazon Web Services 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 Amazon Web Services 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

        • PricingPlan — (String)

          No longer used. Always returns RequestBasedUsage.

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

          No longer used. Always returns an empty string.

        • 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 */
  MaxResults: 'NUMBER_VALUE',
  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.

    • MaxResults — (Integer)

      An optional limit for the number of geofences 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 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.

        • GeofenceProperties — (map<String>)

          User defined properties of the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.

          Format: "key" : "value"

        • Geometryrequired — (map)

          Contains the geofence geometry details describing a polygon or a circle.

          • Circle — (map)

            A circle on the earth, as defined by a center point and a radius.

            • Centerrequired — (Array<Float>)

              A single point geometry, specifying the center of the circle, using WGS 84 coordinates, in the form [longitude, latitude].

            • Radiusrequired — (Float)

              The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).

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

            A polygon is a list of linear rings which are each made up of a list of vertices.

            Each vertex is a 2-dimensional point of the form: [longitude, latitude]. This is represented as an array of doubles of length 2 (so [double, double]).

            An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles ([[double, double], ...]).

            A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array of linear rings, which is represented as an array of arrays of arrays of doubles ([[[double, double], ...], ...]).

            A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

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

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

Lists API key resources in your Amazon Web Services account.

Service Reference:

Examples:

Calling the listKeys operation

var params = {
  Filter: {
    KeyStatus: Active | Expired
  },
  MaxResults: 'NUMBER_VALUE',
  NextToken: 'STRING_VALUE'
};
location.listKeys(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: {})
    • Filter — (map)

      Optionally filter the list to only Active or Expired API keys.

      • KeyStatus — (String)

        Filter on Active or Expired API keys.

        Possible values include:
        • "Active"
        • "Expired"
    • 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 API key resources in your Amazon Web Services account. Details include API key name, allowed referers and timestamp for when the API key will expire.

        • CreateTimerequired — (Date)

          The timestamp of when the API key was created, in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • Description — (String)

          The optional description for the API key resource.

        • ExpireTimerequired — (Date)

          The timestamp for when the API key resource will expire, in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

        • KeyNamerequired — (String)

          The name of the API key resource.

        • Restrictionsrequired — (map)

          API Restrictions on the allowed actions, resources, and referers for an API key resource.

          • AllowActionsrequired — (Array<String>)

            A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.

            The following are valid values for the actions.

            • Map actions

              • geo:GetMap* - Allows all actions needed for map rendering.

            • Place actions

              • geo:SearchPlaceIndexForText - Allows geocoding.

              • geo:SearchPlaceIndexForPosition - Allows reverse geocoding.

              • geo:SearchPlaceIndexForSuggestions - Allows generating suggestions from text.

              • GetPlace - Allows finding a place by place ID.

            • Route actions

              • geo:CalculateRoute - Allows point to point routing.

              • geo:CalculateRouteMatrix - Allows calculating a matrix of routes.

            Note: You must use these strings exactly. For example, to provide access to map rendering, the only valid action is geo:GetMap* as an input to the list. ["geo:GetMap*"] is valid but ["geo:GetMapTile"] is not. Similarly, you cannot use ["geo:SearchPlaceIndexFor*"] - you must list each of the Place actions separately.
          • AllowReferers — (Array<String>)

            An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.

            Requirements:

            • Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list $-._+!*(),;/?:@=&

            • May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.

            • May contain wildcard characters question mark (?) and asterisk ().

              Question mark (?) will replace any single character (including hexadecimal digits).

              Asterisk () will replace any multiple characters (including multiple hexadecimal digits).

            • No spaces allowed. For example, https://example.com.

          • AllowResourcesrequired — (Array<String>)

            A list of allowed resource ARNs that a API key bearer can perform actions on.

            • The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.

            • The resources must be in the same partition, region, and account-id as the key that is being created.

            • Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id delimited by colons (:).

            • No spaces allowed, even with wildcards. For example, arn:aws:geo:region:account-id:map/ExampleMap*.

            For more information about ARN format, see Amazon Resource Names (ARNs).

        • UpdateTimerequired — (Date)

          The timestamp of when the API key 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 Amazon Web Services 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 Amazon Web Services 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.

        • PricingPlan — (String)

          No longer used. Always returns RequestBasedUsage.

          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 Amazon Web Services 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 Amazon Web Services 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. Values can be one of the following:

          • Esri

          • Grab

          • Here

          For more information about 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.

        • PricingPlan — (String)

          No longer used. Always returns RequestBasedUsage.

          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 that there are additional pages available. You can use the token in a new request to fetch the next page 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 Amazon Web Services 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 Amazon Web Services 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

          • Grab

          • Here

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

        • Descriptionrequired — (String)

          The optional description of the route calculator resource.

        • PricingPlan — (String)

          Always returns RequestBasedUsage.

          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 Amazon Web Services 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 Amazon Web Services 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.

        • PricingPlan — (String)

          Always returns RequestBasedUsage.

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

          No longer used. Always returns an empty string.

        • 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 */
    Circle: {
      Center: [ /* required */
        'NUMBER_VALUE',
        /* more items */
      ],
      Radius: 'NUMBER_VALUE' /* required */
    },
    Polygon: [
      [
        [
          'NUMBER_VALUE',
          /* more items */
        ],
        /* more items */
      ],
      /* more items */
    ]
  },
  GeofenceProperties: {
    '<PropertyMapKeyString>': 'STRING_VALUE',
    /* '<PropertyMapKeyString>': ... */
  }
};
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.

    • GeofenceProperties — (map<String>)

      Associates one of more properties with the geofence. A property is a key-value pair stored with the geofence and added to any geofence event triggered with that geofence.

      Format: "key" : "value"

    • Geometry — (map)

      Contains the details to specify the position of the geofence. Can be either a polygon or a circle. Including both will return a validation error.

      Note: Each geofence polygon can have a maximum of 1,000 vertices.
      • Circle — (map)

        A circle on the earth, as defined by a center point and a radius.

        • Centerrequired — (Array<Float>)

          A single point geometry, specifying the center of the circle, using WGS 84 coordinates, in the form [longitude, latitude].

        • Radiusrequired — (Float)

          The radius of the circle in meters. Must be greater than zero and no larger than 100,000 (100 kilometers).

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

        A polygon is a list of linear rings which are each made up of a list of vertices.

        Each vertex is a 2-dimensional point of the form: [longitude, latitude]. This is represented as an array of doubles of length 2 (so [double, double]).

        An array of 4 or more vertices, where the first and last vertex are the same (to form a closed boundary), is called a linear ring. The linear ring vertices must be listed in counter-clockwise order around the ring’s interior. The linear ring is represented as an array of vertices, or an array of arrays of doubles ([[double, double], ...]).

        A geofence consists of a single linear ring. To allow for future expansion, the Polygon parameter takes an array of linear rings, which is represented as an array of arrays of arrays of doubles ([[[double, double], ...], ...]).

        A linear ring for use in geofences can consist of between 4 and 1,000 vertices.

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 */
  ],
  Key: 'STRING_VALUE',
  Language: 'STRING_VALUE',
  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.

    • Key — (String)

      The optional API key to authorize the request.

    • Language — (String)

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English.

      This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

      For an example, we'll use the Greek language. You search for a location around Athens, Greece, with the language parameter set to en. The city in the results will most likely be returned as Athens.

      If you set the language parameter to el, for Greek, then the city in the results will more likely be returned as Αθήνα.

      If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    • MaxResults — (Integer)

      An optional parameter. The maximum number of results returned per request.

      Default value: 50

    • Position — (Array<Float>)

      Specifies the longitude and latitude of the position to query.

      This parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

      For example, [-123.1174, 49.2847] represents a position with longitude -123.1174 and latitude 49.2847.

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.

        • Distancerequired — (Float)

          The distance in meters of a great-circle arc between the query position and the result.

          Note: A great-circle arc is the shortest path on a sphere, in this case the Earth. This returns the shortest distance between two locations.
        • Placerequired — (map)

          Details about the search result, such as its address and position.

          • AddressNumber — (String)

            The numerical portion of an address, such as a building number.

          • Categories — (Array<String>)

            The Amazon Location categories that describe this Place.

            For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

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

          • Interpolated — (Boolean)

            True if the result is interpolated from other known places.

            False if the Place is a known place.

            Not returned when the partner does not provide the information.

            For example, returns False for an address location that is found in the partner data, but returns True if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.

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

          • SubMunicipality — (String)

            An area that's part of a larger municipality. For example, Blissville is a submunicipality in the Queen County in New York.

            Note: This property is only returned for a place index that uses Esri as a data provider. The property is represented as a district.

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

          • SubRegion — (String)

            A county, or an area that's part of a larger region. For example, Metro Vancouver.

          • SupplementalCategories — (Array<String>)

            Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.

          • TimeZone — (map)

            The time zone in which the Place is located. Returned only when using HERE or Grab as the selected partner.

            • Namerequired — (String)

              The name of the time zone, following the IANA time zone standard. For example, America/Los_Angeles.

            • Offset — (Integer)

              The time zone's offset, in seconds, from UTC.

          • UnitNumber — (String)

            For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 123.

            Note: This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for SearchPlaceIndexForPosition.
          • UnitType — (String)

            For addresses with a UnitNumber, the type of unit. For example, Apartment.

            Note: This property is returned only for a place index that uses Esri as a data provider.
        • PlaceId — (String)

          The unique identifier of the place. You can use this with the GetPlace operation to find the place again later.

          Note: For SearchPlaceIndexForPosition operations, the PlaceId is returned only by place indexes that use HERE or Grab as a data provider.
      • Summary — (map)

        Contains a summary of the request. Echoes the input values for Position, Language, MaxResults, and the DataSource of the place index.

        • DataSourcerequired — (String)

          The geospatial data provider attached to the place index resource specified in the request. Values can be one of the following:

          • Esri

          • Grab

          • Here

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

        • Language — (String)

          The preferred language used to return results. Matches the language in the request. The value is a valid BCP 47 language tag, for example, en for English.

        • MaxResults — (Integer)

          Contains the optional result count limit that is specified in the request.

          Default value: 50

        • Positionrequired — (Array<Float>)

          The position specified in the request.

Returns:

  • (AWS.Request)

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

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

Generates suggestions for addresses and points of interest based on partial or misspelled free-form text. This operation is also known as autocomplete, autosuggest, or fuzzy matching.

Optional parameters let you narrow your search results by bounding box or country, or bias your search toward a specific position on the globe.

Note: You can search for suggested place names near a specified position by using BiasPosition, or filter results within a bounding box by using FilterBBox. These parameters are mutually exclusive; using both BiasPosition and FilterBBox in the same command returns an error.

Service Reference:

Examples:

Calling the searchPlaceIndexForSuggestions operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  Text: 'STRING_VALUE', /* required */
  BiasPosition: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterBBox: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterCategories: [
    'STRING_VALUE',
    /* more items */
  ],
  FilterCountries: [
    'STRING_VALUE',
    /* more items */
  ],
  Key: 'STRING_VALUE',
  Language: 'STRING_VALUE',
  MaxResults: 'NUMBER_VALUE'
};
location.searchPlaceIndexForSuggestions(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>)

      An optional parameter that indicates a preference for place suggestions that are closer to a specified position.

      If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

      For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.

      Note: BiasPosition and FilterBBox are mutually exclusive. Specifying both options results in an error.
    • FilterBBox — (Array<Float>)

      An optional parameter that limits the search results by returning only suggestions within a specified bounding box.

      If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the northeast corner of the bounding box.

      For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the southwest corner has longitude -12.7935 and latitude -37.4835, and the northeast corner has longitude -12.0684 and latitude -36.9542.

      Note: FilterBBox and BiasPosition are mutually exclusive. Specifying both options results in an error.
    • FilterCategories — (Array<String>)

      A list of one or more Amazon Location categories to filter the returned places. If you include more than one category, the results will include results that match any of the categories listed.

      For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

    • FilterCountries — (Array<String>)

      An optional parameter that limits the search results by returning only suggestions within the provided list of countries.

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

    • Key — (String)

      The optional API key to authorize the request.

    • Language — (String)

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English.

      This setting affects the languages used in the results. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

      For an example, we'll use the Greek language. You search for Athens, Gr to get suggestions with the language parameter set to en. The results found will most likely be returned as Athens, Greece.

      If you set the language parameter to el, for Greek, then the result found will more likely be returned as Αθήνα, Ελλάδα.

      If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    • MaxResults — (Integer)

      An optional parameter. The maximum number of results returned per request.

      The default: 5

    • Text — (String)

      The free-form partial text to use to generate place suggestions. For example, eiffel tow.

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 place suggestions that best match the search text.

        • Categories — (Array<String>)

          The Amazon Location categories that describe the Place.

          For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

        • PlaceId — (String)

          The unique identifier of the Place. You can use this with the GetPlace operation to find the place again later, or to get full information for the Place.

          The GetPlace request must use the same PlaceIndex resource as the SearchPlaceIndexForSuggestions that generated the Place ID.

          Note: For SearchPlaceIndexForSuggestions operations, the PlaceId is returned by place indexes that use Esri, Grab, or HERE as data providers.

          While you can use PlaceID in subsequent requests, PlaceID is not intended to be a permanent identifier and the ID can change between consecutive API calls. Please see the following PlaceID behaviour for each data provider:

          • Esri: Place IDs will change every quarter at a minimum. The typical time period for these changes would be March, June, September, and December. Place IDs might also change between the typical quarterly change but that will be much less frequent.

          • HERE: We recommend that you cache data for no longer than a week to keep your data data fresh. You can assume that less than 1% ID shifts will release over release which is approximately 1 - 2 times per week.

          • Grab: Place IDs can expire or become invalid in the following situations.

            • Data operations: The POI may be removed from Grab POI database by Grab Map Ops based on the ground-truth, such as being closed in the real world, being detected as a duplicate POI, or having incorrect information. Grab will synchronize data to the Waypoint environment on weekly basis.

            • Interpolated POI: Interpolated POI is a temporary POI generated in real time when serving a request, and it will be marked as derived in the place.result_type field in the response. The information of interpolated POIs will be retained for at least 30 days, which means that within 30 days, you are able to obtain POI details by Place ID from Place Details API. After 30 days, the interpolated POIs(both Place ID and details) may expire and inaccessible from the Places Details API.

        • SupplementalCategories — (Array<String>)

          Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.

        • Textrequired — (String)

          The text of the place suggestion, typically formatted as an address string.

      • Summary — (map)

        Contains a summary of the request. Echoes the input values for BiasPosition, FilterBBox, FilterCountries, Language, MaxResults, and Text. Also includes the DataSource of the place index.

        • BiasPosition — (Array<Float>)

          Contains the coordinates for the optional bias position specified in the request.

          This parameter contains a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

          For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.

        • DataSourcerequired — (String)

          The geospatial data provider attached to the place index resource specified in the request. Values can be one of the following:

          • Esri

          • Grab

          • Here

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

        • FilterBBox — (Array<Float>)

          Contains the coordinates for the optional bounding box specified in the request.

        • FilterCategories — (Array<String>)

          The optional category filter specified in the request.

        • FilterCountries — (Array<String>)

          Contains the optional country filter specified in the request.

        • Language — (String)

          The preferred language used to return results. Matches the language in the request. The value is a valid BCP 47 language tag, for example, en for English.

        • MaxResults — (Integer)

          Contains the optional result count limit specified in the request.

        • Textrequired — (String)

          The free-form partial text input specified in the 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.

Optional parameters let you narrow your search results by bounding box or country, or bias your search toward a specific position on the globe.

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.

Search results are returned in order of highest to lowest relevance.

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 */
  ],
  FilterCategories: [
    'STRING_VALUE',
    /* more items */
  ],
  FilterCountries: [
    'STRING_VALUE',
    /* more items */
  ],
  Key: 'STRING_VALUE',
  Language: 'STRING_VALUE',
  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>)

      An optional parameter that indicates a preference for places that are closer to a specified position.

      If provided, this parameter must contain a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

      For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.

      Note: BiasPosition and FilterBBox are mutually exclusive. Specifying both options results in an error.
    • FilterBBox — (Array<Float>)

      An optional parameter that limits the search results by returning only places that are within the provided bounding box.

      If provided, this parameter must contain a total of four consecutive numbers in two pairs. The first pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the southwest corner of the bounding box; the second pair of numbers represents the X and Y coordinates (longitude and latitude, respectively) of the northeast corner of the bounding box.

      For example, [-12.7935, -37.4835, -12.0684, -36.9542] represents a bounding box where the southwest corner has longitude -12.7935 and latitude -37.4835, and the northeast corner has longitude -12.0684 and latitude -36.9542.

      Note: FilterBBox and BiasPosition are mutually exclusive. Specifying both options results in an error.
    • FilterCategories — (Array<String>)

      A list of one or more Amazon Location categories to filter the returned places. If you include more than one category, the results will include results that match any of the categories listed.

      For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

    • FilterCountries — (Array<String>)

      An optional parameter that limits the search results by returning only places that are in a specified list of countries.

      • Valid values include ISO 3166 3-digit country codes. 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.

    • Key — (String)

      The optional API key to authorize the request.

    • Language — (String)

      The preferred language used to return results. The value must be a valid BCP 47 language tag, for example, en for English.

      This setting affects the languages used in the results, but not the results themselves. If no language is specified, or not supported for a particular result, the partner automatically chooses a language for the result.

      For an example, we'll use the Greek language. You search for Athens, Greece, with the language parameter set to en. The result found will most likely be returned as Athens.

      If you set the language parameter to el, for Greek, then the result found will more likely be returned as Αθήνα.

      If the data provider does not have a value for Greek, the result will be in a language that the provider does support.

    • 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 matching the input text. Each result contains additional information about the specific point of interest.

        Not all response properties are included with all responses. Some properties may only be returned by specific data partners.

        • Distance — (Float)

          The distance in meters of a great-circle arc between the bias position specified and the result. Distance will be returned only if a bias position was specified in the query.

          Note: A great-circle arc is the shortest path on a sphere, in this case the Earth. This returns the shortest distance between two locations.
        • Placerequired — (map)

          Details about the search result, such as its address and position.

          • AddressNumber — (String)

            The numerical portion of an address, such as a building number.

          • Categories — (Array<String>)

            The Amazon Location categories that describe this Place.

            For more information about using categories, including a list of Amazon Location categories, see Categories and filtering, in the Amazon Location Service Developer Guide.

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

          • Interpolated — (Boolean)

            True if the result is interpolated from other known places.

            False if the Place is a known place.

            Not returned when the partner does not provide the information.

            For example, returns False for an address location that is found in the partner data, but returns True if an address does not exist in the partner data and its location is calculated by interpolating between other known addresses.

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

          • SubMunicipality — (String)

            An area that's part of a larger municipality. For example, Blissville is a submunicipality in the Queen County in New York.

            Note: This property is only returned for a place index that uses Esri as a data provider. The property is represented as a district.

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

          • SubRegion — (String)

            A county, or an area that's part of a larger region. For example, Metro Vancouver.

          • SupplementalCategories — (Array<String>)

            Categories from the data provider that describe the Place that are not mapped to any Amazon Location categories.

          • TimeZone — (map)

            The time zone in which the Place is located. Returned only when using HERE or Grab as the selected partner.

            • Namerequired — (String)

              The name of the time zone, following the IANA time zone standard. For example, America/Los_Angeles.

            • Offset — (Integer)

              The time zone's offset, in seconds, from UTC.

          • UnitNumber — (String)

            For addresses with multiple units, the unit identifier. Can include numbers and letters, for example 3B or Unit 123.

            Note: This property is returned only for a place index that uses Esri or Grab as a data provider. It is not returned for SearchPlaceIndexForPosition.
          • UnitType — (String)

            For addresses with a UnitNumber, the type of unit. For example, Apartment.

            Note: This property is returned only for a place index that uses Esri as a data provider.
        • PlaceId — (String)

          The unique identifier of the place. You can use this with the GetPlace operation to find the place again later.

          Note: For SearchPlaceIndexForText operations, the PlaceId is returned only by place indexes that use HERE or Grab as a data provider.
        • Relevance — (Float)

          The relative confidence in the match for a result among the results returned. For example, if more fields for an address match (including house number, street, city, country/region, and postal code), the relevance score is closer to 1.

          Returned only when the partner selected is Esri or Grab.

      • Summary — (map)

        Contains a summary of the request. Echoes the input values for BiasPosition, FilterBBox, FilterCountries, Language, MaxResults, and Text. Also includes the DataSource of the place index and the bounding box, ResultBBox, which surrounds the search results.

        • BiasPosition — (Array<Float>)

          Contains the coordinates for the optional bias position specified in the request.

          This parameter contains a pair of numbers. The first number represents the X coordinate, or longitude; the second number represents the Y coordinate, or latitude.

          For example, [-123.1174, 49.2847] represents the position with longitude -123.1174 and latitude 49.2847.

        • DataSourcerequired — (String)

          The geospatial data provider attached to the place index resource specified in the request. Values can be one of the following:

          • Esri

          • Grab

          • Here

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

        • FilterBBox — (Array<Float>)

          Contains the coordinates for the optional bounding box specified in the request.

        • FilterCategories — (Array<String>)

          The optional category filter specified in the request.

        • FilterCountries — (Array<String>)

          Contains the optional country filter specified in the request.

        • Language — (String)

          The preferred language used to return results. Matches the language in the request. The value is a valid BCP 47 language tag, for example, en for English.

        • MaxResults — (Integer)

          Contains the optional result count limit specified in the request.

        • ResultBBox — (Array<Float>)

          The bounding box that fully contains all search results.

          Note: If you specified the optional FilterBBox parameter in the request, ResultBBox is contained within FilterBBox.
        • Textrequired — (String)

          The search text specified in the request.

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.

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.

You can use the TagResource 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.

You can associate up to 50 tags with a resource.

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>)

      Applies one or more tags to specific resource. A tag is a key-value pair that helps you manage, identify, search, and filter your resources.

      Format: "key" : "value"

      Restrictions:

      • Maximum 50 tags per resource.

      • Each tag key must be unique and must have exactly one associated 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: + - = . _ : / @

      • Cannot use "aws:" as a prefix for a key.

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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

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

      This parameter is no longer used.

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 Amazon Web Services.

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

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

Updates the specified properties of a given API key resource.

Service Reference:

Examples:

Calling the updateKey operation

var params = {
  KeyName: 'STRING_VALUE', /* required */
  Description: 'STRING_VALUE',
  ExpireTime: new Date || 'Wed Dec 31 1969 16:00:00 GMT-0800 (PST)' || 123456789,
  ForceUpdate: true || false,
  NoExpiry: true || false,
  Restrictions: {
    AllowActions: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    AllowResources: [ /* required */
      'STRING_VALUE',
      /* more items */
    ],
    AllowReferers: [
      'STRING_VALUE',
      /* more items */
    ]
  }
};
location.updateKey(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 API key resource.

    • ExpireTime — (Date)

      Updates the timestamp for when the API key resource will expire in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

    • ForceUpdate — (Boolean)

      The boolean flag to be included for updating ExpireTime or Restrictions details.

      Must be set to true to update an API key resource that has been used in the past 7 days.

      False if force update is not preferred

      Default value: False

    • KeyName — (String)

      The name of the API key resource to update.

    • NoExpiry — (Boolean)

      Whether the API key should expire. Set to true to set the API key to have no expiration time.

    • Restrictions — (map)

      Updates the API key restrictions for the API key resource.

      • AllowActionsrequired — (Array<String>)

        A list of allowed actions that an API key resource grants permissions to perform. You must have at least one action for each type of resource. For example, if you have a place resource, you must include at least one place action.

        The following are valid values for the actions.

        • Map actions

          • geo:GetMap* - Allows all actions needed for map rendering.

        • Place actions

          • geo:SearchPlaceIndexForText - Allows geocoding.

          • geo:SearchPlaceIndexForPosition - Allows reverse geocoding.

          • geo:SearchPlaceIndexForSuggestions - Allows generating suggestions from text.

          • GetPlace - Allows finding a place by place ID.

        • Route actions

          • geo:CalculateRoute - Allows point to point routing.

          • geo:CalculateRouteMatrix - Allows calculating a matrix of routes.

        Note: You must use these strings exactly. For example, to provide access to map rendering, the only valid action is geo:GetMap* as an input to the list. ["geo:GetMap*"] is valid but ["geo:GetMapTile"] is not. Similarly, you cannot use ["geo:SearchPlaceIndexFor*"] - you must list each of the Place actions separately.
      • AllowReferers — (Array<String>)

        An optional list of allowed HTTP referers for which requests must originate from. Requests using this API key from other domains will not be allowed.

        Requirements:

        • Contain only alphanumeric characters (A–Z, a–z, 0–9) or any symbols in this list $-._+!*(),;/?:@=&

        • May contain a percent (%) if followed by 2 hexadecimal digits (A-F, a-f, 0-9); this is used for URL encoding purposes.

        • May contain wildcard characters question mark (?) and asterisk ().

          Question mark (?) will replace any single character (including hexadecimal digits).

          Asterisk () will replace any multiple characters (including multiple hexadecimal digits).

        • No spaces allowed. For example, https://example.com.

      • AllowResourcesrequired — (Array<String>)

        A list of allowed resource ARNs that a API key bearer can perform actions on.

        • The ARN must be the correct ARN for a map, place, or route ARN. You may include wildcards in the resource-id to match multiple resources of the same type.

        • The resources must be in the same partition, region, and account-id as the key that is being created.

        • Other than wildcards, you must include the full ARN, including the arn, partition, service, region, account-id and resource-id delimited by colons (:).

        • No spaces allowed, even with wildcards. For example, arn:aws:geo:region:account-id:map/ExampleMap*.

        For more information about ARN format, see Amazon Resource Names (ARNs).

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:

      • KeyArn — (String)

        The Amazon Resource Name (ARN) for the API key resource. Used when you need to specify a resource across all Amazon Web Services.

        • Format example: arn:aws:geo:region:account-id:key/ExampleKey

      • KeyName — (String)

        The name of the API key resource.

      • UpdateTime — (Date)

        The timestamp for when the API key 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.

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 */
  ConfigurationUpdate: {
    CustomLayers: [
      'STRING_VALUE',
      /* more items */
    ],
    PoliticalView: 'STRING_VALUE'
  },
  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: {})
    • ConfigurationUpdate — (map)

      Updates the parts of the map configuration that can be updated, including the political view.

      • CustomLayers — (Array<String>)

        Specifies the custom layers for the style. Leave unset to not enable any custom layer, or, for styles that support custom layers, you can enable layer(s), such as POI layer for the VectorEsriNavigation style. Default is unset.

        Note: Currenlty only VectorEsriNavigation supports CustomLayers. For more information, see Custom Layers.
      • PoliticalView — (String)

        Specifies the political view for the style. Set to an empty string to not use a political view, or, for styles that support specific political views, you can choose a view, such as IND for the Indian view.

        Note: Not all map resources or styles support political view styles. See Political views for more information.
    • Description — (String)

      Updates the description for the map resource.

    • MapName — (String)

      The name of the map resource to update.

    • PricingPlan — (String)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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:map/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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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 Amazon Web Services.

        • 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)

      No longer used. If included, the only allowed value is RequestBasedUsage.

      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',
  EventBridgeEnabled: true || false,
  KmsKeyEnableGeospatialQueries: true || false,
  PositionFiltering: TimeBased | DistanceBased | AccuracyBased,
  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.

    • EventBridgeEnabled — (Boolean)

      Whether to enable position UPDATE events from this tracker to be sent to EventBridge.

      Note: You do not need enable this feature to get ENTER and EXIT events for geofences with this tracker. Those events are always sent to EventBridge.
    • KmsKeyEnableGeospatialQueries — (Boolean)

      Enables GeospatialQueries for a tracker that uses a Amazon Web Services KMS customer managed key.

      This parameter is only used if you are using a KMS customer managed key.

    • 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 historical device positions to paginate through. Distance-based filtering can also reduce the effects of GPS noise when displaying device trajectories on a map.

      • AccuracyBased - If the device has moved less than the measured accuracy, location updates are ignored. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is ignored if the device has moved less than 15 m. Ignored location updates are neither evaluated against linked geofence collections, nor stored. This helps educe the effects of GPS noise when displaying device trajectories on a map, and can help control costs by reducing the number of geofence evaluations.

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

      No longer used. If included, the only allowed value is RequestBasedUsage.

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

      This parameter is no longer used.

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