Moving out a previous question into a seperate thread...
Does anybody have an idea about this?
How to pass an identification parameter from the server-side to the Annotation, which can be picked up by the client-side JavaScript?
For example, in the ServerSide code I might have:-
AnnotationImage img = new AnnotationImage("sunglasses.png");
HotSpotData hsd = new HotSpotData();
hsd.Name = "Jimbob";
hsd.Size = new SizeF((float)469, (float)169);
hsd.Fill.Image = img;
hsd.Fill.FillType = FillType.Texture;
HotSpotAnnotation annHotSpot = new HotSpotAnnotation(hsd);
And then in the JavaScript :-
atalaInitClientScript(
"OnPageLoad()");
function OnAnnotationClicked(e)
{
var clickedAnno = e.annotation;
switch( clickedAnno.getType() )
{
case "HotSpotData":
alert("clicked hotspot");
break;
default:
alert("unknown annotation type");
break;
}
}
function OnPageLoad()
{
wav.AnnotationClicked = OnAnnotationClicked;
}
The above would get me to the "clicked hotspot" alert box... but around that location, would there be a way of figuring out that the HotSpot Name was "Jimbob"? Or any other form of identification added at the serverside (though not the image filename, as in my case, they'll all be the same, being markers)?
Moo!