Skip to content

Commit

Permalink
Merge branch '4.x' into 5.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ttempleton committed Aug 2, 2024
2 parents 1fb33e2 + 6ae43ab commit 95fdd16
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/adapters/googlemaps/detectors/Code.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,13 @@ private function _getPosition(string $mode, string $path): array
];

if ($mode === 'view') {
$pos = explode(',', getDirectory($path, 1));
$position['coordinates'] = str_replace('@', '', $pos[0]).','.$pos[1];
$position['zoom'] = str_replace('z', '', $pos[2]);
foreach (explode('/', $path) as $pathComponent) {
if (str_starts_with($pathComponent, '@')) {
$pos = explode(',', $pathComponent);
$position['coordinates'] = str_replace('@', '', $pos[0]).','.$pos[1];
$position['zoom'] = str_replace('z', '', $pos[2]);
}
}
}

if ($mode === 'streetview') {
Expand Down

0 comments on commit 95fdd16

Please # to comment.