Mapbox is a popular map provider with a straightforward setup. This guide takes about 5 minutes and walks you through creating an account, setting up a secure access token, and connecting it to Storepoint.
Step 1: Create a Mapbox Account
- Go to mapbox.com/signup
- Enter your email and create a password
- Verify your email address
Step 2: Create a New Access Token
Once you're logged in to Mapbox, you'll create a new token that's restricted to your website. This keeps your token secure so only your site can use it.
- Go to your Access Tokens page
- Click the Create a token button
- Give it a name like "Store Locator" or your website name
- Scroll down to URL restrictions
- Add your website URLs (see below for what to add)
- Click Create token
- Copy your new token (it starts with
pk.)
URLs to Add
Add each of these URLs to your token's restrictions:
| URL | Why |
|---|---|
https://yourwebsite.com/* |
Your main website |
https://www.yourwebsite.com/* |
If you use the www version |
https://storelocator.page/* |
Allows preview in Storepoint dashboard (optional) |
Restricting your token to specific URLs means only your website can use it. Without restrictions, anyone could copy your token and use your Mapbox account, which would count against your usage limits.
Adding https://storelocator.page/* lets you preview your locator in the Storepoint dashboard. If you skip this, the dashboard preview won't load the map, but your locator will still work perfectly on your actual website.
Step 3: Add the Token to Storepoint
- Go to Map Provider in your Storepoint dashboard
- Select Mapbox as your provider
- Paste your access token into the token field
- Click Save
That's it! Your locator is now connected to Mapbox. Preview it from the Embed page (if you added the storelocator.page URL) or check it on your live website.
Understanding Usage & Free Tier
Mapbox counts usage based on how many times your map is loaded and how many searches are performed.
What counts as usage?
| When this happens... | Mapbox counts... |
|---|---|
| Your locator loads | Map load |
| Someone types in the search bar | A few search requests |
| Pre-search via URL or embed snippet or similar | Geocoding search request(s) |
Free tier
Mapbox currently offers around 50,000 free map loads per month, and a similar number of free search suggestions, which is enough for most store locators. Verify current limits on the Mapbox Pricing page.
Setting a spending limit
If you want extra peace of mind, you can set a spending limit:
- Go to your Billing settings
- Under Spending limits, set a monthly cap
Pricing and limits can change. Visit Mapbox Pricing for current rates.
Troubleshooting
Map not loading?
- Make sure your token starts with
pk. - Check that the token is pasted correctly with no extra spaces
- Verify your website URL is in the token's allowed list
Using Wix or another iframe-based platform?
Some website builders (especially Wix) load the locator inside an iframe that uses a different domain than your website. In this case, restricting your token to your website URL won't work because Mapbox sees the iframe's domain, not yours. Check the Fix Errors page in your Storepoint dashboard to see the actual referrer being detected, and add that to your allowed URLs. If you're not sure, contact us for help.
Map works on your site but not in the Storepoint dashboard?
- Add
https://storelocator.page/*to your token's URL restrictions
Getting a "token invalid" error?
- Your token may have been deleted. Create a new one in Mapbox.
Need help? Contact us and we'll help you troubleshoot.