2012-08-08 118 views
0

我有一組經度和緯度值(和大地基準?)。我想用這些來獲得地名或城市。有沒有辦法在.NET中做到這一點?緯度和經度放置在.NET中的名稱或城市

感謝,

薩欽

+1

退房http://stackoverflow.com/questions/2702309/need-a-list-of-all-countries-in-the-world-with-a-longitude-and-latitude-coordin – 2012-08-08 11:10:51

+0

這就是關於回頭ntry名稱。我不想那樣,我需要城市名或地名。 – 2012-08-08 11:13:28

回答

1

這是反向地理編碼的名稱。有很多這樣的服務提供商。一個是谷歌。看看他們的開發人員部分:

Google Reverse Geocoding

您只需格式化所需的網址,並使用Net.WebClient下載JSON:

Using client As New Net.WebClient() 
    Return client.DownloadString(address) 
End Using 

然後,您將需要parse the Json數據提取街名

0

你將不得不使用Web服務。 Geonames就是這樣一個免費的資源。

+0

你如何從代碼中使用它? – 2012-08-08 11:11:47

+0

@SachinKainth他們有幾個客戶端庫:http://www.geonames.org/export/client-libraries.html – 2012-08-08 11:14:19

相關問題