---
title: "map"
description: "A place on a map: the store's own map of the point, its name and address over it, and the map's credit."
---

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

# map

## Where it sits

| Body | In the body | Inside its texts |
| --- | --- | --- |
| The store's home | Yes | Yes |
| A custom page | Yes | Yes |
| A product's page | Yes | Yes |
| An event's page | Yes | Yes |
| A portfolio's page | Yes | Yes |
| A lesson | Yes | Yes |
| An article | Yes | Yes |

A text holds it as a `<block type="map" props="…"></block>` element: its props are those below but `type`, which the element's own `type` names.

See [Bodies](/overview/blocks#bodies) for how a body holds its blocks.

## Props

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | The block's id, unique within its body. |
| `type` | `"map"` | Yes | The block's type. |
| `latitude` | `number` | Yes | The point's latitude in decimal degrees, from -85.0511 to 85.0511, kept to 6 decimals. |
| `longitude` | `number` | Yes | The point's longitude in decimal degrees, from -180 to 180, kept to 6 decimals. |
| `venue` | `string` | No | The place's name, shown over the map. |
| `address` | `string` | No | The place's address, its lines joined by line breaks. |
| `mapUrl` | `string` | No | A map link for the place (https, with no credentials), where `openInMaps` leads. |
| `openInMaps` | `boolean` | No | Whether it shows an "Open in maps" link: to `mapUrl`, else OpenStreetMap at the point. Defaults to `false`. |
| `size` | `"small" or "medium" or "full"` | No | How wide it shows: `small`, `medium` or `full`. |
| `align` | `"start" or "center" or "end"` | No | How its content aligns: `start`, `center` or `end`. |
| `hidden` | `boolean` | No | Whether the block is hidden: it, and every block it holds, doesn't show. |

## JSON Schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The block's id, unique within its body."
    },
    "type": {
      "type": "string",
      "const": "map",
      "description": "The block's type."
    },
    "latitude": {
      "type": "number",
      "minimum": -85.0511,
      "maximum": 85.0511,
      "description": "The point's latitude in decimal degrees, from -85.0511 to 85.0511, kept to 6 decimals."
    },
    "longitude": {
      "type": "number",
      "minimum": -180,
      "maximum": 180,
      "description": "The point's longitude in decimal degrees, from -180 to 180, kept to 6 decimals."
    },
    "venue": {
      "type": "string",
      "maxLength": 200,
      "description": "The place's name, shown over the map."
    },
    "address": {
      "type": "string",
      "maxLength": 500,
      "description": "The place's address, its lines joined by line breaks."
    },
    "mapUrl": {
      "type": "string",
      "maxLength": 2000,
      "description": "A map link for the place (https, with no credentials), where `openInMaps` leads."
    },
    "openInMaps": {
      "default": false,
      "type": "boolean",
      "description": "Whether it shows an \"Open in maps\" link: to `mapUrl`, else OpenStreetMap at the point."
    },
    "size": {
      "type": "string",
      "enum": [
        "small",
        "medium",
        "full"
      ],
      "description": "How wide it shows: `small`, `medium` or `full`."
    },
    "align": {
      "type": "string",
      "enum": [
        "start",
        "center",
        "end"
      ],
      "description": "How its content aligns: `start`, `center` or `end`."
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether the block is hidden: it, and every block it holds, doesn't show."
    }
  },
  "required": [
    "id",
    "type",
    "latitude",
    "longitude"
  ],
  "description": "A place on a map: the store's own map of the point, its name and address over it, and the map's credit.",
  "additionalProperties": false
}
```

Source: https://docs.sherpo.io/overview/blocks/map/index.mdx
