hi christopher,you were incredibly close, i only had to make two changes1. your code was throwing an "unexpected token '}'" error in the console at line 56 because you had an unmatched curly brace and parenthesis at the bottom of your code.2. i moved the geocoder and home button widget instantiation to happen inside the createMap() callback, because otherwise they were getting called before there was actually a map available.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
<title>Web Map</title>
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<style>
html, body, #map {
height:400px;
width:100%;
margin:0;
padding:0;
}
#HomeButton {
position: absolute;
top: 95px;
left: 20px;
z-index: 50;
}
#search {
display: block;
position: absolute;
z-index: 2;
top: 20px;
left: 74px;
}
</style>
<script src="http://js.arcgis.com/3.9/"></script>
<script>
var map,
webmapId = "1a40fa5cc1ab4569b79f45444d728067";
require([
"esri/map",
"esri/arcgis/utils",
"esri/dijit/HomeButton",
"esri/dijit/Geocoder",
"dojo/domReady!"
], function (Map, arcgisUtils, HomeButton, Geocoder) {
arcgisUtils.createMap(webmapId, "map").then(function (response) {
map = response.map;
var home = new HomeButton({
map : map
}, "HomeButton");
home.startup();
var geocoder = new Geocoder({
map : map
}, "search");
geocoder.startup();
});
});
//});
</script>
</head>
<body>
<div id="map" class="map">
<div id="HomeButton"></div>
<div id="search"></div>
</body>
</html>