add Map getDistance, close #1442
simplify calculations in scale control