Map Search with Address Directory

Search for a place or an address and display its lat/long within a map along with a directory of businesses located at that address.

Search for an address and display its lat/long within a map along with a directory of businesses located at that address (where applicable).

Use Case

The Map Search with Address Directory demo shows how to:

  • Search for an address and display its lat/long within a map
  • Display local search results by filtering the search query on the bounds of the map’s viewport.
    • The search is filtered by a ll and radius based on the center of the viewport.
  • Add a marker for the address result to the map
  • If an address contains a POI or multiple POIs:
    • View a list of all POIs along with relevant information (hours, rating, photo)
    • Select and display the POIs on a map

Interactive Map Demo

📘

Map Demo Requirements

To render and then interact with the Place & Address Search Demo, you will need the following:

Within the Javascript code, make sure to input these two tokens into their corresponding lines:

  • mapboxgl.accessToken = 'MAPBOX_ACCESS_TOKEN';
  • const fsqAPIToken = 'FSQ_API_TOKEN';

Resources

The following resources are required to build a similar Map Search with Address Directory experience: