Last updated

Embed a map on your website

To show a Deep Woods map on your website, publish it and paste its embed code where the map should appear. The code never changes: when you edit locations or the map's look in the dashboard, your site shows the change within a few minutes.

Before you embed

The map needs an active Maps subscription and a Mapbox account (the Deep Woods Mapbox account or your own, on the map's Settings tab; see Mapbox accounts and tokens). Then open the map's Embed & API tab and click Publish. Until it's published, the embed code shows nothing. A published map without a Mapbox account it can use lists its locations without the map.

Copy the embed code

On the Embed & API tab, under Embed code, click Copy next to the code you want:

  • Script (any website): a placeholder and one script line. Works on any site where you can add HTML.
  • Iframe (site builders that block scripts): a single iframe tag, for builders that strip <script> tags.

Both show the same map. If you pasted the iframe code before November 19, 2026, copy it again to let visitors use Use my location: the new code includes allow="geolocation". The script embed updates itself. The embed code contains only your map's public key, which is read-only: nobody can change your map with it.

Height

The script embed uses the Height set on the map's Appearance tab. To set it for one page only, add data-height to the placeholder, in pixels:

<div data-deepwoods-map="YOUR_MAP_KEY" data-height="600"></div>

The iframe embed uses the height in its own tag. Change it there.

Where to paste it

  • Any HTML page: paste the code where the map should appear, inside the page's <body>.
  • WordPress: edit the page, add a Custom HTML block where the map should go, and paste the script code.
  • Shopify: in the theme editor, add a Custom Liquid section (or edit the page's HTML) and paste the script code.
  • Wix, Squarespace, and similar builders: add their Embed or Code element and paste the code. If the map doesn't appear, use the iframe code instead.

How do visitors search the map?

Visitors can search a Deep Woods map by a location's name or by a place, such as a postal code, city, state, or country. The search box above the location list works like this:

  • By name. When what a visitor types matches the names of your locations, the list shows those locations. Capitals, accents, and word order don't matter: "cafe hill" finds "Café Capitol Hill".
  • By place. When no name matches, the search looks up what was typed as a place: a postal code, city, state or region, country, or street address. The list then shows all your locations nearest first, with the distance to each, and the map moves to show the place and the nearest locations.
  • By the visitor's own position. Use my location, next to the search box, sorts the list by distance from where the visitor is. Their browser asks them first, and nothing about their position is sent to Deep Woods.

The place search starts when the visitor stops typing for a moment or presses Enter. Distances are in miles when the visitor's browser is set to the United States or the United Kingdom, and in kilometres otherwise. When the list is sorted by distance, a distance filter (Within 5, 10, 25, 50 or 100 miles or kilometres) narrows it; if nothing is that close, the nearest three are shown with a note. Filter buttons, and Open now when your locations have opening hours, narrow the results too.

When the map can't be shown (it has no Mapbox account it can use, or it has reached its monthly limit), the search matches the words in your locations' addresses instead. On the Appearance tab you can turn off Show the search box, Show "Use my location" and Show the distance filter.

What do visitors see when they choose a location?

Choosing a location, in the list or on the map, opens its details in place of the list: its photo, whether it's open now, its address and distance, buttons for Directions, Call, Website, Book and Email (each when the location has one), its description, the week's opening hours with upcoming exceptions, and your custom fields. All locations goes back to the list. See What else can a location show?

On the map, nearby markers join into numbered circles until the visitor zooms in, so maps with thousands of locations stay fast and readable. Clicking a circle zooms in on it. To show every marker on its own, turn off Group nearby markers on the Appearance tab.

Can visitors get directions to a location?

Yes. Every location on a Deep Woods map has a Directions link, under its name in the list and in its details, and a Call link when it has a phone number. Directions open in the visitor's maps app:

  • iPhone and iPad: Apple Maps.
  • Android: the phone's default maps app, or a choice of apps.
  • Computers: Google Maps, in a new tab.

The directions go to the location's address. A location without an address gets directions to its position on the map. The links work even when the map itself can't be shown.

On a Deep Woods Studio site

On a site you build in Deep Woods Studio, you don't need the embed code: add a Map section and choose the map from your Deep Woods maps. The map still needs an active Maps plan and to be published, and Studio warns you before you publish when it isn't. See Maps in Studio.

Limit the map to your domains

By default a published map can be shown on any site. To stop a copied embed code from working elsewhere, list your domains under Allowed domains on the Embed & API tab, one per line, for example example.com. A listed domain also covers its subdomains, such as www.example.com and shop.example.com.

This stops casual copying. Your locations are still public on every site that shows the map, as they would be on any store locator.

Unpublish

Click Unpublish on the Embed & API tab. Every embedded copy stops showing the map within a few minutes. Publish again at any time; the embed code stays the same.