Click here to Skip to main content
15,949,686 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

When i click a button i want to Display Google map with openinfowindow
Now its displaying without openinfowindow,
this is the code i am using in .cs file
C#
GooglePoint GP = new GooglePoint();
 GP.Address = txtAddress.Text;
 //GeocodeAddress() function will geocode address and set      Latitude and Longitude of GP(GooglePoint) to it's respected value.
 if (GP.GeocodeAddress(txtAPIKey.Text))
  {
     //Once GP is geocoded, you can add it to google map.
      GP.InfoHTML = GP.Address;
      //Set GP as center point.
      GoogleMapForASPNet1.GoogleMapObject.CenterPoint = GP;

       //Clear any existing
      GoogleMapForASPNet1.GoogleMapObject.Points.Clear();
       //Add geocoded GP to GoogleMapObject
       GoogleMapForASPNet1.GoogleMapObject.Points.Add(GP);
       GoogleMapForASPNet1.GoogleMapObject.ZoomLevel = 15;
       GoogleMapForASPNet1.GoogleMapObject.ShowDirections = true;
  }

Please help.
Thanks in advance

soumya
Posted
Updated 14-Dec-10 2:07am
v2
Comments
TweakBird 14-Dec-10 8:07am    
Edited code blocks. Please use <pre> tag for code blocks.

1 solution

You didn't add the code for opening info window some thing like below.
C#
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindow(address);

Try these

Using Google Maps API In ASP.NET[^]

Add information window on google map[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900