I am using the ArcGIS API for JavaScript for creating a map. I have added some CSV and KML layers to the map.

Now the KML is colored base layer(different colored for country) on the map and CSV is some green dot layer on map but top on the KML layer.When I click on the green dot(CSV) the green dot is selected and a popup window is shown on the for green dot(CSV layer).But on clicking the green dot the base KML layer is also selected and also give popup window for the KML layer on goto the arrow sing on the header of popup.

Here is a link to my demo. You can check here click on the green dot and click on the arrow sing on the right of popup black header.

Can anyone suggest how to remove the popup from the KML layer?

2 Answers 2


You can disable a popup on a layer or layers by passing null to layer.setInfoTemplate(). Once you've got the array of feature layers that are used for displaying features from you KML (the lyrs var in your example page, around line 110), loop and clear out the info template like so:

lyrs.forEach(function(l) {
  • Thanks buddy,It is working for me.I really appreciate your suggestion. Thanks Commented Aug 30, 2014 at 12:16
  • @MukeshNandedaDhakad you're welcome, glad I could help. Commented Aug 30, 2014 at 20:39

I just ran into this looking for something else.. for future visitors, the correct way to do this is not to loop every single layer, but to use the map option..

new Map("map", {
    showInfoWindowOnClick: false

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.