This is a little hack I did to solve an issue with Regions in my osclass installation.
Problem:
I had some big regions with many cities and decided to make them more user-friendly by splitting them.
e.g Region - North, Region - South, Region - Center etc
Google maps couldn't locate them and send back coordinates to plugin.
Preferred the first part and not my additions, including hyphen.
So, d_coord_lat and d_coord_long fields were empty in oc_t_item_location table.
Solution:
google_maps plugin -> index.php -> function insert_geo_location
Below
$sRegion = (isset($aItem['s_region']) ? $aItem['s_region'] : '');
added
$sRegionNew = explode("-", $sRegion);
$sRegionNew = $sRegionNew[0];
I changed this
$address = sprintf('%s, %s, %s, %s', $sAddress, $sCity, $sRegion, $sCountry);
to this
$address = sprintf('%s, %s, %s, %s', $sAddress, $sCity, $sRegionNew, $sCountry);
Now google maps is happy and I'm happy.
It could be used with other symbols and other fields like sCity.