Directions Language wrong with Mapbox API

Phoca Maps - displaying maps in Joomla! CMS
sonnenlanze
Phoca Member
Phoca Member
Posts: 29
Joined: 24 Jan 2010, 12:57
Location: Germany

Directions Language wrong with Mapbox API

Post by sonnenlanze »

Hey there :)

I've changed to OSM/Mapbox on my page and I need routing funcionality.
Therefore I entered the routing service url: https://api.mapbox.com/
The Map Language ist correctly in German, the routing information unfortunatey is not, it's in Englisch.
Performance is great, routing works correctly otherwise.
I would like to know if one can possibly change the given Language Code for the routing js-file.
PHP-Version 7.2.11
Webserver Apache
PHP-Interface für den Webserver cgi-fcgi
Joomla!-Version Joomla! 3.9.0 Stable [ Amani ] 30-October-2018 14:00 GMT
Joomla!-Plattform-Version Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Browsererkennung Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Phoca Maps Version 3.0.5
Url: http://www.bruecklocherhof.de/index.php/der-hof/anfahrt

Any ideas and help appreciated.
Thank you in advance!

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Directions Language wrong with Mapbox API

Post by Jan »

Hi, for now there is no such option, I will add it in next version.

You can do a quick change now here, open:

components\com_phocamaps\views\map\tmpl\default_osm.php

line cca 248, change
FROM:

Code: Select all

$map->renderRouting(0,0,$lat,$lng, $mId, $markerIconOptions);
TO:

Code: Select all

$map->renderRouting(0,0,$lat,$lng, $mId, $markerIconOptions, 'de');
and let me know if this works.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48402
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Directions Language wrong with Mapbox API

Post by Jan »

Hi, should work in version 3.0.6 (the language can be set in maps edit)

https://www.phoca.cz/news/1019-phoca-ma ... 6-released

Jan
If you find Phoca extensions useful, please support the project
Post Reply