You could try calling queryLayer.selectFeatures() instead of queryLayer.queryFeatures(). This returns an Array of features though instead of a FeatureSet so you'd also need to make some changes to createSearchResults(). It may be easier to just set the highlight on the Graphic yourself in createSearchResults(). You'd need to add a GlowFilter to the Graphic's filters array.See:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/DisplayObject.html#filtershttp://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/filters/GlowFilter.htmlHere's what's used in the FeatureLayer: glowFilter = new GlowFilter(); glowFilter.alpha = 0.6; glowFilter.blurX = 16; glowFilter.blurY = 16; glowFilter.inner = feature.geometry is Polygon; glowFilter.strength = 8;glowFilter.color = selectionColor;
Thanks Dasa! Thet gets me a lot closer: I was able to add a GlowFilter to each feature in the FeatureSet. However it's still using the widget icon as a marker and I simply want to highlight the map feature icon as it's symbolized from the server (also a PictureMarkerSymbol).I commented out this line in init: graphicsLayer.symbol = resultMarkerSymbol;and this one in createSearchResults(): graphic.symbol = searchResult.symbol = resultMarkerSymbol;But now the results are displayed with a black circle (with the yellow highlight/GlowFilter) on top of my map icons (see i1.png). What I'd like to do is mimic the map icon getting highlighted similar when you select a feature to edit using the Edit widget. i2.png shows the same feature icons but "un-highlighted".
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.