Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Zoom to the map with coordinates in the url with IMS

1 REPLY 1
Reply
Message 1 of 2
escastilloa
436 Views, 1 Reply

Zoom to the map with coordinates in the url with IMS

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!

1 REPLY 1
Message 2 of 2
gluckett
in reply to: escastilloa

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.

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report