Gmaps tips

Solo disponible en BuenasTareas
  • Páginas : 4 (976 palabras )
  • Descarga(s) : 0
  • Publicado : 4 de septiembre de 2012
Leer documento completo
Vista previa del texto
marker en el servidor

Code.aspx



--------------------------------------------------------------------------------
Code.aspx.cs
protected void Page_Load(object sender, EventArgs e){
if (!Page.IsPostBack)
{
GMap1.addControl(new GControl(GControl.preBuilt.LargeMapControl));
GMap1.addControl(new GControl(GControl.preBuilt.MapTypeControl));
}}

protected string GMap1_Click(object s, GAjaxServerEventArgs e)
{
GMarker marker = new GMarker(e.point);

GInfoWindow window = new GInfoWindow(marker,
string.Format(@"GLatLngBounds
SW = {0}
NE = {1}
",
e.bounds.getSouthWest().ToString(),
e.bounds.getNorthEast().ToString())
, true);

returnwindow.ToString(e.map); }

protected string GMap1_MarkerClick(object s, GAjaxServerEventArgs e)
{
return string.Format("alert('MarkerClick: {0} - {1}')", e.point.ToString(), DateTime.Now);
}protected string GMap1_MoveStart(object s, GAjaxServerEventArgs e)
{
return "document.getElementById('messages1').innerHTML= 'MoveStart at " + e.point.ToString() + " - " +DateTime.Now.ToString() + "';";
}

protected string GMap1_MoveEnd(object s, GAjaxServerEventArgs e)
{
return "document.getElementById('messages2').innerHTML= 'MoveEnd at " + e.point.ToString() + " - " +DateTime.Now.ToString() + "';";
}

protected string GMap1_DragStart(object s, GAjaxServerEventArgs e)
{
GMarker marker = new GMarker(e.point);
GInfoWindow window = newGInfoWindow(marker, "DragStart - " + DateTime.Now.ToString(), false);
return window.ToString(e.map);
}

protected string GMap1_DragEnd(object s, GAjaxServerEventArgs e)
{
GMarker marker = newGMarker(e.point);
GInfoWindow window = new GInfoWindow(marker, "DragEnd - " + DateTime.Now.ToString(), false);
return window.ToString(e.map);
}

protected string GMap1_ZoomEnd(object...
tracking img