> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Map Location Component

> Extends the Base Map Component by adding an interactive button element. Commonly used for “Get Directions,” “View on Map,” or “Locate Us” functionality.

## 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

| Property     | Type     | Required          | Description                                                                                                      |
| :----------- | :------- | :---------------- | :--------------------------------------------------------------------------------------------------------------- |
| **location** | `object` | ✅ Yes (inherited) | From the Base Map Component. Defines map provider, coordinates, and metadata.                                    |
| **button**   | `object` | ✅ Yes             | From 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:

* [Coupon](/guides/category-components/categories/coupon)
* [Dynamic Text](/guides/category-components/categories/dynamicText)
* [Dynamic VCard](/guides/category-components/categories/dynamicVCard)
* [Event](/guides/category-components/categories/event)
* [Product](/guides/category-components/categories/product)
* [Social Media](/guides/category-components/categories/sMedia)
* [Wedding](/guides/category-components/categories/wedding)

## Related Components

* **Base Map Component** → Provides foundational location fields.
* **Base Button Schema** → Defines button structure and styling.

## Example Schema

<CodeGroup>
  ```json Schema theme={null}
  {
    "$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"
        ]
      }
    ]
  }
  ```
</CodeGroup>

## 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.
