add automatic map panning and scaling