Black Friday Sale

Save Up to 40% Off

Menu Close
Close
Elementor Recent Posts Notification widget bell icon
2
What's New?
Elementor Google Maps Widget Tutorial

Elementor Google Maps Widget Tutorial

Use the Google Maps widget to put an interactive Google map on any Elementor page. You choose where the map opens and how close it’s zoomed, drop markers wherever you need them, and give each marker a title, a description and its own icon. When a visitor clicks a marker, an info window pops up. With Premium Addons PRO, that window can also show an image, an address, a website, a phone number and opening hours. On a map with lots of markers, nearby ones can group into clusters as visitors zoom out.

Check the Google Maps widget demo to see it on a live page.


Requirements:

  • You will need Premium Addons for Elementor plugin installed and activated on your website. The Google Maps widget is part of the free plugin, so no PRO license is needed for the widget itself.
  • Premium Addons PRO if you want the Advanced Info marker skins. Every other option on this page works without it.
  • Also, make sure that this addon is enabled so you can find it in the Elementor editor. Check this article to know how to do that.
  • Premium Addons works only with Elementor Page Builder plugin so you will need to have it installed and activated as well.

Google Maps API Key and Settings

Google only serves maps to sites with an API key, so get one before you add the widget. This guide walks you through getting a Google API key.

Then, from your WordPress dashboard, go to Premium Addons for Elementor → Integrations. Changes on this tab save as soon as you make them.

Google Maps settings on the Integrations tab of the Premium Addons dashboard: API key, localization language and the two script toggles
Google Maps settings on the Integrations tab
  • Google Maps API Key: Paste your key here. The map won’t load without it.
  • Google Maps Localization Language: Pick the language for the map’s labels and controls. Leave it on Default to follow the visitor’s browser.
  • Load Maps API JS File: Loads Google’s Maps script for you. Turn it off only if your theme or another plugin already loads it, since loading it twice causes errors.
  • Load Markers Clustering JS File: Loads the script behind Marker Clustering. The Marker Clustering option only shows up in the widget while this is on.
Load Maps API JS File and Load Markers Clustering JS File are on by default. If your site was set up a while ago, or someone turned them off, check them here.

Key Features

  • Center Location.
  • Markers.
  • Controls.
  • Map Style.

Content

Center Location

Center Location decides where the map opens when the page loads.

Center Location section of the Premium Addons Google Maps widget with Map ID, Get User Location and the latitude and longitude finder
Center Location Options
  • Map ID: Paste a Map ID from your Google Cloud Console. Here’s how to create one. With a Map ID, the widget uses Google’s newer Maps API and avoids the console warnings the older one logs. You can leave it empty, but Marker Clustering needs it.
  • Get User Location: Center the map on the visitor’s approximate location instead of fixed coordinates. Turning it on hides the fields below.
  • Latitude & Longitude Finder: Show a search box that fills in the center coordinates for you.
  • Find Latitude & Longitude: Type a place name and click Search. The Center Latitude and Center Longitude fields update to match.
  • Center Latitude and Center Longitude: The coordinates the map is centered on. Both accept dynamic tags.
  • If the lookup fails, or the visitor’s address can’t be looked up (on a local test site, for example), the widget shows no map at all.
  • The location is worked out on your server while the page is built. A page caching plugin can therefore save the first visitor’s location and show it to everyone after them, so exclude the page from caching if you use this option.
  • Because a visitor’s IP address leaves your site, mention the service in your privacy policy if it lists the third parties you share data with.

Markers

Markers are the pins on the map. Add one Map Pins item per location.

Markers section of the Google Maps widget with Max Width and the Map Pins list
Markers Options
  • Max Width: The widest the info window can grow, in pixels. It applies to every marker on the map.
  • Map Pins: Add, duplicate or remove markers. Each item has a Content tab and a Style tab.

Map Pins → Content tab

Map Pins item Content tab showing Location Finder, Latitude, Longitude and Location Title
Map Pins Content Tab
  • Location Finder: Show a search box for this marker.
  • Find Location: Type a place name and click Search to fill in the marker’s Latitude and Longitude.
  • Latitude and Longitude: Where the marker sits. You can type them in or look them up on LatLong.net. Both accept dynamic tags.
  • Location Title: The heading of the marker’s info window.
