Closed popovoleksandr closed 4 years ago
Found workaround:
Reason that library gives me coordinates with local decimal point (in my case it is 'comma' or ',') which will not work as Google (as I understand requires decimal point to be a dot or '.').
Thus workaround as for now is to replace in both coordinates decimal point and then pass it to Mapper
:
$location = Mapper::location($address);
$longitude = str_replace(',','.', $location->getLongitude());
$latitude = str_replace(',','.', $location->getLatitude());
Mapper::map($latitude, $longitude);
Can it be solved in future?
Hi there,
This sounds like some kind of localisation issues, have you tried updating the configuration for language to your locale?
|--------------------------------------------------------------------------
| Language
|--------------------------------------------------------------------------
|
| The Language Google API should use required in ISO 639-1 code format.
|
*/
'language' => 'en-gb',```
Hi could you please advise me: I'm running following code
Mapper::location('Kiev')->map(['zoom' => 15, 'center' => true, 'marker' => true]);
and for some reason getting following https://www.google.com/maps/@50,-179,15z?hl=en-GB (whileMapper::location('Kiev')
gives me correct coordinates for Kiev).Thanks!