Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Location

import { Location } from "https://aws-api.deno.dev/v0.4/services/location.ts?docs=full";
class Location {
constructor(apiFactory: client.ApiFactory);
async associateTrackerConsumer(params: AssociateTrackerConsumerRequest, opts?: client.RequestOptions): Promise<void>;
async batchDeleteDevicePositionHistory(params: BatchDeleteDevicePositionHistoryRequest, opts?: client.RequestOptions): Promise<BatchDeleteDevicePositionHistoryResponse>;
async batchDeleteGeofence(params: BatchDeleteGeofenceRequest, opts?: client.RequestOptions): Promise<BatchDeleteGeofenceResponse>;
async batchEvaluateGeofences(params: BatchEvaluateGeofencesRequest, opts?: client.RequestOptions): Promise<BatchEvaluateGeofencesResponse>;
async batchGetDevicePosition(params: BatchGetDevicePositionRequest, opts?: client.RequestOptions): Promise<BatchGetDevicePositionResponse>;
async batchPutGeofence(params: BatchPutGeofenceRequest, opts?: client.RequestOptions): Promise<BatchPutGeofenceResponse>;
async batchUpdateDevicePosition(params: BatchUpdateDevicePositionRequest, opts?: client.RequestOptions): Promise<BatchUpdateDevicePositionResponse>;
async calculateRoute(params: CalculateRouteRequest, opts?: client.RequestOptions): Promise<CalculateRouteResponse>;
async calculateRouteMatrix(params: CalculateRouteMatrixRequest, opts?: client.RequestOptions): Promise<CalculateRouteMatrixResponse>;
async createGeofenceCollection(params: CreateGeofenceCollectionRequest, opts?: client.RequestOptions): Promise<CreateGeofenceCollectionResponse>;
async createKey(params: CreateKeyRequest, opts?: client.RequestOptions): Promise<CreateKeyResponse>;
async createMap(params: CreateMapRequest, opts?: client.RequestOptions): Promise<CreateMapResponse>;
async createPlaceIndex(params: CreatePlaceIndexRequest, opts?: client.RequestOptions): Promise<CreatePlaceIndexResponse>;
async createRouteCalculator(params: CreateRouteCalculatorRequest, opts?: client.RequestOptions): Promise<CreateRouteCalculatorResponse>;
async createTracker(params: CreateTrackerRequest, opts?: client.RequestOptions): Promise<CreateTrackerResponse>;
async deleteGeofenceCollection(params: DeleteGeofenceCollectionRequest, opts?: client.RequestOptions): Promise<void>;
async deleteKey(params: DeleteKeyRequest, opts?: client.RequestOptions): Promise<void>;
async deleteMap(params: DeleteMapRequest, opts?: client.RequestOptions): Promise<void>;
async deletePlaceIndex(params: DeletePlaceIndexRequest, opts?: client.RequestOptions): Promise<void>;
async deleteRouteCalculator(params: DeleteRouteCalculatorRequest, opts?: client.RequestOptions): Promise<void>;
async deleteTracker(params: DeleteTrackerRequest, opts?: client.RequestOptions): Promise<void>;
async describeGeofenceCollection(params: DescribeGeofenceCollectionRequest, opts?: client.RequestOptions): Promise<DescribeGeofenceCollectionResponse>;
async describeKey(params: DescribeKeyRequest, opts?: client.RequestOptions): Promise<DescribeKeyResponse>;
async describeMap(params: DescribeMapRequest, opts?: client.RequestOptions): Promise<DescribeMapResponse>;
async describePlaceIndex(params: DescribePlaceIndexRequest, opts?: client.RequestOptions): Promise<DescribePlaceIndexResponse>;
async describeRouteCalculator(params: DescribeRouteCalculatorRequest, opts?: client.RequestOptions): Promise<DescribeRouteCalculatorResponse>;
async describeTracker(params: DescribeTrackerRequest, opts?: client.RequestOptions): Promise<DescribeTrackerResponse>;
async disassociateTrackerConsumer(params: DisassociateTrackerConsumerRequest, opts?: client.RequestOptions): Promise<void>;
async getDevicePosition(params: GetDevicePositionRequest, opts?: client.RequestOptions): Promise<GetDevicePositionResponse>;
async getDevicePositionHistory(params: GetDevicePositionHistoryRequest, opts?: client.RequestOptions): Promise<GetDevicePositionHistoryResponse>;
async getGeofence(params: GetGeofenceRequest, opts?: client.RequestOptions): Promise<GetGeofenceResponse>;
async getMapGlyphs(params: GetMapGlyphsRequest, opts?: client.RequestOptions): Promise<GetMapGlyphsResponse>;
async getMapSprites(params: GetMapSpritesRequest, opts?: client.RequestOptions): Promise<GetMapSpritesResponse>;
async getMapStyleDescriptor(params: GetMapStyleDescriptorRequest, opts?: client.RequestOptions): Promise<GetMapStyleDescriptorResponse>;
async getMapTile(params: GetMapTileRequest, opts?: client.RequestOptions): Promise<GetMapTileResponse>;
async getPlace(params: GetPlaceRequest, opts?: client.RequestOptions): Promise<GetPlaceResponse>;
async listDevicePositions(params: ListDevicePositionsRequest, opts?: client.RequestOptions): Promise<ListDevicePositionsResponse>;
async listGeofenceCollections(params?: ListGeofenceCollectionsRequest, opts?: client.RequestOptions): Promise<ListGeofenceCollectionsResponse>;
async listGeofences(params: ListGeofencesRequest, opts?: client.RequestOptions): Promise<ListGeofencesResponse>;
async listKeys(params?: ListKeysRequest, opts?: client.RequestOptions): Promise<ListKeysResponse>;
async listMaps(params?: ListMapsRequest, opts?: client.RequestOptions): Promise<ListMapsResponse>;
async listPlaceIndexes(params?: ListPlaceIndexesRequest, opts?: client.RequestOptions): Promise<ListPlaceIndexesResponse>;
async listRouteCalculators(params?: ListRouteCalculatorsRequest, opts?: client.RequestOptions): Promise<ListRouteCalculatorsResponse>;
async listTagsForResource(params: ListTagsForResourceRequest, opts?: client.RequestOptions): Promise<ListTagsForResourceResponse>;
async listTrackerConsumers(params: ListTrackerConsumersRequest, opts?: client.RequestOptions): Promise<ListTrackerConsumersResponse>;
async listTrackers(params?: ListTrackersRequest, opts?: client.RequestOptions): Promise<ListTrackersResponse>;
async putGeofence(params: PutGeofenceRequest, opts?: client.RequestOptions): Promise<PutGeofenceResponse>;
async searchPlaceIndexForPosition(params: SearchPlaceIndexForPositionRequest, opts?: client.RequestOptions): Promise<SearchPlaceIndexForPositionResponse>;
async searchPlaceIndexForSuggestions(params: SearchPlaceIndexForSuggestionsRequest, opts?: client.RequestOptions): Promise<SearchPlaceIndexForSuggestionsResponse>;
async searchPlaceIndexForText(params: SearchPlaceIndexForTextRequest, opts?: client.RequestOptions): Promise<SearchPlaceIndexForTextResponse>;
async tagResource(params: TagResourceRequest, opts?: client.RequestOptions): Promise<void>;
async untagResource(params: UntagResourceRequest, opts?: client.RequestOptions): Promise<void>;
async updateGeofenceCollection(params: UpdateGeofenceCollectionRequest, opts?: client.RequestOptions): Promise<UpdateGeofenceCollectionResponse>;
async updateKey(params: UpdateKeyRequest, opts?: client.RequestOptions): Promise<UpdateKeyResponse>;
async updateMap(params: UpdateMapRequest, opts?: client.RequestOptions): Promise<UpdateMapResponse>;
async updatePlaceIndex(params: UpdatePlaceIndexRequest, opts?: client.RequestOptions): Promise<UpdatePlaceIndexResponse>;
async updateRouteCalculator(params: UpdateRouteCalculatorRequest, opts?: client.RequestOptions): Promise<UpdateRouteCalculatorResponse>;
async updateTracker(params: UpdateTrackerRequest, opts?: client.RequestOptions): Promise<UpdateTrackerResponse>;
 
static ApiMetadata: client.ApiMetadata;
}

