Trouble with Navigation Toolbar Sample

502
1
Jump to solution
07-23-2012 01:23 PM
MatthewLawton
Occasional Contributor
I am trying to add the Navigation Toolbar sample to my application. Works great in Firefox, but in IE8 I keep getting the error "Object doesn't support this property or method" on the line that declares the navToolbar variable. Here is a code snippet showing the order I declare the map variable and the navToolbar variable:

  //Set the map variable and assign it to the mapDiv box   map = new esri.Map("mapDiv",{extent: initExtent, slider: true, nav: true });    //Define navigation toolbar - IN DEVELOPMENT   navToolbar = new esri.toolbars.Navigation(map);


Since it works fine in Firefox, I'm sure there is just some simple IE code issue that I am overlooking. Any suggestions are greatly appreciated.
0 Kudos
1 Solution

Accepted Solutions
MatthewLawton
Occasional Contributor
Nevermind. It was a variable scope issue for IE. I had to declare navToolbar as a global variable outside of my startup function, even though it has no problem with all of the other global variables being defined this way. Go figure.

View solution in original post

0 Kudos
1 Reply
MatthewLawton
Occasional Contributor
Nevermind. It was a variable scope issue for IE. I had to declare navToolbar as a global variable outside of my startup function, even though it has no problem with all of the other global variables being defined this way. Go figure.
0 Kudos