adding map scale and fixing some draing functions