You are not logged in.

1

Wednesday, November 12th 2014, 8:34am

Conditional Hotspot image URL for Mobile devices

I wish to use a smaller hotspot image on mobile devices. I have tried the following, but it does not work:

Source code

1
<hotspot name="mySpot"  url="images/large.png"  devices="!mobile"  />


Source code

1
<hotspot name="mySpot"  url="images/small.png"  devices="mobile"  />



Is there a way to do this? Perhaps I am meant to use hotspot[name].loadStyle()

2

Wednesday, November 12th 2014, 9:47am

Hi,

the code itself is okay and should work (maybe you need to clear the browser cache).

With version 1.18 you could also do:

Source code

1
2
3
4
<hotspot name="mySpot"
         url.no-mobile="images/large.png" 
         url.mobile="images/small.png" 
         />


Best regards,
Klaus

3

Thursday, November 13th 2014, 12:46am

Thanks Klaus, "url.no-mobile" worked beautifully!

I was able to combine it with scale.no-mobile="2", so my small mobile hotspot images display correctly.

Thank you for the elegant design!

4

Tuesday, October 11th 2016, 7:29pm

Anyone know how to do this but with stereo? I have a hotspot that I want to behave one way when in VR mode, and a different way when not in VR mode.

Tried:


url.no-stereo="images/large.png"
url.stereo="images/small.png"


url.no-webvr="images/large.png"
url.webvr="images/small.png"


as examples and they didn't seem to work.