Add Google Maps to your site – Webflow tutorial

By | March 3, 2020


What is a map element in Webflow? It shows a map. But also, as we already know, the word “map”
is most common in the last name Mapother, as in Thomas Cruise Mapother the fourth, who
has appeared in such films as A Few Good Men, Minority Report, of course, Tropic Thunder,
where Tom Cruise plays Les Grossman. It was around this time that we realized
the full, four-minute CV of Tom Cruise wasn’t the real motivation behind this lesson. Instead, Google Maps. A Maps element you can add to a Webflow
project by just dragging it in. (And doing a few more things.) Why is it so complicated? Well, it’s not. At least on the Webflow side. We’ll quickly go through adding the element,
getting the API key from Google, and then we’ll talk about the options and settings
we have to get your map exactly how you want it. Part 1. Adding the Maps element. We can do this from the Add panel, and all
we’ll do is add the Maps element to our design (we’re dragging it right into our
layout). Part 1 done. Too fast? Okay, we can tweak it. Maybe set a height. Like 100% of the container it’s in. Part 1 done. Part 2. API key. Okay, so if you haven’t already added an
API for this project, this is where we can add our API key. Where are we taken? To Project Settings. Under integrations. [Schwipp, ding] But on the page, there’s
a blank spot for our API key. So. Let’s get it from Google. Here we are on the Google Maps Platform. And our goal here is to create a new project. We can call this project whatever we want. Now, Google requires you to create a billing
account for this to work. While we fill this out, it’s a great time
to talk about Star Trek: Picard. Is it worth signing up for another video subscription
service just to watch Patrick Stewart bring his masterful performance of Jean-Luc Picard
back to life? Objectively speaking, yes. Now that we’re done with billing, let’s
select the Maps product (since that’s what we’re trying to enable), and we’ll continue. Let’s enable our APIs. The result? The API key. …which we’ll copy to our clipboard. And once we have that, let’s go back to
Webflow, and paste in that key. Of course, we’ll save our changes…and
head back to the Designer. That’s part 2. Part 3? The Map element itself. Once you’ve added your API key, you’ll
see a generic map preview in Webflow. The reason is because Google limits the usage
of your API key to your published site, whether you’re using a custom domain or a Webflow.io
domain. And if we double-click on the Map, we can
type in an address or a general location and press enter. If Google Maps confirms that address, it’ll
update right in the Address field. What about the specific settings? If we show all our settings, or …if we just
click over to the Element Settings Panel, and we can control the specific way our map
behaves. We can change the address, add a tooltip,
adjust the zoom level, and of course change the type of map that’s displayed. What about these two options? If you’re scrolling down a page and your
mouse happens to land inside the boundary, scrolling movement on a scrollwheel or trackpad
can cause the map to zoom in and out. You might want this, but if you don’t, uncheck
Scrollwheel. And touch drag is a similar concept. On touch devices (like an iPhone), having
touch drag on will show a message when you scroll over the map — this will clarify
to the user how they can navigate through the map. If touch drag is off? You’ll be able to scroll through the page
on a mobile device without messing with the map at all — it’ll look exactly the same
— no message — even when you’re swiping or scrolling past it. Also, you can style a Map element to adjust
its behavior and its position. It’ll have some height, but you can put
in your own values for size and positioning. By default, it’s going to take up the full
width of whatever element it’s in. And when we publish, our map appears just
how we configured it right on our page. So. How do we use a Map element? We add it to our project, we copy and paste
the API key from Google Maps Platform into Webflow, and then we use the Map element. That’s the Map element in Webflow.

8 thoughts on “Add Google Maps to your site – Webflow tutorial

  1. Jovan Pavlovic Post author

    It's a shame that webflow has the best tutorials and the best of everything, but the e-commerce part is garbage.

    Reply
  2. Gustavo Stringari Post author

    What if i have more than one map on the page? I can only show one because of the api?

    Reply
  3. XimerTracks - Sub To Me Post author

    Keep it up! More content please. Let's Be Friends 😮

    Reply
  4. Lost Diver Productions Post author

    I have google maps on my websites, but for some reason, every AFTER I've setup billing, I keep getting this weird "for development purposes only" thing that changes how my google maps look like… any help? 🙁

    p.s. ur videos are legendary as always lol

    Reply
  5. Oli Post author

    So after the free 12 month trial period ends, will Google charge you for having APIs keys?

    Reply
  6. Signei Koch Post author

    Pleaseee… make a tutorial on how to place multiple locations on a google map. I create real estate websites with Webflow but don't know how to show multiple listings on the map. I'm not a professional developer… just learned web development by making websites with Webflow…. and simply love it.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *