{"id":1701,"date":"2016-12-08T01:37:28","date_gmt":"2016-12-08T01:37:28","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1701"},"modified":"2016-12-08T01:38:15","modified_gmt":"2016-12-08T01:38:15","slug":"cesium-how-to-improve-infobox","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2016\/12\/cesium-how-to-improve-infobox\/","title":{"rendered":"Cesium &#8211; How to Improve InfoBox ?"},"content":{"rendered":"<p>In order to run a script in the infobox, you have to enable scrips to run in the iframe.  This is disabled by default for security reasons, in case you don&#8217;t know the source of the data populating the infobox.<br \/>\nYou can enable scrips with this code:<\/p>\n<pre>\r\nvar iframe = document.getElementsByClassName('cesium-infoBox-iframe')[0];\r\niframe.setAttribute('sandbox', 'allow-same-origin allow-scripts allow-popups allow-forms'); \r\n<\/pre>\n<p>Also, to get the current value of an entity property, you can use .getValue(viewer.clock.currentTime);<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to run a script in the infobox, you have to enable scrips to run in the iframe. This is disabled by default for security reasons, in case you don&#8217;t know the source of the data populating the infobox. You can enable scrips with this code: var iframe = document.getElementsByClassName(&#8216;cesium-infoBox-iframe&#8217;)[0]; iframe.setAttribute(&#8216;sandbox&#8217;, &#8216;allow-same-origin allow-scripts allow-popups [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[53],"tags":[],"class_list":["post-1701","post","type-post","status-publish","format-standard","hentry","category-cesiumjs"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1701","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1701"}],"version-history":[{"count":1,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1701\/revisions"}],"predecessor-version":[{"id":1702,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1701\/revisions\/1702"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1701"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1701"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1701"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}