Hi Stefan,
In your require list there is an issue:
"dojo/store/Memory "dojo/domReady!" // problem
The end quote and comma are missing after dojo/store/Memory. This needs to be changed to:
"dojo/store/Memory", "dojo/domReady!"
The Tundra stylesheet is also returning a 404 error. Try using:
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
or:
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/dojo/dijit/themes/tundra/tundra.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.10/js/esri/css/esri.css">
After completing these changes your code populates the combo values.
However, there is another issue with the way that the applyLayerDef() function is called using:
<select id="mySelect"
dojotype="dijit.form.ComboBox"
style="width:300px;font-size:18px;"
autoComplete="true"
forceValidOption="false"
value="Select Zoning Type"
onchange="applyLayerDef(this)"></select>
The new style of code creates a scoping issue in that the applyLayerDef function is not available from the HTML declared events (such as the mySelect onchange event). To get around this issue remove the onchange attribute from the select element and wire up the event within your JS code, for example:
// this replaces your applyLayerDef() function
dijit.byId("mySelect").on("change", function () {
//Filter the layer to display only the selected zoning types
var zone = dijit.byId("mySelect").value;
if (zone !== 'ALL') {
var layerDefs = [];
layerDefs[2] = "ZONING_TYPE = " + "'" + zone + "'";
layerDefs.visibleLayers = [2];
map.getLayer("dynamic").setLayerDefinitions(layerDefs);
}
else {
map.getLayer("dynamic").setDefaultLayerDefinitions();
}
});
Note that this uses the dojo/on module that will need to be included in your require list.
There is a full working example I created on JS Bin you can check out.
Hope this helps,
Owen
Spatial XP