Multiple entries in same address
Permalink Browser Info Environment
In case there are locations in the same address (shopping center's etc) the cache fails to create appropriate lines. I found a tiny solution for this, but the solution might not be optimal when the locations have content windows.
The tiny fix is to add IGNORE into simpleGMapAPI models addCoordsToCache function.
Old query:
$db->query('INSERT INTO btExtendedGoogleMapCache (address, lat, lng)
VALUES ("'.$address.'", "'.$this->checkCoords($lat).'", "'.$this->checkCoords($lng).'")');
New query
Old query:
$db->query('INSERT IGNORE INTO btExtendedGoogleMapCache (address, lat, lng)
VALUES ("'.$address.'", "'.$this->checkCoords($lat).'", "'.$this->checkCoords($lng).'")');
This makes the cache ignore duplicates in the database
The tiny fix is to add IGNORE into simpleGMapAPI models addCoordsToCache function.
Old query:
$db->query('INSERT INTO btExtendedGoogleMapCache (address, lat, lng)
VALUES ("'.$address.'", "'.$this->checkCoords($lat).'", "'.$this->checkCoords($lng).'")');
New query
Old query:
$db->query('INSERT IGNORE INTO btExtendedGoogleMapCache (address, lat, lng)
VALUES ("'.$address.'", "'.$this->checkCoords($lat).'", "'.$this->checkCoords($lng).'")');
This makes the cache ignore duplicates in the database
Type: | Discussion |
---|---|
Status: | New |
Do you think this is something that should be in the nexzt update?
Or is this very specific in your situation?
Best,
Corretje