Using/Migrating HTML Pages from 1.5 to 2.0
Are there plans for Uniview 2.0 to accept HTML control documents that were originally created for 1.5 that used uvFleck and TrayApp to talk to Uniview? The current panels are based on JSON which is a very different way of defining the webpage.
We have an upcoming series of presentations in Aspen based on our previous Worldviews Network events that make extensive use of our HTML/uvFleck/TrayApp interfaces. These seem to work (for the most part) in 2.0, but requires that we run the separate wamp server. But what is happening to help migrate these legacy interfaces into 2.0?
Service d'assistance aux clients par UserEcho
Dan Tell posted a similar question here a while ago, http://uniview.userecho.com/topic/500831-migrating-html-buttons-to-work-in-16/. The same uniview.sendEvent() function should replace your message function I think.
Unfortunately this doesn't appear to work with my 2.0.6 install for some reason. I've added the uniview.js link in index.html, and have edited uvTray.js as suggested by Mikael's post. However none of my buttons work. Also the the browser is stuck on the default tab ("1. Flood Layers"), and I cannot switch to the other three tabs ("2.Precipitation," etc.).
Here are my browser files de_coflood.zip.
1) removed the js/uniview.js (this is already served by Uniview Theater)
2) removed the websocket code from uvTray
3) removed the sendMessage "overload" with retry from uvTray
4) Included "/js/uniview.js" instead of "js/uniview.js" (i.e. relative to the hosted root instead of the current directory)
Here is the html, html.zip
However now I've noticed other code that is unresponsive. Any ideas why this function: or this:
would no longer work?
If it's of any help, I an attach html an example of a now-fully functional HTML page from one of our shows in Uniview 2.0.
They're still not idea, fancy page layouts, but it might be helpful. Instead of scripting each individual layer button, I have a generic "toggle" type button that alternates between two clasess (uv-toggle-off and uv-toggle-on) which enables to send it two different command strings, which has made it easier (and less programming intensive and consistent) to toggle resources in Uniview in our custom layouts. All the javascript is still stored in the uniview.js.
Let me see if your files can help with our toggling needs. I thought I had a generic function written that would work for any Geoscope layer, but that has recently stopped working in 2.0 as well. I'll report back later today (Monday May 18) ...
With the way things are, I usually have to rebuild layersets from scratch since the layer numbering is opaque, unless you open it up gui.statemanager, and even then that only tells you what layer you need to edit. Editing in the Geoscope window is also not very efficient. Since many of our layersets run into dozens of datasets, this is a real pain.
But isn't the real issue that you need dozens of layers? How much of this would be simplified by having video layers? An mp4/mkv mapped on a rectangle projected onto the planet.
However it would still be useful to be able to edit layers when we are not loading animated time series. Or we have time series that do not have large frame counts, so it doesn't make sense to go to the trouble of making a video (e.g., 12 frames for each month of the year). Often we have multiple sets of short time series.
But what often kills us is needing to keep on deck many different KML files and individual WMS base layers (e.g., Landsat, NAIP, Bing, Black Marble, NLCD). These can add up quickly, especially since we want to have them handy in case the presentation or conversation turns to one direction or another.
We've noted the support for video layers (it's on our list of things we want to do too).
I'm closing this thread now, since the original question (getting html pages to work in 2.0) has been answered below.
uvCycler.js
I.e, has the uniview.js been loaded and does the browser get a 200 OK back from Uniview if you check the browser console?
I just need to know if the problem is on the web side or the Uniview side.
I've confirmed that the uniview.js script is running and sending back "200 OK"s from the sendEvent function. The resume, pause, stop, stepforward, and stepbackward functions in uvCycler.js:range_cycler() all seem to work at least based on the status messages that show up.
For an example of this code to test, check out the profile files referenced in my other support forum thread at https://copy.com/j4oganWtqYDLv3hJ. They contain an example of the range_cycler() code in the first tab of the Custom browser control, with the stepbackward/play/pause/stop/stepforward buttons under "Continuous Cycle":
The kmz layers actually are not effected by Alpha property changes unfortunately. If you try to change your code to use the Enabled property instead in the uvCycler.js you will get it to work.
P.S. Lets continue this discussion either in a new issue or email, just to get clarity on this Issue. :)
Best regards,
Jawad