encapsulated map-drawing code to th emap fragment