Is it possible to change the color of data from a map service?

696
7
Jump to solution
02-06-2013 02:28 PM
GeorgeHaskett
Occasional Contributor III
Hello,

I am wondering if there is a why I can customize the color scheme for both vector data stored in a mapservice and raster data stored in an image service?

I am using ArcGIS 10.1 and Viewer for Flex 3.1.

Any advice would be great.

Thanks,

George
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus
Guys,

   This is possible if the server is a 10.1 Server. Look at this sample:

http://resources.arcgis.com/en/help/flex-api/samples/01nq/01nq00000072000000.htm

View solution in original post

0 Kudos
7 Replies
DanJensen
Occasional Contributor
Not to be completely helpful, I will mention something you probably already dismissed.  The vector data can be added to the graphics layer with any symbol you want.  Not sure about the raster data.

-Dan
0 Kudos
GeorgeHaskett
Occasional Contributor III
Dan,

Are you referring to the symbology chosen prior to creating the service?

I am consuming services which I do not have control over their creation.  I would like to change the color of their current symbology when I bring them into the Viewer for Flex environment, both vector and raster data.  Is it possible to do so, within the various config and xml files?

If so, how?

Thanks,

Haskett
0 Kudos
DanJensen
Occasional Contributor
I don't think what you want to do is possible.  Map services are read only.  However, if you look at the way the query tool operates, it selects all the features from a specified feature class within a Layer (or map service) then renders them with whatever symbol you configure.  It adds those features to the graphics layer which gives you the control to change their symbol.  This is as close as you will likely come to changing the symbology of a map service.

I suppose if you only have a few  hundred features total in the map service you could write a custom widget to add all the features from a map service to the graphics layer with the symbol of your choice.  I know, I know, it's a little far fetched.  But probably as close as you will get.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Guys,

   This is possible if the server is a 10.1 Server. Look at this sample:

http://resources.arcgis.com/en/help/flex-api/samples/01nq/01nq00000072000000.htm
0 Kudos
GeorgeHaskett
Occasional Contributor III
Thanks Dan and Robert for your assistance.

So while its not readily available in the Viewer, its possible in the Flex API.  Guess that means I need to start working with the API at some point.

Haskett
0 Kudos
MichaelVolz
Esteemed Contributor
This sample demonstrates functionality available at ArcGIS 10.1 which allows you
            to dynamically change the rendering of a map service (service must report "Supports Dynamic Layers: true")
            at runtime by overwriting the default symbology.

Where do you make this change at run-time?  In an mxml file?  In the mapservice itself?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Michael,

   Sorry I thought the sample was pretty self explanatory. You adjust the the layers layerDrawingOptions either in the mxml as the sample demonstrates or in ActionScript.
0 Kudos