mapbox-store-locator-patterns

Automate Mapbox GL JS store locator interfaces with markers, filtering, and distance calculations.

72|14|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-store-locator-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mapbox-store-locator-patterns
Source: https://github.com/mapbox/mapbox-agent-skills/tree/main/skills/mapbox-store-locator-patterns
Command: npx skills add https://github.com/mapbox/mapbox-agent-skills --skill mapbox-store-locator-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides proven patterns and templates for building store locators and location-based search interfaces using Mapbox GL JS. It helps developers quickly implement maps with multiple locations, synced interactive lists, and optional directions.

Core Features & Use Cases

  • Map-based location rendering with customizable markers.
  • Filtering, searching, and distance-based sorting for large location datasets.
  • Synchronized interactive lists and map popups with a real-world store locator workflow.
  • Optional directions integration to route users to selected locations.

Quick Start

Install Mapbox GL JS and Turf, add a GeoJSON data set of locations, and wire up a sidebar for filtering and a map for displaying markers.

Frequently Asked Questions about mapbox-store-locator-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a store locator with Mapbox GL JS?

To build a store locator with Mapbox GL JS, you need to add a GeoJSON dataset of locations, wire up a sidebar for filtering, and configure the map for displaying markers. This pattern provides templates for rendering maps with multiple locations and synced interactive lists.

How do I calculate distance and sort locations in a Mapbox store locator?

To calculate distance and sort locations in a Mapbox store locator, you use Turf.js for spatial computations. This enables distance-based sorting across large location datasets, allowing users to find and filter the nearest stores effectively.

Can I add directions integration to a Mapbox store locator?

Yes, you can add directions integration to a Mapbox store locator. The pattern includes optional directions functionality to route users directly to selected locations, extending the map interface with routing capabilities across web and mobile contexts.

Do I need Turf.js to create interactive lists and map popups in Mapbox?

Yes, you need Turf.js along with Mapbox GL JS to create interactive lists and map popups. Turf.js handles the required spatial computations and distance calculations, while Mapbox GL JS manages the data rendering and marker patterns.

What is the best way to filter a large GeoJSON dataset on a Mapbox map?

The best way to filter a large GeoJSON dataset on a Mapbox map is using established store locator patterns. These patterns provide built-in filtering, searching, and distance-based sorting mechanisms to manage and query extensive location data efficiently.