Map Pins item Content tab showing Description, Advanced Info, Opened By Default and Custom ID
Map Pins Content Tab, Continued
  • Description: The body of the info window. It’s a full text editor, so you can add links, lists or an address with line breaks.
  • Advanced Info: Replace the plain info window with a richer card that has an image, contact details and a Get Directions link. Advanced Info needs Premium Addons PRO. Upgrade to PRO »
  • Opened By Default: Open this marker’s info window as soon as the map loads. It only shows up once the marker has a Location Title or a Description.
  • Custom ID: Give the marker an ID so the Premium Carousel’s Custom Navigation option can use it. Once the carousel is also linked through Connected Carousel Widget ID (under Controls), clicking the marker moves the carousel to the slide that uses this ID.
A marker only gets an info window if it has a Location Title or a Description. A marker with neither is just a pin.
A Google Maps marker with its info window open, showing a location title and description
A marker’s info window, opened by default

Map Pins → Content tab → Advanced Info (PRO)

Advanced Info turned on for a map pin, with Skin, Image, Address, Website, Phone Number and Working Hours
Advanced Info Options
  • Skin: Choose how the info window is laid out.
    • Google Default: the image across the top, the title on a colored bar with a directions button, and the details below.
    • Inline Skin: a round image beside the title and a Get Directions link, with the details below.
    • Block Skin: the title on top, the image under it, then the details and a Get Directions link at the bottom.
  • Image: The picture shown in the card.
  • Address: The street address, shown as text. The Get Directions link doesn’t use it: it opens Google Maps directions to the marker’s Latitude and Longitude.
  • Website: A link to the location’s website.
  • Phone Number: Shown as a tap-to-call link.
  • Working Hours: Opening hours, as plain text.
Advanced Info window in the Google Default skin with an image, a colored title bar and contact details
Google Default skin
Advanced Info window in the Inline skin with a round image beside the title and a Get Directions link
Inline Skin
Advanced Info window in the Block skin with the title, an image, contact details and a Get Directions link
Block Skin

Map Pins → Style tab

Map Pins item Style tab with Custom Icon and Size
Map Pins Style Tab
  • Custom Icon: Upload an image to use instead of Google’s red pin.
  • Size: The icon’s size in pixels. With a Map ID and no size set, the icon shows at 50px. Without a Map ID, it shows at the image’s own size.
Three map markers using a custom blue pin icon
Markers using a custom icon

Controls

Controls section of the Google Maps widget from Map Type to Close Info Container on Mouse Out
Controls Options
  • Map Type: Choose the kind of map.
    • Road Map
    • Satellite
    • Terrain
    • Hybrid
  • Height: The map’s height, in px or vh. You can set it per device.
  • Zoom: How close the map starts, from 0 (the whole world) to 22 (street level). You can set it per device.
  • Disable Map Drag: Lock the map in place. Visitors can’t drag it, and zooming with the mouse wheel, a pinch or a double click stops working too, so Scroll Wheel Zoom has no effect while this is on. The zoom buttons still work.
  • Map Type Controls: Show buttons that let visitors switch between the map types.
  • Zoom Controls: Show the zoom in and zoom out buttons.
  • Street View Control: Show the Street View figure, which visitors drag onto the map to enter Street View.
  • Fullscreen Control: Show a button that opens the map full screen.
  • Scroll Wheel Zoom: Let visitors zoom with the mouse wheel.
  • Info Container Always Opened: Open every marker’s info window when the map loads. To open only some of them, use Opened By Default on those markers instead.
  • Open Info Container on Hover: Open a marker’s info window when the mouse moves over it. On tablet and mobile widths, a tap opens it instead.
  • Close Info Container on Mouse Out: Close the info window again when the mouse leaves the marker. It shows up once Open Info Container on Hover is on, and it only works on desktop widths.
Google map at zoom level 0 showing the whole world
Zoom set to 0
Google map at zoom level 18 showing individual streets and buildings
Zoom set to 18
Controls section of the Google Maps widget from Marker Clustering to Connected Carousel Widget ID
Controls Options, Continued
  • Marker Clustering: Group nearby markers into a single icon showing how many markers it holds when the map is zoomed out. The group splits back into separate markers as visitors zoom in. It only shows up when the Map ID field is filled and Load Markers Clustering JS File is on in the Integrations tab.
  • Cluster Icon: Upload an image to use instead of the default cluster circle.
  • Icon Size (PX): The cluster icon’s size. It’s 50px when left empty.
  • Load Map On Scroll: Wait until the visitor scrolls the map into view before loading it. This speeds up pages where the map sits further down.
  • Connected Carousel Widget ID: Link the map to a Premium Carousel widget by entering the carousel’s CSS ID. When the carousel moves to a slide, the marker in the same position in the Map Pins list opens its info window. For the order to line up, give every marker a Location Title or a Description. Learn how to link Google Maps markers to a carousel.
