Calculate distance, cap ajax calls at 36