
內容簡介
附近地點搜尋:此外掛整合了 Google Places 和 GMap。
顯示一個特定類型的地方列表,可從後臺進行配置,在指定的地點設置的半徑範圍內。
需求
Google Maps API 金鑰。
短碼
短碼:[nearby_places_search_code]
用法
在路徑 (wp-admin/options-general.php?page=searchsettings) 中配置地點搜索的設置。
在配置頁面中更改地點類型、中心點和中心點半徑。
複製短碼 [nearby_places_search_code],將其粘貼到您的頁面、文章或任何自定義的文章類型中。
配置設置
位置類型 —— 僅限選擇一個值的位置類型。
請參見 https://developers.google.com/places/documentation/supported_types
以獲得支援的類型。
預設值設為:Atm|Bank|Hospital|Park|Restaurant|School
Google API 驗證方法 —— 「API 金鑰」或「Google Maps API for Work」
根據選擇的方法添加「Google Maps API 金鑰」。
地點 —— 檢索位置信息的緯度/經度。
必須指定為緯度、經度。
預設值設為 18.5204, 73.8567 (印度馬哈拉施特拉邦普內市)
半徑 —— 定義要返回的地點結果的距離(以米為單位)。允許的最大半徑為 50000 米。預設設為 1000 米。
注意:默認配置值定義於「config/nearby_places_search_config.php」。
參考連結
https://developers.google.com/places/web-service/search#PlaceSearchRequests
外掛標籤
開發者團隊
原文外掛簡介
Nearby Places Search: This Plugin integrates with the Google Places and GMap.
Shows a list of places of a certain type and configurable from the back-end
settings within the specified radius for specified location.
Requirement
Google Maps API Key.
Shortcode
Shortcode : [nearby_places_search_code]
Usage
In path (wp-admin/options-general.php?page=searchsettings) configure the search settings for
places.
You can change the type of place, the center point and the radius from the
center point in the configuration page.
Copy the shortcode [nearby_places_search_code],Paste the Shortcode into Your Page , Post or any custom post type.
Configuration Settings
Location Types – Location Type is restricted to select only one value.
See https://developers.google.com/places/documentation/supported_types
for supported types.
Default values set as: Atm|Bank|Hospital|Park|Restaurant|School
Google API Authentication Method – ‘API Key’ or ‘Google Maps API for Work’
As per method selection add ‘Google Maps API Key’.
Location – The latitude/longitude around which to retrieve the information
of place. This must be specified as latitude,longitude.
Default value set to 18.5204, 73.8567 (Pune, Maharashtra, India).
Radius – Defines the distance (in meters) within which to return place
results. The maximum allowed radius is 50000 meters. Default set to 1000 meter.
Note : Default configuration value define at ‘config/nearby_places_search_config.php’
Reference link
https://developers.google.com/places/web-service/search#PlaceSearchRequests