§Constructors

§
new Location(apiFactory: client.ApiFactory)
[src]

§Methods

§
associateTrackerConsumer(params: AssociateTrackerConsumerRequest, opts?: client.RequestOptions): Promise<void>
[src]

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

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

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

§

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

§

Deletes a batch of geofences from a geofence collection.

Note: This operation deletes the resource permanently.

§

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

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

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

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

Note: Geofence evaluation uses the given device position. It does not account for the optional Accuracy of a DevicePositionUpdate.

Note: The DeviceID is used as a string to represent the device. You do not need to have a Tracker associated with the DeviceID.

§

Lists the latest device positions for requested devices.

§

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.

§

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

Note: Position updates are handled based on the PositionFiltering property of the tracker. When PositionFiltering is set to TimeBased, updates are evaluated against linked geofence collections, and location data is stored at a maximum of one position per 30 second interval. If your update frequency is more often than every 30 seconds, only one update per 30 seconds is stored for each unique device ID. When PositionFiltering is set to DistanceBased filtering, location data is stored and evaluated against linked geofence collections only if the device has moved more than 30 m (98.4 ft). When PositionFiltering is set to AccuracyBased filtering, location data is stored and evaluated against linked geofence collections only if the device has moved more than the measured accuracy. For example, if two consecutive updates from a device have a horizontal accuracy of 5 m and 10 m, the second update is neither stored or evaluated if the device has moved less than 15 m. If PositionFiltering is set to AccuracyBased filtering, Amazon Location uses the default value { "Horizontal": 0} when accuracy is not provided on a DevicePositionUpdate.

§

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

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

