Displays an information window.


Namespace: AspMap.Web
Assembly: AspMapNET (in AspMapNET.dll)

Syntax

Visual Basic (Declaration)
Public Sub ShowInfoWindow( _ 
   ByVal value As InfoWindow _ 
)
C#
public void ShowInfoWindow(
   InfoWindow value
)
C++
public:
 void ShowInfoWindow(
   InfoWindow value
) sealed 
J#
public void ShowInfoWindow(
   InfoWindow value
)
JScript
public  function ShowInfoWindow(
   value : InfoWindow
)

Remarks

An InfoWindow can be displayed as a result of user interaction by the InfoWindow tool, a hotspot click, or a marker click.
This method allows you to display an InfoWindow programmatically.

Example

 Copy Code
void Page_Load(object sender, EventArgs e)
{
    AspMap.Point location = new AspMap.Point(2.35099, 48.85676);
    Map1.CenterAt(location);

    InfoWindow info = new InfoWindow(location);
    info.Content = "Paris, France";
    Map1.ShowInfoWindow(info);
}

void Map1_InfoTool(object sender, AspMap.Web.InfoToolEventArgs e)
{
    AspMap.Recordset records = map.Identify(e.InfoPoint, 5);
    if (!records.EOF)
    {
        DataGrid grid = new DataGrid();
        grid.DataSource = records;
        grid.DataBind();

        InfoWindow info = new InfoWindow(e.InfoPoint);
        info.Controls.Add(grid);

        Map1.ShowInfoWindow(info);
    }
}

See Also