Keep PushPin's Details Balloon Open?

Hi,

Does anyone know how to keep a PushPin's detail balloon open

I have managed to programatically control the display of the balloon, but not how long it stays open. I am calling the VEPushpin.Show method to open the balloon from an onclick event (see below).

VEPushpin.Show(pin.m_vemap.GUID, pin.ID, pin.LatLong.Latitude, pin.LatLong.Longitude, escape(pin.Title), escape(pin.Details), pin.TitleStyle, pin.DetailsStyle);

It looks like maybe there is a setTimeout(eA, 500) call so that the balloon only stays open for a short time Is there some way to modify this

I would prefer to not have to write my own onMouseOver event for the pushpins and use the the built in VEPushpin.Show method if possible (both for my the pushpin onMouseOver event and for my onClick event).

Thanks,

Zach



Answer this question

Keep PushPin's Details Balloon Open?

  • Rharve

    do you want it to remain open forever then


  • tee_user5

    I'd start here, with some fine view source mojo from Dr Neil

    http://www.viavirtualearth.com/MyVirtualEarth/v3/dynamicpushpin.htm

    The key points from the source are

    VEPushpin.ShowDetailOnMouseOver = false; // turn off the default, roll your own
    VEPushpin.OnMouseOverCallback = PinHover; // js / css, however herein is your timeout...i wouldn't try recursion...imo

    Taking this one step further (although not recommended in a production site as the source js can change), one can go ahead and assert custom code inside of core functions like the example link here (just do a page search for onClick) -- attaching in your case an onmouseover event -- where you write your own timeout and drop the callback above all together. Might work..


  • Johanvh

    Yes, it should remain open until another onclick event closes it.

    I might have figured it out though.

    It looks like calling the Show method actually might keep it open.

    However, there are maybe certain other events that close it - e.g. hovering (onmouseover) over the pin and then moving away from the pin. But if I control the display of the balloon details (custom pin mouseover and my custom onclick event) then I think I can decide when I want the balloon details to fade and when I want the details balloon to stay open. I would call the Show method in both instances, but for the pin mouseover I would use some sort of setTimeOut and for the onclick event I would not.

    Think this should work, any thoughts/comments

    Thanks,

    Zach


  • Keep PushPin's Details Balloon Open?