Select to view content in your preferred language

IdentifyWidget 3.0.1 - can you help to config one layer?

1805
26
Jump to solution
10-24-2012 06:51 AM
by Anonymous User
Not applicable
Original User: sgalloway

I'd like to config the IdentifyWidget 3.0.1 and could use some help.  I am running AGS 10.0.  Previously I added some layers and widgets that work but I am not sure how to config this IdentifyWidget.  I tried to comment out all but the essential code to make just one layer work.  Can you look at the attached files?  Thanks.
Stew
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: rscheitlin

Stew,

   Another question is are you sure you are using Version 3.0 of the Flex Viewer? What does it say when you right click on the map and choose "About ArcGIS Viewer for Flex..."

View solution in original post

0 Kudos
26 Replies
RobertScheitlin__GISP
MVP Emeritus
Stew,

   Wow, what is not wrong with this. Did you add all the pound signs in the IdentifyWidget.xml or did the file just get corrupted?

In the config.xml is your IdentifyWidget really in a folder called identify6? Normally the folder would be capital I for Identify and no 6. Like this:

        <widget label="Identify" left="330" top="80" preload="open"
                icon="assets/images/i_info.png"
                config="widgets/Identify/IdentifyWidget.xml"
                url="widgets/Identify/IdentifyWidget.swf"/>


You do understand that Flex is a case sensitive language right?

Here is the fixed IdentifyWidget.xml (BIG assumption that you did read the pdf about using the field alias names and the REST Service directory name of the layer).
0 Kudos
by Anonymous User
Not applicable
Original User: sgalloway

Ha, that bad eh?  Thanks for the quick response.
�??case sensitive�?�?  You do understand that I know nothing about Flex language 🙂 
The good news is that I don�??t get an error msg now but I don�??t get anything, nothing gets returned.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stew,

  So, No error is good. Now on to why it is not returning any results...

Did you read in the Identify Widget XML Configuration.pdf that the name of the layer you are configuring has to be
The name element specifies the EXACT name of the layer as it is displayed in the REST services
directory
.
Also the fields:
The fields parent element contains all the individual field child elements that will be used for this
particular layer. Everything for the field element is specified as an attribute of the element. The name
attribute is the EXACT ALIAS (as it is displayed in the REST services directory) of the field and is a
REQUIRED attribute.
0 Kudos
by Anonymous User
Not applicable
Original User: sgalloway

The labels\names\layers look like they match.  Am I matching up the correct parts?

CONFIG.XML
<layer label="Armory Locations" type="dynamic" visible="true" alpha="10.0"
        url="http://ngnya0-gis-02/NYArcGIS/rest/services/Armory_Locations/MapServer"/>

IDENTIFYWIDGET.XML
</labels>
<useproxy><!-- Enter the label of the MapService from the main config.xml -->

  <!--<proxymapservice label="Imagery" />
  <proxymapservice label="Armory Locations" />-->
</useproxy>

REST SERVICE:
Layer: DMNA_Fac2011_DESCRIP (ID: 0)
Display Field: Descrip
Type: Feature Layer
Geometry Type: esriGeometryPoint
Description:
Definition Expression: "label_site" = 'SITE' OR "label_site" = 'TNG'
Copyright Text:
Min. Scale: 0
Max. Scale: 0
Default Visibility: True
Extent:
XMin: 144442.606310887
YMin: 4495714.38354477
XMax: 698655.175929449
YMax: 4950087.10403643
Spatial Reference: 26918
�?��?��?��?��?��?�
Fields:
�?� OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID)
�?� Shape (Type: esriFieldTypeGeometry, Alias: Shape)
�?� SiteNumber (Type: esriFieldTypeString, Alias: SiteNumber, Length: 6 )
�?� INSTNAME (Type: esriFieldTypeString, Alias: INSTNAME, Length: 34 )
�?� INSTNAME2 (Type: esriFieldTypeString, Alias: INSTNAME2, Length: 40 )
Type ID Field: N/A
Supported Interfaces:   REST

IDENTIFYWIDGET.XML

<layers onlythese="false">
  <layer>
   <name>DMNA_Fac2011_DESCRIP</name>
   <fields>
    <field name="INSTNAME2" alias="INSTNAME2" />
    popuponly="true" />
   </fields>
0 Kudos
RhettZufelt
MVP Notable Contributor
The labels\names\layers look like they match. Am I matching up the correct parts? 

CONFIG.XML 
<layer label="Armory Locations" type="dynamic" visible="true" alpha="10.0" 
url="http://ngnya0-gis-02/NYArcGIS/rest/services/Armory_Locations/MapServer"/> 

IDENTIFYWIDGET.XML 
</labels> 
<useproxy><!-- Enter the label of the MapService from the main config.xml --> 

<!--<proxymapservice label="Imagery" /> 
<proxymapservice label="Armory Locations" />--> 
</useproxy> 

