You can take a look at the code for zoomToFullExtent by typing this in firebug or chrome dev tools console:
navToolbar.zoomToFullExtent.toString()
That will print:
"function () {
var map = this.map;
map.setExtent(map.getLayer(map.layerIds[0]).initialExtent);
}"
The easiest way to change this is to re-define zoomToFullExtent for your toolbar. After you create your toolbar, do something like this:
navToolar.zoomToFullExtent = function() {
var map = this.map;
map.setExtent(appFullExtent);
}
Where appFullExtent is a global that represents your app's full extent.
where do i modify the code with the above edit?here is what i have:
navToolbar = new Navigation(map);
on(navToolbar, "onExtentHistoryChange", extentHistoryChangeHandler);
registry.byId("zoomin").on("click", function(){
navToolbar.activate(Navigation.ZOOM_IN);
});
registry.byId("zoomout").on("click", function(){
navToolbar.activate(Navigation.ZOOM_OUT);
});
registry.byId("zoomfullext").on("click", function(){
navToolbar.zoomToFullExtent();
});
registry.byId("zoomprev").on("click", function(){
navToolbar.zoomToPrevExtent();
});
registry.byId("zoomnext").on("click", function(){
navToolbar.zoomToNextExtent();
});
registry.byId("pan").on("click", function(){
navToolbar.activate(Navigation.PAN);
});
registry.byId("deactivate").on("click", function(){
navToolbar.deactivate();
});
function extentHistoryChangeHandler(){
registry.byId("zoomprev").disabled = navToolbar.isFirstExtent();
registry.byId("zoomnext").disabled = navToolbar.isLastExtent();
}
});
Thanks in advance!