Hi,
I am trying to display cloudpopup on mapclick . My map doesnot get updated with click event. Can someone tell me why this is happening? Is there a way to update a map on serverside like Map.refresh / Map.update?
Given below is my code;
protected void Map1_Click(object sender, MapClickedEventArgs e)
{
PointShape clickPosition = e.Position;
SetCloudPopUp(e);
Map1.MapBackground.BackgroundBrush = new GeoSolidBrush(GeoColor.SimpleColors.BrightYellow);
}
private static void SetCloudPopUp( MapClickedEventArgs e )
{
CloudPopup popUp ;
if (Map1.Popups.Count == 0)
{
popUp = new CloudPopup("PopUp", e.Position, string.Empty);
popUp.AutoSize = true;
popUp.HasCloseButton = true;
popUp.AutoPan = true;
Map1.Popups.Add(popUp);
}
else
{
popUp = (CloudPopup) Map1.Popups["popUp"];
popUp.Position = e.Position;
}
StringBuilder contHtml = new StringBuilder();
contHtml.Append("")
.Append("This is a test string")
.Append("");
popUp.ContentHtml = contHtml.ToString();
}
Any Ideas?
Thanks in advance.
Prava