Select to view content in your preferred language

Operation Layer drawing underneath BaseMap Layers

2447
3
06-22-2012 07:23 AM
KenCarrier
Deactivated User
I am stumped, everything was working fine and then I added another basemap layer to config.xml and now when I switch between basemaps my operational layers are drawing underneath my basemap. For example I have a cached base map with building footprints and in my operational layer which is dynamic I have a point featureclass that I am labeling and the labels draw or render underneath the buildings. I thought operational layers always draw on top of the basemaps but clearly they are not in my case. Any thoughts? I have provided my config.xml file in case someone sees something I am not. Thanks in advanced for anyone who can help with this.

    <map wraparound180="true" initialextent="1336768.54628681 466504.867959491 1682954.44472431 713228.709105325" fullextent="1336768.54628681 466504.867959491 1682954.44472431 713228.709105325" top="40" wkid="3735" esrilogovisible="false">
        
        <operationallayers>
            <layer label="Main AMS" type="dynamic" visible="false"
                   url="http://10.2.0.20/ArcGIS/rest/services/MainAMS/MapServer">
<!-- Sanitary Meter Popup -->
                   <sublayer id="1" popupconfig="popups/PopUp_SanitaryMeter.xml"/>                
<!-- Sanitary Network Structure Popup -->
                   <sublayer id="4" popupconfig="popups/PopUp_SanitaryNetworkStructure.xml"/>                        
<!-- Sanitary Manhole Popup -->
                   <sublayer id="5" popupconfig="popups/PopUp_SanitaryManhole.xml"/>
<!-- Sanitary Gravity Main Popup -->
                   <sublayer id="6" popupconfig="popups/PopUp_SanitaryGravityMain.xml"/>                         
<!-- Water Hydrant Popup -->
                   <sublayer id="12" popupconfig="popups/PopUp_WaterHydrant.xml"/>            
<!-- Water Meter Popup -->
                   <sublayer id="14" popupconfig="popups/PopUp_WaterMeter.xml"/>               
<!-- Water Control Valve Popup -->
                   <sublayer id="15" popupconfig="popups/PopUp_WaterControlValve.xml"/>             
<!-- Water Network Structure Popup -->
                   <sublayer id="18" popupconfig="popups/PopUp_WaterNetworkStructure.xml"/> 
<!-- Water Critical Main Popup -->
                   <sublayer id="21" popupconfig="popups/PopUp_WaterCritialMain.xml"/> 
<!-- Water Main Popup -->
                   <sublayer id="22" popupconfig="popups/PopUp_WaterMain.xml"/> 
<!-- Process Lift Station Popup -->
                   <sublayer id="25" popupconfig="popups/PopUp_ProcessLiftStation.xml"/>
<!-- Process Property Popup -->
                   <sublayer id="26" popupconfig="popups/PopUp_ProcessProperty.xml"/>
<!-- Process Control Valve Site Popup -->
                   <sublayer id="27" popupconfig="popups/PopUp_ProcessControlValveSite.xml"/>
<!-- Process EQ Basin Popup -->
                   <sublayer id="28" popupconfig="popups/PopUp_ProcessEQBasin.xml"/>
<!-- Process Pump Station Popup -->
                   <sublayer id="29" popupconfig="popups/PopUp_ProcessPumpStation.xml"/>
<!-- Process Water Storage Popup -->
                   <sublayer id="30" popupconfig="popups/PopUp_ProcessWaterStorage.xml"/>
<!-- Administrative HTE Location Point Popup -->                   
                   <sublayer id="37" popupconfig="popups/PopUp_AdministravtiveHTE.xml"/>
<!-- Administrative Pressure Zone Popup -->                   
                   <sublayer id="38" popupconfig="popups/PopUp_AdministrativePressureZone.xml"/>
<!-- Administrative Cleaning SubBasin Popup -->                   
                   <sublayer id="39" popupconfig="popups/PopUp_AdministrativeCleaningSubBasin.xml"/>
            </layer>
                   
            <layer label="Main PLL" type="dynamic" visible="false"
                   url="http://10.2.0.20/ArcGIS/rest/services/MainPLL/MapServer">
<!-- Sanitary Meter Popup -->
                   <sublayer id="1" popupconfig="popups/PopUp_SanitaryMeter.xml"/>                
<!-- Sanitary Network Structure Popup -->
                   <sublayer id="4" popupconfig="popups/PopUp_SanitaryNetworkStructure.xml"/>                        
<!-- Sanitary Manhole Popup -->
                   <sublayer id="5" popupconfig="popups/PopUp_SanitaryManhole.xml"/>
<!-- Sanitary Gravity Main Popup -->
                   <sublayer id="6" popupconfig="popups/PopUp_SanitaryGravityMain.xml"/>                         
<!-- Water Hydrant Popup -->
                   <sublayer id="12" popupconfig="popups/PopUp_WaterHydrant.xml"/>            
<!-- Water Meter Popup -->
                   <sublayer id="14" popupconfig="popups/PopUp_WaterMeter.xml"/>               
<!-- Water Control Valve Popup -->
                   <sublayer id="15" popupconfig="popups/PopUp_WaterControlValve.xml"/>             
<!-- Water Network Structure Popup -->
                   <sublayer id="18" popupconfig="popups/PopUp_WaterNetworkStructure.xml"/> 
<!-- Water Critical Main Popup -->
                   <sublayer id="21" popupconfig="popups/PopUp_WaterCritialMain.xml"/> 
