Select to view content in your preferred language

widget for identify values in raster data  using ARCGIS VIEWER for flex.

4150
25
Jump to solution
10-31-2012 03:55 AM
NadeemQazi
Regular Contributor
I have used Kernel Density tool from the spatial analyst tool on one of my layer in the map document. the result is generated as raster data.i used identify tool (in the ARCMAP) to find the density at any point. However I want to do the same job from client side  using ARCGIS VIEWER for flex.

The things i want to know is :
should i publish map as map service or image service to access the density at every point under browser. and am i right is thinking to use identify task or is there some other trick. please give suggestion. is there any widget available.
Tags (2)
0 Kudos
25 Replies
NadeemQazi
Regular Contributor
Nadeem, 

It shouldn't make any xml files, just the swf when you compile. 

However, if you do have two xml files, did you make sure that your widget tag in the config.xml points to the one you are modifying?  

        <widget label="Identify" left="430" top="80" height="150"
                icon="assets/images/i_info.png"
                config="widgets/Identify/IdentifyWidget_1.xml"
                url="widgets/Identify/IdentifyWidget.swf"/>


R_


please note that i have used application builder (ARCGIS Viewer for flex) and when i used the identify widget it has created two xml files as i mentioned earlier. i checked the config file it points to identifywidget_1.xml and I have modified this file only. can u please send me the code that u used for testing it.please also note that iam testing on arcgis server 10.1 and identify widjet version 3.0.

<widget url="widgets/Identify/IdentifyWidget.swf" config="widgets/Identify/IdentifyWidget_1.xml" label="Identify Widget" icon="widgets/Identify/assets/images/i_info.png" preload="open"/>
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

Why are you setting the following fields:

<field name="ZONING_NAME" alias="Zoning Name"/>
<field name="ZONING_TYPE" alias="Zoning Type" popuponly="true"/>

In the data you sent me you do not have these fields

Try setting <layers onlythese="false">

And see if you get a result, if you do have a look at your REST endpoint and configure the widget with the appropiate field names

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

Why are you setting the following fields:

<field name="ZONING_NAME" alias="Zoning Name"/>
<field name="ZONING_TYPE" alias="Zoning Type" popuponly="true"/>

In the data you sent me you do not have these fields

Try setting <layers onlythese="false">

And see if you get a result, if you do have a look at your REST endpoint and configure the widget with the appropiate field names

Regards

Anthony


hi. i did both way removing the field and making layers onlythese= false and also tried for true but still no result found.  i am new to arcgis i understand URL but what you mean by REST endpoint , how to look at this. this is my identify_1.xml that i used.

<?xml version="1.0" ?>
<configuration>
    <betareturngeometryfix>false</betareturngeometryfix>
    <identifylayeroption>visible</identifylayeroption>
    <identifytolerance>5</identifytolerance>
    <defaultzoomscale>5000</defaultzoomscale>
    <keepidentifyactive>true</keepidentifyactive>
    <returngeometryforzoom>true</returngeometryforzoom>
    <enablelineselect>true</enablelineselect>
    <enableextentselect>true</enableextentselect>
    <enablepolyselect>true</enablepolyselect>
    <enablemouseovergraphicsinfo>true</enablemouseovergraphicsinfo>
    <enablemouseoverrecordinfo>false</enablemouseoverrecordinfo>
    <usemaptime>false</usemaptime>
    <infoautoclosemilliseconds>2000</infoautoclosemilliseconds>
    <autoactivatedtool>mappoint</autoactivatedtool>
    <excludebasemaps>false</excludebasemaps>
    <disablepopuplinks>true</disablepopuplinks>
    <labels>
        <zoom2message>Click to Zoom to Point</zoom2message>
        <identifylabel>Identify</identifylabel>
        <resultslabel>Results</resultslabel>
        <descriptionlabel>Use the identify tool to identify features on the map:</descriptionlabel>
        <pointlabel>Identify by Point</pointlabel>
        <linelabel>Identify by Polyline</linelabel>
        <rectlabel>Identify by Rectangle</rectlabel>
        <polylabel>Identify by Polygon</polylabel>
        <clearlabel>Clear</clearlabel>
        <loadinglabel>Loading...</loadinglabel>
        <removeresultmessage>Remove Result</removeresultmessage>
        <idfrom>Identify From</idfrom>
        <noresultsfoundlabel>No Results Found</noresultsfoundlabel>
        <resultsfoundlabel>Results Found</resultsfoundlabel>
    </labels>
    <useproxy/>
    <layers onlythese="true">
        <layer>
            <name>kerneldensity</name>
            <links>
                <link includeinresults="false" field="" alias="" tooltip="">
                    <linkprefix/>
                    <linksuffix/>
                    <iconfield/>
                    <iconprefix/>
                    <iconsuffix/>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>
   
    </layers>
    <symbols>
        <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">
            <outline color="0x448ccb" alpha="0.8" width="2"/>
        </simplefillsymbol>
        <simplemarkersymbol style="circle" size="12" color="0x448ccb" alpha="0.8" xoffset="0" yoffset="0" angle="0">
            <outline style="solid" color="0xffffff" alpha="0.8" width="1"/>
        </simplemarkersymbol>
        <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0"/>
        <simplelinesymbol color="0x448ccb" alpha="0.8" width="2"/>
    </symbols>
</configuration>
thanks for your time. any suggestion....
regards
nadeem.
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

Have you tried using <layers onlythese="false"> as your config file you have just posted has still got it set to true,

Regards

Anthony

P.S here is a link that explains REST and how you access it:

http://servicesbeta2.esri.com/arcgis/sdk/rest/index.html
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

Have you tried using <layers onlythese="false"> as your config file you have just posted has still got it set to true,

Regards

Anthony

P.S here is a link that explains REST and how you access it:

http://servicesbeta2.esri.com/arcgis/sdk/rest/index.html


thank you anthony it worked by setting false. however i could not understand what is reason. now one more help , actually i want to make a decision in my workflow based on the value of the pixel, how can i take this pixel value in a variable. Can i also use the widget in flex application. which one is better  i mean should we plan to build application using application builder of ARCGIS VIEWER or should we use flushbuilder. Once again thank you very much for ur kind help and patience 🙂
regards
nadeem
0 Kudos
AnthonyGiles
Honored Contributor
Nadeem,

The reason that it was not working when you had the setting on true was that you were asking it to return fields that are not in that layer (i.e. Zoning Type and Zoning Name). Setting the value to false you are ignoring those settings and just showing everything that is returned. If you want to be more specific in what is shown on the return you have to set the value to true then set up the fields that you want to return for each layer. These fields must match the ALIAS names in the REST endpoint.

If you want to do an identify task then make a decision on the result you will need to program your own widget using the uncompiled code in flash builder.

Please do not forget to mark this post as answered and start a new post if you have more queries.

Regards

Anthony
0 Kudos