How to Embed a Map Widget on Any Site

Build the embed once: type your address in the map-embed builder, drag the pin onto your exact entrance, and copy one iframe line — it works in any platform with an HTML/embed block. WordPress users can install the plugin and use a shortcode instead. Either way there is no API key, no billing account, no cookies, and the pin can never drift, because the embed ships your final coordinates rather than re-geocoding the address.

Start in the builder (the only real work)

Everything begins at the map-embed builder. Geocoding happens once, there — the snippet you copy carries fixed coordinates, so a geocoder outage or “address normalization” can never move your pin later. Type the address, watch the pin land, then drag it onto your actual entrance before copying: that ten-second drag is the difference between “the right street” and “the right door”.

Want to see a finished multi-branch setup before building yours? Open the builder demo — it loads a three-branch sample company with addresses, colored numbered pins, and the locations panel live in the preview, ready to poke.

WordPress: plugin shortcode or raw iframe?

Both routes end in the identical widget — pick by taste.

Plugin route (recommended): download whatismylocation-widget.zip → wp-admin ▸ Plugins ▸ Add New ▸ Upload Plugin → Activate. Then add a Shortcode block:

[whatismylocation_map lat="48.858400" lng="2.294500" name="Acme SARL" address="Champ de Mars, Paris"]

Attributes read like the builder's options: theme, marker, zoom, height, directions, and for branches pins="lat,lng,Label~Address|…" with panel= and motion= (see the reference table below). The builder's WordPress section generates the complete shortcode for you — no typing.

No-plugin route: paste the iframe from the builder into a Custom HTML block. Same widget, no plugin to update; the trade-off is longer markup in your content and no attribute-style editing later.

Squarespace, Shopify, Notion — and the rest

Outside WordPress the job is usually one paste: add your platform's HTML/embed element (Wix Embed HTML, Squarespace Code block, Webflow Embed) and drop the iframe in. One difference makes the map widget easier than the location widget: it needs no allow="geolocation" attribute, because it never asks visitors for anything — so there is nothing fragile to preserve when a page builder rewrites your HTML.

Squarespace: add a Code block and paste. One catch worth knowing up front: Code blocks require the Business plan or higher — on the Personal plan the block shows your code as plain text instead of rendering it.

Shopify deserves better than a paste: we ship a ready-made theme section — one file in your theme gives you a native settings panel with branches as drag-to-reorder blocks, no app and no API key.

Notion and Google Sites embed by URL, not HTML. They won't accept an iframe snippet at all — instead, press Copy widget URL in the builder and paste it into Notion's /embed block or Google Sites' Embed ▸ By URL. The widget is a full standalone page, so it renders perfectly either way.

Salesforce Experience Cloud (public community sites): drop the iframe into an HTML Editor component — then have your admin add whatismylocation.ai under Setup ▸ Trusted URLs with the frame-src CSP directive, or Salesforce silently blocks the frame. Teams building with code can wrap the same URL in a ~10-line Lightning Web Component:

<!-- wimlMap.html -->
<template>
  <iframe src={src} width="100%" height="340"
          loading="lazy" title="Map"></iframe>
</template>

// wimlMap.js
import { LightningElement } from 'lwc';
export default class WimlMap extends LightningElement {
  src = 'https://whatismylocation.ai/widget/map?lat=48.858400&lng=2.294500&name=Acme';
}

Multiple branches: the locations panel

Up to 10 locations fit in one embed. In the builder's Advanced mode, position each pin, give it a label and address, and press Add location. Visitors get a locations panel — an accordion beside the map on desktop, a swipeable card strip on phones — with numbered pins: picking a branch flies the map to it and shows its address with its own Get-directions link.

Options reference

