473,487 Members | 2,601 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Display Google Map in Windows Form

14 New Member
I have to display google maps in a windows form.
I managed to display the map in the form like this link:
http://maps.google.ro/maps?q=N45.447...53418&t=m&z=16

but i have to display only the frame with the map in the form..not the whole page.
can someone give me an idea or a piece of code?
Jun 1 '12 #1
3 20929
madankarmukta
308 Contributor
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.
Jun 1 '12 #2
ucu13
14 New Member
Expand|Select|Wrap|Line Numbers
  1.  public partial class GoogleMap : Form
  2.     {
  3.         MeasuringPointDetail measuringPointDetail = new MeasuringPointDetail();
  4.         public string Lat = "";
  5.         public string Long = "";
  6.         public GoogleMap()
  7.         {
  8.             InitializeComponent();
  9.         }
  10.  
  11.         private void GoogleMap_Load(object sender, EventArgs e)
  12.         {
  13.             if (Lat == string.Empty || Long == string.Empty)
  14.             {
  15.                 this.Dispose();
  16.             }
  17.  
  18.             try
  19.             {
  20.                 StringBuilder queryAddress = new StringBuilder();
  21.                 queryAddress.Append("http://maps.google.com/maps?q=");
  22.  
  23.                 if (Lat != string.Empty)
  24.                 {
  25.                     queryAddress.Append(Lat + "%2C");
  26.                 }
  27.  
  28.                 if (Long != string.Empty)
  29.                 {
  30.                     queryAddress.Append(Long);
  31.                 }
  32.  
  33.                 webBrowser1.Navigate(queryAddress.ToString());
  34.             }
  35.             catch (Exception ex)
  36.             {
  37.                 MessageBox.Show(ex.Message.ToString(), "Error");
  38.             }
  39.         }
  40.     }
Jun 1 '12 #3
madankarmukta
308 Contributor
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.

http://gglgeo.codeplex.com/wikipage?...Form%20Control

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.
Jun 4 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
324
by: Dayne | last post by:
Briefly this is my problem . I created a windows form on a "parent thread" .. then I called a child thread 1 to make it visible then hide it on that same thread .. then kill child thread 1 ......
3
5897
by: Ken | last post by:
I have a database called autographs.mdb that is in the "XYZ" folder in the "database" folder. I have a form in the database that I want to display a photo of the celeb on. The photos are in a...
4
3970
by: Jeff Griffin | last post by:
OK, this should be my last question for the day. I have spent a couple hours on google trying to figure this out but I probibly just dont know what I really need to be searching for. I have a...
1
3370
by: Paige W. | last post by:
I have added a mainmenu object to my windows form and would like to display an MRU list on it. Is there an easy way? or do I have to do it programatically? Can anyone point me to a good tutorial....
2
1222
by: mazignan | last post by:
Salve a tutti , avrei bisogno di visualizzare una email in HTML in una windows form . C'è qualche controllo che mi permette di farlo ? Grazie e Buon lavoro
5
1399
by: fernandez.dan | last post by:
Hi My question is how to change the view of my windows form. What I want to do is in my Windows Form is first ask the user some questions, when the user is done she pushes a button called next....
5
8609
by: bob lambert | last post by:
Hi, I have a vb .net std 2002 windows form app and wanted to use keyboard shortcuts (& in text property input) It shows up on the design view, but when I build (in debug mode) and display the...
3
2063
by: saravanancse | last post by:
Can Any One Help Me....... How to display a Windows Form into Html page? I used Html Syntax <a href="that vb file name">file</a> But its shows only a coding,its doesn't show...
4
2407
by: =?Utf-8?B?TWlrZVM=?= | last post by:
Why does my code window NOT display the "Windows Form Designer generated code" section? This was always there in 2003 but only certain programs have it in 2005, or else I can't figure out how to...
7
9331
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4874
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.