Set zoomToFullExtent to be my Initial Extent

Discussion created by carrietropasso on Jan 23, 2012
Latest reply on Mar 15, 2014 by Mr_Kirkwood
I am using the Navigation Toolbar from the API Samples.  However, the Zoom to Full Extent zooms to the full extent of the underlying base map and I want this to zoom to my Initial Extent.  I saw a previous post on here that states to save a copy of the extent and connect a button or link to a function that passes your extent to map.setExtent ().

I already have the button (from the Navigation Toolbar api sample) and the function for this right now is ???onClick:function(){navToolbar.zoomToFullExtent();}??? which works as described above (zooms to the extent of the base map).

I am fairly new to JavaScript but can usually get things to work if I have examples.  That being said, can someone provide me a code example showing me how to do this rather than just outlining the steps?