Answers for "validate latitude longitude javascript"

0

validate latitude longitude javascript

function validateLatLng(lat, lng) {    
  let pattern = new RegExp('^-?([1-8]?[1-9]|[1-9]0)\\.{1}\\d{1,6}');
  
  return pattern.test(lat) && pattern.test(lng);
}
Posted by: Guest on April-10-2020

Code answers related to "validate latitude longitude javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language