I'm trying to get an extent to work on a web map app but keep getting an error when trying to pass the extent parameter:
<!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>Simple Map</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.28/esri/css/esri.css">
<style>
html, body, #map {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="https://js.arcgis.com/3.28/"></script>
<script>
var map;
require([
"esri/map",
"esri/layers/FeatureLayer",
"dojo/domReady!",
"esri/geometry/Extent",
"esri/SpatialReference"],
function(
Map,
FeatureLayer,
Extent,
SpatialReference
) {
var extent = new esri.geometry.Extent(-121.467,37.454,-122.3737,37.9067, new SpatialReference({ wkid:4326 }));
map = new Map("map", {
extent: extent,
basemap: "topo", //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
center: [-121.91, 37.65], // longitude, latitude
zoom: 10
});
var countyBoundary = new FeatureLayer("https://services5.arcgis.com/ROBnTHSNjoZ2Wm1P/arcgis/rest/services/County_Boundary/FeatureServer/0");
map.addLayer(countyBoundary);
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
The error returned is:
a.equals is not a function
And is happening right at map = new Map("map", {