managing of getLegendGraphic popup and refresh