hotspot can't display css icon,layer can,how to solution?

  • 1.link css

    Code
    <link rel="stylesheet" type="text/css" href="//cdn.materialdesignicons.com/2.8.94/css/materialdesignicons.min.css">

    2.xml code-hotspot(can't display css icon)

    Code
    <hotspot name="spot1" style="test" ath="0" atv="0" html="1235555 [span class='mdi mdi-map-marker-radius' /]" />
    Code
    <style name="test" type="text" url="%SWFPATH%/plugins/textfield.swf" backgroundcolor="0x000000" backgroundalpha="0.8" css="font-size:20px; color:#ffffff" />

    3.xml code-layer(can display css icon)

    Code
    <layer name="spot1" style="test" ath="0" atv="0" html="1235555 [span class='mdi mdi-map-marker-radius' /]" />
    Code
    <style name="test" type="text" url="%SWFPATH%/plugins/textfield.swf" backgroundcolor="0x000000" backgroundalpha="0.8" css="font-size:20px; color:#ffffff" />

    i want to use hotspot,but it can't display css icon,what's wrong?

  • Hi,

    add renderer="css3d" to the <hotspot> element.

    By default hotspots are rendered by WebGL and there the textfields are created by own custom drawing and not by the browser. Therefore the HTML/CSS support is limited there, re-implementing a 'full-browser' just to get some text would be too much of course.

    Btw - note - there is a reason why WebGL is used by default: the performance is better, the cross-browser-compatibility is better, and rendering quality can be better (e.g. when using oversampling and mipmapping), the rendering between the pano and the hotspot is fully sync (CSS3D is slightly async on iOS sometimes), stereo-rendering/vr-support is possible.

    Best regards,
    Klaus

  • many thanks,

    add "renderer="css3d" can't display in vr mode.

    i found,use iconfont could solve this problem with default value(webgl),like

    Code
    <hotspot name="spot1" style="test" ath="0" atv="0" html="1235555 [i class='icon iconfont' ]&#xe77d;[/i]" />

    it can display in vr mode.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!