這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

Address Geocoder

描述

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”.

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

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. For the full coordinates (in brackets):

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

For the Latitude:

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

For the Longitude:

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

For the Address:

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

螢幕截圖

  • The meta box before clicking "Geocode"
  • The meta box after clicking "Geocode"
  • The settings page

安裝

  1. Activate the plugin
  2. Go to Settings > Address Geocoder to set your Google Maps API key and choose desired post types
  3. Done! You’ll see a “Geocoder” meta box on your edit screens.

評價

2020年11月16日
It is a very useful plugin to use with Facetwp and the map plugin
2016年9月3日
does what it says very well. awesome contribution!
2016年9月3日
Light weight and allows us to select which post types the box should appear on. Great! Thanks for providing us with this plugin for free.
閱讀全部7個評價

貢獻者及開發者

“Address Geocoder” 是一個開源的軟體。以下的人對這個外掛作出了貢獻。

貢獻者

Address Geocoder 外掛目前已有 1 個本地化語言版本。 感謝所有譯者為這個外掛做出的貢獻。

將 Address Geocoder 外掛本地化為台灣繁體中文版。

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄

修改日誌

1.0.1

  • Tested compatibility against WP 5.1

1.0

  • Better meta box handling (props @burkeshartsis)
  • Draggable marker (props @burkeshartsis)
  • Various fixes and improvements

0.9.2

  • Minor cleanup
  • Added new icon and banner to wordpress.org plugins page

0.9.1

  • Tested compatibility against WP 4.4

0.9

  • A Google Maps API key is now required. Go to Settings > Address Geocoder to set your Google Maps API key.