OptionValuesNotes
lat / lngdecimal degreesRequired for a single location (the builder fills them).
pinslat,lng,Label~Address|…Up to 10 branches; replaces lat/lng. Labels ≤80 chars, addresses ≤120; no | or ~ inside them.
nametext ≤80Bold overlay/panel title — usually your business name.
addressup to 3 linesOverlay address (single location; branches use Label~Address). The builder gives you three line inputs; in the WordPress shortcode, | separates lines.
name_style / address_stylen · b · i · biBold/italic per line — the title defaults to bold, and the chosen style replaces that default. In the builder: the B/I chips in Advanced mode.
mapsgoogle · apple · google,appleSmall “Open in Google Maps” / “Open in Apple Maps” icon links with hover tooltips, on the card and per branch in the panel. No value, no icons.
zoom2–19, default 16With branches it becomes the maximum after auto-fit.
themelight · dark · goldenMatch your site.
markeremerald · red · amber · indigo · slatePin color; default is the classic blue.
panelauto · side · bottom · noneLocations-panel layout (multi-pin only).
motionsmooth · fade · lively · noneBranch-switch animation; reduce-motion visitors always get instant.
openyes · noWhether the first branch starts expanded (default yes).
directionsyes · noGet-directions button(s) — per branch in multi-pin mode.
iframe height220–800 px340 suits a single pin; 400+ breathes better with the panel.
attributionyes · noOptional “Powered by” caption on your page — off by default in the plugin.

WordPress troubleshooting

The shortcode shows as literal text on the page. That block doesn't process shortcodes. In the block editor use a Shortcode block (not a code or preformatted block); in Elementor use its Shortcode widget, in Divi a Code module. Classic-editor users: type it in the Visual tab as plain text.

Nothing appears at all. View the page source and search for whatismylocation. An HTML comment about missing lat/lng means the coordinates are absent or invalid — copy the complete shortcode from the builder rather than typing attributes by hand.

The iframe disappears when you save (no-plugin route). WordPress strips iframes for user roles without the unfiltered_html capability — on multisite that includes admins by default — and some security plugins do the same. The plugin shortcode is the clean fix: it doesn't rely on your role being allowed to save raw iframes.

The map is grey / tiles don't load. Tiles come from tile.openstreetmap.org; a very aggressive ad-blocker or corporate network can block them (the overlay card still renders). Confirm on another network or a phone on mobile data.

No locations panel. The panel appears from 2 pins up — a single location gets the classic overlay card. Also check panel="none" isn't set.

The switch animation doesn't play. Almost always the visitor's (or your own) operating-system “reduce motion” setting — the widget honors it by design and switches instantly. It isn't a bug, and other visitors still see your chosen preset.

Edits don't show up. A caching plugin (or host cache) is serving the old page. Purge the page cache after editing shortcode attributes — the widget itself has nothing to cache.

Step by step

  1. Open the map-embed builder, type your address, and press Find on map (or paste raw coordinates like 48.8584, 2.2945).
  2. Drag the pin (or click the map) until it sits exactly on your entrance — geocoders usually land on the street centroid, not your door. The embed keeps these final coordinates forever.
  3. Add your business name and pick a theme. Got branches? Switch the builder to Advanced and press Add location for each one — label plus address.
  4. Copy the embed code — or, on WordPress, the ready-made shortcode from the same page — and paste it into your page.
  5. Publish and check the page: the map, pin, and Get-directions button should render immediately. No key, no account, nothing to configure server-side.

Frequently asked questions

Do I need a Google Maps API key or a billing account?
No. The widget uses OpenStreetMap tiles inside a sandboxed iframe — no key, no account, no quota, no billing. Copy the snippet (or install the WordPress plugin) and you're done.
Why does my WordPress page show the shortcode as plain text?
The block you pasted into doesn't process shortcodes. Use a Shortcode block in the block editor, the Shortcode widget in Elementor, or a Code module in Divi. If you see an HTML comment in the page source instead, the lat/lng attributes are missing or invalid — copy the complete shortcode from the builder.
How do I change the pin or add a branch later?
Shortcode users just edit the attributes in the page — add a branch by extending pins="…". Raw-iframe users rebuild the snippet in the builder and paste over the old one. Nothing is stored server-side, so there is no account or dashboard to update.
Will the map slow my site down or affect GDPR compliance?
The iframe weighs a few kilobytes, lazy-loads, and adds zero scripts to your page. It sets no cookies and runs no trackers, so it doesn't create a consent obligation by itself — the only third-party request is the map tiles from openstreetmap.org. (Practical information, not legal advice.)
Can I put the same embed on more than one site?
Yes. The code is static and self-contained — paste it into as many pages or sites as you like, and every copy shows the same pins. There is no per-site registration.