Closed hpinkos closed 9 years ago
+1 for a really easy way to do this.
@mramato for 1.6? Or we can roll this out later. Either is OK with me.
In the long run we want to loosen up the sanitizer restrictions so that images and links work by default, this is important for KML, I just haven't had a chance to look into it yet.
For this demo in the short term you can disable the sanitizer completely with something like:
Cesium.InfoBoxViewModel.defaultSanitizer = function(html){return html;};
Although I'll want to change this before we ship to at least to allow for Cesium.InfoBoxViewModel.defaultSanitizer = undefined
, which currently doesn't work (I think).
As for other InfoBox stuff, I haven't looked at the example, but can't you just create an entity out of thin air and assign it to selectedEntity? That should work.
As soon as everything I'm working on is ready for master, I plan on looking through everything in this branch and finding easier ways to do things that are not straightforward or making slow things faster. It's up to you if you want to keep this open until then or merge it and wait for the next pass.
We have enough on our plates. Let's wait until post 1.6.
@mramato should we just close this for now?
@mramato is there a better way to do some of these things? If I want an infobox that displays information for an entity, its beautifully simple. But if I just want to display some other information, or show/hide the box via code I have to create a
new InfoBox()
because the viewer has too much control overviewer.infoBox
Also, it seems like the html sanitizer is scrubbing out images and links. Is there a way around this? Some of the google earth examples have images, embedded videos and links that call javascript commands
onclick
, is there a way we can do this too?