Maps with Windows Forms application
Asked Answered
R

3

8

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

My questions:

  1. What mapping provider would you suggest (preferably free) to embed with a winforms application, for commercial purposes.

  2. What mapping provider would you recommend if the app is "offline" i.e. cannot get tiles from a mapping server.

  3. Google Earth seemed quite promising until I read in the ToU of non-commercial use only clause, would you know if that is waivable through purchase of a license? Any commercial alternatives?

Reduplicative answered 15/11, 2011 at 12:32 Comment(0)
F
7
  1. For Windows application, try looking for OpenStreetMap for windows form integration using a browser control

  2. For offline solution you will require map data. One of the most used map data format is Shapefiles which is an ESRI standard, you can download OpenStreetMap data and convert it to Shapefiles and then you can import them in your application. There are open source project which are using Shapefiles for map rendering and other GIS functionalities. namely SharpMap and DotSpatial (Both are .Net implementation)

  3. You can search for Google Earth Pro, also try World Wind from NASA (which is free)

Fulbright answered 15/11, 2011 at 12:53 Comment(1)
I have also written a blog post about it: habiboncoding.wordpress.com/2015/04/24/…Fulbright
R
0

This is excellent, you can check different providers and select one that meets both legal and tech requirenments: Great Maps for Windows Forms & Presentation

Just download code and check out the demo!

Roussel answered 31/1, 2014 at 12:43 Comment(0)
R
0

Try This Code Using Web browser control this code to get direction between two location

   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());
Retiarius answered 10/12, 2014 at 7:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.