Skip to content

Latest commit

 

History

History
 
 

react-map-gl-amplify

Using react-map-gl with Amazon Location Service and AWS Amplify

This example demonstrates how to use react-map-gl with MapLibre GL JS, Amazon Location Service, and AWS Amplify.

Implementation

See src/index.tsx.

Dependencies

See package.json.

Getting started

  1. Install the Amplify CLI: npm install -g @aws-amplify/cli
  2. Install project dependencies: npm install
  3. Create a new Amplify project environment: amplify init
  4. Create Auth and Geo resources: amplify push

Cleaning up

To clean up all resources created for this application, run the following:

amplify delete

Important notes

This project uses CRACO to alias react-map-gl's Mapbox GL dependency to MapLibre GL JS, as react-map-gl depends on mapbox-gl@^2 by default, which is NOT compatible with Amazon Location Service, as it requires a Mapbox API key. See craco.config.js to see how the aliasing works.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.