VDS Technologies

 

Select multiple feature from multiple layers.

11/21/2017 7:27:20 AM
Total Posts 6

Select multiple feature from multiple layers.

hi,

How to select multiple features though rectangle tool from multiple layers and get selected information of each selected features.

11/27/2017 4:27:18 AM
MVP
Total Posts 326

Re: Select multiple feature from multiple layers.

It is neccesary to make a request to each layer:

 

    protected void map_RectangleTool(object sender, AspMap.Web.RectangleToolEventArgs e)
    {

        foreach (AspMap.Layer layer in map)
        {
            AspMap.Recordset records = layer.SearchShape(e.Rectangle, SearchMethod.Inside);

            if (!records.EOF)
            {
                // create a DataGrid(or other grid control) for each layer and set its DataSource property

                //dataGrid.DataSource = records;
                //dataGrid.DataBind();
                //dataGrid.Caption = records.Layer.Name.ToUpper();
            }

        }
    }