
內容簡介
Address Geocoder 外掛可讓您將經緯度附加到您的文章、頁面和自訂文章類型中。在編輯畫面上,只需在 metabox 中輸入地址並點擊"Geocode"。
此外掛程式使用 Google Maps API v3 將地址轉換成經度/緯度座標,需使用 Google Maps API 金鑰。
常見問題解答
如何檢索座標?
在迴圈中使用以下函數來存取您的資料,將文章 ID 傳遞為參數。若要取得完整座標(在方括號中):
<?php echo get_geocode_latlng( $post->ID ); ?>
若要取得經度:
<?php echo get_geocode_lat( $post->ID ); ?>
若要取得緯度:
<?php echo get_geocode_lng( $post->ID ); ?>
若要取得地址:
<?php echo get_geocode_address( $post->ID ); ?>
外掛標籤
開發者團隊
原文外掛簡介
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):
ID ); ?>
For the Latitude:
ID ); ?>
For the Longitude:
ID ); ?>
For the Address:
ID ); ?>
