private var resultMarkerSymbol:Symbol; private var resultMarkerSymbol1:Symbol; private var resultMarkerSymbol2:Symbol; private var resultMarkerSymbol3:Symbol; private var resultMarkerSymbol4:Symbol; private var resultMarkerSymbol5:Symbol;
//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);
//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);
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 }
case Geometry.MAPPOINT: { //resultFeatureLayer.renderer = new SimpleRenderer(resultMarkerSymbol); break; }
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.