This example shows how to disable click on icon. More information on how to override click event is available here.

We can use geometry type of clicked object to filter out the icons from other geometries. Geometry type of icon geometry is 2. Below code will do nothing if geometry type is equal to 2 else it will show the default popup.

    function onMapClick(mx,my,clicked){
        if(clicked) {
            if(clicked.lt == 2) {
                // do nothing
            } else {
                mapControl.defaultSelectAction(clicked);
            }
        }
    }