Skip to content

How to Embed a Google Map in Tableau

2013 June 7
by Ben Jones

UPDATE, May 2015: Google is constantly changing their Maps service. Nelson Davis has a recent blog post that addresses issues with the method outlined here, which doesn’t work quite like it used to. 😉

(For this post, I owe a word of thanks to Andrew Beers – VP of Product Development at Tableau, for the raw data, and Mike Klaczynski – Data Analyst on the Tableau Public team, for showing me this method).

At the Seattle Hacks/Hackers event last night, we built an interactive data dashboard that allows the reader to explore bridges in the state of Washington, where a bridge crossing the Skagit River recently collapsed into the water after being struck by a truck carrying an oversize load.

What’s notable about this dashboard is that you can click on any of the 2,489 circles on the map and bring up an embedded Google satellite image of the bridge within the dashboard itself. I didn’t have to take a screen shot of each satellite image – that would be way too much fun. Instead, I used a little-known feature in Tableau Public – embedded web pages (similar to the Embedding YouTube post from a few weeks ago).

How to embed a Google satellite image in a Tableau Public visualization:

The first group of 5 steps shows you how to create a url for each bridge, and the second group of 5 steps shows you how to add a box to your dashboard to pull up the bridges.

I. Create the URLs
1. First, notice that the data file contains Latitude (“LAT”) & Longitude (“LON”) for each bridge.

2. A Google Maps search for a particular Latitude & Longitude (say, 48.445781 and -122.341108) yields a link url like this:,-122.341108&hl=en&sll=48.445781,-122.341108&sspn=0.009949,0.026157&t=h&z=16

3. The url can be simplified a little bit as follows:,-122.341108&z=17&t=h&output=svembed

4. Breaking down the elements of the url, we can see that after the latitude & longitude, there are three parameters in the url:

  • “q=48.445781,-122.341108″ – these are your coordinates. Note that if you have an address field instead of Lat/Long, you can put an address after “q=” as well
  • &z=17 – this specifies the zoom level. Higher numbers zoom in, lower numbers zoom out
  • &t=h – this specifies the type of map. (t=m is a map, t=h is a satellite view)
  • &output=svembed – this is a key parameter that makes sure the website you embed in your viz doesn’t include the entire site – just the map itself

5.  You could then generalize the url to:


You can see that the actual numbers for Latitude and Longitude have been replaced with field names <LAT> and <LON>

The next group of steps walks you through how to add a box to your dashboard that pulls up this embedded satellite image when a user clicks on a particular circle.

II. Add dynamic Satellite Images to your Dashboard

1. First, in the dashboard tab, drag a Web Page onto your dashboard from the left-center panel (just leave the “Edit URL” dialog box blank and click “OK” for now):

Add Web Page

2. From the Dashboard file menu, click Actions and click the “Add Action >” button and choose “URL…”

3. In the Add URL Action dialog box, select whatever sheet you have created that includes the fields LAT and LON, and choose what event you’d like to trigger navigation to the new image (Hover, Select, or Menu). In this case, I’ve selected Map as my Source Sheet and Select as my trigger event, but you could trigger the action from a table or other type of sheet. Here’s what the dialog box looks like:

Triggering the URL Action

4. Now comes the magic. Copy and paste the generalized url above to the URL field of the dialog box, and replace <LAT> and <LON> with the corresponding field names in your data source by clicking the small arrow to the right of the URL text entry field:

Specify URL to go to

5. That’s it! Test it out by clicking on the map circles and see the satellite image change accordingly.

I can see this being useful for organizations that would like to include images of office locations or real estate assets in their dashboards. For data journalists, it’s about allowing readers to interact with the abstract and the real in the same graphic.

If you make a dashboard with a dynamic Google map, be sure to post the link in the comments field for all to see.

Added 6/10: Here are the slides from the event:

Thanks for stopping by,



