webempoweredchurch/wec_map — Issue #5: Inconsistent return values from cache lookup
Author: ckoehler
Created: 2011-11-30 03:32:48+00:00
State: open

In reference to an entry in calendar base bug tracker (http://svn.webempoweredchurch.org/issues/2018):

The cache lookup function generates inconsistent return values, depending if there is a record found in the cache or not.

If yes, the values will have the same precision as they have in the database. (e.g., long=13.823203)
If no, they will have the maximum precision returned from the geocoder (e.g., long=13.8232030)

It doesn't matter for the further processing, but with cal base integration, tcemain::checkStoredRecord() function returns an error regarding a "value mismatch with fieldtype".

class.tx_wecmap_cache.php, around line 95, add:
$latlong['lat'] = trim($latlong['lat'],'0');
$latlong['long'] = trim($latlong['long'],'0');