{"id":1703,"date":"2016-12-08T01:40:43","date_gmt":"2016-12-08T01:40:43","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1703"},"modified":"2016-12-08T01:42:17","modified_gmt":"2016-12-08T01:42:17","slug":"cesium-how-to-make-an-infobox-pop-up-on-demand-2","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2016\/12\/cesium-how-to-make-an-infobox-pop-up-on-demand-2\/","title":{"rendered":"Cesium &#8211; How to make an InfoBox pop up on demand ?"},"content":{"rendered":"<pre class=\"\">                              .....\r\n                           .'       '.\r\n                          .           .\r\n                          :           :\r\n                          '           '\r\n                ,.*====.   '.       .'   .====*.,\r\n               .-`\"\/c)}}},    :...:    ,{{{(c\\\"`-.\r\n           _.-'-6&gt;   {{{{{'''`     `'''}}}}}   &lt;9-'-._\r\n          t         |}}}}}}           {{{{{{|         y\r\n           \\__.___.'{{{{{{{           }}}}}}}'.___.__\/\r\n               `[__\/}}}}}}}}         {{{{{{{{\\__]`\r\n                {{{.'     `'-._   _.-'`     '.}}}\r\n                }}\/            ```            \\{{\r\n                {{|                           |}}\r\n                }}|                           |{{\r\n         .------{{{\\    ,               ,    \/}}}------.\r\n        \/\/.--------'    ;               ;   '---------.\\\\\r\n       ((\/\/\/  _          \\             \/          _  \\\\\\))\r\n jgs    (((--' `''-------'`'\"'-----'\"'`'-------''` '--)))<\/pre>\n<p>It&#8217;s a bit of a hack, but you can make the info popup display whatever you like by creating a fake entity and setting it as the viewer&#8217;s selected entity. For example:<\/p>\n<pre>var entity = new Cesium.Entity('Title to put in the infobox');\r\nentity.description = {\r\n    getValue : function() {\r\n        return 'HTML to display in the infobox';\r\n    }\r\n};\r\nviewer.selectedEntity = entity;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8230;.. .&#8217; &#8216;. . . : : &#8216; &#8216; ,.*====. &#8216;. .&#8217; .====*., .-`&#8221;\/c)}}}, :&#8230;: ,{{{(c\\&#8221;`-. _.-&#8216;-6&gt; {{{{{&#8221;&#8217;` `&#8221;&#8217;}}}}} &lt;9-&#8216;-._ t |}}}}}} {{{{{{| y \\__.___.'{{{{{{{ }}}}}}}&#8217;.___.__\/ `[__\/}}}}}}}} {{{{{{{{\\__]` {{{.&#8217; `&#8217;-._ _.-&#8216;` &#8216;.}}} }}\/ &#8220;` \\{{ {{| |}} }}| |{{ .&#8212;&#8212;{{{\\ , , \/}}}&#8212;&#8212;. \/\/.&#8212;&#8212;&#8211;&#8216; ; ; &#8216;&#8212;&#8212;&#8212;.\\\\ ((\/\/\/ _ \\ \/ _ \\\\\\)) jgs (((&#8211;&#8216; [&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-1703","post","type-post","status-publish","format-standard","hentry","category-cesiumjs"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1703","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=1703"}],"version-history":[{"count":3,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1703\/revisions"}],"predecessor-version":[{"id":1706,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1703\/revisions\/1706"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1703"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1703"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1703"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}