Select to view content in your preferred language

Identify Widget 3.6.2 for Flex Viewer: raster layer names will not display

8234
32
Jump to solution
01-21-2014 01:32 PM
BarnabyRockwell
Deactivated User
Using the 3.6.2 version of the Identify Widget, I cannot get names of attributed, ERDAS Imagine (.img) raster layers to display when I click on a pixel in the Flex app to identify. In the 3.0.2 version of the widget for Flex Viewer 3.0, the layer name would be displayed for these raster layers. How can I get the layer name to be displayed along with the other results? I am using ArcGIS 10.2 for Server and Flex Viewer 3.6, on Windows Server 2008 R2 x64. I have not installed the Flex API, just the Flex Viewer.

Behavior is the same with widget version 3.5.1 for Flex Viewer 3.5.

Layer names for vector layers are displayed with Identify results, just not the layer names of the Imagine .img files. In Widget settings, if I try and add a layer from one of these rasters, the services are seen, but no "addable" features are shown, so I cannot add them.

In my current xml configuration for the widget, I completely removed the <layers> section. So there is no layer info in the xml for any layer. Everything seems to work fine except for the .img layers for which no layer names are displayed.

This image shows identify results on one of the .img files using Identify widget 3.0.2 in Flex Viewer 3.0, using ArcGIS for Server 10.0 (sp5), in Firefox:

[ATTACH=CONFIG]30682[/ATTACH]

This image shows identify results on one of the .img files using Identify widget 3.6.2 in Flex Viewer 3.6, using ArcGIS 10.2 for Server, in Firefox:

[ATTACH=CONFIG]30683[/ATTACH]

Thank you in advance...
0 Kudos
32 Replies
BarnabyRockwell
Deactivated User
GREAT!  That's just what I'm looking for.  Stay tuned...

I did remove the widget from my app in App Builder and then re-add it, but still there was data from the old version in the Identify widget folder of my app.  I had to rename that folder and then re-add the widget to get the correct version to display.
0 Kudos
BarnabyRockwell
Deactivated User
Robert, from where did you learn to put the

<id>2</id>


in that xml?  Was it here:

http://www.sciencebase.gov/arcgis/rest/services/usminmap/Landsat7_West/MapServer

Edit:  And yes, I got the layer name to display for that layer using the edited xml!!  But I am daunted by the task of adding the layer info for 60-100 raster layers!  😞

An example:

http://www.sciencebase.gov/arcgis/rest/services/usminmap/Regional_Studies_pub/MapServer

some of those are vectors, but a vast majority are rasters. 

Here is a shot of the Add Layers dialog for the widget in App Builder.  No addable layers are shown under the service, but there are 4 rasters layers in there?  I guess I have to manually edit the xml, eh?

[ATTACH=CONFIG]30726[/ATTACH]

Is there a way to alter your widget so that the <name> attribute is automatically added for all layers?
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Barnaby,

  The reason that the service explorer in App Builder does not list any layers under that map service is because AcrGIS Server does not return any fields in the REST Service endpoint for rasters. All of these factors you are running up against is beyond our control. Changes will have to be made to ArcGIS Server and that is not going to happen until people like yourself call tech support and log Bugs or Enhancement requests to have these issues changed.

Yes configuring 60 to 100 raster layer could be daunting (maybe you should reconsider the scope/purpose of your web map). Normally maps should be specific and purpose driven and not just have every layer and the kitchen sink. 🙂
0 Kudos
BarnabyRockwell
Deactivated User
Robert, thanks again for all your help.  I think we have pinned down the issue to a bug in Server 10.1+.  I will file a tech support request about this, and point to this thread, your last post in particular. 

Having hundreds of overlapping layers to allow for easy comparison is one of the main purposes of my app, so I cannot remove any layers, and anyway everything works perfectly on Server 10.0/Flex 3.0.

I am still confused as to why ArcMap Identify can read the layer name from the published service if "ArcGIS Server does not return any fields in the REST Service endpoint for rasters" as you wrote.  The layer names do appear to be in the REST as shown here:

10.0 (layer name is read from REST endpoint using Identify function):

http://cmerwebmap.cr.usgs.gov/arcgis/rest/services/Landsat7_West/MapServer/2

10.2 (layer name not present in REST endpoint):

http://www.sciencebase.gov/arcgis/rest/services/usminmap/Landsat7_West/MapServer/2

I will bring this up with tech support.  Let me know if you discover a way to get your widget to get the layer names of the rasters without having to edit the xml for every raster layer.  I could supply you with a sample attributed raster for testing if it could help you in development.

Best regards,
Barnaby
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Barnaby,

 
I am still confused as to why ArcMap Identify can read the layer name from the published service
This is because ArcMap would use SOAP communiction and all the WebAPIs use REST.

As it sits right now with the Server not returning the layername for raster map services and not returning any fields like it does for vector mapservices, there is nothing to do except file this incident with tech support.
0 Kudos
BarnabyRockwell
Deactivated User
Got it.  Thanks, Robert!  🙂
0 Kudos
BarnabyRockwell
Deactivated User
The issue was found about a year ago, and has been fixed in ArcGIS 10.2.1 for Server.

Case closed!  🙂

---------------------------------------------

However, note that raster layers are still not shown in Add Layer dialog of ID widget in App Builder, as shown in this post above:

http://forums.arcgis.com/threads/101169-Identify-Widget-3.6.2-for-Flex-Viewer-raster-layer-names-wil...

even when using Server 10.2.1, Flex Viewer 3.6, and ID widget 3.6.2.
0 Kudos
by Anonymous User
Not applicable
Original User: Pingu

I have another issue regarding identify widget.
Using Flex Viewers 3.6.4 and Identify widget with the configuration to display raster layers as well.
Gives back the result from each layer, one by one, even the results from all layers if they are vectors or if they are all rasters. When displaying vector and raster layers at the same time and try to identify "all layers" no results can be seen from the raster layer, only the vectors. Would you please advise how to configure the xml in order to be able to get the results back from all layers at the same time from vector and raster types of data?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Kinga,

   As explained in this thread a raster does not return a list of fields from its REST Service Endpoint. This means that you can not configure a raster layer in the same manner you would a vector. The best thing to do is in App Builder set the 'only these' to false. This may be all you need to do, but if you are like most and want to specify certain fields and field formats then you go on to the next steps. Now identify your raster layer and take note of the returned results.
[ATTACH=CONFIG]31700[/ATTACH]
Using this info you can find the fields of the raster that are being returned by the identify task but not reported by the REST Service end point. Now you will manually add the layer and the fields to the IdentifyWidget.xml using this info.

        <layer>
            <useproxy>true</useproxy>
            <name>3/27/13 - reduced vegetation supression - AA11</name>
            <id>2</id>
            <url>https://someserver/arcgis/rest/services/someservice/MapServer</url>
            <fields>
                <field name="Red" alias="Red"/>
                <field name="Green" alias="Green"/>
                <field name="Blue" alias="Blue"/>
                <field name="Contrast" alias="Contrast"/>
                <field name="Materialid" alias="Material Id"/>
                <field name="Count" alias="Count"/>
                <field name="Opacity" alias="Opacity"/>
                <field name="Pixel Value" alias="Pixel Value"/>
                <field name="OID" alias="Object Id"/>
            </fields>
            <links/>
            <zoomscale>2000</zoomscale>
            <forcescale>true</forcescale>
        </layer>
0 Kudos
by Anonymous User
Not applicable
Original User: Pingu

Hi Robert,
Thanks for your quick response. Just to clarify:
- if I use identify for more than one overlapping polygon geometry vector layers the widget works perfectly
- if I use identify for more than one overlapping raster layers the widget works perfectly as well (reporting the pixel values of different raster layers)
- the problem shows if I click to a place where a polygon of a vector layer overlapping with a raster layer; in this case the 'all layers' option reporting the values of the upper vector layer correctly but the pixel value of raster layer below is missing, while at the same location the pixel value is reported correctly when the upper vector layer is turned off.
do you have any idea or solution for this special situation? the point of using this identify widget is to get information simultaneously from overlapping vector and raster layers.
thanks in advance!
0 Kudos