javascriptjquerycesiumjsczml

Add hyperlink in content of slider in CZML


I am working with CZML in Cesium 1.20.

I want to add a hyperlink to the slider text content.

I tried to put the content in slider as html link but it is displayed as plain text.

Is there any way this can be achieved?


Solution

  • It looks like you're using Entity.name for this. The name accepts only plain text, not HTML.

    Instead, add your description to Entity.description. The description appears in a sandboxed iframe under the name, and allows links and even JavaScript to execute within the confines of the sandbox.

    Links should specify a target to escape the sandbox, for example target="_top" or target="_blank".