Additional options include:

  • Specifying a departure time using either DepartureTime or DepartNow. This calculates a route based on predictive traffic data at the given time. Note: You can't specify both DepartureTime and DepartNow in a single request. Specifying both parameters returns a validation error.
  • Specifying a travel mode using TravelMode sets the transportation mode used to calculate the routes. This also lets you specify additional route preferences in CarModeOptions if traveling by Car, or TruckModeOptions if traveling by Truck. Note: If you specify walking for the travel mode and your data provider is Esri, the start and destination must be within 40km.
§

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

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

Requires that you first create a route calculator resource.

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

Additional options include:

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

Creates a geofence collection, which manages and stores geofences.

§

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

! IMPORTANT: ! The API keys feature is in preview. ! We may add, change, or remove features before announcing general availability. ! For more information, see Using API keys.

§

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

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

§

Creates a place index resource in your Amazon Web Services account. Use a place index resource to geocode addresses and other text queries by using the SearchPlaceIndexForText operation, and reverse geocode coordinates by using the SearchPlaceIndexForPosition operation, and enable autosuggestions by using the SearchPlaceIndexForSuggestions operation.

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

§

Creates a route calculator resource in your Amazon Web Services account.

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

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

§

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

§
deleteGeofenceCollection(params: DeleteGeofenceCollectionRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a geofence collection from your Amazon Web Services account.

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

§
deleteKey(params: DeleteKeyRequest, opts?: client.RequestOptions): Promise<void>
[src]

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

§
deleteMap(params: DeleteMapRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a map resource from your Amazon Web Services account.

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

§
deletePlaceIndex(params: DeletePlaceIndexRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a place index resource from your Amazon Web Services account.

Note: This operation deletes the resource permanently.

§
deleteRouteCalculator(params: DeleteRouteCalculatorRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a route calculator resource from your Amazon Web Services account.

Note: This operation deletes the resource permanently.

§
deleteTracker(params: DeleteTrackerRequest, opts?: client.RequestOptions): Promise<void>
[src]

Deletes a tracker resource from your Amazon Web Services account.

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

§

Retrieves the geofence collection details.

§

Retrieves the API key resource details.

! IMPORTANT: ! The API keys feature is in preview. ! We may add, change, or remove features before announcing general availability. ! For more information, see Using API keys.

§

Retrieves the map resource details.

§

Retrieves the place index resource details.

§

Retrieves the route calculator resource details.

§

Retrieves the tracker resource details.

§
disassociateTrackerConsumer(params: DisassociateTrackerConsumerRequest, opts?: client.RequestOptions): Promise<void>
[src]

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

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

§

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

Note: Device positions are deleted after 30 days.

§

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

Note: Device positions are deleted after 30 days.

§

Retrieves the geofence details from a geofence collection.

§

Retrieves glyphs used to display labels on a map.

§

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.

§

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.

§

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

§
getPlace(params: GetPlaceRequest, opts?: client.RequestOptions): Promise<GetPlaceResponse>
[src]

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

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

§

A batch request to retrieve all device positions.

§

Lists geofence collections in your Amazon Web Services account.

§

Lists geofences stored in a given geofence collection.

§
listKeys(params?: ListKeysRequest, opts?: client.RequestOptions): Promise<ListKeysResponse>
[src]

Lists API key resources in your Amazon Web Services account.

! IMPORTANT: ! The API keys feature is in preview. ! We may add, change, or remove features before announcing general availability. ! For more information, see Using API keys.

§
listMaps(params?: ListMapsRequest, opts?: client.RequestOptions): Promise<ListMapsResponse>
[src]

Lists map resources in your Amazon Web Services account.

§

Lists place index resources in your Amazon Web Services account.

§

Lists route calculator resources in your Amazon Web Services account.

§

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

§

Lists geofence collections currently associated to the given tracker resource.

§

Lists tracker resources in your Amazon Web Services account.

§

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.

§

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

§

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

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

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

§

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

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

Note: You can search for places near a given position using BiasPosition, or filter results within a bounding box using FilterBBox. Providing both parameters simultaneously returns an error.

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

§
tagResource(params: TagResourceRequest, opts?: client.RequestOptions): Promise<void>
[src]

Assigns one or more tags (key-value pairs) to the specified Amazon Location Service resource.

Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values.

You can use the TagResource operation with an Amazon Location Service resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the tags already associated with the resource. If you specify a tag key that's already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

You can associate up to 50 tags with a resource.

§
untagResource(params: UntagResourceRequest, opts?: client.RequestOptions): Promise<void>
[src]

Removes one or more tags from the specified Amazon Location resource.

§

Updates the specified properties of a given geofence collection.

§

Updates the specified properties of a given API key resource.

! IMPORTANT: ! The API keys feature is in preview. ! We may add, change, or remove features before announcing general availability. ! For more information, see Using API keys.

§

Updates the specified properties of a given map resource.

§

Updates the specified properties of a given place index resource.

§

Updates the specified properties for a given route calculator resource.

§

Updates the specified properties of a given tracker resource.

§Static Properties