diff --git a/src/adapters/googlemaps/detectors/Code.php b/src/adapters/googlemaps/detectors/Code.php index fc8cddb..b2d3c54 100644 --- a/src/adapters/googlemaps/detectors/Code.php +++ b/src/adapters/googlemaps/detectors/Code.php @@ -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') {