Elements

How to add a Google Map

How to add a Google Map

In TeleportHQ, you add a map with the GMaps element. Drag GMaps from Elements → Primitives → Media onto your page (or click it), then type your address into the address field of the Google Maps Location section in the right panel. The map moves to that address. You don't need a Google account or API key.

Steps

  1. In the left sidebar, click Elements.
  2. On the Primitives tab, scroll to the Media group.
  3. Drag GMaps onto the canvas, for example into your contact section. Or select that section and click GMaps: the map goes inside it. The new map shows a sample location in New York.
The Media group of the TeleportHQ Elements panel, with the GMaps card highlighted
  1. With the map selected, in the right panel, find Google Maps Location.
  2. In address, type your full address. For example, 12 Baker Street, London.
  3. Press Enter. The pin moves to your address.
The Google Maps Location section of the TeleportHQ right panel, with the address field highlighted

Use exact coordinates instead

Use latitude and longitude when the address is hard for Google to find, for example a market stall.

  1. Open Google Maps and right-click the exact spot.
  2. Click the two numbers at the top of the menu to copy them. The first is the latitude, the second the longitude.
  3. In TeleportHQ, in Google Maps Location, paste the first number into lat, for example 51.5237.
  4. Paste the second number into lng, for example -0.1585.
  5. Clear the address field. The address overrides latitude and longitude.

You can also paste an embed link from Google Maps.

  1. In Google Maps, find the place and click Share.
  2. Click Embed a map and copy the address inside src="...".
  3. In TeleportHQ, paste it into src in Google Maps Location.
  4. Clear address, lat and lng. Those fields override src.

Check that it worked

The map on the canvas shows a pin at your location. Visitors can drag and zoom the map on your live site. To try it before publishing, preview your site.

Troubleshooting

The map still shows the old location The Google Maps Location section notes that "The address field overrides the latitude and longitude fields for the location pin. Both address and lat/lng override the src field." Clear the fields you're not using.

The map shows the wrong place Add more detail to the address, such as the city and country, or use latitude and longitude.

The map is too small A new map is 320 × 200 pixels. In the right panel, open Size and set the width to 100% and a height such as 400px. See How to set an element's width and height.

Good to know

Share

Related Articles

How to embed another web page with an iframe

In TeleportHQ, you show another website's page inside yours by adding an Iframe element from Elements → Primitives → Media and pasting the page's address into its src field in the Attributes section; the other site must allow embedding.

Which elements can I add to a page?

TeleportHQ's Elements panel has two tabs, Primitives (single building blocks such as text, images, buttons, forms, animations, site-wide extras and charts, sorted into groups) and Sections (ready-made page sections and scroll stories), and a few elements that need a server only work in web apps.

How to set an element's width and height

In TeleportHQ, select an element and type a Width and Height in the Size section of the right panel (in px, %, vw and other units), or drag the handles around the element on the canvas, where the edge snaps to the parent's and neighbours' edges.

How to add borders, rounded corners and shadows

In TeleportHQ, select the element and use the Border, Radius and Shadow sections of the right panel; click + in each to add a 1px border, a small corner radius or a drop shadow, then adjust color, width, style, corners, blur and spread.

How to preview your site before publishing

In the TeleportHQ editor, click Preview in the toolbar at the bottom of the screen to open a working copy of your whole site in a new tab, where you can click links, try interactions and switch between desktop, tablet and mobile views.