[Interest] routing directions from mapboxgl

Marek.Floriańczyk marek.florianczyk at gmail.com
Tue Jul 10 14:46:49 CEST 2018


Dnia wtorek, 10 lipca 2018 13:43:08 CEST Marian Beermann pisze:
> I don't see the QML docs mention a "locales" or "language" parameter.
> Perhaps you need to use MapParameters to accomplish this?

If I simply copy query to web browser:
https://api.mapbox.com/directions/v5/mapbox/driving/21.161,52.1979;21.1796,52.1952?
language=pl&steps=true&alternatives=true&overview=full&geometries=geojson&access_to
ken=my_token

I have localized instructions in  languages supported by mapbox.

In 5.9.2 Qt *Src/qtlocation/src/plugins/geoservices/mapbox*

there is file qgeoroutingmanagerenginemapbox.cpp

query.addQueryItem(QStringLiteral("language"),QStringLiteral("pl"));

I have compiled plugin and copied to:
gcc_64/plugins/geoservices/

But still can't see "language" in https parameters from app debug

Need some small help ;)

Best,
Marek

> 
> On 10.07.2018 12:54, Marek.Floriańczyk wrote:
> > Hi all,
> > 
> >  
> > 
> > I can't make mapbox plugin to return route directions in any language
> > except English, eg. I'm trying Deutsch, I can set locales property of
> > the plugin or add PluginParameters.
> > 
> > plugin:Plugin{
> > 
> > name:"mapbox"
> > 
> > locales:"de_DE"
> > 
> > PluginParameter{
> > 
> > name:"language"
> > 
> > value:"de"
> > 
> > }
> > 
> > }
> > 
> >  
> > 
> > According to mapbox docs
> > 
> > https://www.mapbox.com/api-documentation/#retrieve-directions
> > 
> > There is query parameter "language" but no matter what I set in QML,
> > this parameter seems to be omitted by RouteQuery, what I get from debug
> > is:
> > 
> >  
> > 
> > QUrl("https://api.mapbox.com/directions/v5/mapbox/driving/21.1610200,52.19
> > 78600;21.1795630,52.1951690?overview=full&steps=true&geometries=polyline6&
> > alternatives=true&bearings=0,180;0,180&access_token=my_token&voice_instruc
> > tions=true&banner_instructions=true")
> > 
> >  
> > 
> > So if I can't pass language parameter in query, I can't get localized
> > instructions.
> > 
> > I was testing on Qt 5.10 and 5.11.0 on Linux 64Bit
> > 
> > Can someone help please ?
> > 
> >  
> > 
> > Best Regards
> > 
> > Marek
> > 
> > 
> > 
> > _______________________________________________
> > Interest mailing list
> > Interest at qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20180710/16bace6d/attachment.html>


More information about the Interest mailing list