moved map drawing into shared module