https://github.com/coderbyheart/aws-map-demo
Demo map with localization and places search
https://github.com/coderbyheart/aws-map-demo
Last synced: 9 months ago
JSON representation
Demo map with localization and places search
- Host: GitHub
- URL: https://github.com/coderbyheart/aws-map-demo
- Owner: coderbyheart
- License: mit
- Created: 2023-07-14T11:40:50.000Z (over 2 years ago)
- Default Branch: saga
- Last Pushed: 2023-07-14T12:15:24.000Z (over 2 years ago)
- Last Synced: 2025-02-01T11:11:34.386Z (11 months ago)
- Language: TypeScript
- Size: 255 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AWS Map Demo
## Setup
Install the dependencies:
```bash
npm ci
```
Authenticate the AWS CLI,
[environment variables](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html)
are recommended using [direnv](https://direnv.net/).
Then, deploy the map resources to your account.
```bash
npx cdk bootstrap
npx cdk deploy
```
Add the outputs `mapName` and `placesIndexName` as environment variables for the web application:
```bash
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:
```bash
export MAP_API_KEY=v1.public....
```
Run `npm start` to launch the web app.