Layer does not display as a "feature" type in ArcGIS Flex viewer 2.1

2406
17
10-08-2010 08:25 AM
RobertoFigueroa
New Contributor III
Hi,
I am trying in implement the simple info win widget to pop up some attribute from a layer.
However, when I set up this point layer/map service as a "feature" type, the points do not display. Whereas when set up as "dynamic" type all points are displayed. Please see below a section of my config.xml. Am I missing anything? Thanks Roberto

        <basemaps>
            <layer label="Base Map" type="tiled" visible="true"  alpha="1"
                        url="http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer"/>
        </basemaps>

        <operationallayers>
            <layer label="CML Loans" type="dynamic" visible="true"
               url="http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer"/>

           <layer label="CML loans only" type="feature" visible="true"  alpha="1"
                 info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                 infoconfig="widgets/InfoTemplates/CML_loans.xml"
                    url="http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/FeatureServer/0"/>
        </operationallayers>
Tags (2)
0 Kudos
17 Replies
DasaPaddock
Esri Regular Contributor
Does HttpFox show a query request to http://devn19/ArcGIS/rest/services/CML_loans_only/MapServer/0/query ?
If yes, what is the response?

Note: Once this is working, another issue is going to be the symbology. If you're not using ArcGIS Server 10, the feature layer doesn't get the symbology from the server so you'll see default gray symbols. You'll need to update the code to set a renderer on the feature layer.
0 Kudos
RobertoFigueroa
New Contributor III
Yes, it does. here is the request line:

GET /ArcGIS/rest/services/CML_loans_only/MapServer/0/query?returnGeometry=true&outSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22World%5FMercator%5C%22%2CGEOGCS%5B%5C%22GCS%5FNorth%5FAmerican%5F1983%5C%22%2CDATUM%5B%5C%22D%5FNorth%5FAmerican%5F1983%5C%22%2CSPHEROID%5B%5C%22GRS%5F1980%5C%22%2C6378137%2E0%2C298%2E257222101%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0%2E0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0%2E0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Mercator%5C%22%5D%2CPARAMETER%5B%5C%22False%5FEasting%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22False%5FNorthing%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22Central%5FMeridian%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22Standard%5FParallel%5F1%5C%22%2C0%2E0%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1%2E0%5D%5D%22%7D&geometry=%7B%22xmin%22%3A%2D8434059%2E615335569%2C%22ymin%22%3A5647089%2E735683931%2C%22xmax%22%3A%2D8410822%2E713464431%2C%22ymax%22%3A5661402%2E59711607%7D&spatialRel=esriSpatialRelIntersects&geometryType=esriGeometryEnvelope&outFields=%2A&inSR=%7B%22wkt%22%3A%22PROJCS%5B%5C%22World%5FMercator%5C%22%2CGEOGCS%5B%5C%22GCS%5FNorth%5FAmerican%5F1983%5C%22%2CDATUM%5B%5C%22D%5FNorth%5FAmerican%5F1983%5C%22%2CSPHEROID%5B%5C%22GRS%5F1980%5C%22%2C6378137%2E0%2C298%2E257222101%5D%5D%2CPRIMEM%5B%5C%22Greenwich%5C%22%2C0%2E0%5D%2CUNIT%5B%5C%22Degree%5C%22%2C0%2E0174532925199433%5D%5D%2CPROJECTION%5B%5C%22Mercator%5C%22%5D%2CPARAMETER%5B%5C%22False%5FEasting%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22False%5FNorthing%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22Central%5FMeridian%5C%22%2C0%2E0%5D%2CPARAMETER%5B%5C%22Standard%5FParallel%5F1%5C%22%2C0%2E0%5D%2CUNIT%5B%5C%22Meter%5C%22%2C1%2E0%5D%5D%22%7D&f=json HTTP/1.1
0 Kudos
DasaPaddock
Esri Regular Contributor
And the response?
0 Kudos
AlexJones
New Contributor II
I have had this issue as well using my 9.3.1 server. I am waiting for the install of our 10 server now as I assume this will solve the problem.
Dasa, is there anything special that needs to be in the map or feature class before a feature class is published to allow it to work as type feature? In my application I have very strange results. For example, I can use ....mapserver/11, but not ...mapserver/12. I can always get my point layer, but only one of my line layers works correctly. I was thinking that maybe on the 9.3.1 server I needed to set something up before hand. I have cleared cache, restarted, republished, tried our main server and our test server, many different map services and I cannot get consistent results. If I use the same layers in a query widget the query always works and If I make the layer type dynamic it will work as well(for display).
0 Kudos
DasaPaddock
Esri Regular Contributor
Dasa, is there anything special that needs to be in the map or feature class before a feature class is published to allow it to work as type feature?


I don't think so, but you may need to contact ESRI Tech Support for more help on this issue.
0 Kudos
RobertoFigueroa
New Contributor III
And the response?


I run the http line requesting that query for the layer (from HTTPFox) via the browser URL box and found out the response for that query request was in error! It was not recognizing the InSR and outSR. What happened was that even though both my Base Map and Feature Point Layer were in same projected coordinate systems (World Mercator), they had different geographic coordinates systems: base map in GCS83 and points in WGS84. Thus the viewer was requesting the points for the area of interest in GCS83 rather than WGS84.
With my base map published in WGS84 now, the points are displayed when read as a feature type. Great!!! Thanks Dasa!!
However, as Dasa pointed before, the issue now is about the symbology for those points. The symbols assigned in the MXD are not honored in the Flex Viewer. Is there any way to configure a specific render for this layer using the config.xml?
0 Kudos
DavidTreat
New Contributor
I had this same problem with a polygon layer using Server 10, published as a Map Service.  I originally had 4 scale dependent layers with different definition queries in each.  I had success by changing to a single layer with no scale dependency.  My URL specification ended in "MapServer/0."

Dave
0 Kudos
MattAyer
New Contributor III
I had the same issue.  I projected the feature class to web Mercator and was than able to see the layer.  Although in the map document I had the coordinate system set, it did not seem to display correctly when I used a layer as a feature "MapServer/0".
0 Kudos