[Marble-devel] ORS Routing fails because of lang "C"
Niko Sams
niko.sams at gmail.com
Sat Mar 20 20:13:06 CET 2010
Hi,
I wanted to try marble's new routing feature but it didn't work
because my locale is "C" and
ors returned an error that this language is invalid.
The patch below fixes it for me.
(And I must say it works really great! I hope you will include all
routing parameters avaliable for ors)
thanks,
Niko
diff --git a/kdeedu/marble/src/lib/routing/OrsRoutingProvider.cpp
b/kdeedu/marble/src/lib/routing/OrsRoutingProvider.cpp
index e56aad9..1feb4cf 100644
--- a/kdeedu/marble/src/lib/routing/OrsRoutingProvider.cpp
+++ b/kdeedu/marble/src/lib/routing/OrsRoutingProvider.cpp
@@ -82,7 +83,9 @@ QString OrsRoutingProvider::xmlHeader() const
result += "xsi:schemaLocation=\"http://www.opengis.net/xls ";
result += "http://schemas.opengis.net/ols/1.1.0/RouteService.xsd\"
version=\"1.1\" xls:lang=\"%1\">\n";
result += "<xls:RequestHeader/>\n";
- return result.arg(MarbleLocale::languageCode());
+ QString lang = MarbleLocale::languageCode();
+ if (lang == "C") lang = "en";
+ return result.arg(lang);
}
QString OrsRoutingProvider::requestHeader(DistanceUnit unit,
Preference preference) const
More information about the Marble-devel
mailing list