class Map (construct)
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Location.Alpha.Map |
Go | github.com/aws/aws-cdk-go/awscdklocationalpha/v2#Map |
Java | software.amazon.awscdk.services.location.alpha.Map |
Python | aws_cdk.aws_location_alpha.Map |
TypeScript (source) | @aws-cdk/aws-location-alpha ยป Map |
Implements
IConstruct
, IDependable
, IResource
, IMap
The Amazon Location Service Map.
See also: https://docs.aws.amazon.com/location/latest/developerguide/map-concepts.html
Example
new location.Map(this, 'Map', {
mapName: 'my-map',
style: location.Style.VECTOR_ESRI_NAVIGATION,
customLayers: [location.CustomLayer.POI],
});
Initializer
new Map(scope: Construct, id: string, props: MapProps)
Parameters
Construct Props
Name | Type | Description |
---|---|---|
style | Style | Specifies the map style selected from an available data provider. |
custom | Custom [] | Specifies the custom layers for the style. |
description? | string | A description for the map. |
map | string | A name for the map. |
political | Political | Specifies the map political view selected from an available data provider. |
style
Type:
Style
Specifies the map style selected from an available data provider.
customLayers?
Type:
Custom
[]
(optional, default: no custom layes)
Specifies the custom layers for the style.
description?
Type:
string
(optional, default: no description)
A description for the map.
mapName?
Type:
string
(optional, default: A name is automatically generated)
A name for the map.
Must be between 1 and 100 characters and contain only alphanumeric characters, hyphens, periods and underscores.
politicalView?
Type:
Political
(optional, default: no political view)
Specifies the map political view selected from an available data provider.
The political view must be used in compliance with applicable laws, including those laws about mapping of the country or region where the maps, images, and other data and third-party content which you access through Amazon Location Service is made available.
Properties
Name | Type | Description |
---|---|---|
env | Resource | The environment this resource belongs to. |
map | string | The Amazon Resource Name (ARN) of the Map. |
map | string | The timestamp for when the map resource was created in ISO 8601 format. |
map | string | The name of the map. |
map | string | The timestamp for when the map resource was last updated in ISO 8601 format. |
node | Node | The tree node. |
stack | Stack | The stack in which this resource is defined. |
env
Type:
Resource
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
mapArn
Type:
string
The Amazon Resource Name (ARN) of the Map.
mapCreateTime
Type:
string
The timestamp for when the map resource was created in ISO 8601 format.
mapName
Type:
string
The name of the map.
mapUpdateTime
Type:
string
The timestamp for when the map resource was last updated in ISO 8601 format.
node
Type:
Node
The tree node.
stack
Type:
Stack
The stack in which this resource is defined.
Methods
Name | Description |
---|---|
apply | Apply the given removal policy to this resource. |
grant(grantee, ...actions) | Grant the given principal identity permissions to perform the actions on this map. |
grant | Grant the given identity permissions to rendering a map resource. |
to | Returns a string representation of this construct. |
static from | Use an existing map by ARN. |
static from | Use an existing map by name. |
RemovalPolicy(policy)
applypublic applyRemovalPolicy(policy: RemovalPolicy): void
Parameters
- policy
Removal
Policy
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
grant(grantee, ...actions)
public grant(grantee: IGrantable, ...actions: string[]): Grant
Parameters
- grantee
IGrantable
- actions
string
Returns
Grant the given principal identity permissions to perform the actions on this map.
Rendering(grantee)
grantpublic grantRendering(grantee: IGrantable): Grant
Parameters
- grantee
IGrantable
Returns
Grant the given identity permissions to rendering a map resource.
String()
topublic toString(): string
Returns
string
Returns a string representation of this construct.
MapArn(scope, id, mapArn)
static frompublic static fromMapArn(scope: Construct, id: string, mapArn: string): IMap
Parameters
- scope
Construct
- id
string
- mapArn
string
Returns
Use an existing map by ARN.
MapName(scope, id, mapName)
static frompublic static fromMapName(scope: Construct, id: string, mapName: string): IMap
Parameters
- scope
Construct
- id
string
- mapName
string
Returns
Use an existing map by name.