web_gmap Shortcode

The web_gmap shortcode renders the advanced map component.

The attributes below match the current Page Builder controls and public output. Use raw syntax only for reviewed content that cannot be maintained through the visual controls.

Allowed child shortcodes: web_gmap_marker, web_gmap_route, web_gmap_dynamic_route.

Usage

[web_gmap]
Content
[/web_gmap]

Attributes

Attribute Default Accepted values Purpose
height 300px Positive px/rem/em/%/vh/vw value Bounded to 3000px or 200 relative units; invalid values use 300px. Percent needs a sized parent.
center_based_on_markers calculate custom, calculate Set a custom center or use the center of resolved marker bounds. Fit zoom overrides the custom center while markers exist.
center_lat — String unless stated otherwise Controls the map center default latitude. Available when center_based_on_markers is custom.
center_long — String unless stated otherwise Controls the map center default longitude. Available when center_based_on_markers is custom.
zoom_level 12 fit, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 The lower the number, the more it will cover.
zoom_control yes yes Controls the zoom control.
map_type_control yes yes Controls the map type control.
street_view_control — yes Controls the street view control.
full_screen_control — yes Controls the full-screen control.
custom_style_name Map String unless stated otherwise Controls the custom style name.
json_map_styles Theme map style Base64-encoded, optionally URL-encoded JSON array The visual editor handles encoding. An encoded empty array selects standard Google styling.
el_id Generated unique ID Optional HTML anchor Use a unique anchor when addressing a particular map.
device_visibility — String unless stated otherwise Applies the selected responsive visibility rule.
el_class — String unless stated otherwise If you wish to style a particular content element differently, then use this field to add a class name and then refer to it in your CSS file.

Enclosed content

Content between the opening and closing tags is processed as WordPress shortcode content. Keep the parent/child structure shown by the visual builder so nested components receive the context they expect.

Google Maps requirement

Configure Google Maps under Settings → POM Theme → Integrations → Google Maps before using this component.

Verification

Populate web_gmap with map marker or route child shortcodes and confirm every child remains reachable in the intended order. Pay particular attention to height and center_based_on_markers.

Legacy maps preserve all authored markers and routes; the native Map block has separate composition limits. Provider waypoint limits still apply to each directions request, and large routes are split into consecutive requests.

Both editors use the same map runtime. Native Map blocks keep dimensions in page CSS; existing shortcode heights retain their validated inline declaration. WordPress Preview is passive. Public maps contact Google through the shared loader; configure consent handling and approved API access before publication.

Static HTML page caching is supported. The shared player also reads map markup generated by earlier shortcode versions, so existing cached pages do not need a content migration.