<!-- Water Main Popup -->
                   <sublayer id="22" popupconfig="popups/PopUp_WaterMain.xml"/> 
<!-- Administrative HTE Location Point Popup -->                   
                   <sublayer id="25" popupconfig="popups/PopUp_AdministravtiveHTE.xml"/>
<!-- Proposed Water Control Valve Popup -->
                   <sublayer id="28" popupconfig="popups/PopUp_WaterControlValve.xml"/>    
<!-- Proposed Water Hydrant Popup -->
                   <sublayer id="29" popupconfig="popups/PopUp_WaterHydrant.xml"/>  
<!-- Proposed Water Main Popup -->
                   <sublayer id="30" popupconfig="popups/PopUp_WaterMain.xml"/> 
<!-- Proposed Water Network Structure Popup -->
                   <sublayer id="32" popupconfig="popups/PopUp_WaterNetworkStructure.xml"/>                    
<!-- Proposed Sanitary Manhole Popup -->
                   <sublayer id="37" popupconfig="popups/PopUp_SanitaryManhole.xml"/>
<!-- Proposed Sanitary Gravity Main Popup -->
                   <sublayer id="39" popupconfig="popups/PopUp_SanitaryGravityMain.xml"/>     
<!-- Proposed Sanitary Meter Popup -->
                   <sublayer id="40" popupconfig="popups/PopUp_SanitaryMeter.xml"/>
           </layer>
               
<!--            <layer label="Event Layers" type="dynamic" visible="false"-->
<!--                   url="http://10.2.0.20/ArcGIS/rest/services/EventLayers/MapServer">-->
<!--                   <sublayer id="3" popupconfig="popups/PopUp_FldOpsAllWO.xml"/>-->
<!--            </layer>-->
            
        </operationallayers>
    
       <basemaps>

            <layer label="Satellite View" type="tiled" visible="false" alpha="1"
            url="http://10.2.0.20/ArcGIS/rest/services/SatelliteView/MapServer">
                   
<!-- Montgomery County Parcel Popups -->
                   <sublayer id="10" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="21" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="32" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="43" popupconfig="popups/PopUp_MontParcels.xml"/>
                 
<!-- Warren County Parcel Popups -->
                   <sublayer id="9" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="20" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="31" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="42" popupconfig="popups/PopUp_WarrenParcels.xml"/>

            </layer>

            <layer label="Street View" type="tiled" visible="true" alpha="1"
            url="http://10.2.0.20/ArcGIS/rest/services/StreetView/MapServer">
                   
<!-- Montgomery County Parcel Popups -->
                   <sublayer id="16" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="34" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="52" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="70" popupconfig="popups/PopUp_MontParcels.xml"/>
                   <sublayer id="88" popupconfig="popups/PopUp_MontParcels.xml"/>
                 
<!-- Warren County Parcel Popups -->
                   <sublayer id="15" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="33" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="51" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="69" popupconfig="popups/PopUp_WarrenParcels.xml"/>
                   <sublayer id="87" popupconfig="popups/PopUp_WarrenParcels.xml"/>

             </layer>
             
        </basemaps>
    
    </map>
Tags (2)
0 Kudos
3 Replies
PatrickMullen1
Occasional Contributor
I am experience similar problems. Three of my operational layers are drawing underneath aerial basemaps (both in house aerial imagery and the Bing Hybrid map.

Oddly, if I moved the two cached operational layers to the top of the operationallayers tag, it corrected part of the problem.
I also added a dummy layer as the first operational layer set to visible="false" and set to not show in the Layer List or TOC Widget(which I use). This seemed to correct the problem.


Are you using the TOC widget or the out of the box Layer List widget?
0 Kudos
ChristopherOlsen
Frequent Contributor
I was able to reproduce the same issue with both 2.5 and 3.0.  I used 2 basemaps with sublayers (one imagery, one streets) and one operational layer.  I have logged a bug for this under:
#NIM082418  Operational layers disappear if basemap layers have sublayers.

Thanks,
Chris
0 Kudos
SarthakDatt
Frequent Contributor
Yes, it is a bug and will be fixed in the next version.

In the meantime, if you are using the uncompiled version of the viewer, update the following methods in MapManager.mxml as follows:


private function loadNextBasemapLayer():void
{   
     var basemapLayerObject:Object = m_basemapLayers[m_basemapLayerIndex];
     // configure popups, if any
     configureLayerRenderer(basemapLayerObject, false);
}

private function loadNextOpertionalLayer():void
{
     var optLayerObject:Object = m_operationalLayers[m_operationalLayerIndex];
     // configure pop-ups, if any
     configureLayerRenderer(optLayerObject, true);
}

private function loadNextOperationalOrBasemapLayer(isOperationalLayer:Boolean):void
{   
     if (isOperationalLayer)
     {   
           // add layer to map after popups have been configured, if any
           var optLayerObject:Object = m_operationalLayers[m_operationalLayerIndex];
           addLayerToMap(optLayerObject);
                    
           m_optLayerTable.push(optLayerObject);
           m_operationalLayerIndex++;
           if (m_operationalLayerIndex < m_operationalLayers.length)
           {
                 loadNextOpertionalLayer();
           }
      }
      else
      {   
            // add layer to map after popups have been configured, if any
            var basemapLayerObject:Object = m_basemapLayers[m_basemapLayerIndex];
            addLayerToMap(basemapLayerObject);
                    
            m_basemapLayerIndex++;
            if (m_basemapLayerIndex < m_basemapLayers.length)
            {
                  loadNextBasemapLayer();
            }
      }
}
0 Kudos