Improve map.refreshLayer