Select to view content in your preferred language

Identify Widget for FlexViewer 2.1

58380
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
KwokKin_Wai
Emerging Contributor
Dear Robert,
   I have used the new Indentify Widget, its great, but one thing: In this widget, when I identify one feature, the information show on the widget, after I move the mouse over the information, an additional info popup on the location that I clicked. I want to popup the information box on a mapclick on that point at the same time with the information shown on the widget, how can I do that?

Looking for your reply

John
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
John,

   People have asked about that before and I have to explain why it does not work that way and never will. Basically when you identify you are clicking on the map which creates a point and then any thing under that point (i.e layers are identified). So you may have lots of layers that are identified and have results so which one of those results would you get by clicking on the point graphic as you are asking for? It just doesn't make sense to add a mouse event to the graphic like other widget and that is why this widget does not do that.
0 Kudos
KwokKin_Wai
Emerging Contributor
Dear Robert,
   Thank you for your quick responses. I understand the logic of the widget but If I have only one layer and I am sure what a mouse click will result in only one layer identification, can I pop up with that layer information together with that layer's information shown on the identify widget? I have look through the codes in the identify.mxml and does not have any ideas how can I do amendment for this.
   Sorry to brother you again and look forward to your reply

John
0 Kudos
DavidAllen
Frequent Contributor
Robert - great job on the widget and thanks for sharing.

I initially had issues when I installed, but reading all these posts eventually showed all the necessary fixes. Is it possible to put an FAQ on the download site?

It seems customary that everyone throw in a "wish list" item, so here's mine. It would be great if there was an alias name for the hyperlink. Instead of users seeing the web link, they'd see something like "Click here to see the plans".

Oh - and multiple hyperlink fields would be good, too.

Thanks again!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

   There is currently the ability to specify the alias for the hyperlink text in the grid. Do you not see the list at the top of the IdentifyWidget.xml file that has the list of attributes?
hyperlinkaliastext - the text to show instead of the url


The download site is controller by esri and not me so the FAQ on that site is a no go.

Multiple hyperlink fields are possible in the datagrid but I have no plans to add multiple hyperlinks to the info popup.
0 Kudos
DavidAllen
Frequent Contributor
Actually, I don't see the alias for the URL. Is there a more current version with that in there?

Anyway, I'm getting TONS of use out of this widget!!!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
David,

Version 2.2 is the latest is that the one you are using? Also you are talking about the link in the datagrid right?
0 Kudos
JonFisher
Emerging Contributor
Actually, I don't see the alias for the URL. Is there a more current version with that in there?

Anyway, I'm getting TONS of use out of this widget!!!


I can confirm that the hyperlinkalias tag is not present in the 2.2 xml. It would be extremely helpful if either in the readme or a comment in the xml contained guidance on what each tag is for; some of them like <iconprefix> are not immediately apparent to me, and there are some other tricky things (like requiring field alias to be used rather than field name) that would be great to document.

I also notice that in your examples you do have spaces after each field although you mention they shouldn't be there.

One last question: I have gotten this to work for all of my layers/fields except one case. I have a map service where several fields come from a joined table (http://maps.tnc.org/ecadpubprod-anon/rest/services/conservation_projects_anon_WM/MapServer/1), and the fields that have an alias with an "_" character aren't coming through. I have other layers with fields that have an underscore in the alias, and the fields in this layer that don't have underscores in the alias work fine. Is that a possible limitation of the code? I've triple-checked I have the exact alias name in my xml file.

This is a great widget, and will be incredibly helpful to The Nature Conservancy, thanks for submitting!

I'm pasting in the contents of the 2.2 IdentifyWidget.xml so you can confirm whether or not it's what it should be:

<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
    // Version 2.2 - Dec. 17, 2010
    //
    ///////////////////////////////////////////////////////////////////////////////
-->
<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>
<useproxy>
  <proxylayer>
   <!--name>Imagery</name-->
  </proxylayer>
</useproxy>
<layers onlythese="false">
  <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>
  <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>Parcels</name>
   <fields>PARCELID</fields>
   <linkfield></linkfield>
   <linkprefix></linkprefix>
   <linksuffix></linksuffix>
   <iconfield></iconfield>
   <iconprefix></iconprefix>
   <iconsuffix></iconsuffix>
   <zoomscale>12000</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>
</layers>
<info>widgets/InfoTemplates/InfoPopupWidget.swf</info>
</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jon,

   Thanks for pointing that out. I was actually getting this widget and by enhanced Search Widget confused.

Currently in 2.2 of the Identify widget there is no hyperlink alias.

I will look at adding this to a future version though.

The spaces issue has been resolved in Version 2.2 so it does not matter if you have them in there or not NOW.

What iconfield, iconprefix, and iconsuffix do is allow you to specify a particular icon to use in the identify results instead of the standard black circle with the orange arrow inside it.

So a use case would be you have a hyperlink field that has a pdf url in it. if you had a iconfield in your data also that specified a image file that is url accessible then the orange arrow icon could be replaced with your custom image in the identify results.

So example would be iconprefix would have:
<iconprefix>http://myserver/icons/</iconprefix>
<iconfield>icofield</iconfield>
<iconsuffix>.jpg</iconsuffix>

so if your icofield has a value of "pdf" then the complete url would be "http://myserver/icons/pdf.jpg" and that image would be used for the little icon that by default is the black circle with the orange arrow in it.

Hope this clears some things up. I will consider better documentation. No promises though as these widgets are done in my free time and the majority of them I don't even use on my site.
0 Kudos
JonFisher
Emerging Contributor
Jon,

   Thanks for pointing that out. I was actually getting this widget and by enhanced Search Widget confused.

Currently in 2.2 of the Identify widget there is no hyperlink alias.

I will look at adding this to a future version though.

The spaces issue has been resolved in Version 2.2 so it does not matter if you have them in there or not NOW.

What iconfield, iconprefix, and iconsuffix do is allow you to specify a particular icon to use in the identify results instead of the standard black circle with the orange arrow inside it.

So a use case would be you have a hyperlink field that has a pdf url in it. if you had a iconfield in your data also that specified a image file that is url accessible then the orange arrow icon could be replaced with your custom image in the identify results.

So example would be iconprefix would have:
<iconprefix>http://myserver/icons/</iconprefix>
<iconfield>icofield</iconfield>
<iconsuffix>.jpg</iconsuffix>

so if your icofield has a value of "pdf" then the complete url would be "http://myserver/icons/pdf.jpg" and that image would be used for the little icon that by default is the black circle with the orange arrow in it.

Hope this clears some things up. I will consider better documentation. No promises though as these widgets are done in my free time and the majority of them I don't even use on my site.


Excellent, that's really helpful. I had actually considered writing similar functionality to make it clear when a link goes to a specific document type. This widget is really key as many users expect Google style functionality where they just click on something and it tells them more. Thanks again for contributing it.
0 Kudos