473,699 Members | 2,737 Online
Bytes | Software Development & Data Engineering Community
+ 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 20949
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 ... then try to make the form visible on child thread 2 .. However, the form will not display either on child thread 2 or "parent thread" ... Any idea why this is? Please help DT
3
5918
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 "graphics" folder that is on the same level as the "xyz" folder. The only way I can seem to make it work is to put the entire path including hard drive in the table (c:\database\graphics\photo.jpg). But I also want to upload the database to the web...
4
3978
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 Windows Form program that calls a web service that will return (as a string) the full url to an image hosted on an external webserver. My question is how do I then display this image in my form, or is this even possible. It seems like it should be...
1
3392
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. Thanks for the help. Paige W.
2
1228
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
1408
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. Based on the input from the user, I would display the appropriate view on the form. I just don't how to do this. Should I create two panels(panel1 and
5
8625
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 form for use, the characters that are ampersanded do not show up underlined and the keyboard shortcut does not work ?
3
2089
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 particular vb design page.. pls any one help me..
4
2420
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 display it. This is especially useful in seeing how to build controls using code. More specifically, I'm trying to build a "Menu Strip" using code and I can't seem to find any sample code to do this. Can anyone direct me to a site that has...
7
9365
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 display the Windows form. The form is being displayed but the command only returns when the form is closed. I want the command line to return immediately, leaving the form displayed.
0
8704
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9187
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9053
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7776
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5879
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4390
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2360
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2015
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.