Use google map in asp.net application
This resource explains as how to use the GoogleMap API in Asp.Net webforms. I have developed a User control for this so that the GoogleMap can be easily integrated with the Asp.Net.By using this you can integrate the Google map and use different methods like getdirection, Traffic signals etc. Learn how to use Google map in asp.net application
How to use Google map in asp.net application
I have developed a user control which contains the Google map related stuffs. So that you can easily integrate the GoolgeMap API in your Asp.Net application without much strain.
Follow the below steps to use this
You must specify Google Map API Key for this component. You can obtain this key from http://code.google.com/apis/maps/signup.html.
if (!IsPostBack)
{
GoogleMapIntegration.GoogleMapObject.APIKey = "";
GoogleMapIntegration.GoogleMapObject.Width = "800px";
GoogleMapIntegration.GoogleMapObject.Height = "600px";
GoogleMapIntegration.GoogleMapObject.CenterPoint= new GooglePoint("CenterPoint", 43.66619, -79.44268);
GoogleMapIntegration.GoogleMapObject.Points.Add(new GooglePoint("1", 40.65669, -78.45278));
GoogleMapIntegration.GoogleMapObject.Points.Add(new GooglePoint("1", 47.65669, -75.45278));
GoogleMapIntegration.GoogleMapObject.ShowTraffic = true;
GoogleMapIntegration.GoogleMapObject.Directions.ShowDirectionInstructions= true;
You can also use to get direction between addresses as
GoogleMapIntegration.GoogleMapObject.Directions.ShowDirectionInstructions = chkShowDirections.Checked;
GoogleMapIntegration.GoogleMapObject.Directions.HideMarkers = chkHideMarkers.Checked;
GoogleMapIntegration.GoogleMapObject.Directions.PolylineColor = txtDirColor.Text;
GoogleMapIntegration.GoogleMapObject.Directions.PolylineWeight = int.Parse(txtDirWidth.Text);
GoogleMapIntegration.GoogleMapObject.Directions.PolylineOpacity = double.Parse(txtDirOpacity.Text);
//Provide addresses or postal codes in following lines
GoogleMapIntegration.GoogleMapObject.Directions.Addresses.Clear();
GoogleMapIntegration.GoogleMapObject.Directions.Addresses.Add(txtFirstAddress.Text);
GoogleMapIntegration.GoogleMapObject.Directions.Addresses.Add(txtSecondAddress.Text);
GoogleMapIntegration.GoogleMapObject.Directions.Addresses.Add(txtThirdAddress.Text);
So by this user control you can use the above methods to point the google map.
You can also change the image of the Mapper.
Hope this helps!!!
Regards,
S.Rajeswari,
Application Engineer,
Steadfast technologies
Hi Rajeshwari,
Please check and update your post once.
In this post,Content Posted repeatedly and
Where is the Zip file?