Select to view content in your preferred language

Configurate symbology widget flex viewer 3.4 & flash builder 4.6

552
0
10-27-2013 02:12 AM
fatizanady
Deactivated User
Hi everyone,

i have a problem with the symbology widget that i can't know how to solve it,so i add my widget symbology to my flex projet then i make some modification in xml file in order to adapt the widget to my application this is my mxl code:
configuration>
    <layers>
        <layer>
            <url>"http://localhost:6080/arcgis/rest/services/SOCDM/MapServer"</url>
            <name>Thematic</name>
            <classificationLayerName>Commune</classificationLayerName>
            <classificationLayerID>3</classificationLayerID>
            <!-- classification methods: Descs are labels -->
            <classificationMethodTypeDescs>Natural Breaks,Quantile,Equal Interval</classificationMethodTypeDescs>
            <!-- esriClassifyEqualInterval,esriClassifyGeometricalInterval,esriClassifyNaturalBreaks,esriClassifyQuantile -->
            <classificationMethodTypes>esriClassifyNaturalBreaks,esriClassifyQuantile,esriClassifyEqualInterval</classificationMethodTypes>
            <!-- classification fields: Descs are labels -->
            <classificationFieldTypeDescs>TYPE_4</classificationFieldTypeDescs>
            <!-- classification fields: Types are fields -->
            <classificationFieldTypes>TYPE_4</classificationFieldTypes>
            <classificationBreaksMin>4</classificationBreaksMin>
            <classificationBreaksMax>12</classificationBreaksMax>
            <classificationBreaksDefault>6</classificationBreaksDefault>
            <dynamicLabelingPlacement>esriServerPolygonPlacementAlwaysHorizontal</dynamicLabelingPlacement>
            <!-- don't show labels when zoomed out beyond this scale -->
            <dynamicLabelingMinScale>18489298</dynamicLabelingMinScale>
            <dynamicLabelingFontColor>0x191919</dynamicLabelingFontColor>
            <dynamicLabelingFontFamily>Verdana</dynamicLabelingFontFamily>
            <dynamicLabelingFontWeight>bold</dynamicLabelingFontWeight>
            <useproxy>false</useproxy>
            
            <!-- ,TYPE_3,TYPE_2,TYPE_1 -->
        </layer>
    </layers>
    <ui>
        <widget_dimensions>
            <width>300</width>
            <height>350</height>
        </widget_dimensions>
        <icons>
            <!-- Path to programmatically find the assets for Application Builder -->
            <base_url>widgets/Thematic/assets/images/</base_url>
            <!-- Title/label for mainState icon across the top widget panel -->
            <main_icon>i_thematic_icon.png</main_icon>
            <main_label>Main Panel</main_label>
            <!-- Title/label for settingsState icon across the top widget panel -->
            <settings_icon>i_options.png</settings_icon>
            <settings_label>Settings Panel</settings_label>
        </icons>
        <transparency>
            <comp_label>Transparence</comp_label>
            <defaulttransparency>0.9</defaulttransparency>
        </transparency>
        <color_ramp>
            <classificationFromColorRampDisplay>Valeurs minimales</classificationFromColorRampDisplay>
            <classificationFromColorRamp>0xCECECE</classificationFromColorRamp>
            <classificationToColorRampDisplay>Valeurs maximales</classificationToColorRampDisplay>
            <classificationToColorRamp>0x0D538A</classificationToColorRamp>
        </color_ramp>
        <classification>
            <methodsLabel>Methode</methodsLabel>
            <fieldsLabel>Couches</fieldsLabel>
            <breaksLabel>Nombre de classes</breaksLabel>
        </classification>
        <dynamicLabels>
            <dynamicLabelsEnabledLabel>Etiquette</dynamicLabelsEnabledLabel>
            <dynamicLabelsOnLabel>invisible</dynamicLabelsOnLabel>
            <dynamicLabelsOffLabel>visible</dynamicLabelsOffLabel>
        </dynamicLabels>
    </ui>
</configuration>


* commune:  this is my layer that I want to make the symbology
* TYPE_4:this is the attribut of commune layer that specify if a town is urban or rural

also i change URL in mxml file lik that:
 thematicLayer = new ArcGISDynamicMapServiceLayer();
                        thematicLayerName = configXML.layers.layer.classificationLayerName || "commune";
                        thematicLayer.name = configXML.layers.layer.name || "Thematic layer";
                        thematicLayer.url = configXML.layers.layer.url || "http://localhost:6080/arcgis/rest/services/SOCDM/MapServer";
                        thematicLayer.proxyURL = proxyurl;
                        thematicLayer.addEventListener(LayerEvent.LOAD, thematicLayer_loadHandler, false, 0, true);

                        detailsTask.url = configXML.layers.layer.url || "http://localhost:6080/arcgis/rest/services/SOCDM/MapServer";
                        detailsTask.proxyURL = proxyurl;


in other hand in arcgis sever i'm choose:"Allow an application via the modification of the order of layers and symbology" and i add a geodabase file.

but when i comile i project and try to use this widget this error appear:"Error: HTTP request error".

any help please.Thank's
Tags (2)
0 Kudos
0 Replies