Skip to content

Commit

Permalink
Merge pull request #19 from DPDBeNeLux/rework/parcelshop-optimization
Browse files Browse the repository at this point in the history
Fixed issue with wrong Parcelshops being shown
  • Loading branch information
dpdplugin authored Jul 18, 2018
2 parents b61a233 + 2431e4d commit 045d377
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/Parcelshops/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function getGoogleMapsCenter($postcode, $countryId)
//{
//$addressToInsert .= $str . " ";
//}
$addressToInsert .= $postcode . " " . $countryId;
$url = 'https://maps.googleapis.com/maps/api/geocode/json?key=' . $apiKey . '&address=' . urlencode($addressToInsert) . '&sensor=false';
$addressToInsert = 'country:' . $countryId . '|postal_code:' . $postcode;
$url = 'https://maps.googleapis.com/maps/api/geocode/json?key=' . $apiKey . '&components=' . urlencode($addressToInsert) . '&sensor=false';
$source = file_get_contents($url);
$obj = json_decode($source);
$LATITUDE = $obj->results[0]->geometry->location->lat;
Expand Down

0 comments on commit 045d377

Please sign in to comment.