Zoomed-out map of the UK with nearby markers grouped into cluster icons
Zoomed out: nearby markers grouped
Map of England zoomed in further, with most clusters split into single markers
Zooming in: groups split up
Map of London zoomed in, with every marker shown on its own
Zoomed in: every marker on its own

Map Style

Map Style changes the look of the map itself: the colors of the land, water, roads and labels. Where you set that style depends on whether the widget has a Map ID.

Map Style section of the Google Maps widget with the JSON Code box
Map Style Options
  • JSON Code: Shows while the Map ID field is empty. Paste a JavaScript style array here. Snazzy Maps has a large free library of ready-made styles. Open one you like, copy its JavaScript Style Array, and paste it into this box.
Google map with a light custom style applied through JSON Code
A map styled with JSON Code, no Map ID
Map Style section with a Map ID set, where a note replaces the JSON Code box
Map Style with a Map ID set

Use a Snazzy Maps Style With a Map ID

A map with a Map ID gets its look from Google Cloud Console. You can still start from a Snazzy Maps style: paste it into a new Cloud map style, then link that style to your Map ID.

  1. On Snazzy Maps, open the style you want and copy its JavaScript Style Array.
  2. In your Google Cloud Console, go to Map Styles and click Create style.
  3. Open the JSON tab and paste the array into the editor. A note says you’re using the Google Maps Legacy JSON format, and the preview on the right shows the style.
Google Cloud Console Create style dialog with a Snazzy Maps style pasted into the JSON tab
A Snazzy Maps style pasted into the JSON tab
  1. Click Customize. Google converts the style to its own format and opens it in the style editor, where you can adjust anything that came out differently. Click Save, give the style a name, and click Save again.
  2. Go to Map Management. If you don’t have a Map ID yet, click Create map ID, give it a name, set Map type to JavaScript, and click Save. Otherwise, click the Map ID you pasted into the widget.
  3. Under Map styles, click the pencil icon in the Light mode box. In the panel that opens, select your style under My Styles and click Done.
Google Cloud Console Map ID page with the Change light style panel and a saved style selected
Picking the saved style for the Map ID’s light mode
  1. Click Save at the bottom of the page.
Google Cloud Console Map ID page with the Snazzy Maps style linked to light mode and the Save button
The Map ID with the Snazzy Maps style linked, ready to save
Google says style changes can take a few hours to reach your site. If the map still shows the old look right after you save, wait a while before changing anything else.
Google Maps widget showing a Snazzy Maps style applied through its Map ID
The widget showing the Snazzy Maps style through its Map ID

Style

Map

Style tab Map section with Border Type, Border Width, Border Color, Border Radius, Shadow, Margin and Padding
Map Style Options
  • Border Type: Add a border around the map. Picking a type shows Border Width and Border Color.
  • Border Radius: Round the map’s corners.
  • Shadow: Add a shadow around the map.
  • Margin: The space around the map.
  • Padding: The space between the map’s border and the map.

Marker Info

Marker Info styles the info window that opens from a marker: first the window, then its title, then its description.

Style tab Marker Info section with the info window options
Info Window Options
  • Minimum Width: The narrowest the info window can be.
  • Background Color: The info window’s background.
  • Border Type: Add a border around the info window.
  • Border Radius: Round the info window’s corners.
  • Box Shadow: Add a shadow around the info window.
  • Padding: The space inside the info window.

Location Title

Style tab Marker Info section with the Location Title options
Location Title Options
  • Text Color: The title’s color.
  • Background Color: A background behind the title.
  • Typography: The title’s font, size, weight and spacing.
  • Margin: The space around the title.
  • Padding: The space inside the title’s background.
  • Alignment: Align the title left, center or right.

Description

Style tab Marker Info section with the Description options
Description Options
  • Text Color: The description’s color.
  • Typography: The description’s font, size, weight and spacing.
  • Margin: The space around the description.
  • Padding: The space inside the description.
  • Alignment: Align the description left, center or right.

Advanced Info

This section only appears when Premium Addons PRO is active. It styles the extra details in Advanced Info windows.

Style tab Advanced Info section with icon, text and Get Directions options
Advanced Info Style Options
  • Icons Color: The color of the icons next to the address, website, phone number and hours.
  • Text Color: The color of those details.
  • Typography: Their font, size, weight and spacing.
  • Get Directions Icon → Icon Color: The color of the directions button on the Google Default skin.
  • Get Directions Link → Text Color and Typography: The Get Directions link on the Block and Inline skins.

Premium Addons for Elementor plugin logo

Stay Updated

Subscribe to our newsletter to receive the latest updates and features.