[wordpress插件] Advanced Custom Fields: Multiple Coordinates高级自定义字段:多个坐标

wordpress 插件 文章 2020-02-07 07:20 519 0 全屏看文

AI助手支持GPT4.0

评分

46

46

描述

The plugin is a modified extended version of the Advanced Custom Fields: Coordinates made by Stupid Studio and is found here:

该插件是“高级自定义字段:Stupid Studio创建的坐标”的修改后的扩展版本,位于以下位置:

https://wordpress.org/plugins/advanced-custom-fields-coordinates/

https://wordpress.org/plugins/advanced-custom-fields-coordinates/

This software is licensed under the GNU General Public License version 3. See

该软件已获得GNU通用公共许可证版本3的许可。请参阅

gpl.txt included with this software for more detail.

该软件随附的gpl.txt可获得更多详细信息。

The plugin relies on the Google Maps API.

该插件依赖于Google Maps API。

It does not use an API-key and is

它不使用API​​密钥,并且是

therefore operating under the restrictions of the free Google Maps API,

因此,必须遵守免费Google Maps API的限制

which should be plenty for most backend usage.

对于大多数后端使用来说应该足够了。

Usage

用法

When you create a new custom field with ACF, set the field type to

使用ACF创建新的自定义字段时,请将字段类型设置为

Multiple Coordinates map.

多个坐标图

Now the coordinates chooser should show up when you edit

现在,当您进行编辑时,坐标选择器应该会显示

a post with your custom fields.

包含您自定义字段的帖子。

The tool add a point on each click on the map.

该工具会在地图上的每次点击时添加一个点。

To remove the point you select the “Remove Coordinate” button and click a point.

要删除点,请选择“删除坐标”按钮,然后单击一个点。

You can also show the points as a Polygon on the map with the “Show area on map” button and show the actual coordinates in a semi-colon

您还可以使用“在地图上显示区域”按钮在地图上将点显示为多边形,并以分号显示实际坐标

separated list with the “Show coordinates” button.

使用“显示坐标”按钮分隔列表。

The search field is only there to quickly take you to different places on the map.

搜索字段仅在此处可快速将您带到地图上的其他地方。

Not

不是

to add the actual points.

添加实际点。

To get the coordinates data in your frontend, simply request the field value

要在前端获取坐标数据,只需请求字段值

and in return you get the coordinates in a latitude, longitude array and the zoom as in the sample below.

作为回报,您可以在纬度,经度数组和缩放中获得坐标,如下例所示。

  <?php

$values = get_field('*****FIELD_NAME*****');

$ values = get_field('***** FIELD_NAME *****');

print_r($values);

print_r($ values);

/* which will give you an array like the following sample    

/ *将为您提供一个类似于以下示例的数组    

Array    

数组    

(        

(        

[coords] => Array            

[coords] =>数组            

(                

(                

[0] => Array                    

[0] =>数组                    

(                        

(                        

[lat] => 57.156363766336                        

[lat] => 57.156363766336                        

[lng] => 16.364327427978                    

[lng] => 16.364327427978                    

)                

)                

[1] => Array                    

[1] =>数组                    

(                        

(                        

[lat] => 57.159612809986                        

[lat] => 57.159612809986                        

[lng] => 16.370315551758                    

[lng] => 16.370315551758                    

)            

)            

)        

)        

[zoom] => 13    

[缩放] => 13    

)

*/

* /

?>

?>

安装步骤

Install this plugin by downloading the source

通过下载源代码来安装此插件

and unzipping it into the plugin folder in your WordPress installation.

并将其解压缩到WordPress安装中的plugin文件夹中。

Make

制作

sure to also have ACF installed.

确保还安装了ACF。

下载地址

https://downloads.wordpress.org/plugin/advanced-custom-fields-multiple-coordinates.zip

https://downloads.wordpress.org/plugin/advanced-custom-fields-multiple-coordinates.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] BossList老板清单
[wordpress插件] Add-custom-page-template添加自定义页面模板
[wordpress插件] Advanced Forms PayPal Payment Buttons高级表格PayPal付款按钮
[wordpress插件] Crazy Egg疯狂的鸡蛋
[wordpress插件] Widget para añadir los iconos de validación de W3C Validator用于添加W3C验证程序的验证图标的小部件
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8032
问题? 7262
如何快速搭建抽奖助手小程序(无需代码知识) 5046
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6001
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5517
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5213
如何解决渲染层网络错误Failed to load media? 16563
小程序找号找回 释放昵称? 2426
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 2508
删除部分微信用户个人数据的通知,怎么删除? 5555