Skip to main content

Maps Element

The Maps element embeds Google Maps in your popup. Perfect for contact pages, store locators, and location-based content.

Overview

PropertyValue
Element Typemaps
Can Contain ChildrenNo
ProviderGoogle Maps

Use Cases

  • Business location display
  • Contact popup with address
  • Store locator
  • Event venue maps
  • Service area display
  • Direction links

Content Settings

Location

Set the map location:

Address:

123 Main Street, New York, NY 10001

Coordinates:

Latitude: 40.7128
Longitude: -74.0060

Zoom Level

Control map zoom:

LevelView
1-5Country/region
6-10City
11-14Neighborhood
15-17Street
18-20Building

Recommended: 14-16 for business locations.

Map Type

Select the map style:

TypeDescription
RoadmapStandard street map
SatelliteSatellite imagery
HybridSatellite + labels
TerrainTopographic map

Display Settings

Width

Map width:

OptionDescription
Full100% container width
FixedSpecific pixel width
PercentagePercentage of container

Height

Map height:

Height: 300px

Typical heights: 200-400px

Aspect Ratio

Alternative to fixed height:

RatioUse Case
16:9Wide view
4:3Traditional
1:1Square

Style Settings

Border Radius

Round map corners:

Border Radius: 12px

Border

Add border around map:

Border: 1px solid #e2e8f0

Shadow

Add depth:

Shadow: 0 4px 12px rgba(0,0,0,0.1)

Map Controls

Show Controls

Display map interaction controls:

ControlDescription
Zoom+ / - buttons
Map TypeRoadmap/satellite toggle
Street ViewPegman control
FullscreenExpand button

Allow Interaction

Enable/disable map interaction:

OptionDescription
EnabledUsers can pan/zoom
DisabledStatic display only
Mobile Consideration

On mobile, interactive maps can interfere with scrolling. Consider disabling interaction for small popups.

Marker Settings

Show Marker

Display a pin at the location:

OptionDescription
EnabledShow location pin
DisabledNo marker

Custom Marker

Use a custom marker image (advanced).

Advanced Settings

HTML ID

Custom ID for targeting.

CSS Classes

Add custom classes.

Lazy Loading

Load map when visible:

OptionBenefit
EnabledBetter performance
DisabledImmediate load

Examples

Business Location

Settings:

  • Address: "123 Main St, City, State"
  • Zoom: 15
  • Type: Roadmap
  • Width: 100%
  • Height: 250px
  • Border Radius: 8px
  • Controls: Zoom only
  • Marker: Enabled

Contact Popup Map

Settings:

  • Address: Business address
  • Zoom: 14
  • Type: Roadmap
  • Width: 100%
  • Height: 200px
  • Interaction: Disabled
  • Border Radius: 0 (edge to edge)

Event Venue

Settings:

  • Coordinates: Exact lat/lng
  • Zoom: 17
  • Type: Hybrid
  • Width: 100%
  • Height: 300px
  • Controls: All
  • Shadow: Enabled

Store Locator Preview

Settings:

  • Address: Store address
  • Zoom: 12
  • Type: Roadmap
  • Width: 100%
  • Height: 200px
  • Border Radius: 12px
  • Marker: Custom icon

Layout Integration

With Address Text

Typical layout:

Section
├── Column (Map)
│ └── Maps Element
└── Column (Info)
├── Heading: "Visit Us"
├── Text: Address
└── Button: "Get Directions"

Full-Width Map Header

Maps Element (no radius, full width)
Content Section
├── Heading
├── Text
└── Button

Performance Tips

  1. Lazy load — Maps are heavy, load when visible
  2. Fixed height — Prevents layout shifts
  3. Limit interactions — Static maps load faster
  4. Consider screenshots — For simple display, an image may be better

Google Maps API

XBuilder uses the Google Maps Embed API, which:

  • Requires no API key for basic embeds
  • Has usage limits (check Google's terms)
  • Supports limited customization

For advanced customization, use the Iframe element with a custom Google Maps implementation.

Accessibility

  • Provide text address alongside map
  • Don't rely solely on map for location info
  • Include "Get Directions" link
  • Ensure adequate color contrast for any overlays

Troubleshooting

Map not loading:

  • Check address format
  • Verify coordinates are correct
  • Check internet connection
  • Try different map type

Map cut off:

  • Adjust height setting
  • Check container overflow
  • Verify aspect ratio
  • Iframe — For custom map implementations
  • Image — Static map screenshots
  • Button — "Get Directions" links
  • Text — Address display