I got a customized query widget to work with 3.4 with the following enhancements ---- Declare any new marker symbols you'll need...private var resultMarkerSymbol:Symbol;
private var resultMarkerSymbol1:Symbol;
private var resultMarkerSymbol2:Symbol;
private var resultMarkerSymbol3:Symbol;
private var resultMarkerSymbol4:Symbol;
private var resultMarkerSymbol5:Symbol;
-- After marker symbol is defined...//marker symbol
const resultMarkerSymbolURL:String = configXML.symbols.picturemarkersymbol.@url || widgetIcon;
const parsedResultMarkerSymbolHeight:Number = parseFloat(configXML.symbols.picturemarkersymbol.@height[0]);
const resultMarkerSymbolHeight:Number = isNaN(parsedResultMarkerSymbolHeight) ? 0 : parsedResultMarkerSymbolHeight;
const parsedResultMarkerSymbolWidth:Number = parseFloat(configXML.symbols.picturemarkersymbol.@width[0]);
const resultMarkerSymbolWidth:Number = isNaN(parsedResultMarkerSymbolWidth) ? 0 : parsedResultMarkerSymbolWidth;
const resultMarkerSymbolXOffset:Number = (configXML.symbols.picturemarkersymbol.@xoffset != null) ? configXML.symbols.picturemarkersymbol.@xoffset : 0;
const resultMarkerSymbolYOffset:Number = (configXML.symbols.picturemarkersymbol.@yoffset != null) ? configXML.symbols.picturemarkersymbol.@yoffset : 0;
resultMarkerSymbol = new PictureMarkerSymbol(resultMarkerSymbolURL, resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);
-- Add any custom marker symbols you may need...//special markers for classified values -- one for each value to be symbolized
resultMarkerSymbol1 = new PictureMarkerSymbol("assets/images/i_hydro_green.png", resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);
resultMarkerSymbol2 = new PictureMarkerSymbol("assets/images/i_hydro_yellow.png", resultMarkerSymbolWidth, resultMarkerSymbolHeight, resultMarkerSymbolXOffset, resultMarkerSymbolYOffset);
-- In createQueryResults, after setting the infoWindowRenderer, add code setting a graphic symbol for each desired value. I am classifying by "Stage" and only showing a few of the values by which to classify...
var infoWindowRenderer:ClassFactory = new ClassFactory(PopUpRenderer);
infoWindowRenderer.properties = { popUpInfo: configurePopUpInfo(resultAttributes)};
graphic.infoWindowRenderer = infoWindowRenderer;
var fieldNameTextValue:String = graphic.attributes["Stage"];
if (fieldNameTextValue == "normal")
{
graphic.symbol = resultMarkerSymbol1
}
else if (fieldNameTextValue == "action")
{
graphic.symbol = resultMarkerSymbol2
}
else
{
//leave a default marker if needed
graphic.symbol = resultMarkerSymbol
}
- In the case statement below that, comment out setting a renderer for the whole layercase Geometry.MAPPOINT:
{
//resultFeatureLayer.renderer = new SimpleRenderer(resultMarkerSymbol);
break;
}
That worked for me with a point layer -- more would have to be done with lines and/or polygons.