Adding the required http calls to serer when map is open. Also fixing onDestroy.