Why is my floating pane under my map and not on top of  it?

Discussion created by schlot on Jun 27, 2014
Latest reply on Jul 8, 2014 by khutchins-esristaff
I have a map that accepts an incoming parameter and based on the value, loads a particular data layer, sets the title etc.  I need to handle the possibility of no incoming argument, presenting the user with a pick list comparable to the values of the incoming parameter.

I will always have a county boundary layer, so I have a load event on the county layer, which checks to see if there is a parameter on the URL.  It will either load additional data or open the floating pane of category choices if there is no parameter provided.

My problem is that the floating pane loads first, and ends up under my map instead of on top of it.  I've tried setting the z-index to 999 for my floating pane, but that didn't help.  I feel like I'm missing something obvious, but I haven't spotted it yet. 
<!DOCTYPE html>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> 
    <title>Sample - Floating Pane if no URL parameter</title> 
    <link type="text/css" rel="stylesheet" href="">  
    <link rel="stylesheet" type="text/css" href=""> 
    <link rel="stylesheet" type="text/css" href="">
    <link rel="stylesheet" type="text/css" href="">
    <link rel="stylesheet" type="text/css" href="" > 
    <link type="text/css" rel="stylesheet" href="css/style.css">
    <script type="text/javascript">
    var dojoConfig = {
      parseOnLoad: false,
<script type="text/javascript" src=""></script> 
<script type="text/javascript">
    var pathName = "";
    var map, countyLayer, NCDM, ncdmLayer;
    require(["dojo/parser", "esri/map", "esri/domUtils","esri/urlUtils",   
     "dojo/dom", "dijit/registry", "dojo/on", "dojo/dom-construct", "dojo/query",
    "esri/layers/FeatureLayer", "esri/layers/ArcGISDynamicMapServiceLayer", 
    "esri/renderers/SimpleRenderer", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol",  
    "esri/graphic", "dojo/_base/Color", "dojo/_base/array","dojo/aspect", 
    "dijit/form/Form", "dijit/form/RadioButton", "dijit/form/Button","dijit/form/TextBox",
    "dijit/form/Select", "dijit/TitlePane", "dijit/layout/BorderContainer", 
    function(parser, Map, domUtils, urlUtils, dom, registry, on, domConstruct, query, 
    FeatureLayer,  ArcGISDynamicMapServiceLayer,SimpleRenderer, SimpleLineSymbol, SimpleFillSymbol, Graphic, Color, 
    arrayUtils, aspect){
      var countyFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.STYLE_NULL, 
        new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([149,149,149]), 2)); 

      map = new Map("mapDiv", {
        basemap: "topo",
        center: [-92.593, 38.5],
        zoom: 7

      countyLayer = new FeatureLayer(pathName + "/ArcGIS/rest/services/BaseMap/county_simple/MapServer/0", {
        id: "countyLayer",
        mode: FeatureLayer.MODE_ONDEMAND,
        outFields: ["COUNTYNAME"]

      countyRenderer = new SimpleRenderer(countyFillSymbol);
      countyLayer.on('load', checkURL);//checks for NCDM in URL, loads data based on parameter provided
  //load this category specified in the incoming URL parameter
    function loadData(ncdm){
        var ncdmPath, layerName;
        switch (ncdm) {
          case "AMI":
            ncdmPath = pathName + "/ArcGIS/rest/services/DHSS/EPHT_ami_county/MapServer";
            layerName = "AMILayer";      
          case "CO":
            ncdmPath = pathName + "/ArcGIS/rest/services/DHSS/EPHT_carbon_county/MapServer";
            layerName = "COLayer";         
        ncdmLayer = new ArcGISDynamicMapServiceLayer(ncdmPath, {
          id: layerName,
          opacity: '0.7'
      function cleanUpLayers(){
        var layers = map.getLayersVisibleAtScale(map.getScale());
        arrayUtils.forEach(layers, function(layer){
          if ( !== 'layer0' && !== 'countyLayer') {
//get the URL parameter, either load the data or if there isn't a parameter, open the floating pane               
  function checkURL(){
    NCDM = getNCDMFromUrl(document.location.href);
    if (!NCDM) {     
    } else {
  function getNCDMFromUrl(url){ //extracts the parameter from the url
    var urlObject = urlUtils.urlToObject(url);
    if (urlObject.query && urlObject.query.ncdm) {
      return urlObject.query.ncdm;
    } else {
      return null;
//functions for managing floating panes
  function openFloatingPane(paneId){
    var fp = registry.byId(paneId);
    if (( == "visibility: hidden;") || ( = "VISIBILITY:hidden;")) { = "visible";;
  <body class="claro">  
  <div id='mainWindow' data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false" 

  <div id="mapDiv" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center',gutters:'false'">  
          <div id="dock_pick" data-dojo-type="dojox/layout/Dock" ></div> 
        <div id="floater_pick" data-dojo-type="dojox/layout/FloatingPane" 
        data-dojo-props= "title:'Choose a category', dockTo:'dock_pick', closable:false, resizable:true, dockable:true"
        style="visibility:hidden;"   >     
        <div id="pickDiv" >
          category picking goes here

  z-index: 999;
  left: 80px;
  width: 100px;
  height: 100px;