我不知道是否會有一些API或Web服務,給定經度和緯度,給我一個附近感興趣的名勝名稱列表(coul'd餐廳,酒店等)。我一直在搜索谷歌,我發現沒有什麼有趣的。返回一個JSON對象的東西將會很棒;)獲取附近的景點,給定經度,緯度和半徑
回答
Koordinates有一個用於緯度/空間查詢任意空間數據集的API。響應可以是XML,JSON或JSONP。對於信息看到這個頁面:
-
:
- http://koordinates.com/layers/category/poi/
例如,任何這裏列出的興趣點(POI)層的點可以用緯度,經度和搜索半徑查詢
您可以上傳和使用自己的數據,免費的,所以如果你發現您可以添加更適合您的位置的一組數據。
- 編輯:例如,首先評論後的詳細信息 -
對古巴來說,你需要找到/創建自己的興趣數據集的點 - 例如,也許搶OpenStreetMap的一個子集您所在地區的數據。基本上你需要找到/創建一個Shapefile點數據集來上傳。
一旦你完成了,你可以使用上面鏈接的矢量API。例如,在新西蘭,我們必須通過Zenbu提供了良好的POI層:
使用矢量API在一定半徑範圍內搶特點。例如。我(粗糙)的位置,我可以打這個端點的公里範圍內找到10個最近點(使用我爲這個答案生成的密鑰,您可以免費創建自己的API密鑰。):
的迴應是這樣的:
{
"vectorQuery": {
"layers": {
"1225": {
"crs": {"type": "name", "properties": {"name": "EPSG:4326"}},
"field_names": ["ID", "NAME", "TAGS", "WEBSITE", "ADDRESS", "PHONE", "HOURS", "CATEGORIES", "CREATED_AT", "UPDATED_AT"],
"type": "FeatureCollection",
"features": [
{"distance": 49, "type": "Feature", "properties": {"WEBSITE": null, "NAME": "Harrier Exports Ltd", "TAGS": null, "CREATED_AT": "2007-07-06 14:12:35", "UPDATED_AT": "2007-07-06 14:12:35", "HOURS": null, "PHONE": "09 369 5475", "ADDRESS": "28 Heather Street, Parnell, Auckland", "ID": 1106637.0, "CATEGORIES": null}},
{"distance": 53, "type": "Feature", "properties": {"WEBSITE": "http://www.asics.co.nz", "NAME": "Brittain Wynyard & Co Ltd", "TAGS": null, "CREATED_AT": "2007-07-06 14:05:02", "UPDATED_AT": "2007-07-06 14:05:02", "HOURS": "Mon-Fri 0630-1730", "PHONE": "09 309 0519", "ADDRESS": "Britwyn Building, 22 Heather Street, Parnell, Auckland", "ID": 1102514.0, "CATEGORIES": null}},
{"distance": 74, "type": "Feature", "properties": {"WEBSITE": "http://www.stagecoach.co.nz/thelink/", "NAME": "Link Bus - Parnell bus stop: Cracroft Street (to city)", "TAGS": "Link Bus Stagecoach Parnell", "CREATED_AT": "2007-03-12 20:27:36", "UPDATED_AT": "2007-03-12 20:44:58", "HOURS": null, "PHONE": null, "ADDRESS": "81 Parnell Rise", "ID": 1094917.0, "CATEGORIES": "BusStation"}},
{"distance": 76, "type": "Feature", "properties": {"WEBSITE": "http://www.thorburn.co.nz", "NAME": "Thorburn Consultants Limited", "TAGS": "Engineering consultants", "CREATED_AT": "2007-03-13 12:49:21", "UPDATED_AT": "2007-03-13 12:49:21", "HOURS": null, "PHONE": "(09) 309 5339", "ADDRESS": "81 Parnell Rise, Parnell, Auckland", "ID": 1095258.0, "CATEGORIES": "Store"}},
{"distance": 81, "type": "Feature", "properties": {"WEBSITE": "http://www.wspa.org.nz", "NAME": "WSPA New Zealand", "TAGS": null, "CREATED_AT": "2007-07-06 14:35:53", "UPDATED_AT": "2007-07-06 14:35:53", "HOURS": null, "PHONE": "09 309 3901", "ADDRESS": "Level 1, 18 Heather Street, Parnell, Auckland", "ID": 1116272.0, "CATEGORIES": null}},
{"distance": 82, "type": "Feature", "properties": {"WEBSITE": "http://www.orangerealty.co.nz", "NAME": "Orange Realty", "TAGS": "Commercial & Industrial Property Management", "CREATED_AT": "2008-08-28 10:49:15", "UPDATED_AT": "2008-08-28 10:49:15", "HOURS": null, "PHONE": "09 377 4747", "ADDRESS": "18 Heather Street", "ID": 1132373.0, "CATEGORIES": null}},
{"distance": 87, "type": "Feature", "properties": {"WEBSITE": "http://www.absolutesound.co.nz", "NAME": "Absolute Sound", "TAGS": "Custom home theatre and audio installers", "CREATED_AT": "2007-03-13 12:46:02", "UPDATED_AT": "2007-03-13 12:46:02", "HOURS": null, "PHONE": "(09) 307 0898", "ADDRESS": "75 Parnell Rise, Parnell, Auckland", "ID": 1094926.0, "CATEGORIES": "Store"}},
{"distance": 87, "type": "Feature", "properties": {"WEBSITE": "http://www.audiovisualsolutions.co.nz", "NAME": "Audio Visual Solutions Ltd", "TAGS": null, "CREATED_AT": "2007-03-13 12:46:18", "UPDATED_AT": "2007-03-13 12:46:18", "HOURS": null, "PHONE": "(09) 302 2271", "ADDRESS": "75 Parnell Rise, Parnell, Auckland", "ID": 1094953.0, "CATEGORIES": null}},
{"distance": 87, "type": "Feature", "properties": {"WEBSITE": "http://www.petergilbert.com", "NAME": "Peter Gilbert Ltd", "TAGS": null, "CREATED_AT": "2007-07-06 14:23:33", "UPDATED_AT": "2007-07-06 14:23:33", "HOURS": null, "PHONE": "09 302 2271", "ADDRESS": "75 Parnell Rise, Parnell, Auckland", "ID": 1111467.0, "CATEGORIES": null}},
{"distance": 105, "type": "Feature", "properties": {"WEBSITE": "http://www.stagecoach.co.nz/thelink/", "NAME": "Link Bus - Parnell bus stop: Fraser Park (to Newmarket)", "TAGS": "Link Bus Stagecoach Parnell", "CREATED_AT": "2007-03-12 20:28:07", "UPDATED_AT": "2007-03-12 20:45:14", "HOURS": null, "PHONE": null, "ADDRESS": "89 Parnell Rise", "ID": 1094918.0, "CATEGORIES": "BusStation"}}
]
}
}
}
}
谷歌提供了一個Places API你可以用它來做出這樣的請求。看看here看看如何獲得附近的地方名單。
我試圖使用谷歌地圖,但我住在古巴,我無法訪問這項服務,因爲我的國家是由美國批准的;) –
Simplegeo是一個衆所周知的服務。閱讀更多關於它的地方:https://simplegeo.com/docs/api-endpoints/simplegeo-places
SimpleGeo被Urban Airship收購,他們正在結束地方服務。見http://urbanairship.com/blog/2012/01/12/update-on-our-plan-to-integrate-location-and-context-services-into-our-push-messaging-platform/ – Hamish
- 1. 緯度和經度半徑
- 2. 從給定點和半徑計算經度和緯度
- 3. Bing WPF半徑經度和緯度點
- 4. 如何計算給定點(經度,緯度)給定半徑內的所有點(經度,緯度)?
- 5. 多個緯度/經度點的半徑
- 6. 獲取給定半徑(米)和位置的最大經度和緯度
- 7. (緯度,經度)從半徑
- 8. 參照特定的經度和緯度獲取半徑50英里處的經度和緯度
- 9. 從給定的緯度,經度和半徑值中查找java中的最大和最小緯度和緯度
- 10. 附近地點的經緯度位置
- 11. 獲得最近的緯度和經度
- 12. 如何獲取給定最小和最大經緯度的半徑?
- 13. 如何從緯度/經度獲取附近的位置?
- 14. 獲取緯度/經度附近的郵政編碼列表
- 15. 獲取緯度和經度
- 16. 獲取經度和緯度
- 17. 附近信息由緯度/經度
- 18. 近緯度經緯度
- 19. 獲取經緯度給出一個點
- 20. R - 在給定的半徑內找到最近的鄰近點和鄰居數,座標經緯度爲
- 21. 獲取給定經緯度的大陸
- 22. 在給定半徑和中心的圓中查詢OrientDB的緯度 - 經度對
- 23. 獲取基於給定名稱的經度和緯度的API
- 24. GeoAlchemy2:獲取緯度,經度點的
- 25. 如何排序距離給定點(經度和緯度)最近的點列表?
- 26. 根據當前在servlet中的位置獲取附近的經度和緯度
- 27. 顯示距離用戶緯度和經度1km半徑最近的地方
- 28. 獲取最近手機的緯度和經度
- 29. Rails和ActiveRecord - 經緯度最近點
- 30. 獲取距離給定的緯度和經度在5km範圍內的緯度和緯度
這似乎是一個很大的幫助,但我有點迷失在文檔中,例如,我會給出這個經度和緯度: http://koordinates.com/ search/?q=#@nc=&z=19&c=23.14189%2C-82.35087&e=&f=&mt=MAP 獲取距離2公里遠的地方列表。在這種情況下,我們想給我盧斯卡瓦列羅公園,克里斯托瓦爾科隆紀念碑,哈瓦那大教堂...... –
查看上面的內容。 – Hamish
謝謝,我在上面!:D –