Changed map event handler to onResume