When I follow your example in SelectFeaturesModeApp.aspx/.cs and I click on the image the FeatureInfos is always null.
.aspx
< asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="./images/info.ico"
AlternateText="Identify"
CssClass="imgbtn"
Style="position: relative" OnClick="Lnkinfo_Click" />
< font face="Lucida Sans Unicode, Verdana" size="1">
< asp:linkbutton id="Lnkinfo" runat="server" onclick="Lnkinfo_Click">Identify</asp:linkbutton>< /font>
.cs
Created Map1 Events for SelectFeatures and SelectMapShapes
Button or Image click
protected void Lnkinfo_Click(object sender, EventArgs e)
{
Map1.Mode = Map.ModeType.SelectFeatures;
}
protected void Lnkinfo_Click(object sender, ImageClickEventArgs e)
{
Map1.Mode = Map.ModeType.SelectFeatures;
}
Select:
protected void Map1_SelectFeatures(FeatureInfo[] FeatureInfos)
{
//Get the Feature(s) selected from the Map
if (FeatureInfos != null)
{
mFeatureInfos = new FeatureInfo[FeatureInfos.Length];
Session["mFeatureInfos"] = FeatureInfos;
}
Update the listboxes with the feature Information.
UpdateInfoForm(FeatureInfos);
}
|