Select to view content in your preferred language

Operational Layers Not Displaying

2177
11
09-24-2010 11:00 AM
EmilyLaMunyon
Deactivated User
Hello,

I downloaded the ArcGIS Viewer for Flex 2.1 and have it up and running. However, I am unable to display layers/services from our ArcGIS Server 9.3. The label shows up under the More tab, just not on the map. In the config.xml I added this code:

<operationallayers>

            <layer label="SLCo" type="dynamic" visible="false"
                   url="http://slcarcgisdev:8399/arcgis/rest/services/Utah_Trails/Polygons2/MapServer"/>
</operationallayers>

I have a feeling it is a projection issue (my data is in State Plane Feet) , however, I have been reading that this application should re-project layers on the fly if they are dynamic. Any help would be greatly appreciated.

Thanks!
Tags (2)
0 Kudos
11 Replies
RobertScheitlin__GISP
MVP Emeritus
Emily,

    If your ArcGIS Server and web server are on two different machines than yyou need a crossdomain.xml on your ArcGIS Servers web root.

More info here:

http://help.arcgis.com/en/webapi/flex/help/content/deploy_application.htm
0 Kudos
EmilyLaMunyon
Deactivated User
Emily,

    If your ArcGIS Server and web server are on two different machines than yyou need a crossdomain.xml on your ArcGIS Servers web root.

More info here:

http://help.arcgis.com/en/webapi/flex/help/content/deploy_application.htm


Thanks Robert! I had read that somewhere and put the crossdomain.xml in the root on my machine (localhost), but you are saying that it needs to reside on the server itself? I will give that a try and see if it works.
0 Kudos
EmilyLaMunyon
Deactivated User
Hi Robert,

I put the crossdomain.xml at the server root and still no luck. I am wondering if it has something to do with the services on our 9.3 server. I was able to get our layers to appear with the old 1.3 sample viewer, just no luck with the new one (2.1). Do the layers have to be set-up as dynamic if they are in a different projection than the map? Are there differences between the 1.3 and 2.1 that I am missing?

Thanks!
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Emily,

     Yes if your mapservices are in a different projection than the map they have to be dynamic. The quality and responsiveness of a map that has multiple map services that require re-projection is going to be pretty slow. It is always best to reproject your data to be in the same WKID as the base maps you are using. There are some changes to the 2.1 Flexviewer that could be affecting you. Maybe you should post your config.xml.
0 Kudos
EmilyLaMunyon
Deactivated User
Here is my config.xml.

Thanks again!

<?xml version="1.0" ?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions.  See use restrictions in the file:
// <install location>/License.txt
//
// Read mode about ArcGIS Viewer for Flex 2.1 - http://links.esri.com/flexviewer
//
////////////////////////////////////////////////////////////////////////////////
-->
<configuration>
    <title>Salt Lake County Surveyor's Office</title>
    <subtitle>Interactive GIS Map</subtitle>
    <logo>assets/images/logo.png</logo>
    <stylecolors>0xFFFFFF,0x963524,0x101010,0x00789,0xFFD700</stylecolors> <!-- Black Gold -->
    <stylealpha>0.8</stylealpha>

    <!-- UI elements -->
    <widget left="10"  top="50"    config="widgets/Navigation/NavigationWidget.xml" url="widgets/Navigation/NavigationWidget.swf"/>
    <widget right="-2" bottom="-2" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>
    <widget right="20" top="55"    config="widgets/MapSwitcher/MapSwitcherWidget.xml" url="widgets/MapSwitcher/MapSwitcherWidget.swf"/>
    <widget left="0"   top="0"     config="widgets/HeaderController/HeaderControllerWidget.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>

   <map initialextent="-12535000 4932500 -12367000 4992700" top="40">
        <basemaps>
            <layer label="Streets" type="tiled" visible="true"  alpha="1"
                       url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
     <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <layer label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
        </basemaps>
       
         <operationallayers>

            <layer label="Boundaries and Places" type="dynamic" visible="false" alpha="1"
                   url="http://gis.slco.org/wwwrest/services/Utah_Trails/AttractorsMapTips/MapServer"/>
         
        </operationallayers>
   
</map>

    <!-- widgets organized into widget containers that manage close/open etc -->
    <!-- supported layout property options: horizontal(default)|float|vertical|fix-->
    <widgetcontainer layout="float">
        <widget label="Bookmarks"         left="430" top="90"
                icon="assets/images/i_bookmark.png"
                config="widgets/Bookmark/BookmarkWidget.xml"
                url="widgets/Bookmark/BookmarkWidget.swf"/>
        <widget label="Find an address"   left="100" top="90" preload="open"
                icon="assets/images/i_target.png"
                config="widgets/Locate/LocateWidget_US.xml"
                url="widgets/Locate/LocateWidget.swf"/>
       
        <widget label="Search" left="80" top="280"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget_Louisville.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Earthquakes (GeoRSS)" left="410" top="280"
                icon="assets/images/i_rss.png"
                config="widgets/GeoRSS/GeoRSSWidget.xml"
                url="widgets/GeoRSS/GeoRSSWidget.swf"/>
        <widget label="Draw and Measure" left="60" top="400"
                icon="assets/images/i_draw2.png"
                config="widgets/Draw/DrawWidget.xml"
                url="widgets/Draw/DrawWidget.swf"/>
        <widget label="Print" left="390" top="400"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>

        <!--
        <widget label="My first widget"
                icon="assets/images/i_widget.png"
                config="widgets/Samples/HelloWorld/HelloWorldWidget.xml"
                url="widgets/Samples/HelloWorld/HelloWorldWidget.swf"/>
        -->
    </widgetcontainer>

</configuration>
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Emily,

   I still don't see a crossdomain on this server...
http://gis.slco.org/crossdomain.xml

But using the Flash Builder debugger I was able to load your config.xml and it worked fine. You do not have anything from your map service displayed even once you check the map service as visible due to scale dependencies that you have set but once I zoom in once it displays fine.
0 Kudos
EmilyLaMunyon
Deactivated User
Thanks so much for your help! We finally got it working, it was a reverse proxy issue.
0 Kudos
JimBurd
Deactivated User
Emily,

Hi, would you describe your reverse proxy issue and solution?  I think I am having the same problem.

Thank you,
Jim Burd
0 Kudos
EmilyLaMunyon
Deactivated User
Hi Jim,

My IS department actually figured out the reverse proxy issue, and I asked them to explain it better than I could.

Hi Emily,

I would say it like this�?�

The front end server in our reverse proxy configuration needed to have a directive set up to forward any requests to http://frontend/crossdomain.xml would be redirected to the backend server url�?�http://backend/crossdomain.xml.  Originally http://frontend/crossdomain.xml wasn�??t resolving to anything because this file isn�??t located on this server, but on the back end server.  Help with the apache directives for the reverse proxy redirect (ProxyPassMatch & ProxyPassReverse) be found here�?�
http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypassmatch
�?��?�

I know this still seems confusing, not sure how to simplify the explanation.

Hope this helps!
0 Kudos