C# 带有Windows窗体应用程序的地图
我正在构建一个C#/Winforms应用程序,它需要一个地图(谷歌地图、Bing地图等)。但我对ToU(许可证)-非商业用途等感到非常困惑 我的问题是:C# 带有Windows窗体应用程序的地图,c#,winforms,google-maps,bing-maps,google-earth,C#,Winforms,Google Maps,Bing Maps,Google Earth,我正在构建一个C#/Winforms应用程序,它需要一个地图(谷歌地图、Bing地图等)。但我对ToU(许可证)-非商业用途等感到非常困惑 我的问题是: 出于商业目的,您建议哪个映射提供商(最好是免费的)嵌入winforms应用程序 如果应用程序处于“脱机”状态,即无法从映射服务器获取磁贴,您会推荐哪个映射提供商 谷歌地球似乎很有希望,直到我在《非商业用途条款》中读到,你知道通过购买许可证是否可以放弃吗?有商业替代品吗 对于Windows应用程序,请尝试使用浏览器控件查找Windows窗体集成
这非常好,您可以检查不同的提供商,并选择一个同时满足法律和技术要求的提供商:
只需下载代码并查看演示 使用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());
我还为此写了一篇博文: