Currently, I am working on enhancing an ArcGIS map by incorporating KML layers for interactivity.
This is a simplified version of the code I am currently using:
map = new Map("map", {
basemap: "topo",
center: [-108.663, 42.68],
zoom: 6
});
parser.parse();
var kmlUrl = "https://dl.dropboxusercontent.com/u/2142726/esrijs-samples/Wyoming.kml";
var kml = new KMLLayer(kmlUrl);
map.addLayer(kml);
kml.on("load", function() {
console.log("done");
});
I aim to achieve a similar effect as seen in this interactive map, where the layer highlighting occurs on hover. Although this example uses the FeatureLayer class, my data is in KML format and generated dynamically. Is it viable to create a feature layer from dynamic KML data?
Could someone provide guidance on how to detect mouseover events on a KML shape?