Package software.amazon.awscdk.services.location.alpha
AWS::Location Construct Library
---
The APIs of higher level constructs in this module are experimental and under active development. They are subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model and breaking changes will be announced in the release notes. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
This module is part of the AWS Cloud Development Kit project.
Amazon Location Service lets you add location data and functionality to applications, which includes capabilities such as maps, points of interest, geocoding, routing, geofences, and tracking. Amazon Location provides location-based services (LBS) using high-quality data from global, trusted providers Esri and HERE. With affordable data, tracking and geofencing capabilities, and built-in metrics for health monitoring, you can build sophisticated location-enabled applications.
Place Index
A key function of Amazon Location Service is the ability to search the geolocation information. Amazon Location provides this functionality via the Place index resource. The place index includes which data provider to use for the search.
To create a place index, define a PlaceIndex
:
PlaceIndex.Builder.create(this, "PlaceIndex") .placeIndexName("MyPlaceIndex") // optional, defaults to a generated name .dataSource(DataSource.HERE) .build();
Use the grant()
or grantSearch()
method to grant the given identity permissions to perform actions
on the place index:
Role role; PlaceIndex placeIndex = new PlaceIndex(this, "PlaceIndex"); placeIndex.grantSearch(role);
Geofence Collection
Geofence collection resources allow you to store and manage geofences—virtual boundaries on a map. You can evaluate locations against a geofence collection resource and get notifications when the location update crosses the boundary of any of the geofences in the geofence collection.
Key key; GeofenceCollection.Builder.create(this, "GeofenceCollection") .geofenceCollectionName("MyGeofenceCollection") // optional, defaults to a generated name .kmsKey(key) .build();
Use the grant()
or grantRead()
method to grant the given identity permissions to perform actions
on the geofence collection:
Role role; GeofenceCollection geofenceCollection = GeofenceCollection.Builder.create(this, "GeofenceCollection") .geofenceCollectionName("MyGeofenceCollection") .build(); geofenceCollection.grantRead(role);
Route Calculator
Route calculator resources allow you to find routes and estimate travel time based on up-to-date road network and live traffic information from your chosen data provider.
For more information, see Routes.
To create a route calculator, define a RouteCalculator
:
RouteCalculator.Builder.create(this, "RouteCalculator") .routeCalculatorName("MyRouteCalculator") // optional, defaults to a generated name .dataSource(DataSource.ESRI) .build();
Use the grant()
or grantRead()
method to grant the given identity permissions to perform actions
on the route calculator:
Role role; RouteCalculator routeCalculator = RouteCalculator.Builder.create(this, "RouteCalculator") .dataSource(DataSource.ESRI) .build(); routeCalculator.grantRead(role);
-
ClassDescription(experimental) Data source for a place index.(experimental) A Geofence Collection.(experimental) A fluent builder for
GeofenceCollection
.(experimental) Properties for a geofence collection.A builder forGeofenceCollectionProps
An implementation forGeofenceCollectionProps
(experimental) A Geofence Collection.Internal default implementation forIGeofenceCollection
.A proxy class which represents a concrete javascript instance of this type.(experimental) Intend use for the results of an operation.(experimental) A Place Index.Internal default implementation forIPlaceIndex
.A proxy class which represents a concrete javascript instance of this type.(experimental) A Route Calculator.Internal default implementation forIRouteCalculator
.A proxy class which represents a concrete javascript instance of this type.(experimental) A Place Index.(experimental) A fluent builder forPlaceIndex
.(experimental) Properties for a place index.A builder forPlaceIndexProps
An implementation forPlaceIndexProps
(experimental) A Route Calculator.(experimental) A fluent builder forRouteCalculator
.(experimental) Properties for a route calculator.A builder forRouteCalculatorProps
An implementation forRouteCalculatorProps