added method to calculate angle in MapObject