Hi
I have installed AIMS 2015 and I like to zoom in the coordinates presents in the url (get parameters). Now I use the function ZoomToView() but this works when the map is already loaded. How can I to exec this function after the map is loaded?
Thank You!
If you use the ZoomToView, you have the scale and the x and y already. Try something like this:
var zoomTimeout;
var myScale=50000;
var myX=-122.53059;
var myY=38.005466;
function zoomToMyView() {
var theMap = Fusion.getWidgetById('Map');
var busyToggle = theMap.isBusy() ? 'True' : 'False';
if (busyToggle == 'False') {
clearTimeout(toggleLayerTimeout);
ZoomToView(myX, myY, mySacle, true);
}
else {
zoomTimeout = setTimeout("zoomToMyView()", 1000);
}
}
Use a time out to check every 1,000 miliseconds (or one second) to see if the map is busy or not.