Select to view content in your preferred language

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

3240
17
10-08-2010 08:25 AM
RobertoFigueroa
Occasional Contributor
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
0 Kudos
RobertoFigueroa
Occasional Contributor
Have you tried using this url instead?
http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer/0


I have tried MapServer instead of FeatureServer but still the layer does not display.

Is it necessary to have the layer published as a feature service, as opposed to a map service, in order to read that layer as "feature" type in the config.xml file? We are currently in ArcGIS Server 9.2, not 10.0, so we cannot publish a feature service.

Thanks
0 Kudos
DasaPaddock
Esri Regular Contributor
A map service is fine. You only need a feature service if you need to edit the layer.

Is "Query" listed as a supported operation at the bottom of the page at:
http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer/0
0 Kudos
RobertoFigueroa
Occasional Contributor
A map service is fine. You only need a feature service if you need to edit the layer.

Is "Query" listed as a supported operation at the bottom of the page at:
http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer/0


yes, it says "Supported Operations:   Query Layer"
0 Kudos
DasaPaddock
Esri Regular Contributor
Does the layer have a min or max scale value?

If you use a tool like HttpFox, do you see a /query request being sent to the layer?
0 Kudos
RobertoFigueroa
Occasional Contributor
Does the layer have a min or max scale value?

If you use a tool like HttpFox, do you see a /query request being sent to the layer?



Yes...the layer has scale dependency. It is not visible beyond 1:100,000. But even when I zoom in closer (e.g., 1:50,000) this feature type layer does not display. When set up as "dynamic" it display no problem at the proper scale.


I downloaded HttpFOX. Please see below the tracking done by it:


00:00:02.434 0.037 423 (6057) GET (Cache) text/html http://163.155.89.150/flexviewer/index.html
00:00:02.470 0.009 419 (26337) GET (Cache) application/x-javascript http://163.155.89.150/flexviewer/swfobject.js
00:00:02.479 0.189 556 (1720) GET (Cache) image/gif http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif
00:00:02.669 0.155 476 (434734) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/index.swf
00:00:02.789 0.031 476 (434734) GET (Cache) application/x-shockwave-flash (NS_ERROR_FAILURE) http://163.155.89.150/flexviewer/index.swf
00:00:02.876 0.004 511 (209) GET (Cache) text/x-cross-domain-policy http://fpdownload.adobe.com/pub/swz/crossdomain.xml
00:00:02.957 0.002 503 (141) GET (Cache) text/x-cross-domain-policy http://fpdownload.adobe.com/crossdomain.xml
00:00:03.919 0.003 423 (3936) GET (Cache) text/xml http://163.155.89.150/flexviewer/config.xml
00:00:04.038 0.036 437 (491) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_link.png
00:00:04.039 0.037 438 (937) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_close.png
00:00:04.040 0.038 439 (607) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/assets/images/Red_glow.swf
00:00:04.041 0.039 440 (3374) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_pushpin.png
00:00:04.042 0.045 458 (126973) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/InfoTemplates/SimpleInfoWinWidget.swf
00:00:04.044 0.053 462 (132867) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/WidgetContainer/WidgetContainerWidget.swf
00:00:04.055 0.031 409 (259) GET (Cache) text/xml http://devn19/crossdomain.xml
00:00:04.126 0.030 450 806 GET 200 text/plain http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer?f=json
00:00:04.128 0.246 451 8676 GET 200 text/plain http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer?f=json
00:00:04.131 0.235 452 432 GET 200 text/plain http://devn19/ArcGIS/rest/services/CML_loans_only/FeatureServer/0?f=json
00:00:04.342 0.072 441 (298) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_collapse.png
00:00:04.344 0.072 435 (321) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_up.png
00:00:04.345 0.099 437 (312) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_down.png
00:00:04.346 0.100 446 (4218) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_collapse_down.png
00:00:04.348 0.099 437 (4462) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_left.png
00:00:04.349 0.100 438 (4462) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/w_right.png
00:00:04.350 0.103 452 (148454) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/Navigation/NavigationWidget.swf
00:00:04.351 0.101 448 (245) GET (Cache) text/xml http://163.155.89.150/flexviewer/widgets/InfoTemplates/CML_loans.xml
00:00:04.727 0.023 454 (130092) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/OverviewMap/OverviewMapWidget.swf
00:00:04.952 0.066 440 (4455) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_expand2.png
00:00:04.971 0.087 454 (135727) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/MapSwitcher/MapSwitcherWidget.swf
00:00:05.187 0.467 1912 768 GET 200 image/png http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer/export?size=1200%2C776&bbox=%2D16870...
00:00:05.212 0.130 455 (25637) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/1/0
00:00:05.233 0.168 455 (25807) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/2/0
00:00:05.254 0.166 455 (50590) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/1/1
00:00:05.275 0.163 455 (70533) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/2/1
00:00:05.296 0.183 455 (34077) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/1/2
00:00:05.297 0.233 455 (25249) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/1/2/2
00:00:05.300 0.251 440 (2732) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_zoomout.png
00:00:05.301 0.287 439 (2719) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_zoomin.png
00:00:05.302 0.305 436 (2254) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_pan.png
00:00:05.303 0.387 464 (140532) GET (Cache) application/x-shockwave-flash http://163.155.89.150/flexviewer/widgets/HeaderController/HeaderControllerWidget.swf
00:00:05.951 0.196 452 (649) GET (Cache) text/xml http://163.155.89.150/flexviewer/widgets/Navigation/NavigationWidget.xml
00:00:05.972 0.230 454 (189) GET (Cache) text/xml http://163.155.89.150/flexviewer/widgets/MapSwitcher/MapSwitcherWidget.xml
00:00:05.973 0.290 454 (474) GET (Cache) text/xml http://163.155.89.150/flexviewer/widgets/OverviewMap/OverviewMapWidget.xml
00:00:05.974 0.310 464 (1004) GET (Cache) text/xml http://163.155.89.150/flexviewer/widgets/HeaderController/HeaderControllerWidget.xml
00:00:06.165 0.155 435 (3943) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/logo.png
00:00:06.166 0.175 441 (3809) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_bookmark.png
00:00:06.167 0.192 441 (3809) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_bookmark.png
00:00:06.168 0.211 438 (4069) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_draw2.png
00:00:06.169 0.228 438 (3676) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_print.png
00:00:06.171 0.246 437 (3479) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_info.png
00:00:06.172 0.263 437 (5288) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_pin3.png
00:00:06.173 0.281 438 (5853) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_globe.png
00:00:06.174 0.299 439 (2719) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_zoomin.png
00:00:06.175 0.318 436 (2254) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_pan.png
00:00:06.176 0.335 440 (2732) GET (Cache) image/png http://163.155.89.150/flexviewer/assets/images/i_zoomout.png
00:00:06.264 0.283 451 8676 GET 200 text/plain http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer?f=json
00:00:06.587 0.079 455 (46118) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/0/0/0
00:00:06.606 0.078 455 (37396) GET (Cache) image/png http://devn19/ArcGIS/rest/services/CanadaMercator_2010/MapServer/tile/0/1/0
0 Kudos
RobertoFigueroa
Occasional Contributor
when I open this URL associated with the GET request

