thematic-widget-flex

4953
37
01-24-2013 08:35 AM
LloydHeberlie
Occasional Contributor
This is the forum for asking questions related to the ArcGIS Viewer for Flex ThematicWidget hosted on GitHub (https://github.com/Esri/thematic-widget-flex/) and referenced on ArcGIS.com.
Tags (2)
0 Kudos
37 Replies
FabianoHino
New Contributor
Can I use two layers on thematic widget?
0 Kudos
LloydHeberlie
Occasional Contributor
Can I use two layers on thematic widget?


Hi Fabiano,

Currently the compiled configuration supports just one layer at a time.  You could customize the source code to meet your needs if that is an option for you.
0 Kudos
sofialoulad
New Contributor
can i use thematic widget with arcgis 10.0 FV 3.0 AND FB SDK 4.6 ?????????????
0 Kudos
Jean-FrançoisDolbec
New Contributor II
I have issues making it work by only modifying the widget parameters in Flex Viewer! Could you please tell me if you see something in the configuration statement? Thanks!

<url>http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com/arcgis/rest/services/Municipalites/MapServer</url>
<classificationLayerName>egdb.DBO.sda_mus</classificationLayerName>
<classificationLayerID>0</classificationLayerID>
<classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
<classificationFieldTypeDescs>Test</classificationFieldTypeDescs>
<classificationFieldTypes>Thematic</classificationFieldTypes>
0 Kudos
LloydHeberlie
Occasional Contributor
can i use thematic widget with arcgis 10.0 FV 3.0 AND FB SDK 4.6 ?????????????


Hi Sofie,

The thematic widget uses the server's (dynamic) thematic rendering capabilities which was introduced in version ArcGIS 10.1.  If you upgrade your server software to version 10.1 and compile the widget for ArcGIS API/Viewer 3.0, then it will work.  See: 
http://resources.arcgis.com/en/help/flex-api/apiref/index.html?com/esri/ags/tasks/GenerateRendererTa...
0 Kudos
LloydHeberlie
Occasional Contributor
I have issues making it work by only modifying the widget parameters in Flex Viewer! Could you please tell me if you see something in the configuration statement? Thanks!

<url>http://ec2-XXX-XXX-XXX-XXX.compute-1.amazonaws.com/arcgis/rest/services/Municipalites/MapServer</url>
<classificationLayerName>egdb.DBO.sda_mus</classificationLayerName>
<classificationLayerID>0</classificationLayerID>
<classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
<classificationFieldTypeDescs>Test</classificationFieldTypeDescs>
<classificationFieldTypes>Thematic</classificationFieldTypes>


Double check your services directory for the layer id and layer name, see the graphic below.  Make sure your layer name and id match in your services directory.

[ATTACH=CONFIG]24510[/ATTACH]

The classificationFieldTypes are the "physical" names of the fields in your sda_mus layer, and the classificationFieldTypeDescs are the aliases that will be presented to the user in the User Interface.

<classificationFieldTypeDescs>Field Alias 1,Field Alias 2</classificationFieldTypeDescs>
<classificationFieldTypes>Field1,Field2</classificationFieldTypes>

Make sure your server is running ArcGIS 10.1 software or later, also make sure you have enabled the "dynamic capability" of the service in the ArcGIS Server Manager.  The service will report "supportsDynamicLayers" true. See:  http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer?f=pjson.  See number 5 in the list:  http://resources.arcgis.com/en/help/main/10.1/index.html#/Enabling_dynamic_layers_on_a_map_service_i...

Hope this helps,
0 Kudos
JoeHewitt
New Contributor III
How practical/possible is it to make this widget dynamic. So I can selected from all of my dynamic layers instead of having to hardwire only one layer into the code?
0 Kudos
LloydHeberlie
Occasional Contributor
How practical/possible is it to make this widget dynamic. So I can selected from all of my dynamic layers instead of having to hardwire only one layer into the code?


Hi Joe,

It is possible and practical, just not implemented yet.  You can always implement it yourself, but I've  added a GitHub issue to address this enhancement request also.  I just didn't implement this functionality initially.
0 Kudos
JohnParker
New Contributor II
In working with the widget if I have it open at the start, I have to close the widget and reopen the widget before it will create a thematic map based on one of the attributes.  If the widget is not open at the beginning of the application, I have to open it, close it, and open it again before it will recognize the attributes and display the symbology.


Here is my code.

Thanks in advance for your help.




<configuration>
    <layers>
        <layer>
            <url>http://gis-test/arcgis/rest/services/Parker/School_Aid_Flex_Registered/MapServer</url>
            <name>Thematic</name>
            <classificationLayerName>Schools</classificationLayerName>
            <classificationLayerID>0</classificationLayerID>
            <classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>
            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
            <classificationFieldTypeDescs>Budget Enrollment,Change in Enrollment</classificationFieldTypeDescs>
            <classificationFieldTypes>FY_2014_Budget_Enrollment,Est__Change_in_Enrollment</classificationFieldTypes>
            <classificationBreaksMin>4</classificationBreaksMin>
            <classificationBreaksMax>12</classificationBreaksMax>
            <classificationBreaksDefault>6</classificationBreaksDefault>
            <dynamicLabelingPlacement>esriServerPolygonPlacementAlwaysHorizontal</dynamicLabelingPlacement>
            <dynamicLabelingMinScale>18489298</dynamicLabelingMinScale>
            <dynamicLabelingFontColor>0x191919</dynamicLabelingFontColor>
            <dynamicLabelingFontFamily>Verdana</dynamicLabelingFontFamily>
            <dynamicLabelingFontWeight>bold</dynamicLabelingFontWeight>
            <useproxy>false</useproxy>
        </layer>
    </layers>
    <ui>
        <widget_dimensions>
            <width>300</width>
            <height>350</height>
        </widget_dimensions>
        <icons>
            <base_url>widgets/Thematic/assets/images/</base_url>
            <main_icon>i_thematic_icon.png</main_icon>
            <main_label>Main Panel</main_label>
            <settings_icon>i_options.png</settings_icon>
            <settings_label>Settings Panel</settings_label>
        </icons>
        <transparency>
            <comp_label>Transparency</comp_label>
            <defaulttransparency>0.9</defaulttransparency>
        </transparency>
        <color_ramp>
            <classificationFromColorRampDisplay>Lower values</classificationFromColorRampDisplay>
            <classificationFromColorRamp>0xCECECE</classificationFromColorRamp>
            <classificationToColorRampDisplay>Higher values</classificationToColorRampDisplay>
            <classificationToColorRamp>0x0D538A</classificationToColorRamp>
        </color_ramp>
        <classification>
            <methodsLabel>Classification</methodsLabel>
            <fieldsLabel>based on</fieldsLabel>
            <breaksLabel>Number of classes</breaksLabel>
        </classification>
        <dynamicLabels>
            <dynamicLabelsEnabledLabel>Labels</dynamicLabelsEnabledLabel>
            <dynamicLabelsOnLabel>Hide / Remove</dynamicLabelsOnLabel>
            <dynamicLabelsOffLabel>Show / Display</dynamicLabelsOffLabel>
        </dynamicLabels>
    </ui>
</configuration>
0 Kudos