Identify Widget Question

1999
59
05-20-2011 11:38 AM
TomSedlacek
New Contributor III
This question pertians to Robert Scheitlins' Identify Widget 2.3.1.
I have added the widget to my web app and it's exactly what I'm looking for.  HOWEVER, it only seems to identify those layers that are a part of my basemap.  I've modified the "onlythese" code in the compiled version six ways from Sunday and it will not id any of the layers in my 'operational layers'.

Any ideas anyone?  Robert?

Thanks!

Tom Sedlacek GISP
Engineering Tech / GIS
Clark Regional Wastewater District
360-993-8811
Email: TSedlacek@CRWWD.com
Tags (2)
0 Kudos
59 Replies
TrishRempel
New Contributor III
Hi Robert,

Please feel free to add this code to the Identify widget; by the way, I have found several of your widgets to be very helpful, so thank you for your contributions!
0 Kudos
TaraFeaga
New Contributor
Serena,

   What do your additional compiler arguments look like for your project when you look at your projects properties > Flex Compiler?


Hi Robert,

I am having the exact same problem that Serena reported when taking your compiled 3.0 code (Identify, Toc, Route) and inserting them directly in a FlexViewer 3.0 compiled code.  I do NOT have this problem doing the exact same process using your 2.5 compiled code and inserting directly into a FlexViewer 2.5 compiled code.

I also do not have this problem when using the source code and compiling myself.  However, I need to be able to push these, as well as a custom widget, to the FlexViewer compiled 3.0 code.  It seems that ESRI is pointing the locale swfs to assets/locale/{locale}.  I have tried to compile using the source code to point to this location and then pushing out to a compiled version with no luck:

-locale en_US  -source-path=assets/locale/{locale} -keep-all-type-selectors=true


Have you encountered this?  Am I missing any additional arguments, compiler or otherwise, that you are aware of?

Thanks for any help in advance!

TF
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tara,

   Thanks for letting me know of this issue. I have been able to reproduce it and I am working on the fix right now. I will post something here when I have the issue resolved.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Serena and Tara,

Go get version 3.0i of my identify widget and the error will no longer be there.

Tara,

   The TOC and Route widget have been fixed as well.
0 Kudos
TaraFeaga
New Contributor
Robert,

Thank you so much for fixing these!  Would you mind posting what you changed in your source code before compiling for future reference? 


Thanks,
Tara
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Tara,

   All you do is remove the locale from the compiler argument.

Original:
-locale en_US  -source-path=assets/locale/{locale} -keep-all-type-selectors=true


Corrected:
-locale=  -source-path=assets/locale/{locale} -keep-all-type-selectors=true
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   A New version is now available:

* 3.0.1 - Added a drop down to choose which configured layer to identify or just all layers
    - Added a remove button to each result, so that you can remove unwanted results from the list
    - Added tag excludelayer to the IdentifyWidget.xml that allows you to specify a layer that you do not
      want to see results for.
    - Fixed widget resizing issue after a popup has been displayed
    - Added tag disablepopuplinks to the IdentifyWidget.xml that allows you to turn off url links for popups only.
    - If no results are found the widget will automatically transition back to the identify tools view
    - All identify tools buttons toggle now.
    - Mouse over graphics now works even if you have the widget set to keepidentifyactive.
0 Kudos
wilfredwaters
New Contributor III
Hi Robert,

I am getting a 1085 error when using the Identify 3.01 tool. I followed your PDF help file in constructing the <layers> portion of the syntax, the rest of the syntax remains unchanged from the tool as I downloaded it. Yes, the REST service name is what is used for the <name> tag.

Here is my syntax:

<layers onlythese="true">
  <layer>
   <name>offices</name>
   <fields>
    <field name="Address" />
                                <field name="City" />
                                <field name="State" />
                                <field name="Postcode" />
                        </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>
                 <layer>
                        <name>QLD rail</name>
   <fields>
    <field name="FNAME" alias="Name"/>
                                <field name="ELECTRIFIE" alias="Electrified"/>
                        </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>
</layers>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
wilfred,

   I would need to see your whole xml as 1085 normally means that you have a unterminated element in your xml.
0 Kudos
wilfredwaters
New Contributor III
Hi Robert,

I am getting a 1085 error when using the Identify 3.01 tool. I followed your PDF help file in constructing the <layers> portion of the syntax, the rest of the syntax remains unchanged from the tool as I downloaded it. Yes, the REST service name is what is used for the <name> tag.

Here is my syntax:

<layers onlythese="true">
 


Hi Rober, thanks for your prompt reply. This problem has been fixed simply by deleting the widget folder and starting again from scratch. You're right, probably was a syntax error elsewhere. I note, however, that using <fields all="true"> appears not to display all fields. I appreciate your above comment that it is better to display only relevant fields, although it would be good to know why the tag doesn't seem to work, only displaying the layer name but no field values.

<?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><!-- 2 seconds -->
<autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
<excludebasemaps>true</excludebasemaps>
<disablepopuplinks>false</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><!-- Enter the label of the MapService from the main config.xml -->
  <!--<proxymapservice label="Imagery" />
  <proxymapservice label="Streets" />-->
</useproxy>
<layers onlythese="true">
  <layer>
   <name>offices</name>
   <fields all="true">
<!--
    <field name="Address" alias="Address" />
    <field name="City" alias="City" popuponly="true"/>
    <field name="State" alias="State" popuponly="true"/>
    <field name="Postcode" alias="Postcode"/>
-->
   </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>
  <layer>
   <name>QLD rail</name>
   <fields all="true">
<!--
    <field name="FNAME" alias="Name" />
    <field name="WIDTH" alias="Gauge" popuponly="true"/>
    <field name="ELECTRIFIE" alias="Electrified?" popuponly="true"/>
    <field name="OP_STATUS" alias="Status"/>
    <field name="ESRIdate" alias="Date"/>popuponly="true" dateformat="YYYY/MM/DD" useutc="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>
</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>

DATES

I have another question about the documentation. You say to consult the ESRI date format documentation, which I found here. It appears to say that a date should be in "yyyy-mm-dd". The date in my map service, however is YYYYMMDD. I created a new date field, threw the YYYYMMDD data in there but it uses / instead of -. As you can see in the syntax for the second layer in the identify tool, I tried to get it to display the dates in YYYY/MM/DD format, since in the map service they are in DD/MM/YYYY.

What is the problem with the date?

EDIT: also, I forgot to mention that the date should only show in the pop up, but in fact it shows in the list of results as well, not only the pop up.

Thanks so much for making this tool.

Wil
0 Kudos