The below code works to get the current zoom level in ArcGIS 3.18 JavaScript API.

<!DOCTYPE html>
<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="http://js.arcgis.com/3.18/esri/css/esri.css">
  html, body, #map {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
  body {
    background-color: #FFF;
    overflow: hidden;
    font-family: "Trebuchet MS";
<script src="http://js.arcgis.com/3.18/"></script>
  var map;
  require(["esri/map", "dojo/domReady!"], function(Map) {
    map = new Map("map", {
      basemap: "topo",  //For full list of pre-defined basemaps, navigate to http://arcg.is/1JVo6Wd
      center: [-122.45, 37.75], // longitude, latitude
      zoom: 13
        console.log("extent change",map.getZoom());
        if(map.getZoom() > 13)

But map.getZoom() or map.setZoom() is not a method in the ArcGIS 4.0 JavaScript API MAP Class.

How do I get the current zoom level in ArcGIS 4.0 map JavaScript?


solved with MapView.zoom property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.