[wordpress插件] Address Geocoder地址地理编码器

wordpress 插件 文章 2020-02-01 15:00 780 0 全屏看文

AI助手支持GPT4.0

评分

100

100

描述

The Address Geocoder plugin lets you attach coordinates to your posts, pages, and custom post types.

使用地址地理编码器插件,您可以将坐标附加到帖子,页面和自定义帖子类型中。

On your edit screens, simply enter an address into the metabox and hit “Geocode”.

在编辑屏幕上,只需在metabox中输入一个地址,然后点击“ Geocode”即可。

This plugin uses Google Maps API v3 to translate an address to lat/lng coordinates.

此插件使用Google Maps API v3将地址转换为经/纬度坐标。

A Google Maps API key is required.

需要Google Maps API密钥。

Fequently Asked Questions

常见问题

How do I retrieve the coordinates?

如何获取坐标?

Access your data in the loop using the following functions, with the post ID passed as a parameter.

使用以下函数在循环中访问数据,并将帖子ID作为参数传递。

For the full coordinates (in brackets):

对于完整坐标(在方括号中):

ID );

  <?php echo get_geocode_latlng($ post-> ID); 

?>

?>

For the Latitude:

对于纬度:

ID );

  <?php echo get_geocode_lat($ post-> ID); 

?>

?>

For the Longitude:

对于经度:

ID );

  <?php echo get_geocode_lng($ post-> ID); 

?>

?>

For the Address:

地址:

ID );

  <?php echo get_geocode_address($ post-> ID); 

?>

?>

安装步骤

    1. Activate the plugin
    2. 激活插件

    3. Go to Settings > Address Geocoder to set your Google Maps API key and choose desired post types
    4. 转到“设置”>“地址地理编码器”以设置您的Google Maps API密钥并选择所需的帖子类型

    5. Done!

    6. 完成!

      You’ll see a “Geocoder” meta box on your edit screens.

    7. 您会在编辑屏幕上看到一个“ Geocoder”元框。

下载地址

https://downloads.wordpress.org/plugin/address-geocoder.zip

https://downloads.wordpress.org/plugin/address-geocoder.zip

-EOF-

AI助手支持GPT4.0