Hi,<br><br>Problem mostly solved... I finded out where it gets drawed:<br><br>AgsControl.js, line 457:<br><span class="sourceRowText">if(this.displayResults
 === true) {        
</span><div id="sb187-L459" class="sourceRow"><span class="sourceRowText">   this.showResults();<br>}<br><br>then it does <br><br>this.layer.addFeature(this._resultFeatures);<br><br>So I guess the solution if I wanted custom style would be to add a styleMap to this.layer? (in my case I&#39;ll just set displayResults = false).<br>
</span></div><br>Thanks,<br>Francois<br><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 6:50 PM, Frank <span dir="ltr">&lt;<a href="mailto:eucloid@gmail.com">eucloid@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br><br>I&#39;m already able to style a layer, using the styleMap.<br><br>But what I really want to do is when I do a esri query for all STATES (in United States), to just get the list of features in the callback and do any drawing myself. What it does right now is that it draws by default a semi-opaque orange layer over all the returned features (states), and I don&#39;t know where this comes from.<br>

<br>The AgsQueryTask comes from august&#39;s sandbox, but I guess there already exists a solution to style an OpenLayer.Control query result.<br><br>So that&#39;s my question! Example and code is below:<br><br>My work area if you want to see some js code is:<br>

<a href="http://oligny.com/unitedstates_rev3.php" target="_blank">http://oligny.com/unitedstates_rev3.php</a><br><br>And the code in which I want to modify the style would be line 214<br>    g_agsQueryTask = new OpenLayers.Control.AgsQueryTask(&quot;<a href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/2" target="_blank">http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/2</a>&quot;, null,<br>

    [<br>        statesCallback<br>    ],<br>    {}  // &lt;-- I already tried a styleMap in there.. .no changes.<br>    );<br>    map.addControl(g_agsQueryTask);<br>    g_agsQueryTask.activate();<br><br>Click on the button &quot;statesExecute&quot; that will trigger g_agsQueryTask.execute(&quot;all, ..., ...), then wait a few seconds and it will draw a default-color orange layer on all states (where does this layer comes from and how can I style it?!?). BTW I&#39;ve modified the AgsQueryTask class to be able to return all features instead of just matching a geometry (areas and points).<br>

<br>Thanks,<br>Francois<br>
</blockquote></div><br>