If your web site is configured to allow postMessages, you can load JS9 into an iframe and send it any JS9 Public API routine using the js9PostMessage.js module:
<script type="text/javascript" src="js9PostMessage.js"></script> var pm = JS9PM.init("js9iframe", "https://js9.si.edu"); JS9PM.send(pm, "SetColormap", "cool"); JS9PM.send(pm, "GetColormap", function(o){alert(JSON.stringify(o))});
When running analysis tools, you have two options:
Without js9PostMessage.js, you can send a postMessage directly, passing an object with a cmd property (API call name) and an args property (array of call args):
var pm = window.document.getElementById("js9iframe").contentWindow; pm.postMessage({cmd: "SetColormap", args: ["red"]}, "https://js9.si.edu");
Caveat: dealing with light windows is an issue. In this example, light windows can move left and right because the iframe is in an overlay that uses a transparent background.
Behold her, single in the field,
Yon solitary Highland Lass!
Reaping and singing by herself;
Stop here, or gently pass!
Alone she cuts and binds the grain,
And sings a melancholy strain;
O listen! for the Vale profound
Is overflowing with the sound.
No Nightingale did ever chaunt
More welcome notes to weary bands
Of travellers in some shady haunt,
Among Arabian sands:
A voice so thrilling ne'er was heard
In spring-time from the Cuckoo-bird,
Breaking the silence of the seas
Among the farthest Hebrides.
Will no one tell me what she sings?—
Perhaps the plaintive numbers flow
For old, unhappy, far-off things,
And battles long ago:
Or is it some more humble lay,
Familiar matter of to-day?
Some natural sorrow, loss, or pain,
That has been, and may be again?
Whate'er the theme, the Maiden sang
As if her song could have no ending;
I saw her singing at her work,
And o'er the sickle bending;—
I listened, motionless and still;
And, as I mounted up the hill,
The music in my heart I bore,
Long after it was heard no more.
Load an image: |
Pick a colormap: | ||||||
Pick a scale: | ||||||
Pick a zoom: | ||||||
Add a region: | ||||||
Run analysis: | ||||||
Get Info: |
The sea is calm tonight.
The tide is full, the moon lies fair
Upon the straits; on the French coast the light
Gleams and is gone; the cliffs of England stand,
Glimmering and vast, out in the tranquil bay.
Come to the window, sweet is the night-air!
Only, from the long line of spray
Where the sea meets the moon-blanched land,
Listen! you hear the grating roar
Of pebbles which the waves draw back, and fling,
At their return, up the high strand,
Begin, and cease, and then again begin,
With tremulous cadence slow, and bring
The eternal note of sadness in.
Sophocles long ago
Heard it on the Ægean, and it brought
Into his mind the turbid ebb and flow
Of human misery; we
Find also in the sound a thought,
Hearing it by this distant northern sea.
The Sea of Faith
Was once, too, at the full, and round earth’s shore
Lay like the folds of a bright girdle furled.
But now I only hear
Its melancholy, long, withdrawing roar,
Retreating, to the breath
Of the night-wind, down the vast edges drear
And naked shingles of the world.
Ah, love, let us be true
To one another! for the world, which seems
To lie before us like a land of dreams,
So various, so beautiful, so new,
Hath really neither joy, nor love, nor light,
Nor certitude, nor peace, nor help for pain;
And we are here as on a darkling plain
Swept with confused alarms of struggle and flight,
Where ignorant armies clash by night.