mrf / map
Neos CMS Google 地图插件,提供易于定制的地图节点类型
1.0.1
2016-06-05 19:54 UTC
Requires
- typo3/neos: ~2.0
- typo3/neos-nodetypes: ~2.0
This package is not auto-updated.
Last update: 2024-09-14 19:58:26 UTC
README
Mrf.Map 插件为您的 Neos CMS 网站添加易于定制的 Google 地图节点类型。
安装
要安装此包,请在 CLI 中使用 composer require 命令
composer require mrf/map:1.*
或者直接将以下行添加到 composer.json 中的 "require" 部分,以手动添加
"mrf/map": "1.*"
然后,在 CLI 中通过命令安装 composer 包
composer update
扩展地图选项
Mrf.Map 包使扩展 Google 地图设置变得简单。如果您想为整个网站全局硬编码新设置,只需在您的网站包(例如 Resources/Private/TypoScript/Root.ts2)中添加几行 TypoScript 即可。
prototype(Mrf.Map:GoogleMap) {
jsVars {
mapOptions {
streetViewControl = ${String.toBoolean('0')}
}
}
}
您还可以轻松地从 Neos 检查器中使新设置可配置。为此,您只需扩展您网站包中的节点类型定义(例如 Configuration/NodeTypes.yaml)即可。
'Mrf.Map:GoogleMap': properties: streetViewControl: type: boolean defaultValue: TRUE ui: label: 'Allow street view control' inspector: group: 'settings'
然后在您的网站 TypoScript 中使用它(例如 Resources/Private/TypoScript/Root.ts2)。
prototype(Mrf.Map:GoogleMap) {
jsVars {
mapOptions {
streetViewControl = ${String.toBoolean(q(node).property('streetViewControl'))}
}
}
}