Click here to Skip to main content
15,879,096 members
Articles / Web Development / ASP.NET

Lat Lays Flat - Part 1 : A Google Maps .NET Control

Rate me:
Please Sign up or sign in to vote.
4.76/5 (69 votes)
17 Oct 20056 min read 906.6K   17.3K   258  
An ASP.NET server control wrapper for the Google Maps API.
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

using WCPierce.Web.UI.WebControls;

namespace TestWeb
{
	/// <summary>
	/// Summary description for Basics.
	/// </summary>
	public class InfoWindow : System.Web.UI.Page
	{
    protected GMap gMap;

		private void Page_Load(object sender, System.EventArgs e)
		{
      GPoint gp = new GPoint(-122.141944F, 37.441944F);
			gMap.CenterAndZoom(gp, 4);
      //gMap.OpenInfoWindow(gp, "document.createTextNode('Hello World')");
      gMap.OpenInfoWindowHtml(gp, "<b>Test</b>");
		}

		#region Web Form Designer generated code
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: This call is required by the ASP.NET Web Form Designer.
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);
		}
		#endregion
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions