Hello everyone i am having trouble with map tip.
<esri:GraphicsLayer ID="gpoly" MinimumResolution="0" MaximumResolution="10" >
<esri:GraphicsLayer.MapTip >
<Border BorderBrush="DarkGray" CornerRadius="1" BorderThickness="10" Background="White" Margin="0" >
<StackPanel Orientation="Vertical">
<TextBlock Margin="0,0,0,0" Text="{Binding [LOCNAME]}" FontWeight="Bold" FontSize="14"></TextBlock>
<TextBlock Margin="0,15,5,5">
<Run Text="No. of projects: "/>
<Run Text="{Binding [CNT]}" FontWeight="Bold"/>
</TextBlock>
</StackPanel>
</Border>
</esri:GraphicsLayer.MapTip>
</esri:GraphicsLayer>
It is working fine all the time but whenever i do spacial search it s stop appearing in text search it is working fine.
Please let me know where i am making mistake here is code of that graphics
if (graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.Type"].ToString().ToUpper() == "P")
{
gsearchpoint.Opacity = 1;
gsearch = new Graphic();
gsearch = fpoint.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString()));
gglseach = new Graphic();
if (gsearch != null)
{
gglseach.Geometry = gsearch.Geometry;
gglseach.Attributes.Add("LOCATION_ID", int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString()));
gglseach.Symbol = layoutroot.Resources["searchpoint"] as ESRI.ArcGIS.Client.Symbols.MarkerSymbol;
gsearchpoint.Graphics.Add(gglseach);
}
}
else
{
gsearchline.Opacity = 1;
gsearch = new Graphic();
gsearch = fline.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString()));
gglseach = new Graphic();
if (gsearch != null)
{
gglseach.Geometry = gsearch.Geometry;
gglseach.Attributes.Add("LOCATION_ID", int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString()));
gglseach.Symbol = layoutroot.Resources["searchline"] as ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol;
gsearchline.Graphics.Add(gglseach);
}
}
cnt = totalfeature.Features.Count(gtt => gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] != null && (int)gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString()));
gglseach.Attributes.Add("CNT", cnt);
gglseach.Attributes.Add("LOCNAME", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_NAME"].ToString().ToUpper());
gglseach.Attributes.Add("LOCADDRESS", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_ADDY"].ToString().ToUpper());
gglseach.Attributes.Add("LOCCITY", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_CITY"].ToString().ToUpper());
gglseach.Attributes.Add("LOCSTATE", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_STATE"].ToString().ToUpper());
gglseach.Attributes.Add("LOCZIP", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_ZIP"].ToString());
It is working fine if i am not updating my feature layer's geometry but it stop working if i update my feature layer's geometry.and feature layer is different than my graphical layer.
Please help,
Thanks
Foram