53 Responses leave one →
  1. June 9, 2013

    Very helpful viz! I was there at the event. I came into work this weekend and was able to pull together a viz using these concepts. I had to do it in Tableau 7.0 since the server my employer uses is not yet at 8.0.

    I’ll post a Tableau Public link to the viz after I review it make sure the data is publicly available.

    Question: Under “Describe field,” there is an option to “Load.” It brings in the domain of the column. My lat./long are already in my data and don’t need to be generated. It seems like the range could be easily determined and calculable by Tableau. I checked your viz and there is not “Load” button nor is the domain listed. What’s the purpose of the “Load”?

    • June 9, 2013

      Hi Phillip – nice meeting you last week, and thanks for commenting! Looking forward to seeing your work. As for your question – I’m not sure where you’re seeing “Describe field” and “Load”. Can you give me a little more info about what you’re trying to do?

  2. Hari permalink
    June 9, 2013

    Nice one. Waiting for the answer from you for my previous question :)

  3. Hari permalink
    June 9, 2013

    If my Question didnt reach you, below are the one.

    1) How to fetch data from twitter into tableau.
    2) how to integrate video into tableau
    3) How to customize charts which are not available in tableau.

    for ex : gauge chart or organization chart which are out of box. Other tools have SDK, through which a new type can be imported. What about tableau ?

  4. June 13, 2013

    Hi, Ben. I was able to go back and right away do an embedded map with the URL action. Here’s the link to what I cobbled together:

    I had to remove some data and sanitize it a bit, hence the jane and john doe names.

    I’ll follow up in a different comment re the “Load” question.

  5. June 13, 2013

    Hi, Ben. I can’t paste images so will paste what Tableau copies to the clipboard. I can send images to you if the clipboard text doesn’t provide enough context or detail.

    Notice the “The domain for this field has not been loaded. Click “Load” to retrieve.” changes to Domain -29.60517 to 59.721287″

    Before pressing the “Load” button on the describe window:

    Role: Continuous Measure
    Type: Database column
    Remote column: [Extract].[F_CENTER_FACILITY_LONGITUDE]
    Remote type: Double-precision floating-point number
    Default aggregation: Average
    Geographic Role: Longitude
    Status: Valid
    The domain for this field has not been loaded. Click “Load” to retrieve.

    And next, after pressing the “Load” button on the describe window:

    Role: Continuous Measure
    Type: Database column
    Remote column: [Extract].[F_CENTER_FACILITY_LATITUDE]
    Remote type: Double-precision floating-point number
    Default aggregation: Average
    Geographic Role: Latitude
    Status: Valid
    -29.60517 to 59.721287

    • June 13, 2013

      Hey Phillip – why don’t you send the images over via email using the email address in my “About” page (link at the top-right).

      Thanks, nice use of embedded satellite images by the way!

  6. Ramesh permalink
    November 21, 2013

    thanks ben

  7. Jihye Lee permalink
    December 4, 2013

    Hi Ben,

    Thanks for these instructions, it’s really helpful! One question, how did you make the Google Map show a marker of the coordinates? I was able to embed Google Maps, but could not show where exactly on the map. I would appreciate your help!


  8. sandhya permalink
    January 14, 2014

    I was able to connect the tableau maps to google maps through the instrcutions you have given, but i am not able to hide the panel on the left on Google maps website in Tableau where they give things like “Directions”, “search nearby” and all that.

  9. sandhya permalink
    January 14, 2014

    I have another question too, How to find directions in Google maps from one standard place to the place that we click on Tableau map? I saw a sample workbook which did that, but i could not figure out how to do it, would really appreciate the help, thanks in advance!

  10. sandhya permalink
    January 16, 2014

    your method works fine, but whenever i click on the area which i want to see on google maps, it gives an error called “An error has occured in the script on this page”, but the maps are showing fine. Hence i want to hide this error. What do i do for this?

    Thanks in advance!

  11. Marco permalink
    February 18, 2014

    Is there a tutorial on how to draw polygons onto the embedded webpage?

    Right now I got the webpage to zoom into the location of wherever I click on the map. The next thing I want is to draw the polygons I have on the map onto the webpage.

    • February 22, 2014

      Marco, if you want to draw polygons on a map, you can draw them on the standard Tableau maps (online kb article here). I don’t know of any way of drawing them on an embedded web page like Google Maps.

  12. Teresa permalink
    February 18, 2014

    Hi Ben,

    Just trying to replicate the above but after creating the blank space then going into dashboard -> action -> add action, the map option does not come up.
    Hence I can not make the maps interactive.

    I’m using the latest version 8.1.


    • February 22, 2014

      Hi Teresa, are you adding a URL action and inputting the map URL with your Latitude and Longitude fields? It might help to email me a screen shot of your Dashboard Action, as I can’t quite make out from your description what’s going on. See my About page for email info.

  13. Tristan Mikoleit permalink
    April 11, 2014

    When I try this approach I get the message: “The Google Maps Embed API must be used in an iframe”

    Is this a change that google maps has made?

    I am on the latest version of Tableau, 8.1.

  14. May 3, 2014

    I did this post and it had a great result. The thing is that now Google Maps has changed and when i do the embed on Tableau it asks me to call it as an iframe. Do you know how to fix this?

  15. Katie permalink
    June 4, 2014

    Hi Ben,

    Thanks for posting! When I use this method a message pops up that says: “The Google Maps Embed API must be used in an iframe.” on the URL page in the dashboard. Any ideas to fix this?


    • June 5, 2014

      Hi Katie, yep, you’re right. Looks like recent changes in the Google Maps service has caused in this error. There are two ways to fix it. 1) simply change “&output=embed” to “&output=svembed” (Thanks Jeff Shaffer!). OR, change everything over to the Staticmaps format which is documented here.

  16. Justin permalink
    June 5, 2014

    Does anyone else get an error saying: The Google Maps Embed API must be used in an iframe.

    Any help is much appreciated!

  17. June 5, 2014

    All – you can fix the Google Maps API iframe error message by changing “&output=embed” to “&output=svembed” (Thanks Jeff Shaffer!), or you can refer to the Google Staticmaps documentation here

    • Matt permalink
      May 1, 2015

      Hi Ben – I know you have mentioned this already about iFrame error. But just as to update, even after changing from “&output=embed” to “&output=svembed”, iframe would not go. Only way is the hard way to use static URL documentation. If you can update your dashboard with output=svembed and repost, it would help all of us.

  18. Luís Ramos permalink
    November 7, 2014

    Hi Ben,

    Excellent tutorial. Many thanks, but now I’m trying to do something forward.
    If I select more than one point, do you know how to zoom this two points?

    Luís Ramos

  19. Youssef permalink
    November 13, 2014

    Thanks for the information.
    I am having problem in the map; whenever I select a location it does not reflect in the google map.!/vizhome/VehicleDealersDashboard/Dashboard2

    • Youssef permalink
      November 13, 2014

      I just got a solution for the previous mentioned issue. Thanks.

      I have another question, how can I change the symbol of the pins (from dots to an image). Is that possible in Tableau maps?

      Thank you again.

  20. Chelsea permalink
    January 7, 2015

    Hi Ben,

    Fantastic tutorial. Have you had any experience with enabling search by address or lat/long in the embedded Google map (or elsewhere on the Tableau map)? That way the user could compare an inputted location to mapped locations already in the Tableau dataset. Not sure if that is possible, but I figured you would be the best user to ask. I’m using Tableau 8.2.


    • January 7, 2015

      Hi Chelsea, thanks for the kind words. I’ve never tried what you’re talking about, but agree it would be great to be able to input an address on a dashboard. It looks like embedded Google Maps has something called Search mode. Perhaps that is a good place to start.

  21. Tausif permalink
    February 19, 2015

    Hello Mr Jones,

    I downloaded the workbook “bridges in Washington” and openened in tableau 8.3

    I’m getting this error “The Google Maps Embed API must be used in an iframe.”

    instead of the map

  22. March 4, 2015

    Love the tech behind this, but also wondering where did you get the bridge data for this project?

  23. Tableau user permalink
    April 23, 2015

    Hi Ben – Can this be done in tableau server too. I mean once done on desktop, can this be published to tableau server ? Note that our tableau server do not have Internet connection but has intranet. So will the google maps work in that case.

  24. Manideep Bhattacharyya permalink
    April 27, 2015

    I have adopted the following steps to make sure that it works (Thanks to Subha Prasanna Dutta) :

    a. Declare the Lat & Long Fields as Dimension in the Map (In my case the Field names are Latitude and Longitude)

    b. Add a Blank URL and in the Action add the URL as following:,+&hl=en&t=h&z=16

    It works without any API / key / Staircamp etc.

    Hope this will work for everybody

  25. Manideep Bhattacharyya permalink
    April 27, 2015

    Sorry guys the URL should be the following:,+&hl=en&t=h&z=16

    • Manideep Bhattacharyya permalink
      April 27, 2015


  26. Laura permalink
    April 29, 2015

    Hi Ben. Great post and happy to find your website when researching this topic.
    I was wondering if you need to have the map necessary to get to the street view. For example, my dashboard would have commercial building information and i have the lat and long based on the addresss. Would I be able to bring the street view based on location name selection, Like the rest of the elements in my dashboard, without including a map?


  27. Laura R permalink
    May 1, 2015

    Hi Ben. I found your great post around this topic and I was wondering if you have any updates from Tableau around this error “The Google Maps Embed API must be used in an iframe.”, even after using the most updated url here. I actually tried few other Url options with Google Maps, same error.
    I am using Tableau Desktop 8.2
    Any suggestion is much appreciated.

    Thank you.

    • Jag permalink
      July 16, 2016

      Hi Ben,

      I’m getting the same error “The Google Maps Embed API must be used in an iframe.”
      I tried changing “&output=embed” to “&output=svembed” and that did not work

      Any idea?


  28. Jag permalink
    July 16, 2016

    For me the below worked in the URL,

    • July 18, 2016

      Awesome, thanks Jag! Yeah, this is a moving target for sure, as Google continues to make changes to the Maps service. Thanks for posting the update for everyone else to see.

Trackbacks and Pingbacks

  1. Feasting in Phoenix | improVIZation
  2. Tableau map + Google Maps embed | At Her Desk, Probably
  3. google maps embed iframe - Search Yours
  4. google maps embed iframe | Zakee
  5. Tableau map + Google Maps embed | Aysha Khan
  6. Feasting in Phoenix | improVIZation
  7. Detailed Geo Viz with Tableau, Mapbox and Google Street View | Data Science Riot!
  8. Links for Monday, April 25 | sncdatajournalism

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS