Select to view content in your preferred language

identify widget version 3.0 raster layer.

2774
19
11-22-2012 03:27 AM
NadeemQazi
Regular Contributor
I have published a map on server consisting of 10 layers of which only one layer is published as raster the rest is published as feature layer. I used the identify widget. when i used the all layers option  then the this widgets shows me data for all the layers in the map with the names of the layers and data in their respective fields. however it does not show me the layer name of the raster layer. However  if I use the name of raster layer in the identify config.xml  to take the information of the raster layer only then it returns me No result found. however if mentioned any other feature layer separately it returns the info for that feature layer. its only for the raster layer that it shows no result found when i use the name of the raster layer and do nt use the all layers. Any suggestion please.
Tags (2)
0 Kudos
19 Replies
NadeemQazi
Regular Contributor
How are you loading the layer with kerneldenisty in the main config.xml?  What type="", visible="", do you have any displaylevels="" or visiblayers="", definitionexpression, or anything like that set for this layer (do you see the raster layer on the map when you click on it, and wkid of map same as this layer(29900))?

Also, have you tried making a new ArcMap document with just the kernel density layer and publish as a new service.  Then load that service into the map and try to identify against it?  Might give you an idea if it is an issue with that particular service rather than a config issue.

Any chance that you've upgraded from a previous version of the Identify widget without doing a clean on the project or removing/re-adding the (updated) IdendifyWidget.mxml in the modules list?

R_


hi
I already have checked with a service that only contains the raster layer and it behave same which means that when i select all layer options than it returns me the inforation however if specify the name of the layer it does not return me result . secondly  in the main config file i have used the following line for:


    <map wkid="29900" fullextent="-20000000 -20000000 20000000 20000000" top="40" addarcgisbasemaps="true" >
       
  <basemaps>
            <layer type="dynamic" label="abc" 
          url="  http://localhost:6080/arcgis/rest/services/Wexford_model_layersnhq22/MapServer" visible="true"/>
        </basemaps>

i tried one more thing. as during debugging i noted that raster layer name is passed as "" (an empty string) in identifyreult object. so in my config of identify i mention <name></name> i.e did not pass any name and this time it works. I want to know can i pass the layerid in the config file. if yes than what is the attribute for it.
regards
nadeem


</map>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

     OK I was able to reproduce what you are seeing using my ArcGIS Server 10.1 SP1. Is this the version of ArcGIS Server that you are using? I will need to put in a possible bug report to the Server team as I saw like you did that the LayerName comes back as an empty string.
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

     OK I was able to reproduce what you are seeing using my ArcGIS Server 10.1 SP1. Is this the version of ArcGIS Server that you are using? I will need to put in a possible bug report to the Server team as I saw like you did that the LayerName comes back as an empty string.


yeah I have already quoted this bug some days before. however i have modified the code for myuse and rather than checking with the layername i am checking it with layerid. it is working fine for me. I am using server 10.0. thank for all of your help.
regards
nadeem
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

   Glad you found a workaround. How are you handling the fact that many Map Services will have the same LayerID?
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

   Glad you found a workaround. How are you handling the fact that many Map Services will have the same LayerID?


Actually I am using it for a specific application, but yes this could be a problem any suggestion that you may give for this.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

   It would involve a redesign of the widget and it's XML to handle this. Not something That I have time to look at for such a small specific bug.
0 Kudos
RhettZufelt
MVP Notable Contributor
Nadeem,

Using AGS 10.01 I did the following. Loaded a single band raster layer as a basemap and set <excludebasemaps>false</excludebasemaps>.

Comment out all layers in eSearchWidget.xml and make onlythese="false" (Even if you say onlythese="false", and you have a layer listed, it will only give you the results in the fields(IE, it still honors the field settings, even if onlythese="false"). So, if I remove all layers info and have it return all with basemaps as such:

 <layers onlythese="false">

 </layers>



Then identify a raster layer (singleband), I get the following:
[ATTACH=CONFIG]19523[/ATTACH]

This is the best way I've found to get the actual "field" names reported back to the identify widget for rasters.



If I then copy "exactly" the fields reported from this identify:

 <layers onlythese="true">
  <layer>
   <name>All_96_imagery</name>
   <fields all="false">
    <field name="Pixel Value" alias="Pixel Value from field"  numberformat="2|,|." /> 
              <field name="Pixel value" alias="Pixel value from field"  numberformat="2|,|." />
    <field name="Stretched value" alias="Stretched value from field"  numberformat="2|,|." />
    <field name="Stretched Value" alias="Stretched Value from field"  numberformat="2|,|." />
   </fields>
   <links>
    <link includeinresults="true" field="" alias="" tooltip="">
     <linkprefix></linkprefix>
     <linksuffix></linksuffix>
     <iconfield></iconfield>
     <iconprefix></iconprefix>
     <iconsuffix></iconsuffix>
    </link>
   </links>
   <zoomscale>15000</zoomscale>
   <forcescale>true</forcescale>
  </layer>


I get this (note that I have both values with different case to demonstrate how "sensitive" it is. Also, I have noticed that some times it's Value, others it's value (In this service, the case for value is different for Pixel Value, vs Stretched value), so look at what is being returned when you do not have a layer defined to get the actual field name). (the two in red work, the others don't)

[ATTACH=CONFIG]19524[/ATTACH]

Also, I can't find wkid="29900" in any current ESRI listings, maybe try 29902 (at least if this "is" Irish National Grid). I think 29900 is the old number.

Anyway, not sure about the missing widget name, but this works for me on all single band rasters tested (just have to make sure to get the field spelling correct).

Of course, once you get it "working", you can set the onlythese="" to whatever you want and it won't affect your returns from this layer.

R_
0 Kudos
PEREZvincent
Emerging Contributor
hi,
i have the same problem as that evoked before.
I've tested the differents solutions but nothing work for me (I'm on AGS 10.1 flex 3.0).

When I configure <layers onlythese="false">, there is no layer name that appear in the message box.
I want to rename the "Pixel Value" field for naming it with the name of the Raster layer, but all my changes in the xml file don't work (no result found).

Have you another solution for me please?
Vincent
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Vincent,

   There is not a solution for Flex Viewer 3.0 and ArcGIS Server 10.1. You will have to go to FlexViewer 3.1 or higher as this issue was worked around in the identify widget 3.1.2.
0 Kudos
PEREZvincent
Emerging Contributor
OK, thank you for your answer
and for the widget, too!
Vincent
0 Kudos