Select to view content in your preferred language

Symbolizing layers on AGS 9.3 in Flex Viewer v2.2

3290
26
03-18-2011 10:16 AM
ChristinaKepler
Emerging Contributor
I'm using the latest v2.2 of the Flex Viewer against v9.3.1 of AGS. In my viewer, I'm using a FeatureLayer as follows:
<layer label="Wells" type="feature" visible="true" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/Wells_Simple.xml"
                   url="http://myServer/ArcGIS/rest/services/myService/MapServer/0"/>


The reason for this is so that I can leverage the InfoWindow functionality in the viewer, which doesn't work when the layer 'type=dynamic'.

Everything works as expected, but the layer is being symbolized with black circles (looks like a default setting) instead of the symbology from the server, as it does w/ AGS v10.

Question:  Is there a way to mimic the server-side symbology on the Flex client when using the v2.2 viewer against a v9.3.x service?
Tags (2)
0 Kudos
26 Replies
RobertScheitlin__GISP
MVP Emeritus
Alison,

   A couple of questions.


  1. Your attribute field "PHOTO" is a string field that contains values like "Y" and "N"?

  2. The layer with type="feature" that you are trying to symbolize has a label of "NEP_Projects" in your main configuration file? and looks something like this:
    <layer label="NEP_Projects" type="feature" visible="true"

  3.                    url="http://your server/ArcGIS/rest/services/yourService/MapServer/0"/>
  4. I am not sure what this is talking about...
    And in my xml file, I've added the following in the opening configuration tag:

  5. <configuration label="NEP_Projects">
0 Kudos
AlisonPage
Regular Contributor
Hi Robert,

1. Yes, PHOTO is a field in my map service with the value or Y or N.
2. I obviously put the label in the wrong place.  I thought it was to go into the xml file for the popupconfig instead of in the feature layer tag in the main config.

I'll change that and give it another try. Thanks so much!

-Alison
0 Kudos
AlisonPage
Regular Contributor
That worked for showing the symbology on the map but it doesn't change them in the Map Contents widget (screenshot below). Any thoughts on how I can get them to show up in the widget?

Thanks,
Alison

0 Kudos
AlisonPage
Regular Contributor
Anyone have any thoughts on why the symbols listed in my mapmanager.mxml aren't showing up in my map contents widget? Screenshot is in the last post above.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alison,

   The TOC/Legend widget is only going to display what ArcGIS Server is returning and not what you are overriding in the map manager.
0 Kudos
AlisonPage
Regular Contributor
So I should add the same symbology to my mapservice?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Alison,

    Yes. That is it exactly and if you do that then there is really no need for the MapManager code change.
0 Kudos