Select to view content in your preferred language

Identify Widget 3.4: No Results Found Message

2321
17
Jump to solution
08-23-2013 11:05 AM
DanielJohns
Frequent Contributor
The 'No Results Found' message keeps popping up when after identifying features. Results are returned (see attached image), but the message keeps popping up. If I remove a record it will update the results and display the number of records found.

[ATTACH=CONFIG]26931[/ATTACH]

Due to the thread text length limit, I could only included certian sewer layers.

<?xml version="1.0" ?> <!-- encoding="UTF-8" --> <configuration>     <identifylayeroption>visible</identifylayeroption>     <identifytolerance>10</identifytolerance>     <defaultzoomscale>5000</defaultzoomscale>     <keepidentifyactive>true</keepidentifyactive>     <returngeometryforzoom>true</returngeometryforzoom>     <enablelineselect>true</enablelineselect>     <enableextentselect>true</enableextentselect>     <enablepolyselect>true</enablepolyselect>     <enablecircleselect>true</enablecircleselect>     <enableellipseselect>true</enableellipseselect>     <enablemouseovergraphicsinfo>false</enablemouseovergraphicsinfo>     <enablemouseoverrecordinfo>true</enablemouseoverrecordinfo>     <enablegraphicclickinfo>true</enablegraphicclickinfo>     <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>     <disablelayerdropdown>false</disablelayerdropdown>     <disablealllayerschoice>false</disablealllayerschoice>     <replacenullswithemptystring>true</replacenullswithemptystring>     <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>         <circlelabel>Identify by Circle</circlelabel>         <ellipselabel>Identify by Ellipse</ellipselabel>         <clearlabel>Clear</clearlabel>         <loadinglabel>Loading...</loadinglabel>         <removeresultmessage>Remove Result</removeresultmessage>         <idfrom>Identify From</idfrom>         <noresultsfoundlabel>No Results Found</noresultsfoundlabel>         <resultsfoundlabel>Results Found</resultsfoundlabel>         <alllayers>All Layers</alllayers>         <layersremaining>layers remaining:</layersremaining>     </labels>     <useproxy><!-- Enter the label of the MapService from the main config.xml -->         <!--<proxymapservice label="Imagery" />          <proxymapservice label="Streets" /> -->     </useproxy>               <!-- Sewer Layers -->  <layers onlythese="true"> <!--   <excludelayer name="AerialHybrid_2009" /> --> <!--   <excludelayer name="AerialHybrid_2011" /> --> <!--   <excludelayer name="AerialLayer_2009" /> --> <!--   <excludelayer name="AerialLayer_2011" /> --> <!--   <excludelayer name="BaseLayers" /> --> <!--   <excludelayer name="Routes" /> --> <!--   <excludelayer name="Notifications" /> --> <!--   <excludelayer name="CostSharingLayers" /> -->      <layer>    <name>Sewer Manhole</name>    <id>11</id>    <url>http://server/svr/rest/services/UtilityLayers/MapServer</url>    <fields all="false">     <field name="Rim elevation" />     <field name="As-built #" />     <field name="As-built link" popuponly="true" />     <field name="Manhole # (as-built)" />     <field name="Status" />     <field name="Owned and maintained by" />     <field name="Comments" />    </fields>    <layer>    <name>Sewer Tee, Tap or Cross</name>    <id>18</id>    <url>http://server/svr/rest/services/UtilityLayers/MapServer</url>    <fields all="false">     <field name="Type of fitting" />     <field name="Size" />     <field name="Material" />     <field name="As-built #" />     <field name="As-built link" popuponly="true" />     <field name="Status" />     <field name="Owned and maintained by" />     <field name="Comments" />    </fields>    <links>     <link includeinresults="false" field="As-built link" alias="Copy As-built"      tooltip="Copy As-built">      <linkprefix></linkprefix>      <linksuffix></linksuffix>      <iconfield></iconfield>      <iconprefix></iconprefix>      <iconsuffix>assets/images/dwgIcon.png</iconsuffix>     </link>    </links>    <zoomscale>15000</zoomscale>    <forcescale>true</forcescale>   </layer>   <layer>    <name>Sewer Locate Wire</name>    <id>20</id>    <url>http://server/svr/rest/services/UtilityLayers/MapServer</url>    <fields all="false">     <field name="Type of locate device" />     <field name="As-built #" />     <field name="As-built link" popuponly="true" />     <field name="Owned and maintained by" />     <field name="Comments" />    </fields>    <links>     <link includeinresults="false" field="As-built link" alias="Copy As-built"      tooltip="Copy As-built">      <linkprefix></linkprefix>      <linksuffix></linksuffix>      <iconfield></iconfield>      <iconprefix></iconprefix>      <iconsuffix>assets/images/dwgIcon.png</iconsuffix>     </link>    </links>    <zoomscale>15000</zoomscale>    <forcescale>true</forcescale>   </layer>         <layer>    <name>Gravity Main</name>    <id>29</id>    <url>http://server/svr/rest/services/UtilityLayers/MapServer</url>    <fields all="false">     <field name="Size" />     <field name="Material" />     <field name="Rating of pipe" />     <field name="Upstream Invert" />     <field name="Downstream Invert" />     <field name="As-built #" />     <field name="As-built link" popuponly="true" />     <field name="Status" />     <field name="Owned and maintained by" />     <field name="Comments" />    </fields>    <links>     <link includeinresults="false" field="As-built link" alias="Copy As-built"      tooltip="Copy As-built">      <linkprefix></linkprefix>      <linksuffix></linksuffix>      <iconfield></iconfield>      <iconprefix></iconprefix>      <iconsuffix>assets/images/dwgIcon.png</iconsuffix>     </link>    </links>    <zoomscale>15000</zoomscale>    <forcescale>true</forcescale>   </layer>   <layer>    <name>Force Main</name>    <id>32</id>    <url>http://server/svr/rest/services/UtilityLayers/MapServer</url>    <fields all="false">     <field name="Size" />     <field name="Material" />     <field name="Rating of pipe" />     <field name="As-built #" />     <field name="As-built link" popuponly="true" />     <field name="Status" />     <field name="Owned and maintained by" />     <field name="Comments" />    </fields>    <links>     <link includeinresults="false" field="As-built link" alias="Copy As-built"      tooltip="Copy As-built">      <linkprefix></linkprefix>      <linksuffix></linksuffix>      <iconfield></iconfield>      <iconprefix></iconprefix>      <iconsuffix>assets/images/dwgIcon.png</iconsuffix>     </link>    </links>    <zoomscale>15000</zoomscale>    <forcescale>true</forcescale>   </layer>   <!-- End of Sewer Layers -->     </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>
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanielJohns
Frequent Contributor
Okay I got it working. I did some debugging and was able to determine that items were only being added to the 'identifyArrayCollection' in the 'projectResults function'. The 'noResultsFoundLbl' was being enable from within the 'onResult function', since the 'identifyArrayCollection' was shown as length = 0. I added your segment of code below, to the end of the 'projectResults function' and it updates the results label as desired.