REST SERVICE: 
Layer: DMNA_Fac2011_DESCRIP (ID: 0) 
Display Field: Descrip 
Type: Feature Layer 
Geometry Type: esriGeometryPoint 
Description:  
Definition Expression: "label_site" = 'SITE' OR "label_site" = 'TNG' 
Copyright Text:  
Min. Scale: 0 
Max. Scale: 0 
Default Visibility: True 
Extent:  
XMin: 144442.606310887 
YMin: 4495714.38354477 
XMax: 698655.175929449 
YMax: 4950087.10403643 
Spatial Reference: 26918 
â?¦â?¦â?¦â?¦â?¦â?¦ 
Fields:  
â?¢ OBJECTID (Type: esriFieldTypeOID, Alias: OBJECTID) 
â?¢ Shape (Type: esriFieldTypeGeometry, Alias: Shape) 
â?¢ SiteNumber (Type: esriFieldTypeString, Alias: SiteNumber, Length: 6 ) 
â?¢ INSTNAME (Type: esriFieldTypeString, Alias: INSTNAME, Length: 34 ) 
â?¢ INSTNAME2 (Type: esriFieldTypeString, Alias: INSTNAME2, Length: 40 ) 
Type ID Field: N/A 
Supported Interfaces: REST  

IDENTIFYWIDGET.XML 

<layers onlythese="false"> 
<layer> 
<name>DMNA_Fac2011_DESCRIP</name> 
<fields> 
<field name="INSTNAME2" alias="INSTNAME2" /> 
popuponly="true" /> 
</fields>



<layers onlythese="false">
   <layer>
      <name>DMNA_Fac2011_DESCRIP</name>
         <fields>
             <field name="INSTNAME2" alias="INSTNAME2" popuponly="true" />
          </fields>



Try this for your fields tag(s). you are terminating your field tag before setting the popuponly attribute.

R_
0 Kudos
by Anonymous User
Not applicable
Original User: sgalloway

I cut and pasted the lines of code but no go.  I thought it might work this AM after rebooting but still no.

The xml gets compiled into the swf, right?  The IdentifyWidget.swf has the original date on it - does that mean it is not getting compiled?  It does not look like I have Adobe Flash Builder installed but could there be some other (IDE?) program that would compile it?  Or could it be that I have been able to work with a few xmls without compiling?

Not sure how to get to the list of modules to see if Identify is listed:
"Compiling widgets
Any widget you want to use must be compiled. To compile a widget, make sure it is listed among the Flex modules to build for your project (see Project > Properties > Flex modules)."
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Stew,

   If you are not using the un-compiled version of this widget by adding it into Flash Builder to an existing Flex Viewer project that you already have setup, then none of that compile stuff or add to modules list applies to you. It sounds like you are just using the compiled version of Flex Viewer and thus are just adding the Identify folder that contains IdentifyWidget.swf and IdentifyWidget.xml and an assets folder, to your already compiled Flex Viewer app.

The xml gets compiled into the swf, right?
No the mxml is what gets compiled to a swf (if you are using the un-compiled source code). All you should have to do is add the contents of the "compiled_FV3.0" folder from the download zip, which is the "Identify" folder and put copy that under the widgets folder in your compiled Flex Viewer directory. Or if you are using App Builder than you go to App Builder:


  • In Application Builder, click the Settings link to open the  Settings page. Make certain that the advanced settings are displayed.

  • Click Manage Custom Widgets.

  • In the Manage Custom Widgets dialog box, browse to the ZIP file containing the packaged widget.

http://resources.arcgis.com/en/help/flex-viewer/concepts/01m3/01m30000004m000000.htm


To test and see if you have the identify widget working at all:

  1. Do you at least get the identify widget to display in the viewer

  2. Are you leaving the identify widgets dropdown set to All Layers and are clicking on the map?

  3. You might want to try and comment out all layers including your own and then test again:

    <layers onlythese="false">
        <!--<layer>
            <name>DMNA_Fac2011_DESCRIP</name>
            <fields>
                <field name="INSTNAME2" alias="site name" />
                <field name="SiteNumber" alias="site number" popuponly="true" />
            </fields>
            <links>
                <link includeinresults="false" field="" alias="" tooltip="">
                    <linkprefix></linkprefix>
                    <linksuffix></linksuffix>
                    <iconfield></iconfield>
                    <iconprefix></iconprefix>
                    <iconsuffix></iconsuffix>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>-->


Because you have the onlythese="false" you should get results back for any layer in you map that is identifiable.
0 Kudos
by Anonymous User
Not applicable
Original User: sgalloway

Robert,
I am using the compiled version. 
Today I started from scratch, deleting all identify widget files and then adding the contents of your identify folder to the Flex Viewer folder; IdentifyWidget.xml, IdentifyWidget.swf, meta.xml.

I made edits to the IdentifyWidget.xml.

The blue "i" Identify button displays in the toolbar and bounces when clicked.

"Comment out":  I deleted all references to all layers in the config file (that's what all the pound signs were in my first uploaded file; I thought thats how you comment lines out).  The button displays but no result.

I added one layer, then two layers, they were turned on, but no go.

What about <useproxy>
do I need this: <useproxy>true</useproxy>

I noticed a few differences so:
Then I tried adding this in front of <layer>:  <!--
  <proxymapservice label="Facility Locations" />-->
<useproxy>true</useproxy>
<layers onlythese="false">
  <!--<layer>
   <name>Facility_Locations</name>
   <fields>
    <field name="SiteNumber" alias="SiteNumber" />popuponly="true" />
And then I tried deleting this after the alias name: />
<field name="SiteNumber" alias="SiteNumber" />popuponly="true" />
   </fields>
   <links>
    <link includeinresults="false" field="" alias="" tooltip="">
0 Kudos
RhettZufelt
MVP Notable Contributor
Stew,

When posting, if you press the pound sign icon ( # ) then paste your "code" in between the
 tags that it puts there, it shows you code much nicer and is a lot easier to interpret.  This is how Robert got it to appear in its own "Code:" block above.


R_
0 Kudos