Monthly Archives: April 2016

How to display two table columns per row using javascript ?

Share

Online list of Echo Skills.

phpmind-echo-skills

Go to alexa.amazon.com, open up the console, and run

<pre>

$.ajax(‘https://pitangui.amazon.com/api/skills/entitlements’).done(function(r) {
console.log(r.apps.map(function(app) {
return “Name: ” + app.name + “\n” + “Description: ” + app.description;
}).join(“\n\n”));
});

</pre>

Share

Node Rest Client

Making REST calls
Each API call takes a set of data in JSON format and returns data also in JSON format. The exception to this is a GET request, which instead takes its data as a query string. I didn’t want to have to deal with this detail, so I cobbled together a wrapper function that would produce data in the correct format and issue the request.

https://rapiddg.com/blog/calling-rest-api-nodejs-script

https://www.npmjs.com/package/node-rest-client

Share

Cesium – AJAX to update InfoBox ?

pickedObject.id is the entity.

Share

cesium – Updating a CZML ‘description’ upon opening the InfoBox ?

updating-CZML-description

Share

cesium – How to enable javascript in InfoBox ?

phpmind-cesiumjs-show-name

The InfoBox does indeed run in an iframe for security and sanitation purposes. You can remove all restrictions by calling the below line of code after creating the view:

Only do this if you are in complete control of the data that will be loaded into the InfoBox, otherwise it is a security issue.

You can style the infoBox just as easy by injecting any css you want into the viewer.infoBox.frame for example:

By default, we inject the contents of Widgets/InfoBox/InfoBoxDescription.css

You can also style outer InfoBox properties by overriding the CSS classes defined in Widgets/InfoBox/InfoBox.css in your own apps css file. I’m not sure if you’ll be able to add draggable support in this way, but you can do a bunch of other stuff.

If you want to replace the infoBox completely, then simply pass “infoBox: false” to the Viewer constructor. It’s then up to you to bring up your own widget when an entity is selected. The InfoBox simply displayed the content of the entity.description property. You could copy/paste the existing InfoBox code as a starting point.

http://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/

Share