Display Google Map in Windows Form
Collapse
X
-
Could you please put in your current code snippet for displaying the Map on the form.
Perhaps, this may help to resolve your problem ASAP. -
Code:public partial class GoogleMap : Form { MeasuringPointDetail measuringPointDetail = new MeasuringPointDetail(); public string Lat = ""; public string Long = ""; public GoogleMap() { InitializeComponent(); } private void GoogleMap_Load(object sender, EventArgs e) { if (Lat == string.Empty || Long == string.Empty) { this.Dispose(); } try { StringBuilder queryAddress = new StringBuilder(); queryAddress.Append("http://maps.google.com/maps?q="); if (Lat != string.Empty) { queryAddress.Append(Lat + "%2C"); } if (Long != string.Empty) { queryAddress.Append(Long); } webBrowser1.Navigate(queryAddress.ToString()); } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Error"); } } }
Comment
-
Hi,
Not really aware of how to display the Map which is restricted to the Frame dimentions in Winform.
But, yeah here is the optional way you can look at. Please follow the link.
The sample reveals the use of Satic Google Maps Winform control.The set to the Height and width would refrain the Map getting display throughout the page.Comment
Comment