Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
<link rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css">
  <title>JS Bin</title>
</head>
<body>
  <div id="map"></div>
<script src="http://js.arcgis.com/3.13/"></script>
</body>
</html>
 
require(["esri/map", "dojo/domReady!"], function(Map) { 
  var map = new Map("map", {
    center: [-118, 34.5],
    zoom: 8,
    basemap: "topo"
  });
  map.on('click', function(e) {
    var pt = map.extent.getCenter();
    map.centerAndZoom(e.mapPoint, 12).then(function() {
      map.centerAndZoom(pt, 8);
    });
  });
});
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
odoepro
0viewers