[Geomoose-users] slideshow/tour within GeoMoose
Brent Fraser
bfraser at geoanalytic.com
Mon Jun 14 14:08:31 EDT 2010
All,
If you followed last week's "Layer Functions" thread you know that I used the
GeoMOOSE API to create a "Zoom To Layer Extents" button on the metadata results
page.
Our marketing guy asked if it would be possible to create a "slide-show" or
"tour" using similar techniques. At first I thought it would be easy and had
the php return:
var mapWin = window.opener;
var GeoMOOSE = mapWin.GeoMOOSE;
GeoMOOSE.clearPopups();
GeoMOOSE.zoomToExtent(-12711115, 6271185,-12665227, 6309521);
GeoMOOSE.turnLayerOn("Quickbird/Waterton");
GeoMOOSE.addPopup(-12687075, 6290155, 200, 100, "Quickbird Imagery supplied by
Geoanalytic");
wait(3000);
GeoMOOSE.clearPopups();
GeoMOOSE.zoomToExtent(-12702314, 6719493,-12696849, 6724881);
GeoMOOSE.turnLayerOn("Parcels/all");
GeoMOOSE.addPopup(-12701359, 6721881, 200, 100, "Parcels supplied by AltaLIS");
only to find out that Javascript has no wait/sleep/pause function, and in fact
the whole idea is contrary to the async nature of JavaScript. I did find some
info at http://www.devcheater.com/ outlining the problem, some solutions and
their effect on various browsers. The best approach looks like using XMLHttp
and server-side scripting to get things to wait, but perhaps there's a better way?
Any thoughts?
Brent Fraser
More information about the Geomoose-users
mailing list