I have a problem with the location of google maps in my C# winforms application.
I get always this message "You seem to be using an unsupported browser." By Internet explorer - Compatibility View I removed google.it and google.com but the problem persists.
The code I used is as follows:
private void Btn_Localizza_Click(object sender, EventArgs e)
{
string street = txt_IndirizzoAZ.Text;
string city = cbo_ComuneAZ.Text;
string state = cbo_StatoAZ.Text;
string zip = cbo_CapAZ.Text;
try
{
StringBuilder add = new StringBuilder("http://maps.google.com/maps?q=");
add.Append(street);
add.Append(city);
add.Append(state);
add.Append(zip);
webBrowser1.Navigate(add.ToString());
if (street != string.Empty) {add.Append(street + "," + "+");}
if (city != string.Empty) {add.Append(city + "," + "+");}
if (state != string.Empty) {add.Append(state + "," + "+");}
if (zip != string.Empty) { add.Append(zip + "," + "+"); }
webBrowser1.Navigate(add.ToString());
}
catch (Exception ex)
{
MessageBox.Show(ex.Message + " Si รจ verificato un errore durante la geolocalizzazione dell'azienda." +
" Contattare l'amministratore", "ERRORE", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}