This sample app demonstrates using Amazon Location Service to display a polygon on an interactive map. The borders of Vancouver, BC, Canada are loaded from geoJSON and displayed on a map as a polygon. The sample app uses react-map-gl with
MapLibre GL JS, Amazon Location
Service, and AWS Amplify.
See src/main.jsx.
react-map-gl: React components used to display maps.
maplibre-gl-js: Used to draw Amazon Location Service provided maps.
aws-amplify: Helps with authentication to get map resources from Amazon Location Service.
maplibre-gl-js-amplify: Used to get map resources from Amazon Location Service using aws-amplify.
See more in package.json
App has been tested on Node.js v16.13.2 and NPM v8.1.2
- Install
Node.js - Set up map resources for Amazon Location Service by following
this guide. - Create an Amazon Cognito identity pool by following
this guide. - Install project dependencies: run
npm installfrom the sample app location on your computer. - Fill in required fields for Amazon Cognito and Amazon Location Service in
src/configuration.js. - Start the app: run
npm startfrom the sample app location on your computer.
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.