On a side note, your eSearch widget calculates the number of returned results as expected (with not modifications).


if(identifyArrayCollection.length == 0 && numServicesIdent <= 0){  showMessage(noResultsFoundLbl, false);   timedClose2(); }else if(identifyArrayCollection.length > 0 && numServicesIdent <= 0){  showMessage(resultsFoundLbl + " " + identifyArrayCollection.length, false);  timedClose2(); }else{     disableTimer2(null);     showMessage(loadingLabel + " " + layersRemaning + " " + numServicesIdent, true); }

View solution in original post

0 Kudos
17 Replies
RobertScheitlin__GISP
MVP Emeritus
Daniel,

  Can you give me some details on this? Are you selecting a particular layer from the drop down or just using the All Layers? are any of the layer that you have configured to identify a type="feature" in the main config.xml? You should only get that message when the returned results from the identify task is empty and there are no other results in the identify list.
0 Kudos
DanielJohns
Frequent Contributor
Daniel,

  Can you give me some details on this? Are you selecting a particular layer from the drop down or just using the All Layers? are any of the layer that you have configured to identify a type="feature" in the main config.xml? You should only get that message when the returned results from the identify task is empty and there are no other results in the identify list.


I tried a specific layer and all layers with the same result. I also removed all but two layers in the XML, same thing.

I'm using dynamic (config.xml below)
 
   <basemaps>
   <layer label="Base Layers" alpha="1" type="dynamic" visible="true"
    url="http://server/svr/rest/services/BaseLayers/MapServer" />
   <layer label="2011 Aerial" type="dynamic" visible="false"
    url="http://server/svr/rest/services/AerialHybrid_2011/MapServer" />
   <layer label="2009 Aerial" type="dynamic" visible="false"
    url="http://server/svr/rest/services/AerialHybrid_2009/MapServer" />
  </basemaps>

  <operationallayers>
   <layer label="'11 Aerial" type="dynamic" visible="false"
    url="http://server/svr/rest/services/AerialLayer_2011/MapServer" />
   <layer label="'09 Aerial" type="dynamic" visible="false"
    url="http://server/svr/rest/services/AerialLayer_2009/MapServer" />
   <layer label="Cost Sharing" alpha="1" type="dynamic" visible="false"
    url="http://server/svr/rest/services/CostSharingLayers/MapServer" />
   <layer label="Utility Layers and Streets" alpha="1" type="dynamic"
    visible="true" url="http://server/svr/rest/services/UtilityLayers/MapServer" />
   <layer label="Routes" alpha="1" type="dynamic" visible="false"
    url="http://server/svr/rest/services/Routes/MapServer" />
   <layer label="Notifications" alpha=".5" type="dynamic" visible="false"
    url="http://server/svr/rest/services/Notifications/MapServer/" />
  </operationallayers> 
  
  
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,


   When you tried just two layer... Are both of them visible in the map?
0 Kudos
DanielJohns
Frequent Contributor
Daniel,


   When you tried just two layer... Are both of them visible in the map?


Yes both layers are visible
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   I will look into reproducing this.
0 Kudos
DanielJohns
Frequent Contributor
Daniel,

   I will look into reproducing this.


Thank you. Let me know if you need more details.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   Give version 3.4.1 a try.
0 Kudos
DanielJohns
Frequent Contributor
Daniel,

   Give version 3.4.1 a try.


No luck, same result. I tried it with 'All Layers' and just one layer selected.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   I am not sure I can fix your issue with the widget without access to your specific data. Not being able to see the http traffic that the service is returning and whether the map service request is failing or the widget is failing to process properly, has me in the dark. I took a stab at a potential issue tracking the logic in my code with the 3.4.1 release, but as you said you are getting the same result...
0 Kudos