How to display Information window by clicking on the push pin in Google Maps in C#
-
Hi This is Chandra, presently working on GoogleMaps. Right now i can able to bind the langitude and latitude dynamically based on selection of country. That is multiple locations i can able to display in the map.Here my problem is i want to display information window when i click any one of the location. Please find my code below in C~ as well as Asp.net C# Code:- protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindInfo(); } } protected void bindInfo() { try { SqlConnection con = new SqlConnection("Data Source=xxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxx;Password=xxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetCountryNames"; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); ddlPostalCode.DataTextField = "Country"; ddlPostalCode.DataValueField = "Country"; ddlPostalCode.DataSource = ds.Tables[0]; ddlPostalCode.DataBind(); con.Close(); } catch (Exception x) { Response.Write(x.ToString()); } } private void GetLocation(string CName) { try { SqlConnection con = new SqlConnection("Data Source=xxxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxxx;Password=xxxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetLocationWiseInfo"; SqlParameter param = new SqlParameter(); param.ParameterName = "@Name"; param.Value = ddlPostalCode.SelectedItem.Text.ToString(); cmd.Parameters.Add(param); cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); con.Close(); BuildScript(ds); } catch (Exception x) { Response.Write(x.ToString()); } } public void BuildScript(DataSet tbl) { string Locations = ""; foreac
-
Hi This is Chandra, presently working on GoogleMaps. Right now i can able to bind the langitude and latitude dynamically based on selection of country. That is multiple locations i can able to display in the map.Here my problem is i want to display information window when i click any one of the location. Please find my code below in C~ as well as Asp.net C# Code:- protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindInfo(); } } protected void bindInfo() { try { SqlConnection con = new SqlConnection("Data Source=xxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxx;Password=xxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetCountryNames"; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); ddlPostalCode.DataTextField = "Country"; ddlPostalCode.DataValueField = "Country"; ddlPostalCode.DataSource = ds.Tables[0]; ddlPostalCode.DataBind(); con.Close(); } catch (Exception x) { Response.Write(x.ToString()); } } private void GetLocation(string CName) { try { SqlConnection con = new SqlConnection("Data Source=xxxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxxx;Password=xxxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetLocationWiseInfo"; SqlParameter param = new SqlParameter(); param.ParameterName = "@Name"; param.Value = ddlPostalCode.SelectedItem.Text.ToString(); cmd.Parameters.Add(param); cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); con.Close(); BuildScript(ds); } catch (Exception x) { Response.Write(x.ToString()); } } public void BuildScript(DataSet tbl) { string Locations = ""; foreac
How to show Sales data along with Latitude and Longitude pushpins in Google Maps in C# with Asp.Net[^]
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
-
Hi This is Chandra, presently working on GoogleMaps. Right now i can able to bind the langitude and latitude dynamically based on selection of country. That is multiple locations i can able to display in the map.Here my problem is i want to display information window when i click any one of the location. Please find my code below in C~ as well as Asp.net C# Code:- protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { bindInfo(); } } protected void bindInfo() { try { SqlConnection con = new SqlConnection("Data Source=xxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxx;Password=xxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetCountryNames"; cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); ddlPostalCode.DataTextField = "Country"; ddlPostalCode.DataValueField = "Country"; ddlPostalCode.DataSource = ds.Tables[0]; ddlPostalCode.DataBind(); con.Close(); } catch (Exception x) { Response.Write(x.ToString()); } } private void GetLocation(string CName) { try { SqlConnection con = new SqlConnection("Data Source=xxxx;Initial Catalog=Test;Persist Security Info=True;User ID=xxxx;Password=xxxx$;Connect Timeout=38000;pooling='true'; Max Pool Size=200"); con.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "GetLocationWiseInfo"; SqlParameter param = new SqlParameter(); param.ParameterName = "@Name"; param.Value = ddlPostalCode.SelectedItem.Text.ToString(); cmd.Parameters.Add(param); cmd.ExecuteNonQuery(); SqlDataAdapter da = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); da.Fill(ds); con.Close(); BuildScript(ds); } catch (Exception x) { Response.Write(x.ToString()); } } public void BuildScript(DataSet tbl) { string Locations = ""; foreac
How to use PRE tags on CodeProject[^] :)
Luc Pattyn [My Articles] Nil Volentibus Arduum