Select to view content in your preferred language

Identify Widget for FlexViewer 2.1

60441
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
CaryChadwick
Emerging Contributor
Oh, I see, whoops. Yes, the widget is definitely 2.1.7 and we are still using ArcGIS Server 9.3. We have 10, just haven't installed it yet. Maybe this is enough of a reason to make the upgrade. That and your dynamic legend, haha.

Thanks, Robert. If you think of anything else I can try, let me know.
0 Kudos
MichelleKleckler
Emerging Contributor
I am having the same issues.  The identify tool is only displaying results for the first field, even though I am using field Alias names.  I am also on 9.3.1 server and 2.1.7 identify widget, so any ideas would be very helpful!
0 Kudos
MichelleKleckler
Emerging Contributor
I am having the same issue where the widget is only populating the data for the first field.  I am using Server 9.3.1 and version 2.7.1 of the widget.  When I visit this link http://gis.calhouncounty.org/IdentExample/index.html?config=config-identify.xml to test the tool the problem occurs as well.  Any help would be great!  Thank You
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Cary & Michelle,


   After some testing I have found that if your fields list has a space after the comma then that causes an issue. See if that is the issue you are having. Make sure you clear your browser cache so that your modified xml gets used. The next version will address this issue.
0 Kudos
WilliamRockwell
Occasional Contributor
Hello Robert,

Like many others, I'm grateful for this widget. However, when I use it, I get "invalid layer ID specified" and no results. My dynamic layer(s) are visible and I'm really just looking at ID the Parcels layer....not sure what's going on. I'm new to Flex, so any help is appreciated. Thanks for your time.

<layer>
   <name>Parcels</name>
   <fields>ADDRESS, PIN, BILLTONAME</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>12000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
William,

That error likely means that you do not have the IdentifyWidget.xml configured correctly.

<layer>
   <name>Zoning</name>
   <fields>ZONING_NAME, ZONING_TYPE</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>

The name indicated in red above is the actual layer name as it appears in the REST services directory.
0 Kudos
MichelleKleckler
Emerging Contributor
Thank You!!!
0 Kudos
WilliamRockwell
Occasional Contributor
Does the service name matter?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
William,

   Can you post your whole IdentifyWidget.xml and a screen capture of the error?
0 Kudos
WilliamRockwell
Occasional Contributor
Sure. Oddly, I was able to get it to work with the storm sewer layer just fine. I renamed the parcels layer to "Land Parcels" to no avail. Thanks again for your help!


<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
    // Version 2.1.7 - Nov. 17, 2010
    //
// If you want to specify particular layers to only return certain fields
// then you add then to the layers list below. If you need a hyperlink to
// appear in your results than ensure you have the link field in your fields
// list as well as the linkfield
// This new version gives you the ability to use a link field that is not
// a complete url. You can specify a hardcoded pre url and suffix url portion
// Also ths version allows you to specify the icon that will be used for the
// link. Zoom scales can be specified for different layers now too.
// Thanks to Erwan Caradec for those suggestions. Also thanks to
// Ernst Eijkelenboom who reminded my that every one who uses my wodgets are
// always english speaking, so the zoom2message have been added to allow you
// to add the text in a different language.
//
// In v2.1.3 the option of keepidentifyactive has been added to allow you
// to specify that the identify tool will remain active after each indentify
// click on the map instead of the default behavior of defaulting back to map
// navigation. The zoom2message has been moved into the labels parent where it
// belongs.
//
// In v2.1.4 the option for only identifying the specified layers has been added
// onlythese="true"
// Fix issue with feature type services that point to a MapService
//
// In v2.1.5 an issue with using FlexViewer draw tool is that the drawtooltips
// could not be controlled by the widget. Deactivating it when closing the widget
// did not function correctly. So in this version the widget uses it's own
// draw tool.
//
// In v2.1.6 an issue with not being able to click on the hyperlink in the info
// popup window has been resolved. You will have to manually close the info
// window your self now
//
// Delevoped by Robert Scheitlin
//
////////////////////////////////////////////////////////////////////////////////
-->
<configuration>
<identifylayeroption>visible</identifylayeroption>
<identifytolerance>5</identifytolerance>
<defaultzoomscale>5000</defaultzoomscale>
<keepidentifyactive>true</keepidentifyactive>
<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>
  <selectionlabel>Features Identified:</selectionlabel>
</labels>
<layers onlythese="true">
  <layer>
   <name>Storm Lines</name>
   <fields>MAINTAINED,SIZE,TYPE,VIDEO,Shape.len</fields>
   <linkfield>VIDEO</linkfield>
   <linkprefix>\\</linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>1500</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>Points of Interest</name>
   <fields>type, description</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>LandUse</name>
   <fields>LANDUSE_NAME</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>Land Parcels</name>
   <fields>ADDRESS,PIN,BILLTONAME</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>1200</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>TrafficCams</name>
   <fields>ONLINE, DESCRIPTION, LAST_UPDATED, URL</fields>
   <linkfield>URL</linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>2000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>PoliceStations</name>
   <fields>PD_NAME, ADDRESS</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>2000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
  <layer>
   <name>Weather Observations</name>
   <fields>Icon_used, URL, Type</fields>
   <linkfield>URL</linkfield>
   <linkprefix>http://www.wunderground.com/history/airport/</linkprefix>
   <linksuffix>/2010/9/24/DailyHistory.html</linksuffix>
   <iconfield>Icon_used</iconfield>
   <iconprefix>http://icons-pe.wxug.com/i/c/a/</iconprefix>
   <iconsuffix>.gif</iconsuffix>
   <zoomscale>10000</zoomscale>
   <forcescale>true</forcescale>
  </layer>
</layers>
<info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>
0 Kudos