<!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="http://js.arcgis.com/3.8/js/esri/css/esri.css"> <style> html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; } body { background-color: #FFF; overflow: hidden; font-family: "Trebuchet MS"; } </style> <script src="http://js.arcgis.com/3.8/"></script> <script> var map; require(["esri/map", "dojo/domReady!"], function( Map) { map = new Map("map", { basemap: "gray", center: [-97, 38], zoom: 5, sliderStyle: "small" }); map.on('extent-change', function(){console.log('extent changed');}); }); </script> </head> <body> <div id="map"></div> </body> </html>
Solved! Go to Solution.
Sorry to wake this thread up almost 2 years later but I am having the same issue in Chrome version 48.0.2564.103 m
Using this thread, I was able to figure out a fix. I thought I would share a complete solution.
var oldExtent = null; //ON EXTENT CHANGE - UPDATE IF VISIBLE on(this.map, "extent-change", function (event) { var isEqual = false if (oldExtent != null) isEqual = geometryEngine.equals(oldExtent, event.extent); if (isEqual) { console.log('EXTENT IS THE SAME'); } else { console.log('EXTENT IS DIFFERENT'); } //SET OLD EXTENT oldExtent = event.extent; });
Drew