Fixed in SLP 2502.19.01

Reproduction

Got to Location Details | Add
Name: Test
Latitude: 32.8393273773774
Longitude: -79.85448363551637

Code Tracing

In \SLPlus_Location::MakePersistent

$dataTooWrite = 
array (
  'sl_store' => 'Test',
  'sl_address' => '',
  'sl_address2' => '',
  'sl_city' => '',
  'sl_state' => '',
  'sl_zip' => '',
  'sl_country' => '',
  'sl_latitude' => '32.8393273773774',
  'sl_longitude' => '-79.85448363551637',
  'sl_tags' => '',
  'sl_description' => '',
  'sl_email' => '',
  'sl_url' => '',
  'sl_hours' => '',
  'sl_phone' => '',
  'sl_fax' => '',
  'sl_image' => '',
  'sl_private' => '',
  'sl_neat_title' => '',
  'sl_linked_postid' => 0,
  'sl_pages_url' => '',
  'sl_pages_on' => '',
  'sl_option_value' => '',
  'sl_initial_distance' => 943.4293089967016,
)

Error Logs

Database insert error:

WordPress database error: Processing the values for the following fields failed: sl_latitude, sl_longitude. The supplied values may be too long or contain invalid data.

Resolution

The problem is that Google is falsely creating GPS coordinates on the Google Maps interface likely in an effort to thwart data harvesting.

The latitude/longitude combination 32.8393273773774, -79.85448363551637 represents 14 places after the decimal.

9 places after the decimal represents a length on the earth’s surface of approximately 110 microns.

Anything after the sixth decimal place, about 11cm is fairly useless for general map locations.

In Store Locator Plus 2502.19.01 the \SLP_Admin_Locations_Actions::add_location() method was updated to format incoming latitude and longitude data to present no more than 9 places after the decimal. This is necessary to fit the data into a 14 character data field which is stored as a string.

This can include values with negative representation including “-180.123456789”.