Skip to main content

Overview

The Map Location Component builds upon the Base Map Component by adding a button schema for interaction.
This allows users to open the map location in an external map app, launch a navigation link, or trigger a related action.
It inherits all location-related properties from the Base Map Component, such as latitude, longitude, provider, and placeId, and extends them with a button field that follows the Base Button schema.

Properties

PropertyTypeRequiredDescription
locationobject✅ Yes (inherited)From the Base Map Component. Defines map provider, coordinates, and metadata.
buttonobject✅ YesFrom the Base Button Schema. Defines the action button displayed under or near the map (e.g., “Get Directions”).

🧩 Button Object Reference

The button field uses the Base Button Schema (_base_button.json), which supports:
  • label (button text)
  • color (button, border, and label colors)
  • buttonStyle and textStyle
  • Optional tracking for analytics (event_tracking)

Used in Categories

This component is used in the following categories:
  • Base Map Component → Provides foundational location fields.
  • Base Button Schema → Defines button structure and styling.

Example Schema

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {},
  "title": "Map location component",
  "description": "Validate map location component schema",
  "allOf": [
    {
      "$ref": "_base_map.json"
    },
    {
      "properties": {
        "button": {
          "$ref": "_base_button.json"
        }
      },
      "required": [
        "button"
      ]
    }
  ]
}

Notes

  • The button field is mandatory — each map location must provide an actionable button.
  • Ensure the button action aligns with the map context (e.g., open Google Maps or show directions).
  • All coordinates (latitude, longitude) and placeId are inherited from the Base Map Component.
  • Recommended zoom level: 14–16 for city or venue-level clarity.