title: Reloading labels when scrolling esri map
body: <p>What I'm trying to do is reload my labels when the user moves or scrolls the map to a different position.  Currently when the user zooms in past a certain level the labels load and every thing works correct.  When the user starts to move the map to a different state the labels disappear and you have to zoom out and zoom back in to regenerate the labels.</p>
  
  <p>I've changed onZoomEnd to update / update-end / load / onLoad</p>
  
  <p>Here is the code:</p>
  
  <pre><code>    function initUI(graphics) {
  
      dojo.connect(globals.map, 'onZoomEnd', function () {
  
          console.log("Initial zoom level is :" + globals.map.getZoom());                        
  
          var font = new esri.symbol.Font(14, esri.symbol.Font.STYLE_NORMAL, esri.symbol.Font.VARIANT_NORMAL, esri.symbol.Font.WEIGHT_BOLDER, "Arial");            
          var gl = globals.featureLayers[1].graphics;
  
          globals.map.graphics.clear();
  
          if (globals.map.getZoom() &gt;= 9) {                               
  
              console.log(codeID);
  
              for (var i = 0; i &lt; gl.length ; i++) {                   
  
                  var g = globals.featureLayers[1].graphics[i];
  
                  if (codeID == 1 || codeID == 32 || codeID == 28 || codeID == 33 || codeID == 10) {
  
                      var strLabel = g.attributes.NAME + ":" + $.formatNumber(findFips(g), { format: '#,###', locale: "us" });//creates string label formatted
                      var textSymbol = new esri.symbol.TextSymbol(strLabel, font);//create symbol with attribute name 
  
                      textSymbol.setColor(new dojo.Color([0, 0, 0]));//set the color
                      var pt = g.geometry.getExtent().getCenter(); //get center of county
  
                      var labelPointGraphic = new esri.Graphic(pt, textSymbol); //create label graphic 
                      //add label to the intended graphic                    
                      globals.map.graphics.add(labelPointGraphic);
                  }
  
                  else {                    
  
                      var strLabelPct = g.attributes.NAME + " : " + $.formatNumber(findFips(g), {format: '#,###.0', locale: "us"}) + "%";
                      var textSymbol = new esri.symbol.TextSymbol(strLabelPct);//create symbol with attribute name                                          
                      textSymbol.setColor(new dojo.Color([0, 0, 0]));//set the color
                      var pt = g.geometry.getExtent().getCenter(); //get center of county
                      var labelPointGraphic = new esri.Graphic(pt, textSymbol); //create label graphic 
                      //add label to the intended graphic                    
                      globals.map.graphics.add(labelPointGraphic);
                  }
              }//end for
          }//end if   
  
      });//end on zoom end 
  </code></pre>