Measure MapHelp
Open Measure Map

Embedding a map on your website

Show a project's map inside a page of your own website, choose how it looks, limit the websites allowed to show it, and know what each message in the map means.

An embedded map puts a project inside a page of your own website: its shapes, their measurements and, if it is priced, its estimate. Visitors look at it right there, without an account, and can open it in Measure Map Online if they want more room.

A project's map embedded in a company's web page

Which projects can be embedded#

Your embeds can show your own projects and other accounts' projects, such as your customers', as their access level allows:

  • View only and Public projects show on your page, whoever owns them. Visitors can look but not change anything: editing is off inside an embedded map, even for a project's members.
  • Another account's Private projects show only once their owner has authorized you. They then show view only, in your embeds and nowhere else. See customers' private projects.
  • Your own Private projects never show, not even with your key. Set them to View only first.
  • Open Guest projects let visitors measure for themselves and ask for an estimate. See Open Guest.

A project shows only while its owner's plan is running, or for an organisation's projects, the organisation's plan. Projects in the trash, and templates, are not shown. When a project can't be shown, the map says why: see when the map shows a message.

Get the embed code#

  1. In the dashboard, press Developer, then Embed a map. The embed always uses your live key: projects made with a sandbox key cannot be opened by your website's visitors (see live and sandbox).
  2. Under Get your API key, if the page shows no key yet, press Generate new key and create one in the dialog that opens. See create a key.
  3. Under Set the project ID, type part of the project's name in Pick a project and choose it from the list. The list says how each project is shared, and leaves out templates and projects in the trash. If you pick a Private project, the page warns that your visitors will see a message saying it's private, and offers Make it view only.
  4. Under Embed code, choose how the map looks:
    • Theme: Auto follows each visitor's own light or dark setting; or always Light or Dark.
    • Units: Auto (visitor’s country) shows imperial units to visitors in the United States and metric to everyone else; or always Imperial or Metric.
    • Map type: Satellite, Map, Hybrid or Terrain.
    • Width and Height of the map on your page, in pixels (200 to 2000).
  5. Check the Live preview.
  6. Press next to Embed code and paste the code into your page's HTML, where the map should appear.
The Embed a map section: the project picked, the look chosen, the live preview and the embed code

To embed someone else's project, such as a customer's, you need its project ID. Its owner finds it at the end of the project's overview, with a  Copy button; in an embedded map, clicking the project's name copies it. Put it in the pid of the embed address.

The code contains your API key, so the map keeps working until you replace the key, on the websites the key allows. After you replace it, the old key is still accepted for 24 hours, so paste the new code into your pages within that time. A key made before keys had access settings keeps the date you were given instead. Only the Live preview on this page uses a short-lived token.

To keep the key off your pages altogether, have your website's server ask for a token each time the page is shown. See key or token, which also lists every setting the embed address takes.

Restrict the map to your websites#

By default an embed works on any website. To stop other sites from showing your maps, press Developer > API keys and add your own websites, such as example.com, under Website restrictions. A website on the list also covers its subdomains. Once the list has at least one website, a map embedded anywhere else does not open. See restrict the key to your websites.

Website restrictions with two websites on the list

What visitors can do#

In an embedded map, visitors can:

  • move around and zoom, and click a shape to read its measurements;
  • see the project's estimate, when it has one;
  • read the project's comments, and add their own when the project lets everyone comment;
  • press to change the map type and the measurement units (see settings);
  • click the project's name to copy its project ID;
  • press the Measure Map Online button in the bottom-right corner to open the project in a new tab.

In an Open Guest project they can also draw and measure, and press Request an estimate to send you their details.

Editing is off in every other embedded map, even for the project's members. To build the embed from your own code, or to put a short-lived token in it instead of your key, see the iFrame API.

When the map shows a message#

When a project can't be shown, the map says why in its place, and what can be done about it.

The map on a company's web page saying the project is private, with the buttons to authorize the company or open the project
The map says Why What to do
This project is private The project is private, and its owner hasn't authorized you. Its owner presses Authorize with your name in the map and confirms in their account, or presses Open the project and shares it as View only or Public. See your projects in other companies' maps. For your own private project, only the second way is offered.
This project isn't available right now The plan of the account that owns the project has ended; for an organisation's project, the organisation's plan. It shows again as soon as the plan is renewed. Until then only its owner can open it.
This project isn't available The project was deleted or is in the trash, or the project ID in the code is wrong. Check the pid in your code.
This map can't be shown on this website The page's website isn't on your key's website restrictions. Add the website under Website restrictions.
This map's key isn't valid The key in the code has expired, was replaced, or was revoked. Copy the new embed code into your page.
This map isn't available right now The key's account can't show maps right now: its plan has ended, or its API access is suspended. Check your plan, and the badge in API keys.
The map couldn't be opened The map couldn't reach Measure Map Online. The visitor checks their connection and presses Try again.
This project can't be shown here The project couldn't be shown, and the map can't tell why. Check that the project exists and how it is shared.
Four messages a map can show: the plan has ended, the website isn't allowed, the key isn't valid, the project isn't available

For the technical side of each case, see when the map does not appear.

Still need help?

Write to our support team and tell us what you were trying to do. Screenshots help.

Email support