Re: [Interest] routing directions from mapboxgl

2018-07-10 Thread Marek.Floriańczyk
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?

ok, I have added language option to query in qgeoroutingmanagerenginemapbox.cpp


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=true=polyline6&
> > alternatives=true=0,180;0,180_token=my_token_instruc
> > tions=true_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@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] routing directions from mapboxgl

2018-07-10 Thread Marek.Floriańczyk
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?

Hi
QML Plugin has "locales" property
http://doc.qt.io/qt-5/qml-qtlocation-plugin.html
But it seems it does not work.

MapParameters are described here
https://doc-snapshots.qt.io/qt5-5.9/location-plugin-mapboxgl.html#optional-map-parameters
but none of them says anything about language and language does not fit to any 
of 
"Parameter type" category.

I have based my app on this example
https://github.com/tmpsantos/qmapboxglapp/tree/tmpsantos-cheapruler 
it was shown on Qt World Summit 2017
It is  using mapboxgl plugin to display map and mapbox plugin to calculate route
Indeed, when I use mapboxgl plugin in RouteModel it does not work, on the other 
hand 
mapbox plugin does work, but it does not respect "locales" or "language" as a 
PluginParameter.

It seems that it should.

I have tried to modify qgeoserviceproviderpluginmapbox.cpp
*Src/qtlocation/src/plugins/geoservices/mapbox*

QUrl("https://api.mapbox.com/directions/v5/mapbox/driving/
21.161,52.1979;21.1796,52.1952?
steps=true=true=full=geojson_token=my_toke
n")

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=true=polyline6&
> > alternatives=true=0,180;0,180_token=my_token_instruc
> > tions=true_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@qt-project.org
> > http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] routing directions from mapboxgl

2018-07-10 Thread Marian Beermann
I don't see the QML docs mention a "locales" or "language" parameter.
Perhaps you need to use MapParameters to accomplish this?

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.1978600;21.1795630,52.1951690?overview=full=true=polyline6=true=0,180;0,180_token=my_token_instructions=true_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@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] routing directions from mapboxgl

2018-07-10 Thread Marek.Floriańczyk
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.1978600;21.1795630,52.1951690?
overview=full=true=polyline6=true=0,180;0,180&
access_token=my_token_instructions=true_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@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest