Skip to content

coderbyheart/aws-map-demo

Repository files navigation

AWS Map Demo

Setup

Install the dependencies:

npm ci

Authenticate the AWS CLI, environment variables are recommended using direnv.

Then, deploy the map resources to your account.

npx cdk bootstrap
npx cdk deploy

Add the outputs mapName and placesIndexName as environment variables for the web application:

export MAP_NAME=aws-map-demo-map
export PLACES_INDEX_NAME=aws-map-demo-index

Navigate to your map on the AWS Console and create an API key for the map.

Note: Unfortunately API Keys cannot be created using CloudFormation today.

  • Add the map and the place index to the resources.
  • Grant the GetMap* action permission.
  • Grant the SearchPlaceIndexForText and SearchPlaceIndexForSuggestions permissions.
  • In the referrers settings allow these domains
    • http://localhost:*/* (for local development)
    • your domain name, e.g. https://coderbyheart.github.io/*

Add it to the environment variables:

export MAP_API_KEY=v1.public....

Run npm start to launch the web app.

About

Demo map with localization and places search

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published