2011-11-15 43 views
6

我正在構建需要地圖(Google地圖,Bing地圖等)的C#/ Winforms應用程序。但我用頭(牌)非常困惑 - 非商業性使用等帶有Windows窗體應用程序的地圖

我的問題:

  1. 什麼映射的供應商將你的建議(最好是免費的),與WinForms應用程序嵌入,爲商業目的。

  2. 如果應用程序處於「離線」狀態,即無法從映射服務器獲取切片,您會推薦使用哪種貼圖提供程序。

  3. Google地球似乎很有希望,直到我閱讀ToU的非商業用途條款,您是否知道通過購買許可證是否可以放棄?任何商業選擇?

回答

6
  1. 對於Windows應用程序,請嘗試使用瀏覽器控制

  2. 對於離線解決方案,您將需要的地圖數據尋找OpenStreetMap Windows窗體的整合。最常用的地圖數據格式之一是ESRI標準的Shapefiles,您可以下載OpenStreetMap數據並將其轉換爲Shapefile,然後您可以將它們導入到您的應用程序中。有開源項目正在使用Shapefiles進行地圖渲染和其他GIS功能。即SharpMap中和DotSpatial(兩者都是.NET實現)

  3. 您可以從美國航空航天局(這是免費的)搜索谷歌地球專業版,也儘量世界風

+0

我也寫一篇博客文章也得到方向:https://habiboncoding.wordpress.com/2015/04/ 24 /離線映射功能於Windows的應用程序 - 使用-C / – Habib

0

試試這個代碼中使用Web瀏覽器控件 這個代碼之間的兩個位置

System.Text.StringBuilder queryaddress = new System.Text.StringBuilder(); 
string sStreet = string.Empty; 
string sCity = string.Empty; 
string sState = string.Empty; 
string sPincode = string.Empty; 
string sProvider_no = string.Empty; 
queryaddress.Append("https://www.google.com/maps/dir/"); 

if (!string.IsNullOrEmpty(txtprovider_no.Text)) { 
    sProvider_no = txtprovider_no.Text.Replace(" ", "+"); 
    queryaddress.Append(sProvider_no + "," + "+"); 
} 
if (!string.IsNullOrEmpty(txtState.Text)) { 
    sState = txtState.Text.Replace(" ", "+"); 
    queryaddress.Append(sState + "," + "+"); 
} 
if (!string.IsNullOrEmpty(txtCity.Text)) { 
    sCity = txtCity.Text.Replace(" ", "+"); 
    queryaddress.Append(sCity + "," + "+"); 
} 
if (!string.IsNullOrEmpty(txtPincode.Text)) { 
    sPincode = txtPincode.Text.Replace(" ", "+"); 
    queryaddress.Append(sPincode); 
} 

queryaddress.Append("/"); 
sStreet = string.Empty; 
sCity = string.Empty; 
sState = string.Empty; 
sPincode = string.Empty; 
if (!string.IsNullOrEmpty(txtlindmark.Text)) { 
    sStreet = txtlindmark.Text.Replace(" ", "+"); 
    queryaddress.Append(sStreet + "," + "+"); 
} 
if (!string.IsNullOrEmpty(txtclient_city.Text)) { 
    sCity = txtclient_city.Text.Replace(" ", "+"); 
    queryaddress.Append(sCity + "," + "+"); 
} 
if (!string.IsNullOrEmpty(ttxtclient_city.Text)) { 
    sPincode = ttxtclient_city.Text.Replace(" ", "+"); 
    queryaddress.Append(sPincode); 
} 
if (!string.IsNullOrEmpty(txtclient_state.Text)) { 
    sState = txtclient_state.Text.Replace(" ", "+"); 
    queryaddress.Append(sState + "," + "+"); 
} 


WBR.Navigate(queryaddress.ToString());