---
title: "TypoScript"
manual: "maps2 (Maps2)"
version: "main"
source: "Configuration/TypoScript/Index.rst"
rendered: "2026-10-02T11:36:26+00:00"
---

# TypoScript {#typoscript}

All following TypoScript configuration consists in `plugin.tx_maps2`

> [!TIP]
> **Hint**
>
> We prefer using the Site Settings to configure maps2 since TYPO3 13.

## view {#typoscript-view}

### templateRootPaths {#templaterootpaths}

Default: `EXT:maps2/Resources/Private/Templates/`

Example: `plugin.tx_maps2.view.templateRootPaths.40 = EXT:site_package/Resources/Private/Templates/`

You can override our Templates with your own SitePackage extension.

### partialRootPaths {#partialrootpaths}

Default: `EXT:maps2/Resources/Private/Partials/`

Example: `plugin.tx_maps2.view.partialRootPaths.40 = EXT:site_package/Resources/Private/Partials/`

You can override our Partials with your own SitePackage extension.

### layoutsRootPaths {#layoutsrootpaths}

Default: `EXT:maps2/Resources/Private/Layouts/`

Example: `plugin.tx_maps2.view.layoutsRootPaths.40 = EXT:site_package/Resources/Private/Layouts/`

You can override our Layouts with your own SitePackage extension. We prefer to
change this value in TS Constants.

## persistence {#typoscript-persistence}

### storagePid {#storagepid}

Default: empty

Example: `plugin.tx_maps2.persistence.storagePid = 12,32,48`

Set this value to a Storage Folder where you have stored the event records.

> [!IMPORTANT]
> If you have stored Organizers and Locations in another Storage Folder, you
> have to add theses PIDs here, too.

> [!TIP]
> If you use creation of events over frontend plugin, new records will be
> stored in first PID found in storagePid. To store record in other storage
> PIDs you need following configuration
>
> ```typoscript
> plugin.tx_maps2.persistence.classes.JWeiland\maps2\Domain\Model\Event.newRecordStoragePid = 34
> plugin.tx_maps2.persistence.classes.JWeiland\maps2\Domain\Model\Location.newRecordStoragePid = 543
> ```

## settings {#typoscript-settings}

### overlay.link.addSection {#overlay-link-addsection}

Default: 1

Example: `plugin.tx_maps2.settings.overlay.link.addSection = 0`

Append URI section to link of button in consent template. Useful to jump
directly to the content element record with maps2 plugin.

With option set to 1: \[currentURI\]/mapProviderRequestsAllowedForMaps2=1#c123

With option set to 0: \[currentURI\]/mapProviderRequestsAllowedForMaps2=1

### infoWindowContentTemplatePath {#infowindowcontenttemplatepath}

Example: `plugin.tx_maps2.settings.infoWindowContentTemplatePath = EXT:your_sitepackage/Resources/Templates/InfoWindowContent.html`

Here you can define your own Fluid-Template for these little PopUps of Markers.

Since maps2 9.2.0 you have access to all related foreign records of your
PoiCollection in Template.
Use: `<f:for each="{poiCollection.foreignRecords}" as="foreignRecord">...</f:for>`

As such a PoiCollection can be assigned to multiple different tables like
tt_address, news, what ever, you can differ between the foreign records
with f.e.:

```html
<f:groupedFor each="{poiCollection.foreignRecords}" as="groupedForeignRecords" groupBy="jwMaps2TableName" groupKey="tableName">
  <div>Table: {tableName}</div>
  <ul>
    <f:for each="{groupedForeignRecords}" as="foreignRecord">
      <li>PoiCollection URL: {foreignRecord.url}</li>
    </f:for>
  </ul>
</f:groupedFor>
```

`jwMaps2TableName` and `jwMaps2ColumnName` are two special keys we have added to each foreign record.

### infoWindow.image.width {#infowindow-image-width}

Default: 150c

Example: `plugin.tx_maps2.settings.infoWindow.image.width = 300`

Set the maximum width of images within the InfoWindow PopUp

### infoWindow.image.height {#infowindow-image-height}

Default: 150c

Example: `plugin.tx_maps2.settings.infoWindow.image.height = 180c`

Set the maximum height of images within the InfoWindow PopUp

### markerClusterer.enable {#markerclusterer-enable}

Available for Google Maps and OpenStreetMap

Default: 0

Example: `plugin.tx_maps2.settings.markerClusterer.enable = 1`

This value is configurable through the site setting
`maps2.enableMarkerClusterer` ("Enable Marker Clusterer") of site set
`Maps2 - Default Set`.

If you work with a lot of poi collection records you can activate the marker
clusterer. The marker clusterer will merge multiple nearby poi collections to
1 icon showing the amount of contained records. The markers separate as the
visitor zooms in.

For Google Maps the library `MarkerClusterer` is used. For OpenStreetMap the
official Leaflet plugin
[Leaflet.markercluster](https://github.com/Leaflet/Leaflet.markercluster)
is used. With OpenStreetMap only point markers are clustered. Areas, routes and
radius records are always shown as they are. While editing a marker in
frontend, clustering is not used.

This TypoScript value is the source of truth. It also applies to maps
which are rendered by foreign extensions through the maps2 Fluid partials.

> [!TIP]
> **Hint**
>
> Editors can override this value per content element in the "Map Options"
> tab of the maps2 plugin. See
> [markerClusterer.override](../Plugins/Index.html#plugins-show-map-marker-clusterer).

### markerClusterer.imagePath {#markerclusterer-imagepath}

Only available for Google Maps

Default: `EXT:maps2/Resources/Public/Icons/MarkerClusterer/m`

Example: `plugin.tx_maps2.settings.markerClusterer.imagePath = EXT:my_sitepackage/Resources/Public/Icons/MarkerClusterer/m`

If you don't like the icons of Marker Clusterer you can choose a different path for your own
images.

### markerClusterer.styleSheet {#markerclusterer-stylesheet}

Only available for OpenStreetMap

Default: `EXT:maps2/Resources/Public/Css/Leaflet/MarkerCluster.Default.css`

Example: `plugin.tx_maps2.settings.markerClusterer.styleSheet = EXT:my_sitepackage/Resources/Public/Css/MarkerCluster.css`

Leaflet.markercluster does not work with images like the Google Maps
MarkerClusterer. The cluster icons are HTML elements which are styled by CSS
classes `marker-cluster`, `marker-cluster-small` (less than 10 markers),
`marker-cluster-medium` (less than 100 markers) and `marker-cluster-large`.

By default, maps2 loads the default theme `MarkerCluster.Default.css` of
Leaflet.markercluster. If you don't like the cluster icons, copy that file to
your site package, adapt it (colors, sizes, background images, ...) and set
the path to your own file here. If you clear this value, no theme stylesheet
will be loaded at all and you can style these CSS classes within the
stylesheets of your site package.

The required base stylesheet `MarkerCluster.css` (animations) is always loaded,
if marker clustering is enabled.

## \_LOCAL_LANG {#typoscript-local-lang}

As an integrator you can override each language key with TypoScript. For
frontend maps2 uses this file:

`EXT:maps2/Resources/Private/Language/locallang.xlf`

Example: `plugin.tx_maps2._LOCAL_LANG.de.listMyEvents = Zeige meine Veranstaltungen`
