Can I selectively show specific layers from a kmz file on my map? My current setup involves using the ArcGIS API for JavaScript. Specifically, I want to display only folders related to the current day outlook from a KMZ file provided by the NWS. There are 5 folders in total, with names like "Current Day 4 outlook" containing sub-layers such as "day_4otlk_20130920_prob."
At the moment, these layers do not contain any data due to low predictability, but they will in the future. Below is the code snippet taken from a sample project, where the actual KMZ file has been replaced. Thank you.
<script>
var map;
require([
"esri/map", "esri/layers/KMLLayer",
"dojo/parser", "dojo/dom-style",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"
], function(
Map, KMLLayer,
parser, domStyle
) {
map = new Map("map", {
basemap: "topo",
center: [-99, 42.68],
zoom: 4
});
parser.parse();
var kmlUrl = "http://www.spc.noaa.gov/products/outlook/SPC_outlooks.kmz";
var kml = new KMLLayer(kmlUrl);
map.addLayer(kml);
kml.on("load", function() {
domStyle.set("loading", "display", "none");
});
});
</script>