schlot

Identify with a highlighted polygon is very coarse.  Can I change this?

Discussion created by schlot on May 7, 2013
In my init function I have a popup defined as
var popup = new esri.dijit.Popup({
      fillSymbol: highlightFillSymbol,
      highlight: true,
      lineSymbol: false,
      markerSymbol: false
      }, dojo.create("div"));

and this a reference in my map definition as
   map = new esri.Map("mapDiv", {extent: startExtent, infoWindow:popup});


Later I am doing an identifyTask and I want the feature to have both an infoWindow and to be highlighted.  Here is my identifyTask results handler.  It puts the results in a side panel in the form of a table and also puts a infoWindow with just a limited bit on information about the parcel.
function createIdentifyResults (results) {
    map.graphics.clear();
    initTable="";
    var s = "<table id='infoTable' class='infoTable'><tr><th></th><th></th></tr>";
   // for (var i=0, il=results.length; i<il; i++) {
      var feature = results[0].feature;         
      var featureAttributes = feature.attributes;
          for (att in featureAttributes) {
              var check = featureAttributes[att];
              if (check && check != 'Null' && att != 'OBJECTID' && att != 'Shape.area' && att != 'Shape.len' && att != 'Shape' && att != 'JOINPID') {
                s = s + "<tr><td><b>"+att+"</b></td><td>" + featureAttributes[att] + "</td></tr>";  
              }           
          }
       s = s + "</table>";
   // }
    document.getElementById('resultsTab').innerHTML = s;
    var infoTab = dijit.byId('resultsTab');
    var parContainer = dijit.byId('parcelTabContainer').selectChild(dijit.byId('resultsTab'));
    if (feature) {      
        feature.setInfoTemplate(parcelInfoTemplate);              
       map.infoWindow.setTitle("Parcel Information");
       map.infoWindow.setContent(feature.getContent());
       map.infoWindow.show(labelPt);
       var graphic = new esri.Graphic(feature.geometry, highlightFillSymbol);
       map.graphics.add(graphic);
    }else {
        document.getElementById('resultsTab').innerHTML = "No Parcel Found";
    }
}

The infoWindow is formatted with a table and I've added my own Zoom To button, which works fine.  The problem is the number of vertices that are used to draw the highlight on the parcel polygon.  When you are zoomed out, it looks OK, but using the 'Zoom to' button reveals a very coarse looking polygon.  Obviously a minimal number of vertices were used and now that the user is close up, it look awful!  If you dismiss the infoWindow and click once you're zoomed in closer, it looks fine.

The polygon is part of a feature layer and have defined setAutoGeneralize as false.  I thought this might take care of my problem. 

Should I be doing a 2nd identify somehow programmatically?  Is it something to do with my identify parameters?  I have these defined as
    stateOwnIdentifyTask = new esri.tasks.IdentifyTask(stateOwnParcelPath);
    stateOwnIdentifyParams = new esri.tasks.IdentifyParameters();
    stateOwnIdentifyParams.layerIds = [1];
    stateOwnIdentifyParams.tolerance = 1;
    stateOwnIdentifyParams.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_VISIBLE;
    stateOwnIdentifyParams.width = map.width;
    stateOwnIdentifyParams.height = map.height;
    stateOwnIdentifyParams.returnGeometry = true;

Outcomes