AnsweredAssumed Answered

Change default of identified feature

Question asked by gopre400 on Jan 11, 2016
Latest reply on Jan 11, 2016 by gopre400

Hi, I am using IdentifyTask with map.onclick then display attributes in a popup. Everything works great, however I would like to change the default color of found feature (right now it is default to a cyan). How can I do that?

var deferred = identifyTask                           

.execute(identifyParams)                           

.addCallback(function (response) {                               

     return arrayUtils.map(response, function (result) {                                   

     var feature = result.feature;                                                                     

     var layerName = result.layerName;                                   

     var idTemplate = new InfoTemplate();                                   

     idTemplate.setContent("Parcel ID:" + feature.attributes['PID_NUM'] + "
" +                                                 "Address:" + feature.attributes['site_address'] + "
" +                                                 "Owner:" + feature.attributes['owner_name'] + ");                                           

idTemplate.setTitle("Parcel");                                           

feature.setInfoTemplate(idTemplate);                                   

return feature;                               

});                           

});                 

map.infoWindow.setFeatures([deferred]);                 

map.infoWindow.show(evt.mapPoint);

Outcomes