monzay

Need help using graphics

Discussion created by monzay on Jun 7, 2012
Latest reply on Jun 11, 2012 by jeff.pace
After reading all about graphics and graphicLayer I'm still somewhat confused.

If I add a layer to a map it displays the map feature (or graphic? Is that the right terminology?). Is the default symbol what is listed in the service properties?

If I want to change the color do I create a symbol and add it to a graphicsLayer and then add it to the map? Does this mean that I am essentially drawing on top of the default symbol that draws first? Is it really displaying twice?

How would I change the color and add it to the map?



var imageParameters = new esri.layers.ImageParameters();
 
    imageParameters.layerIds = [0];
    imageParameters.layerOption = esri.layers.ImageParameters.LAYER_OPTION_SHOW;
    imageParameters.transparent = true;
 
 var dLayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer",{"imageParameters":imageParameters});

 
 map.addLayer(dLayer);

Outcomes