Select to view content in your preferred language

Problems viewing boundary files in ARCGIS Viewer for Flex

2403
5
09-07-2011 03:34 AM
JustinGleeson
Deactivated User
Hi,
Just getting started with Viewer for Flex and ArcGIS Server.

I'm having problems viewing a text boundary file that I'm pulling in from a local server. The URL in ARCGIS Server Manager is http://localhost/ArcGIS/services/MapDocTest/MapServer, when I add this to config.xml it will not display and send the following error:

Test layer failed to load: Fault code: null
Fault info: Unexpected < encountered
Fault details: null

I've adjusted the url to  http://localhost/ArcGIS/rest/services/MapDocTest/MapServer and the error dissapears however the boundary file is still not displayed

Code:
<map wraparound180="true" initialextent="-1832000 6671000 197000 7497000" fullextent="-20000000 -20000000 20000000 20000000" top="40">
        <basemaps>
            <layer label="Streets" type="tiled" visible="true"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <layer label="Topo"    type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        </basemaps>
        <operationallayers>
            <layer label="Demographics" type="tiled" visible="false" alpha="0.5"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Median_Household_Income/MapServ...">
                <sublayer id="1" popupconfig="popups/PopUp_Demographics_BlockGroups.xml"/>
                <sublayer id="2" popupconfig="popups/PopUp_Demographics_Tracts.xml"/>
                <sublayer id="3" popupconfig="popups/PopUp_Demographics_Counties.xml"/>
                <sublayer id="4" popupconfig="popups/PopUp_Demographics_States.xml"/>
            </layer>
            <layer label="Boundaries and Places" type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/..."/>   
   <layer label="Test" type="feature" visible="false"
                   url="http://localhost/ArcGIS/rest/services/MapDocTest/MapServer"/>
        </operationallayers>
    </map>


Any ideas where I'm going wrong here?

many thanks

Justin
Tags (2)
0 Kudos
5 Replies
RobertScheitlin__GISP
MVP Emeritus
Justin,

   The answer to your issues are addressed in the documentation:

http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/The_Layer_tag/01m30000000p000000/

The URL for a feature layer should end with a number, for example /MapServer/0 when used with a Map Service or Feature Service.   When used with an Image Service, the URL for a feature layer should end  in /MapServer.


The URL for dynamic and tiled services should normally end in /MapServer and also contain /rest/.
0 Kudos
JustinGleeson
Deactivated User
Justin,

   The answer to your issues are addressed in the documentation:

http://help.arcgis.com/en/webapps/flexviewer/help/index.html#/The_Layer_tag/01m30000000p000000/


Hi Robert,

thanks for the reply - I've adjusted the config to include /0 but it has not made any change

<layer label="Test" type="feature" visible="false"
                   url="http://localhost/ArcGIS/rest/services/MapDocTest/MapServer/0"/>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Justin,

   If you add it this way can you see it?

<layer label="Test" type="dynamic" visible="true" 
                   url="http://localhost/ArcGIS/rest/services/MapDocTest/MapServer"/>       
0 Kudos
JustinGleeson
Deactivated User
Justin,

   If you add it this way can you see it?

<layer label="Test" type="dynamic" visible="true" 
                   url="http://localhost/ArcGIS/rest/services/MapDocTest/MapServer"/>       


Hi Robert,

this seems to have done the trick

thanks
0 Kudos
Bakht_AliMohammad_Khan
Deactivated User
rscheitlin: Thanks you very much. I have also faced the same problem. When I follow the  instructions you give above my problem solved.
                                          Once againg thanks to you and All your "FAMILY"
                                                        "GOOD LUCK to You and your FAMILY"



Bakht Ali
GIS Technicain
KSA(Saudi Arabia)
0 Kudos