http://devn19/ArcGIS/rest/services/CML_loans_only/FeatureServer/0?f=json

I get the following error:

{"error":{"code":500,"message":"Server Error - Object reference not set to an instance of an object.","details":[]}}
0 Kudos
DasaPaddock
Esri Regular Contributor
I'm confused now. I thought you were trying to load this layer:
http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/FeatureServer/0
but you don't have 10, so you were going to try:
http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer/0

Is this correct? Also, can you try clicking the "Query Layer" link and see what happens when you query the layer using the html form with a where clause of something like 1=1?
0 Kudos
RobertoFigueroa
Occasional Contributor
Sorry ...I am using a new map service (CML_loans_only) with only one layer in the MXD now. Just trying to see if that would make a difference in the viewer.
Also, I hadn't cleared the cache in ArcGIS REST services and therefore was still requesting a .....FeatureServer/0 as opposed to MapServer/0, even though the config.xml had been changed to MapServer/0. Now after clearing the REST services cache, the viewer is loading:

http://devn19/ArcGIS/rest/services/CML_loans_only/MapServer/0?f=json  but still no points are displayed in the viewer.

When you query under http://devn19/ArcGIS/rest/services/CML_loans_only/MapServer/0/query and try where 1=1, the query layer operation does return results

My map tag section in the config.xml is now:

  <map initialextent="-16000000 6000000 -6000000 10000000" top="40">

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

    <operationallayers>
      <layer label="Homeowner Loans" type="dynamic" visible="true"
       url="http://devn19/ArcGIS/rest/services/emili_ho_loans_dev/MapServer" />
 
       <layer label="CML loans" type="feature" visible="true" alpha="1"
       info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" 
       infoconfig="widgets/InfoTemplates/CML_loans.xml"
       url="http://devn19/ArcGIS/rest/services/CML_loans_only/MapServer/0"/>

    </operationallayers>
  </map>
0 Kudos