Select to view content in your preferred language

Identify Widget for FlexViewer 2.1

58252
266
09-23-2010 11:34 AM
RobertScheitlin__GISP
MVP Emeritus
All,

   I have been waiting for the Final release of the FlexViewer 2.1 before I started to push out some widgets I have been working on.

Here is my Identify Widget for Flex Viewer 2.1. I have tested to ensure proper functioning with FlexViewer 2.1 and am now releasing it to you since the API Team did not get one into the FlexViewer.

Here is the link:

http://www.arcgis.com/home/item.html?id=39cf66d58c234279ba728c50461a1a89

More FlexViewer 2.1 widgets to come stay tuned...
Tags (2)
0 Kudos
266 Replies
RobertScheitlin__GISP
MVP Emeritus
Jon,

   Here is the fix:

        if(fldArr.toUpperCase() == identLinkField.toUpperCase()){
         //concatenate
         if(value != "" && value != "Null")
          link = identLinkPre + value + identLinkSuffix;
        }


I will work on getting this in the code for the next version.
0 Kudos
JonFisher
Emerging Contributor
Thanks Robert, that worked perfectly for me.
0 Kudos
RashidMalik1
Emerging Contributor
Robert,

Could you please shed some light on this thread?

http://forums.arcgis.com/threads/23502

Sorry for addressing you from another thread.  I don't know how to send you a private message.  I would greatly appreciate your help.
0 Kudos
DavidAllen
Frequent Contributor
I'm having an odd issue. When I run my application from the flash builder program to test it, the Identify widget is displaying information about my location in a pop-up box that points to the feature. It includes all the fields as well as a little picture that's associated with the feature. See Sign1.gif attached. When I compile this and view it through a web browser, none of this information is displayed with the feature. See Sign2.gif attached. Any idea what's going on?

David Allen
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   It looks like your production machine does not have access to the images. Are they in a virtual directory that is restricted in some way?
0 Kudos
DavidAllen
Frequent Contributor
David,

   It looks like your production machine does not have access to the images. Are they in a virtual directory that is restricted in some way?



That's a good thought. Let me go take a look, and maybe get the server guys involved.

Thanks!
0 Kudos
DavidAllen
Frequent Contributor
Well that was the answer - the web server wouldn't send a jpg file out, but it has no trouble with a gif. So I changed the format of the images and they work fine now.
0 Kudos
EddBlaine
Emerging Contributor
OK. I've got a weird thing going on that I've been banging my head against the wall over. I've configured the widget to work with five different services - Parcels, FLU, Development projects, ParksPreserves and Zoning. The identify task works great with Parcels & Zoning but will not identify features from the other three services. I've double checked everything that I could think of - even switching the order of the layers in IdentifyWidget.xml and setting them to return one column only. No luck. If I set the <layers onlythese> tag to false, they will identify fine. I've posted the app I'm working on here: http://199.201.190.110//ParksPreserves My rest services are here http://199.201.190.110/ArcGIS/rest/services/ParksPreserves And my config file for the widget is...

<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
    // Version 2.2.2f - Mar. 2, 2011
    //
    ///////////////////////////////////////////////////////////////////////////////
-->
<configuration>
<identifylayeroption>visible</identifylayeroption>
<identifytolerance>5</identifytolerance>
<defaultzoomscale>5000</defaultzoomscale>
<keepidentifyactive>true</keepidentifyactive>
<returngeometryforzoom>true</returngeometryforzoom>
<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</pointlabel>
  <clearlabel>Clear</clearlabel>
  <loadinglabel>Loading...</loadinglabel>
</labels>
<useproxy>
  <proxylayer>
   <!--name>Imagery</name-->
  </proxylayer>
</useproxy>
<layers onlythese="false">
  <layer>
   <name>Parcels</name>
   <fields>ParcelID,Owner1,Owner2,Address,City,State,Zip,SiteAddress,Acres,WebLink</fields>
   <linkfield>WebLink</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>12000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
  <name>ParksPreserves</name>
   <fields>SiteName,Address,ZipCode,PhoneNumber,OperationHours,Weblink</fields>
   <linkfield>WebLink</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>12000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>Zoning</name>
   <fields>Zoned,Weblink</fields>
   <linkfield>Weblink</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>FLU</name>
   <fields>FLUCode,Weblink</fields>
   <linkfield>Weblink</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>Development</name>
   <fields>ProjectName,Type,Description,Category,Status</fields>
   <linkfield>Weblink</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
</layers>
<info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>

Does anyone have a clue? Robert, have you bumped into this problem before? ANY help would be appreciated. Thanks!

Edd
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Edd,

    The likely issue is that the layer name in the IdentifyConfig.xml has to match exactly with the name of the layer in the REST services directory.

<layer>
<name>ParksPreserves</name>
<fields>SiteName,Address,ZipCode,PhoneNumber,OperationHours,Weblink</fields>
<linkfield>WebLink</linkfield>
<linkprefix></linkprefix>
<linksuffix></linksuffix>
<iconfield></iconfield>
<iconprefix></iconprefix>
<iconsuffix></iconsuffix>
<zoomscale>12000</zoomscale>
<forcescale>true</forcescale>
</layer>


Should be:

<layer>
<name>Parks & Preserves</name>
<fields>SiteName,Address,ZipCode,PhoneNumber,OperationHours,Weblink</fields>
<linkfield>WebLink</linkfield>
<linkprefix></linkprefix>
<linksuffix></linksuffix>
<iconfield></iconfield>
<iconprefix></iconprefix>
<iconsuffix></iconsuffix>
<zoomscale>12000</zoomscale>
<forcescale>true</forcescale>
</layer>


and if that doesn't work than you have to escape the apostrophe with
&apos;
0 Kudos
NateRose
Deactivated User
Robert,

I downloaded the latest version of this identify widget recently.  I went through at set up the .xml and compiled the application using Flash Builder 4.  It doesn't seem to want to build the .swf file in the debug folder, but will rebuild .swf files for other widgets.

Today I copied the .swf from the flex 2.2 compiled version into the debug folder and it works fine.  I'm just curious why the other widgets will build the .swf but this won't for some reason.

Thanks,

Nate
0 Kudos