New Showtext (1.18) Isn't Working On Hovering Mapspots

  • Hello, I'm having a strange problem: I want to display the name of the mapspot when hovering over it through the showtext action embedded into krpano, the thing is that when the text appears it disappears and appears back again in an endless loop. I moved the showtext action (exactly as it was) to a layer and it works perfectly, it doesn't disappear untill the hovering stops. So I'm wondering if this is a bug or if it's just not intended to be used over mapspots, and if there's any way to fix it. Thank you!

    Aberto.

  • I remember I encountered something similar when tried to implement tooltips on Bing Maps in our custom skin. The key to the problem was that Bing somehow misses to determine "hovering" (as I understood it), and "hovering" must be set to "true" 'manually'. E.g.

    Code
    set(hovering, true);asyncloop(hovering, ... blah..blah..blah

    - this for on over event and

    Code
    set(hovering, false);.......

    for onout event.


    Hope this gives some hint to you *smile*

  • Thank you very much for your answer, Alexey, I tried to implement your suggestion but it failed to work, perhaps I didn't understand you, here's what I did:

    <spot name="mapspot" (blahblahblah,settings); onover="set(hovering,true); showtext(Hotel Paradise);" onout="set(hovering,false);"/>

    then I tried this:

    <spot name="mapspot" (blahblahblah,settings); onover="set(hovering,true);" onhover="showtext(Hotel Paradise);" onout="set(hovering,false);"/>

    Both of them worked exactly as before (none worked as expected). I hope you can illustrate me a bit more!

    Alberto

  • Hi,

    the current Bing- and Google-Maps plugins aren't supporting the map spots 'onhover' event in HTML5.

    See here - 'Flash only':
    https://krpano.com/plugins/bingmaps/#spotevents
    https://krpano.com/plugins/googlemaps/#spotevents

    But this will be changed in version 1.18.1 - then they will be available and work also in HTML5.

    An alternative solution that works without onhover event and without the showtext() action could be seen in the vtourskin.xml when looking there for 'tooltips_mapspots'.

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!