BEHSEINI

Issue On Having HomeButton and Overview Together

Discussion created by BEHSEINI on Mar 27, 2014
Latest reply on Mar 28, 2014 by timw1984dev
Using ArcGIS 10.1 and ArcGIS Server Javascript Api I am having issue on having Home Button and Map Overview on the map. for what ever reason the home button is not showing up the map
Here is the Script which I have

    <script>
      require([
        "esri/map", 
       "esri/dijit/OverviewMap", "dojo/parser","dijit/layout/BorderContainer", "dijit/layout/ContentPane",
        "esri/dijit/HomeButton", "esri/layers/FeatureLayer", "dojo/dom-construct", "dojo/domReady!"
      ], function(
          Map, OverviewMap,
   parser, HomeButton, FeatureLayer       
         ) {
        parser.parse(); 
        var map = new Map("mapDiv", {
          basemap: "topo",
          center: [-126.416, 55.781],
          zoom: 6
        });
      //===================================================== Overview
        var overviewMapDijit = new OverviewMap({
          map: map,
          visible: true
        });
        overviewMapDijit.startup();
 
     //===================================================== Shapefile
        //add a layer to the map
        var featureLayer = new FeatureLayer("http://somewhere/1", {
          mode: FeatureLayer.MODE_ONDEMAND,
        });
  map.addLayer(featureLayer);
  
     //===================================================== Home Button
 var home = new HomeButton({
 map: map
 }, "HomeButton");
  home.startup();

      });
     </script> 


and CSS for Home Button is

 #HomeButton { position: absolute;  top: 120px; left: 50px;  z-index: 2; }


Can you please let me know why this is happening?

Outcomes