Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. How to display Information window by clicking on the push pin in Google Maps in C#

How to display Information window by clicking on the push pin in Google Maps in C#

Scheduled Pinned Locked Moved C#
csharpasp-netsecurityhelptutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    ChandrakanthGaddam
    wrote on last edited by
    #1

    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

    L L 2 Replies Last reply
    0
    • C ChandrakanthGaddam

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • C ChandrakanthGaddam

        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

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        How to use PRE tags on CodeProject[^] :)

        Luc Pattyn [My Articles] Nil Volentibus Arduum

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups