Select to view content in your preferred language

Help formatting config.xml to make FlexViewer show map appropriately.

670
1
09-15-2010 05:09 AM
JoshuaCoates
Deactivated User
Can anyone offer some insight as to why my map has changed from white to black almost instantly on its own? I have not changed the "stylesheet" settings in my config.xml file and cannot figure out why the background to my map is black like the rest of the UI around the map? Below is my config.xml:
<?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
//
////////////////////////////////////////////////////////////////////////////////
-->
<configuration>
    <httpproxy enabled="false">proxy.php</httpproxy>
    <title>Bartow County</title>
    <subtitle>Floodplain Mapping Application</subtitle>
    <logo>assets/images/bartow_courthouse.png</logo>
    <stylesheet>blackgold.swf</stylesheet>

    <!-- UI elements -->
    <widget left="0"   top="0"   config="widgets/HeaderController/HeaderController.xml" url="widgets/HeaderController/HeaderControllerWidget.swf"/>
    <widget right="1" bottom="1" config="widgets/OverviewMap/OverviewMapWidget.xml" url="widgets/OverviewMap/OverviewMapWidget.swf"/>

    <map initialextent="1989177 1488269 2190132 1605493">
        <basemaps>
            <mapservice label="Basemap" type="tiled" visible="true" alpha="1"
                url="http://publicgis/PublicGISserver/rest/services/Basemap/MapServer"/>
        </basemaps>
        <operationallayers>
            <layer label="2008 Aerial Photo" type="dynamic" visible="false"
                   url="http://publicgis/PublicGISserver/rest/services/2008_Aerial_Photo/MapServer"/>
            <layer label="Basemap" type="tiled" visible="false" 
                   url="http://publicgis/PublicGISserver/rest/services/Basemap/MapServer"/>
            <layer label="2007 Cross Sections" type="tiled" visible="false"
                   url="http://publicgis/PublicGISserver/rest/services/2007_CrossSections/MapServer"/>
            <layer label="2007 Bartow Floodplain" type="tiled" visible="false" visiblelayers=""
                   url="http://publicgis/PublicGISserver/rest/services/2007_BartowFloodplain/MapServer"/>
            <layer label="2010 Cross Sections" type="tiled" visible="false" 
                   url="http://publicgis/PublicGISserver/rest/services/2010_CrossSections/MapServer"/>
            <layer label="2010 Bartow Floodplain" type="tiled" visible="false" alpha="0.5" visiblelayers=""
                   url="http://publicgis/PublicGISserver/rest/services/2010_BartowFloodplain/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="Navigation Tools" x="975" y="50"
                icon="assets/images/i_nav.png"
                config="widgets/NavigationTools/NavigationToolsWidget.xml"
                url="widgets/NavigationTools/NavigationToolsWidget.swf"/>
        <widget label="Dynamic Legend" x="25" y="565"
                icon="assets/images/i_legend2.png"
                config="widgets/DynamicLegend/DynamicLegendWidget.xml"
                url="widgets/DynamicLegend/DynamicLegendWidget.swf"/>
        <widget label="Layer List" x="975" y="280" 
                icon="assets/images/i_layers.png"
                config="widgets/LayerList/LayerListWidget.xml"
                url="widgets/LayerList/LayerListWidget.swf"/>
        <widget label="Search" x="25" y="320"
                icon="assets/images/i_search.png"
                config="widgets/Search/SearchWidget_Bartow.xml"
                url="widgets/Search/SearchWidget.swf"/>
        <widget label="Print" x="975" y="585"
                icon="assets/images/i_print.png"
                config="widgets/Print/PrintWidget.xml"
                url="widgets/Print/PrintWidget.swf"/>
                
    </widgetcontainer>

</configuration>


Basically what I am trying to do is have a completely cached map. I want my basemap layer to show up when the FlexViewer opens, I would like to also be able to turn some layers on and off at the users command so I therefore also put the same basemap layer as an operational layer. Is this why I have symbology appearing twice for everything in the dynamic legend widget? And because this layer is cached, is this why you cannot turn certain sublayers in Basemap on/off?  All the other services are layers that have been cached and added individually as operational layers. These layers need to have the capability to be turned on and off at the users command as well. Is it not necessary or possible to have my "Basemap" service as the basemap service and as an operational layer as well. It would just be nice to have all the layers in Basemap appear when the FlexViewer opens and be able to have these layers in the layer list widget so they can be turned on/off and I thought for that to happen they need to be in the operational layer?!

I am sorry if this post is redundant and overwhelming, but I am really trying to get this web app up and running this week and it seems like after I created separate services for every layer, and then added them as operational layers....everything has become destroyed and I feel like I no longer know what I'm doing. Any help would be much appreciated!

Thanks,
Josh C.
Tags (2)
0 Kudos
1 Reply
JoshuaCoates
Deactivated User
Here are two screen shots: One shows the HttpFox errors I am receiving from the cached basemap layer service. The other shows the viewer--for this one, notice how the left side just stops displaying data for this scale......there is still more of the county to be displayed on the left side, however, it does not show up unless I zoom in more. When I first created this FlexViewer project, is there any formatting I needed to do in regards to projection or coordinates? To make sure everything is being projected right? Its just strange that the rest of the county shows up and displays all layers at this scale but not for this particular first quarter of the county? Its a completely vertical line from top of the county to the bottom of the county where nothing appears at this scale? When I cached the map, everything completed with no errors?!
0 Kudos