Skip to content

Files

Latest commit

 

History

History
 
 

react-map-gl-amplify-here-map

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Amazon Location Service and HERE Technologies

Demo created for demonstrations purposes for re:Invent 2021.

Within this solution, you will learn how to leverage the capabilities provided by HERE Technologies via Amazon Location Service to build your own location-based solutions. The features covered are:

Maps

Maps help you visualize location information and are the foundations of many location-based service capabilities. Amazon Location Service provides map tiles of different styles sourced from HERE. The map tiles from HERE are trusted by millions of customers worldwide, and have been continuously fine-tuned over the decades for a wide range of customer applications.

Places

Amazon Location Service Places enables your application to offer point-of-interest search functionality, convert addresses into geographic coordinates in latitude and longitude (geocoding), and convert a coordinate into a street address (reverse geocoding). Amazon Location Service sources high-quality geospatial data from HERE, so you can use them to improve the quality and the versatility of your address database.

Routes

With Amazon Location Routes, your application can request the travel time, distance, and directions between a departure point and one or more destinations, with specific travel restrictions such as Truck mode, vehicle dimension, and avoidances. Amazon Location Service provides routing data sourced from HERE. This enables your application to obtain accurate estimates of travel time based on up-to-date roadway information and live traffic information. Amazon Location Service Routes can help you achieve business goals such as faster delivery and reduced fuel consumption.

Amplify Geo

Amplify Geo provides APIs and map UI components for maps and location search for JavaScript-based web apps. You can add maps and location search functionality to your app in just a few lines of code. Amplify Geo APIs are powered by Amazon Location Service and HERE TEchnologies, having the map UI components from MapLibre already integrated with the Geo APIs. You can quickly get started using Amplify CLI to provision your map and location search resources.

Learn More

To learn more check out this blog post on the HERE Developer Blog.

Implementation

The demo uses MapLibre GL JS and AWS Amplify within a React application.

react-map-gl is a set of React components that can be used to display maps. react-map-gl-amplify demonstrates how to use react-map-gl with Amazon Location and AWS Amplify. The demo also uses @aws-amplify/ui-react to build part of the UI.

See src/main.jsx.

Dependencies

See package.json.

Getting started

To deploy clone this repo and run:

  1. Install the Amplify CLI: npm install -g @aws-amplify/cli (v9.1.0 or later)
  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

Security

See CONTRIBUTING for more information.

License

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