restruct / silverstripe-latlongfield
此包最新版本(1.0.5)没有可用的许可证信息。
独立经纬度字段,从可映射模块或类似模块抽象出来
1.0.5
2022-01-06 11:12 UTC
Requires
- ext-json: *
README
CMS编辑器可以输入街道地址,然后点击搜索。地图上将显示一个(可拖动的)指针,并替换字段内容为LatLong代码。最初是从可映射模块抽象出来的(我认为)。要求
SilverStripe 4.0 或更高版本 SS3-4 升级: 将 LatLongField::google_maps_api_key 移动到环境变量(见下文配置)
配置
.env:
GMAPS_API_KEY="..."
GMAPS_BROWSER_KEY="..." (optional secondary 'public' key to use in the browser)
提供全局 $GMapsApiKey
模板变量
<img src="//maps.googleapis.com/maps/api/staticmap?center=Leiden+NL&size=600x600&key=$GMapsApiKey" />