- Navigation GuideYou are on a Client landing page. Commands (operations) are listed on this page. The Client constructor type is linked at the bottom.
LocationClient
"Suite of geospatial services including Maps, Places, Routes, Tracking, and Geofencing"
Installation
npm install @aws-sdk/client-location
yarn add @aws-sdk/client-location
pnpm add @aws-sdk/client-location
LocationClient Operations
Command | Summary |
---|
Command | Summary |
---|---|
AssociateTrackerConsumerCommand | Creates an association between a geofence collection and a tracker resource. This allows the tracker resource to communicate location data to the linked geofence collection. You can associate up to five geofence collections to each tracker resource. Currently not supported — Cross-account configurations, such as creating associations between a tracker resource in one account and a geofence collection in another account. |
BatchDeleteDevicePositionHistoryCommand | Deletes the position history of one or more devices from a tracker resource. |
BatchDeleteGeofenceCommand | Deletes a batch of geofences from a geofence collection. This operation deletes the resource permanently. |
BatchEvaluateGeofencesCommand | Evaluates device positions against the geofence geometries from a given geofence collection. This operation always returns an empty response because geofences are asynchronously evaluated. The evaluation determines if the device has entered or exited a geofenced area, and then publishes one of the following events to Amazon EventBridge:
The last geofence that a device was observed within is tracked for 30 days after the most recent device position update. Geofence evaluation uses the given device position. It does not account for the optional The |
BatchGetDevicePositionCommand | Lists the latest device positions for requested devices. |
BatchPutGeofenceCommand | A batch request for storing geofence geometries into a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request. |
BatchUpdateDevicePositionCommand | Uploads position update data for one or more devices to a tracker resource (up to 10 devices per batch). Amazon Location uses the data when it reports the last known device position and position history. Amazon Location retains location data for 30 days. Position updates are handled based on the When When |
CalculateRouteCommand | Calculates a route given the following required parameters: By default, a request that doesn't specify a departure time uses the best time of day to travel with the best traffic conditions when calculating the route. Additional options include:
|
CalculateRouteMatrixCommand | Calculates a route matrix given the following required parameters: Your account is charged for each route calculated, not the number of requests. Requires that you first create a route calculator resource . By default, a request that doesn't specify a departure time uses the best time of day to travel with the best traffic conditions when calculating routes. Additional options include:
|
CreateGeofenceCollectionCommand | Creates a geofence collection, which manages and stores geofences. |
CreateKeyCommand | Creates an API key resource in your Amazon Web Services account, which lets you grant actions for Amazon Location resources to the API key bearer. For more information, see Using API keys . |
CreateMapCommand | Creates a map resource in your Amazon Web Services account, which provides map tiles of different styles sourced from global location data providers. If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details. |
CreatePlaceIndexCommand | Creates a place index resource in your Amazon Web Services account. Use a place index resource to geocode addresses and other text queries by using the If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details. |
CreateRouteCalculatorCommand | Creates a route calculator resource in your Amazon Web Services account. You can send requests to a route calculator resource to estimate travel time, distance, and get directions. A route calculator sources traffic and road network data from your chosen data provider. If your application is tracking or routing assets you use in your business, such as delivery vehicles or employees, you must not use Esri as your geolocation provider. See section 82 of the Amazon Web Services service terms for more details. |
CreateTrackerCommand | Creates a tracker resource in your Amazon Web Services account, which lets you retrieve current and historical location of devices. |
DeleteGeofenceCollectionCommand | Deletes a geofence collection from your Amazon Web Services account. This operation deletes the resource permanently. If the geofence collection is the target of a tracker resource, the devices will no longer be monitored. |
DeleteKeyCommand | Deletes the specified API key. The API key must have been deactivated more than 90 days previously. |
DeleteMapCommand | Deletes a map resource from your Amazon Web Services account. This operation deletes the resource permanently. If the map is being used in an application, the map may not render. |
DeletePlaceIndexCommand | Deletes a place index resource from your Amazon Web Services account. This operation deletes the resource permanently. |
DeleteRouteCalculatorCommand | Deletes a route calculator resource from your Amazon Web Services account. This operation deletes the resource permanently. |
DeleteTrackerCommand | Deletes a tracker resource from your Amazon Web Services account. This operation deletes the resource permanently. If the tracker resource is in use, you may encounter an error. Make sure that the target resource isn't a dependency for your applications. |
DescribeGeofenceCollectionCommand | Retrieves the geofence collection details. |
DescribeKeyCommand | Retrieves the API key resource details. |
DescribeMapCommand | Retrieves the map resource details. |
DescribePlaceIndexCommand | Retrieves the place index resource details. |
DescribeRouteCalculatorCommand | Retrieves the route calculator resource details. |
DescribeTrackerCommand | Retrieves the tracker resource details. |
DisassociateTrackerConsumerCommand | Removes the association between a tracker resource and a geofence collection. Once you unlink a tracker resource from a geofence collection, the tracker positions will no longer be automatically evaluated against geofences. |
ForecastGeofenceEventsCommand | Evaluates device positions against geofence geometries from a given geofence collection. The event forecasts three states for which a device can be in relative to a geofence: |
GetDevicePositionCommand | Retrieves a device's most recent position according to its sample time. Device positions are deleted after 30 days. |
GetDevicePositionHistoryCommand | Retrieves the device position history from a tracker resource within a specified range of time. Device positions are deleted after 30 days. |
GetGeofenceCommand | Retrieves the geofence details from a geofence collection. The returned geometry will always match the geometry format used when the geofence was created. |
GetMapGlyphsCommand | Retrieves glyphs used to display labels on a map. |
GetMapSpritesCommand | 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. |
GetMapStyleDescriptorCommand | 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. |
GetMapTileCommand | Retrieves a vector data tile from the map resource. Map tiles are used by clients to render a map. they're addressed using a grid arrangement with an X coordinate, Y coordinate, and Z (zoom) level. The origin (0, 0) is the top left of the map. Increasing the zoom level by 1 doubles both the X and Y dimensions, so a tile containing data for the entire world at (0/0/0) will be split into 4 tiles at zoom 1 (1/0/0, 1/0/1, 1/1/0, 1/1/1). |
GetPlaceCommand | Finds a place by its unique ID. A A PlaceId is valid only if all of the following are the same in the original search request and the call to
|
ListDevicePositionsCommand | A batch request to retrieve all device positions. |
ListGeofenceCollectionsCommand | Lists geofence collections in your Amazon Web Services account. |
ListGeofencesCommand | Lists geofences stored in a given geofence collection. |
ListKeysCommand | Lists API key resources in your Amazon Web Services account. |
ListMapsCommand | Lists map resources in your Amazon Web Services account. |
ListPlaceIndexesCommand | Lists place index resources in your Amazon Web Services account. |
ListRouteCalculatorsCommand | Lists route calculator resources in your Amazon Web Services account. |
ListTagsForResourceCommand | Returns a list of tags that are applied to the specified Amazon Location resource. |
ListTrackerConsumersCommand | Lists geofence collections currently associated to the given tracker resource. |
ListTrackersCommand | Lists tracker resources in your Amazon Web Services account. |
PutGeofenceCommand | Stores a geofence geometry in a given geofence collection, or updates the geometry of an existing geofence if a geofence ID is included in the request. |
SearchPlaceIndexForPositionCommand | Reverse geocodes a given coordinate and returns a legible address. Allows you to search for Places or points of interest near a given position. |
SearchPlaceIndexForSuggestionsCommand | Generates suggestions for addresses and points of interest based on partial or misspelled free-form text. This operation is also known as autocomplete, autosuggest, or fuzzy matching. Optional parameters let you narrow your search results by bounding box or country, or bias your search toward a specific position on the globe. You can search for suggested place names near a specified position by using |
SearchPlaceIndexForTextCommand | Geocodes free-form text, such as an address, name, city, or region to allow you to search for Places or points of interest. Optional parameters let you narrow your search results by bounding box or country, or bias your search toward a specific position on the globe. You can search for places near a given position using Search results are returned in order of highest to lowest relevance. |
TagResourceCommand | Assigns one or more tags (key-value pairs) to the specified Amazon Location Service resource. Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values. You can use the You can associate up to 50 tags with a resource. |
UntagResourceCommand | Removes one or more tags from the specified Amazon Location resource. |
UpdateGeofenceCollectionCommand | Updates the specified properties of a given geofence collection. |
UpdateKeyCommand | Updates the specified properties of a given API key resource. |
UpdateMapCommand | Updates the specified properties of a given map resource. |
UpdatePlaceIndexCommand | Updates the specified properties of a given place index resource. |
UpdateRouteCalculatorCommand | Updates the specified properties for a given route calculator resource. |
UpdateTrackerCommand | Updates the specified properties of a given tracker resource. |
VerifyDevicePositionCommand | Verifies the integrity of the device's position by determining if it was reported behind a proxy, and by comparing it to an inferred position estimated based on the device's state. |
LocationClient Configuration
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
defaultsMode Optional | DefaultsMode | Provider<DefaultsMode> | The @smithy/smithy-client#DefaultsMode that will be used to determine how certain default configuration options are resolved in the SDK. |
disableHostPrefix Optional | boolean | Disable dynamically changing the endpoint of the client based on the hostPrefix trait of an operation. |
extensions Optional | RuntimeExtension[] | Optional extensions |
logger Optional | Logger | Optional logger for logging debug/info/warn/error. |
maxAttempts Optional | number | Provider<number> | Value for how many times a request will be made at most in case of retry. |
profile Optional | string | Setting a client profile is similar to setting a value for the AWS_PROFILE environment variable. Setting a profile on a client in code only affects the single client instance, unlike AWS_PROFILE.When set, and only for environments where an AWS configuration file exists, fields configurable by this file will be retrieved from the specified profile within that file. Conflicting code configuration and environment variables will still have higher priority.For client credential resolution that involves checking the AWS configuration file, the client's profile (this value) will be used unless a different profile is set in the credential provider options. |
region Optional | string | Provider<string> | The AWS region to which this client will send requests |
requestHandler Optional | __HttpHandlerUserInput | The HTTP handler to use or its constructor options. Fetch in browser and Https in Nodejs. |
retryMode Optional | string | Provider<string> | Specifies which retry algorithm to use. |
useDualstackEndpoint Optional | boolean | Provider<boolean> | Enables IPv6/IPv4 dualstack endpoint. |
useFipsEndpoint Optional | boolean | Provider<boolean> | Enables FIPS compatible endpoints. |
Additional config fields are described in the full configuration type: LocationClientConfig