Is it possible to add this toolbar to the Basic Javascript viewer:
http://help.arcgis.com/en/webapi/javascript/arcgis/samples/toolbar_navigation/index.html
if so, does it go in the layout.js file?
Thanks,
BIll
With a little work I think I got it to work. I added this style code to the basicviewer.html file at the top: <style>
.zoominIcon { background-image:url(images/nav_zoomin.png); width:16px; height:16px; }
.zoomoutIcon { background-image:url(images/nav_zoomout.png); width:16px; height:16px; }
.zoomfullextIcon { background-image:url(images/nav_fullextent.png); width:16px; height:16px; }
.zoomprevIcon { background-image:url(images/nav_previous.png); width:16px; height:16px; }
.zoomnextIcon { background-image:url(images/nav_next.png); width:16px; height:16px; }
.panIcon { background-image:url(images/nav_pan.png); width:16px; height:16px; }
.deactivateIcon { background-image:url(images/nav_decline.png); width:16px; height:16px; }
</style>
then added the the navToolbar Id the correct div on the bottom:<div id="webmap-toolbar-center"></div>
<div id="navToolbar" data-dojo-type="dijit.Toolbar">
<div data-dojo-type="dijit.form.Button" id="zoomin" data-dojo-props="iconClass:'zoominIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_IN);}">Zoom In</div>
<div data-dojo-type="dijit.form.Button" id="zoomout" data-dojo-props="iconClass:'zoomoutIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.ZOOM_OUT);}">Zoom Out</div>
<div data-dojo-type="dijit.form.Button" id="zoomfullext" data-dojo-props="iconClass:'zoomfullextIcon', onClick:function(){navToolbar.zoomToFullExtent();}">Full Extent</div>
<div data-dojo-type="dijit.form.Button" id="zoomprev" data-dojo-props="iconClass:'zoomprevIcon', onClick:function(){navToolbar.zoomToPrevExtent();}">Prev Extent</div>
<div data-dojo-type="dijit.form.Button" id="zoomnext" data-dojo-props="iconClass:'zoomnextIcon', onClick:function(){navToolbar.zoomToNextExtent();}">Next Extent</div>
<div data-dojo-type="dijit.form.Button" id="pan" data-dojo-props="iconClass:'panIcon', onClick:function(){navToolbar.activate(esri.toolbars.Navigation.PAN);}">Pan</div>
<div data-dojo-type="dijit.form.Button" id="deactivate" data-dojo-props="iconClass:'deactivateIcon' ,onClick:function(){navToolbar.deactivate();}">Deactivate</div>
<!--Basemap,measure,share,time and layer list tools added if enabled-->
</div>
</div>
Next in the layout.js file I added the dogo.requires that are needed to create it dojo.require("esri.toolbars.navigation");
dojo.require("dijit.form.Button");
dojo.require("dijit.Toolbar");
then I added the function ( I think that's what its called:navToolbar = new esri.toolbars.Navigation(map);
navToolbar.zoomToFullExtent = function () {
var map = this.map;
map.setExtent(initialExtent);
}
I think that's it and I got it load on the top bar next to the legend.