This is an add-on for the Advanced Custom Fields
这是高级自定义字段的附加组件
WordPress plugin and will not provide any functionality to WordPress unless Advanced Custom Fields is installed
WordPress插件,除非安装了高级自定义字段,否则不会为WordPress提供任何功能
and activated.
并激活。 p>
The Location field provides:
“位置”字段提供: p>
- a search field where you can type in some coordinates or an address and hit
Enter
. - 一个搜索字段,您可以在其中输入一些坐标或地址,然后按
Enter code>。
li>
- a Google map which you can click at the desired location.
- 您可以在所需位置单击的Google地图。 li>
ul>
In both cases, Google will find the location and return the coordinates and the complete address, if you want it complete.
在这两种情况下,Google都会找到该位置并返回坐标和完整的地址(如果需要的话)。
A marker will be added at the desired location.
标记将添加到所需位置。 p>
Source Repository on GitHub
GitHub上的源存储库 h4>
https://github.com/julienbechade/acf-location-field
https://github.com/julienbechade/acf-location-field p>
Bugs, Questions or Suggestions
错误,问题或建议 h4>
https://github.com/julienbechade/acf-location-field/issues
https://github.com/julienbechade/acf-location-field/issues p>
Usage
用法 h4>
Make sure you read the Advanced Custom Fields's documentation first.
确保首先阅读高级自定义字段的文档。 p>
p>
>
Back-end
后端 strong> p>The Location field comes with 3 options:
“位置”字段带有3个选项: p>
- The map address let you choose the value(s) to return on the front-end:
- 通过地图地址,您可以选择要在前端返回的值:
- Coordinates & address
- 坐标和地址 li>
- Coordinates
- 坐标 li>
ul>
li>
- The map center let you set the coordinates used to center the initial blank map.
- 地图中心使您可以设置用于将初始空白地图居中的坐标。 li>
- The map zoom.
- 地图缩放。 li>
ol>
Front-end
前端 strong> p>Retrieving the value(s) on the front-end differs according to the Map address options.
根据“映射地址”选项,检索前端的值不同。 p>