Seems simple enough. Using the code below, how would I use a different symbol based on an attribute of the LatestLSRCSV layer? I assume I would need to create new "symbol" variables for each possible entry of the attribute that will decide the symbol?
//Add LSR Event Layers | ||
var LatestLSRCSVtemplate = new InfoTemplate(); | ||
LatestLSRCSVtemplate.setTitle("Local Storm Report Attributes"); | ||
LatestLSRCSVtemplate.setContent(getLatestLSRCSVTextContent); | ||
var LatestLSR = new CSVLayer("./NewLSR.csv",{id:"LatestLSR",refreshInterval: 1.0,mode: FeatureLayer.MODE_SELECTION,outFields: ["*"],infoTemplate: LatestLSRCSVtemplate}); | ||
var symbol = new PictureMarkerSymbol({"angle":0,"xoffset":0,"yoffset":0,"type":"esriPMS","url":"http://static.arcgis.com/images/Symbols/Basic/RedSphere.png","contentType":"image/png","width":22,"height":22}); | ||
var renderer = new SimpleRenderer(symbol); | ||
LatestLSR.setRenderer(renderer); | ||
map.addLayer(LatestLSR); | ||
LatestLSR.hide(); |
Hi Charles,
Take a look at using the UniqueValueRenderer. An example can be found here.