AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

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, Tracking, and Geofencing

Sending a Request Using Location

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

Locking the API Version

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

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

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

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

var location = new AWS.Location();

Version:

  • 2020-11-19

Constructor Summary collapse

Property Summary collapse

Properties inherited from AWS.Service

apiVersions

Method Summary collapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, waitFor, setupRequestListeners, defineService

Constructor Details

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

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

Examples:

Constructing a Location object

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

Options Hash (options):

  • params (map)

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

  • endpoint (String|AWS.Endpoint)

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

  • accessKeyId (String)

    your AWS access key ID.

  • secretAccessKey (String)

    your AWS secret access key.

  • sessionToken (AWS.Credentials)

    the optional AWS session token to sign requests with.

  • credentials (AWS.Credentials)

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

  • credentialProvider (AWS.CredentialProviderChain)

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

  • region (String)

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

  • maxRetries (Integer)

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

  • maxRedirects (Integer)

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

  • sslEnabled (Boolean)

    whether to enable SSL for requests.

  • paramValidation (Boolean|map)

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

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

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

  • convertResponseTypes (Boolean)

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

  • correctClockSkew (Boolean)

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

  • s3ForcePathStyle (Boolean)

    whether to force path style URLs for S3 objects.

  • s3BucketEndpoint (Boolean)

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

  • s3DisableBodySigning (Boolean)

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

  • s3UsEast1RegionalEndpoint ('legacy'|'regional')

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

  • s3UseArnRegion (Boolean)

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

  • retryDelayOptions (map)

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

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

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

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

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

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

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

  • logger (#write, #log)

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

  • systemClockOffset (Number)

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

  • signatureVersion (String)

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

  • signatureCache (Boolean)

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

  • dynamoDbCrc32 (Boolean)

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

  • useAccelerateEndpoint (Boolean)

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

  • clientSideMonitoring (Boolean)

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

  • endpointDiscoveryEnabled (Boolean|undefined)

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

  • endpointCacheSize (Number)

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

  • hostPrefixEnabled (Boolean)

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

  • stsRegionalEndpoints ('legacy'|'regional')

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

Property Details

endpointAWS.Endpoint (readwrite)

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

Returns:

  • (AWS.Endpoint)

    an Endpoint object representing the endpoint URL for service requests.

Method Details

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

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

Service Reference:

Examples:

Calling the associateTrackerConsumer operation

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

Parameters:

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

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

      • Format example: arn:partition:service:region:account-id:resource-type:resource-id

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

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

Deletes a batch of geofences from a geofence collection.

Note: This action deletes the resource permanently. You can't undo this action.

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

Used in geofence monitoring. Evaluates device positions against the position of geofences in a given geofence collection.

Service Reference:

Examples:

Calling the batchEvaluateGeofences operation

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

Parameters:

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

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

    • DevicePositionUpdates — (Array<map>)

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

      • DeviceIdrequired — (String)

        The device associated to the position update.

      • Positionrequired — (Array<Float>)

        The latest device position defined in WGS 84 format: [Xlongitude, Ylatitude].

      • SampleTimerequired — (Date)

        The timestamp for when the position update was received in 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

A batch request to retrieve device positions.

Note: The response will return the device positions from the last 24 hours.

Service Reference:

Examples:

Calling the batchGetDevicePosition operation

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

Parameters:

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

      Devices whose position you want to retrieve.

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

    • TrackerName — (String)

      The tracker resource retrieving the device position.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • DevicePositions — (Array<map>)

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

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • ReceivedTimerequired — (Date)

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

        • SampleTimerequired — (Date)

          The timestamp for when the position was detected and sampled in 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 geofences into a given geofence collection.

Service Reference:

Examples:

Calling the batchPutGeofence operation

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

Parameters:

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

      The geofence collection storing the geofences.

    • Entries — (Array<map>)

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

      • GeofenceIdrequired — (String)

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

      • Geometryrequired — (map)

        The geometry details for the geofence.

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

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Errors — (Array<map>)

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

        • Errorrequired — (map)

          Contains details associated to the batch error.

          • Code — (String)

            The error code associated with the batch request error.

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

            A message with the reason for the batch request error.

        • GeofenceIdrequired — (String)

          The geofence associated with the error message.

      • Successes — (Array<map>)

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

        • CreateTimerequired — (Date)

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

        • GeofenceIdrequired — (String)

          The geofence successfully stored in a geofence collection.

        • UpdateTimerequired — (Date)

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

Returns:

  • (AWS.Request)

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

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

Uploads a position update for one or more devices to a tracker resource. The data is used for API queries requesting the device position and position history.

Note: Limitation — Location data is sampled at a fixed rate of 1 position per 30 second interval, and retained for 1 year before it is deleted.

Service Reference:

Examples:

Calling the batchUpdateDevicePosition operation

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

Parameters:

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

      The name of the tracker resource to update.

    • Updates — (Array<map>)

      Contains the position update details for each device.

      • DeviceIdrequired — (String)

        The device associated to the position update.

      • Positionrequired — (Array<Float>)

        The latest device position defined in WGS 84 format: [Xlongitude, Ylatitude].

      • SampleTimerequired — (Date)

        The timestamp for when the position update was received in 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 for when a position sample was attempted in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

Returns:

  • (AWS.Request)

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

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

Creates a geofence collection, which manages and stores geofences.

Service Reference:

Examples:

Calling the createGeofenceCollection operation

var params = {
  CollectionName: 'STRING_VALUE', /* required */
  PricingPlan: RequestBasedUsage | MobileAssetTracking | MobileAssetManagement, /* required */
  Description: 'STRING_VALUE'
};
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 (-), and underscores (_).

      • Must be a unique geofence collection name.

      • No spaces allowed. For example, ExampleGeofenceCollection.

    • Description — (String)

      An optional description for the geofence collection.

    • PricingPlan — (String)

      Specifies the pricing plan for your geofence collection. There's three pricing plan options:

      • RequestBasedUsage — Selects the "Request-Based Usage" pricing plan.

      • MobileAssetTracking — Selects the "Mobile Asset Tracking" pricing plan.

      • MobileAssetManagement — Selects the "Mobile Asset Management" pricing plan.

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

      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:

      • CollectionArn — (String)

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

      • CollectionName — (String)

        The name for the geofence collection.

      • CreateTime — (Date)

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

Returns:

  • (AWS.Request)

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

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

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

Note: By using Maps, you agree that AWS may transmit your API queries to your selected third party provider for processing, which may be outside the AWS region you are currently using. For more information, see the AWS Service Terms for Amazon Location Service.

Service Reference:

Examples:

Calling the createMap operation

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

Parameters:

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

      Specifies the map style selected from an available data provider.

      • Stylerequired — (String)

        Specifies the map style selected from an available data provider.

        Valid styles: VectorEsriLightGrayCanvas, VectorEsriLight, VectorEsriStreets, VectorEsriNavigation, VectorEsriDarkGrayCanvas, VectorEsriLightGrayCanvas, VectorHereBerlin

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

      An optional description for the map resource.

    • MapName — (String)

      The name for the map resource.

      Requirements:

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

      • Must be a unique map resource name.

      • No spaces allowed. For example, ExampleMap.

    • PricingPlan — (String)

      Specifies the pricing plan for your map resource. There's three pricing plan options:

      • RequestBasedUsage — Selects the "Request-Based Usage" pricing plan.

      • MobileAssetTracking — Selects the "Mobile Asset Tracking" pricing plan.

      • MobileAssetManagement — Selects the "Mobile Asset Management" pricing plan.

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

      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:

      • 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 when you need to specify a resource across all AWS.

        • Format example: arn:partition:service:region:account-id:resource-type:resource-id

      • MapName — (String)

        The name of the map resource.

Returns:

  • (AWS.Request)

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

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

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

Note: By using Places, you agree that AWS may transmit your API queries to your selected third party provider for processing, which may be outside the AWS region you are currently using. Because of licensing limitations, you may not use HERE to store results for locations in Japan. For more information, see the AWS Service Terms for Amazon Location Service.

Service Reference:

Examples:

Calling the createPlaceIndex operation

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

Parameters:

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

      Specifies the data provider of geospatial data.

    • DataSourceConfiguration — (map)

      Specifies the 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.

    • IndexName — (String)

      The name of the Place index resource.

      Requirements:

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

      • Must be a unique Place index resource name.

      • No spaces allowed. For example, ExamplePlaceIndex.

    • PricingPlan — (String)

      Specifies the pricing plan for your Place index resource. There's three pricing plan options:

      • RequestBasedUsage — Selects the "Request-Based Usage" pricing plan.

      • MobileAssetTracking — Selects the "Mobile Asset Tracking" pricing plan.

      • MobileAssetManagement — Selects the "Mobile Asset Management" pricing plan.

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

      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:

      • 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 when you need to specify a resource across all AWS.

      • IndexName — (String)

        The name for the Place index resource.

Returns:

  • (AWS.Request)

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

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

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

Service Reference:

Examples:

Calling the createTracker operation

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

    • PricingPlan — (String)

      Specifies the pricing plan for your tracker resource. There's three pricing plan options:

      • RequestBasedUsage — Selects the "Request-Based Usage" pricing plan.

      • MobileAssetTracking — Selects the "Mobile Asset Tracking" pricing plan.

      • MobileAssetManagement — Selects the "Mobile Asset Management" pricing plan.

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

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

      The name for the tracker resource.

      Requirements:

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

      • Must be a unique tracker resource name.

      • No spaces allowed. For example, ExampleTracker.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CreateTime — (Date)

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

      • TrackerArn — (String)

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

      • TrackerName — (String)

        The name of the tracker resource.

Returns:

  • (AWS.Request)

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

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

Deletes a geofence collection from your AWS account.

Note: This action deletes the resource permanently. You can't undo this action. If the geofence collection is the target of a tracker resource, the devices will no longer be monitored.

Service Reference:

Examples:

Calling the deleteGeofenceCollection operation

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

Parameters:

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

      The name of the geofence collection to be deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a map resource from your AWS account.

Note: This action deletes the resource permanently. You cannot undo this action. If the map is being used in an application, the map may not render.

Service Reference:

Examples:

Calling the deleteMap operation

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

Parameters:

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

      The name of the map resource to be deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Deletes a Place index resource from your AWS account.

Note: This action deletes the resource permanently. You cannot undo this action.

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.

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

Deletes a tracker resource from your AWS account.

Note: This action deletes the resource permanently. You can't undo this action. If the tracker resource is in use, you may encounter an error. Make sure that the target resource is not a dependency for your applications.

Service Reference:

Examples:

Calling the deleteTracker operation

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

Parameters:

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

      The name of the tracker resource to be deleted.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

Returns:

  • (AWS.Request)

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

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

Retrieves the geofence collection details.

Service Reference:

Examples:

Calling the describeGeofenceCollection operation

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

Parameters:

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

      The name of the geofence collection.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CollectionArn — (String)

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

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

      • UpdateTime — (Date)

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

Returns:

  • (AWS.Request)

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

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

Retrieves the map resource details.

Service Reference:

Examples:

Calling the describeMap operation

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

Parameters:

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

      The name of the map resource.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Configuration — (map)

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

        • Stylerequired — (String)

          Specifies the map style selected from an available data provider.

          Valid styles: VectorEsriLightGrayCanvas, VectorEsriLight, VectorEsriStreets, VectorEsriNavigation, VectorEsriDarkGrayCanvas, VectorEsriLightGrayCanvas, VectorHereBerlin

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

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

      • DataSource — (String)

        Specifies the data provider for the associated map tiles.

      • Description — (String)

        The optional description for the map resource.

      • MapArn — (String)

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

      • MapName — (String)

        The map style selected from an available provider.

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

      • 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 when you need to specify a resource across all AWS.

      • IndexName — (String)

        The name of the Place index resource being described.

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

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.

      • TrackerArn — (String)

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

      • 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 bewteen a tracker resource and a geofence collection.

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

Service Reference:

Examples:

Calling the disassociateTrackerConsumer operation

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

Parameters:

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

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

      • Format example: arn:partition:service:region:account-id:resource-type:resource-id

    • 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 the latest device position.

Note: Limitation — Device positions are deleted after one year.

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

    • TrackerName — (String)

      The tracker resource receiving the position update.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • DeviceId — (String)

        The device whose position you retrieved.

      • Position — (Array<Float>)

        The last known device position.

      • ReceivedTime — (Date)

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

      • SampleTime — (Date)

        The timestamp for when the position was detected and sampled in 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: Limitation — Device positions are deleted after one year.

Service Reference:

Examples:

Calling the getDevicePositionHistory operation

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

Parameters:

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

      The device whose position history you want to retrieve.

    • EndTimeExclusive — (Date)

      Specify the end time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

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

    • NextToken — (String)

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

      Default value: null

    • StartTimeInclusive — (Date)

      Specify the start time for the position history in ISO 8601 format: YYYY-MM-DDThh:mm:ss.sssZ.

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

    • TrackerName — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • DevicePositions — (Array<map>)

        Contains the position history details for the requested device.

        • DeviceId — (String)

          The device whose position you retrieved.

        • Positionrequired — (Array<Float>)

          The last known device position.

        • ReceivedTimerequired — (Date)

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

        • SampleTimerequired — (Date)

          The timestamp for when the position was detected and sampled 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.

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

Retrieves the geofence details from a geofence collection.

Service Reference:

Examples:

Calling the getGeofence operation

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

Parameters:

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

      The geofence collection storing the target geofence.

    • GeofenceId — (String)

      The geofence you're retrieving details for.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CreateTime — (Date)

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

      • GeofenceId — (String)

        The geofence identifier.

      • Geometry — (map)

        Contains the geofence geometry details describing a polygon.

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

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

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

      • Status — (String)

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

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

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

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

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

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

      • UpdateTime — (Date)

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

Returns:

  • (AWS.Request)

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

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

Retrieves glyphs used to display labels on a map.

Service Reference:

Examples:

Calling the getMapGlyphs operation

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

Parameters:

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

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

    • FontUnicodeRange — (String)

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

    • MapName — (String)

      The map resource associated with the glyph file.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

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

        The blob's content type.

      • ContentType — (String)

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

Returns:

  • (AWS.Request)

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

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

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

Service Reference:

Examples:

Calling the getMapSprites operation

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

Parameters:

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

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

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

    • MapName — (String)

      The map resource associated with the sprite file.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

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

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

      • ContentType — (String)

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

Returns:

  • (AWS.Request)

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

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

Retrieves the map style descriptor from a map resource.

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

Service Reference:

Examples:

Calling the getMapStyleDescriptor operation

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

Parameters:

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

      The map resource to retrieve the style descriptor from.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

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

        Contains the body of the style descriptor.

      • ContentType — (String)

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

Returns:

  • (AWS.Request)

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

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

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

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

Service Reference:

Examples:

Calling the getMapTile operation

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

Parameters:

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

      The map resource to retrieve the map tiles from.

    • X — (String)

      The X axis value for the map tile.

    • Y — (String)

      The Y axis value for the map tile.

    • Z — (String)

      The zoom value for the map tile.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

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

        Contains Mapbox Vector Tile (MVT) data.

      • ContentType — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists geofence collections in your AWS account.

Service Reference:

Examples:

Calling the listGeofenceCollections operation

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

Parameters:

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

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

      Default value: 100

    • NextToken — (String)

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

      Default value: null

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Entries — (Array<map>)

        Lists the geofence collections that exist in your AWS account.

        • CollectionNamerequired — (String)

          The name of the geofence collection.

        • CreateTimerequired — (Date)

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

        • Descriptionrequired — (String)

          The description for the geofence collection

        • UpdateTimerequired — (Date)

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

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists geofences stored in a given geofence collection.

Service Reference:

Examples:

Calling the listGeofences operation

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

Parameters:

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

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

    • NextToken — (String)

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

      Default value: null

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Entries — (Array<map>)

        Contains a list of geofences stored in the geofence collection.

        • CreateTimerequired — (Date)

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

        • GeofenceIdrequired — (String)

          The geofence identifier.

        • Geometryrequired — (map)

          Contains the geofence geometry details describing a polygon.

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

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

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

        • Statusrequired — (String)

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

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

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

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

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

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

        • UpdateTimerequired — (Date)

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

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists map resources in your AWS account.

Service Reference:

Examples:

Calling the listMaps operation

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

Parameters:

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

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

      Default value: 100

    • NextToken — (String)

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

      Default value: null

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Entries — (Array<map>)

        Contains a list of maps in your AWS account

        • CreateTimerequired — (Date)

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

        • DataSourcerequired — (String)

          Specifies the data provider for the associated map tiles.

        • Descriptionrequired — (String)

          The description for the map resource.

        • MapNamerequired — (String)

          The name of the associated map resource.

        • UpdateTimerequired — (Date)

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

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists Place index resources in your AWS account.

Service Reference:

Examples:

Calling the listPlaceIndexes operation

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

Parameters:

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

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

      Default value: 100

    • NextToken — (String)

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

      Default value: null

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Entries — (Array<map>)

        Lists the Place index resources that exist in your AWS account

        • CreateTimerequired — (Date)

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

        • DataSourcerequired — (String)

          The data provider of geospatial data.

        • Descriptionrequired — (String)

          The optional description for the Place index resource.

        • IndexNamerequired — (String)

          The name of the Place index resource.

        • UpdateTimerequired — (Date)

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

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists geofence collections currently associated to the given tracker resource.

Service Reference:

Examples:

Calling the listTrackerConsumers operation

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

Parameters:

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

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

      Default value: 100

    • NextToken — (String)

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

      Default value: null

    • TrackerName — (String)

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • ConsumerArns — (Array<String>)

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

      • NextToken — (String)

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

Returns:

  • (AWS.Request)

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

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

Lists tracker resources in your AWS account.

Service Reference:

Examples:

Calling the listTrackers operation

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

Parameters:

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

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

      Default value: 100

    • NextToken — (String)

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

      Default value: null

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Entries — (Array<map>)

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

        • CreateTimerequired — (Date)

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

        • Descriptionrequired — (String)

          The description for the tracker resource.

        • TrackerNamerequired — (String)

          The name of the tracker resource.

        • UpdateTimerequired — (Date)

          The timestamp for when the position was detected and sampled 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.

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

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

Service Reference:

Examples:

Calling the putGeofence operation

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

Parameters:

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

      The geofence collection to store the geofence in.

    • GeofenceId — (String)

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

    • Geometry — (map)

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

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

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

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

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • CreateTime — (Date)

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

      • GeofenceId — (String)

        The geofence identifier entered in the request.

      • UpdateTime — (Date)

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

Returns:

  • (AWS.Request)

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

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

Reverse geocodes a given coordinate and returns a legible address. Allows you to search for Places or points of interest near a given position.

Note: By using Places, you agree that AWS may transmit your API queries to your selected third party provider for processing, which may be outside the AWS region you are currently using. Because of licensing limitations, you may not use HERE to store results for locations in Japan. For more information, see the AWS Service Terms for Amazon Location Service.

Service Reference:

Examples:

Calling the searchPlaceIndexForPosition operation

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

Parameters:

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

      The name of the Place index resource you want to use for the search.

    • MaxResults — (Integer)

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

      Default value: 50

    • Position — (Array<Float>)

      Specifies a coordinate for the query defined by a longitude, and latitude.

      • The first position is the X coordinate, or longitude.

      • The second position is the Y coordinate, or latitude.

      For example, position=xLongitude&position=yLatitude .

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Results — (Array<map>)

        Returns a list of Places closest to the specified position. Each result contains additional information about the Places returned.

        • Placerequired — (map)

          Contains details about the relevant point of interest.

          • AddressNumber — (String)

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

          • Country — (String)

            A country/region specified using ISO 3166 3-digit country/region code. For example, CAN.

          • Geometryrequired — (map)

            Places uses a point geometry to specify a location or a Place.

            • Point — (Array<Float>)

              A single point geometry specifies a location for a Place using WGS 84 coordinates:

              • x — Specifies the x coordinate or longitude.

              • y — Specifies the y coordinate or latitude.

          • Label — (String)

            The full name and address of the point of interest such as a city, region, or country. For example, 123 Any Street, Any Town, USA.

          • Municipality — (String)

            A name for a local area, such as a city or town name. For example, Toronto.

          • Neighborhood — (String)

            The name of a community district. For example, Downtown.

          • PostalCode — (String)

            A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.

          • Region — (String)

            A name for an area or geographical division, such as a province or state name. For example, British Columbia.

          • Street — (String)

            The name for a street or a road to identify a location. For example, Main Street.

          • SubRegion — (String)

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

      • Summary — (map)

        Contains a summary of the request.

        • DataSourcerequired — (String)

          The data provider of geospatial data for the Place index resource.

        • MaxResults — (Integer)

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

          Default value: 50

        • Positionrequired — (Array<Float>)

          The position given in the reverse geocoding request.

Returns:

  • (AWS.Request)

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

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

Geocodes free-form text, such as an address, name, city, or region to allow you to search for Places or points of interest.

Includes the option to apply additional parameters to narrow your list of results.

Note: You can search for places near a given position using BiasPosition, or filter results within a bounding box using FilterBBox. Providing both parameters simultaneously returns an error.
Note: By using Places, you agree that AWS may transmit your API queries to your selected third party provider for processing, which may be outside the AWS region you are currently using. Also, when using HERE as your data provider, you may not (a) use HERE Places for Asset Management, or (b) select the Storage option for the IntendedUse parameter when requesting Places in Japan. For more information, see the AWS Service Terms for Amazon Location Service.

Service Reference:

Examples:

Calling the searchPlaceIndexForText operation

var params = {
  IndexName: 'STRING_VALUE', /* required */
  Text: 'STRING_VALUE', /* required */
  BiasPosition: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterBBox: [
    'NUMBER_VALUE',
    /* more items */
  ],
  FilterCountries: [
    'STRING_VALUE',
    /* more items */
  ],
  MaxResults: 'NUMBER_VALUE'
};
location.searchPlaceIndexForText(params, function(err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Parameters:

  • params (Object) (defaults to: {})
    • BiasPosition — (Array<Float>)

      Searches for results closest to the given position. An optional parameter defined by longitude, and latitude.

      • The first bias position is the X coordinate, or longitude.

      • The second bias position is the Y coordinate, or latitude.

      For example, bias=xLongitude&bias=yLatitude.

    • FilterBBox — (Array<Float>)

      Filters the results by returning only Places within the provided bounding box. An optional parameter.

      The first 2 bbox parameters describe the lower southwest corner:

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

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

      For example, bbox=xLongitudeSW&bbox=yLatitudeSW.

      The next bbox parameters describe the upper northeast corner:

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

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

      For example, bbox=xLongitudeNE&bbox=yLatitudeNE

    • FilterCountries — (Array<String>)

      Limits the search to the given a list of countries/regions. An optional parameter.

      • Use the ISO 3166 3-digit country code. For example, Australia uses three upper-case characters: AUS.

    • IndexName — (String)

      The name of the Place index resource you want to use for the search.

    • MaxResults — (Integer)

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

      The default: 50

    • Text — (String)

      The address, name, city, or region to be used in the search. In free-form text format. For example, 123 Any Street.

Callback (callback):

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

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

    Context (this):

    • (AWS.Response)

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

    Parameters:

    • err (Error)

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

    • data (Object)

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

      • Results — (Array<map>)

        A list of Places closest to the specified position. Each result contains additional information about the specific point of interest.

        • Placerequired — (map)

          Contains details about the relevant point of interest.

          • AddressNumber — (String)

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

          • Country — (String)

            A country/region specified using ISO 3166 3-digit country/region code. For example, CAN.

          • Geometryrequired — (map)

            Places uses a point geometry to specify a location or a Place.

            • Point — (Array<Float>)

              A single point geometry specifies a location for a Place using WGS 84 coordinates:

              • x — Specifies the x coordinate or longitude.

              • y — Specifies the y coordinate or latitude.

          • Label — (String)

            The full name and address of the point of interest such as a city, region, or country. For example, 123 Any Street, Any Town, USA.

          • Municipality — (String)

            A name for a local area, such as a city or town name. For example, Toronto.

          • Neighborhood — (String)

            The name of a community district. For example, Downtown.

          • PostalCode — (String)

            A group of numbers and letters in a country-specific format, which accompanies the address for the purpose of identifying a location.

          • Region — (String)

            A name for an area or geographical division, such as a province or state name. For example, British Columbia.

          • Street — (String)

            The name for a street or a road to identify a location. For example, Main Street.

          • SubRegion — (String)

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

      • Summary — (map)

        Contains a summary of the request. Contains the BiasPosition, DataSource, FilterBBox, FilterCountries, MaxResults, ResultBBox, and Text.

        • BiasPosition — (Array<Float>)

          Contains the coordinates for the bias position entered in the geocoding request.

        • DataSourcerequired — (String)

          The data provider of geospatial data for the Place index resource.

        • FilterBBox — (Array<Float>)

          Contains the coordinates for the optional bounding box coordinated entered in the geocoding request.

        • FilterCountries — (Array<String>)

          Contains the country filter entered in the geocoding request.

        • MaxResults — (Integer)

          Contains the maximum number of results indicated for the request.

        • ResultBBox — (Array<Float>)

          A bounding box that contains the search results within the specified area indicated by FilterBBox. A subset of bounding box specified using FilterBBox.

        • Textrequired — (String)

          The address, name, city or region to be used in the geocoding request. In free-form text format. For example, Vancouver.

Returns:

  • (AWS.Request)

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