Pinhover not working correctly in 3D mode.
Hi,
I have the following code which works fine in 2D mode but when I switch to 3D mode and hover over a pin the event.srcElement object is undefined? Any one else having the same problem?
VEPushpin.ShowDetailOnMouseOver
=false;VEPushpin.OnMouseOverCallback
= PinHover;function PinHover(x, y, title, details)
{
var id=event.srcElement.parentNode.id;var pin= document.getElementById(id).data;alert("Pin-" + id);
}
function onPinLoad(pin)
{
pin.style.zIndex= 102;
pin.parentNode.style.zIndex= 102;
}
VEPushpin.prototype.GetContent=function()
{
var pinId=this.ID+"_"+this.m_vemap.GUID;
var content="<img onload='onPinLoad(this)' "+this.IconStyle+"' src='"+this.Iconurl+"' id='"+pinId+"' ";
var isTitleValid=this.Title!=null&&this.Title!="undefined"&&this.Title.length>0;
var isDetailsValid=this.Details!=null&&this.Details!="undefined"&&this.Details.length>0;
if(isTitleValid||isDetailsValid)
{
content+=" onmouseout='VEPushpin.Hide();' onmousedown='VEPushpin.Hide(true);' onmouseover='VEPushpin.Show(\""
+this.m_vemap.GUID
+"\",\""
+this.ID
+"\","
+this.LatLong.Latitude
+","+this.LatLong.Longitude;
if(isTitleValid)content+=", \""+escape(this.Title)+"\"";
else content+=",\"\"";
if(isDetailsValid)content+=", \""+escape(this.Details)+"\"";
else content+=",\"\"";
content+=",\""+this.TitleStyle+"\"";
content+=",\""+this.DetailsStyle+"\"";
content+=");' ";
}
//this adds the click event
content+=" onclick='PinOnClick("+this.ID+")'";
content+=" />";
return content;
}

