Maps with Windows Forms

I am creating a C # / Winforms application that requires maps (Google maps, Bing maps, etc.). But I'm terribly confused by ToU (licensing) - non-commercial use, etc.

My questions:

  • Which provider of mappings do you offer (preferably for free) for embedding with the winforms application for commercial purposes.

  • Which mapping provider would you recommend if the application is "disconnected", i.e. cannot receive fragments from the map server.

  • Google Earth seemed pretty promising until I read in the Non-Commercial Use Disclaimer, do you know if this will be resolved by purchasing a license? Any commercial alternatives?

+6
source share
3 answers
  • For a Windows application, try looking for OpenStreetMap to integrate Windows forms using a browser control

  • For a standalone solution, you will need map data. One of the most used map data is Shapefiles, which is an ESRI standard, you can download OpenStreetMap data and convert it to Shapefiles, and then import it into your application. There is an open source project that uses Shapefiles to display maps and other GIS features. namely, SharpMap and DotSpatial (both are .Net implementations)

  • You can search Google Earth Pro and try NASA's World Wind (which is free)

+6
source

This is excellent, you can check different providers and choose the one that meets both legal and technical requirements: Great maps for Windows Forms and presentations

Just download the code and watch the demo!

0
source

Try this code using a web browser this code to get the direction between two locations

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()); 
0
source

Source: https://habr.com/ru/post/901505/


All Articles