Added const to OnMapEnd