ported map view from old code.