Skip to content

Latest commit

 

History

History

map-with-marker-and-popup

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Add a marker with a popup to a web map

This sample app shows you how to add a marker with a popup to a web map. It uses Amazon Location Service's Maps as the base map provider and MapLibre GL JS as the map rendering library.

Create resources

Click the button below to create the necessary AWS resources for this sample app to run. It will open the AWS Management Console and initiate the CloudFormation template deployment process.

Launch Stack

Once the deployment process is complete, go to the Outputs to view ApiKey and Region.

In the stack output's tab only the ApiKey name is visible, in order to get the ApiKey value:

  • Navigate to Amazon Location Service
  • Click on "API keys" from the left navigation pane
  • Click on the ApiKey js-map-with-marker-and-popup
  • Copy the ApiKey value

Configure

Open index.html and use the values gathered from above to populate apiKey and region.

Run

Open index.html in your browser.

Clean up

If you would like to remove all of the resources created in this walkthrough, delete the CloudFormation stack called marker-with-popup-example. Then, to clean up the API Key:

  • Navigate to Amazon Location Service
  • Click on "API keys" from the left navigation pane
  • Click on the ApiKey js-map-with-marker-and-popup
  • Press Delete

Get help

  • Have a bug to report? Open an issue. If possible, include details about your development environment, and an example that shows the issue.

  • Have an example request? Open an issue. Tell us what the example should do and why you want it.

Contribute

See CONTRIBUTING for more information.

Security

See CONTRIBUTING for more information.

Licensing

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