The InfoWindow does not stay opened when setting the content in the click event and a KML layer is present.
Last Published: September 14, 2015ArcGIS API for JavaScript
Bug ID Number
BUG-000087759
Submitted
May 19, 2015
Last Modified
June 5, 2024
Applies to
ArcGIS API for JavaScript
Version found
3.13
Status
Known Limit
After review by the development team, it has been determined that this issue is related to a known limitation with the software that lies outside of Esri's control. The issue's Additional Information section may contain further explanation.
Additional Information
FeatureLayers automatically handle pop-up on click. Instead of defining a feature layer click set an info template on the layer.
Workaround
Change the following to use the map click event instead of feature layer click.
Change:
//associate the features with the popup on click
featureLayer.on("click", function(evt) {
map.infoWindow.setFeatures([evt.graphic]);
var html = "<strong>";
map.infoWindow.setTitle("Station ");
map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));
});
To:
//associate the features with the popup on click
map.on("click", function(evt) {
map.infoWindow.setFeatures([evt.graphic]);
var html = "<strong>";
map.infoWindow.setTitle("Station ");
map.infoWindow.show(evt.mapPoint, map.getInfoWindowAnchor(evt.screenPoint));
});