aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2024-01-02 08:12:24 +0900
committerNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2024-01-05 20:42:09 +0900
commit867bcd433adb558f95dc631a5617753e7c964295 (patch)
tree8a48e9a8929661f48ceb50c4031478a5d2fab004
parente08336ba085d798e88e33c24b850956d6e50cc51 (diff)
Add support initial position and style change by environment variable
The ondemandnavi was supporting initial position and style change by config file. I CES2024 demo development, we need to change initial position. This patch add support initial position and style change by environment variable. Bug-AGL: SPEC-5044 Change-Id: If89810e2990345e08b86e43506f4f155caf15d8f Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
-rw-r--r--mominavi.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/mominavi.cpp b/mominavi.cpp
index 1679182..6716193 100644
--- a/mominavi.cpp
+++ b/mominavi.cpp
@@ -24,6 +24,21 @@ int main(int argc, char *argv[])
QObject *rootObject = engine.rootObjects().constFirst();
QString StrEnv = qgetenv("MOMIMAP_MAPBOX_ACCESS_TOKEN");
rootObject->setProperty("mapbox_access_token", StrEnv);
-
+
+ QString StrEnvStyle = qgetenv("MOMIMAP_MAPBOX_STYLE");
+ if (StrEnvStyle.size() > 0) {
+ rootObject->setProperty("mapbox_style_urls", StrEnvStyle);
+ }
+
+ QString StrEnvLat = qgetenv("MOMIMAP_INITIAL_LATITUDE");
+ if (StrEnvLat.size() > 0) {
+ rootObject->setProperty("car_position_lat", StrEnvLat);
+ }
+
+ QString StrEnvLong = qgetenv("MOMIMAP_INITIAL_LONGITUDE");
+ if (StrEnvLong.size() > 0) {
+ rootObject->setProperty("car_position_lon", StrEnvLong);
+ }
+
return app.exec();
}