summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2017-09-11 14:47:36 +0200
committerasanoaozora <fifitaneki@hotmail.com>2017-09-11 14:47:36 +0200
commit8cd0718826f1c9b3c58cbe4446c38a01897a4af3 (patch)
tree87ffbd7a038b2da7dbfdce593423e4f099abd7ee
parent2ccff0a4c37b56f05edc189411fcc29e83f6696b (diff)
downloadpoi-service-8cd0718826f1c9b3c58cbe4446c38a01897a4af3.tar.gz
some minor changes to allow display Korean on map
-rwxr-xr-xsrc/navigation/build.sh6
-rw-r--r--src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx4
-rw-r--r--src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx4
-rwxr-xr-xsrc/navigation/update_third_party.sh4
-rw-r--r--src/poi-service/poi-server/main.cpp8
-rw-r--r--test/navigation/resource/location_london.xml10
-rw-r--r--test/navigation/resource/location_seoul.xml10
-rw-r--r--test/navigation/resource/location_switzerland.xml10
8 files changed, 50 insertions, 6 deletions
diff --git a/src/navigation/build.sh b/src/navigation/build.sh
index 952cbe2..4a7217e 100755
--- a/src/navigation/build.sh
+++ b/src/navigation/build.sh
@@ -144,9 +144,9 @@ echo 'build navigation'
if [ "$clean" = 1 ]
then
cmake -DWITH_DLT=$dlt_option $commonapi_tools_option -DWITH_DEBUG=$debug ../
- echo 'replace a missing font in the configuration file of navit instances'
- sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_mapviewer.xml
- sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navit/navit/navit_genivi_navigationcore.xml
+ echo 'Allow to display Korean and Japanese by replacing a font in the configuration file of navit instances'
+ sed -i -e 's/Liberation Sans/NanumGothic/' ./navit/navit/navit_genivi_mapviewer.xml
+ sed -i -e 's/Liberation Sans/NanumGothic/' ./navit/navit/navit_genivi_navigationcore.xml
fi
make
cd ..
diff --git a/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx b/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
index 88bca33..4cc3de7 100644
--- a/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
+++ b/src/navigation/map-viewer/configuration-plugin/genivi_mapviewer_configuration.cxx
@@ -54,6 +54,7 @@ static struct map32 {
{"eng","en"},
{"fra","fr"},
{"jpn","jp"},
+ {"kor","ko"},
};
static struct map32 country_map[] = {
@@ -62,6 +63,7 @@ static struct map32 country_map[] = {
{"FRA","FR"},
{"USA","US"},
{"JPN","JP"},
+ {"KOR","KO"},
};
static std::string scriptCode = "Latn";
@@ -226,10 +228,12 @@ class Configuration
::DBus::Struct< std::string, std::string, std::string > de_DE { "deu","DEU", "Latn" };
::DBus::Struct< std::string, std::string, std::string > fr_FR { "fra","FRA", "Latn" };
::DBus::Struct< std::string, std::string, std::string > jp_JP { "jpn","JPN", "Hrkt" };
+ ::DBus::Struct< std::string, std::string, std::string > ko_KO { "kor","KOR", "Hang" };
ret.push_back(en_US);
ret.push_back(de_DE);
ret.push_back(fr_FR);
ret.push_back(jp_JP);
+ ret.push_back(ko_KO);
return ret;
}
diff --git a/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx b/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
index 8e3a8c2..9d5ddce 100644
--- a/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
+++ b/src/navigation/navigation-core/configuration-plugin/genivi_navigationcore_configuration.cxx
@@ -64,6 +64,7 @@ static struct map32 {
{"eng","en"},
{"fra","fr"},
{"jpn","jp"},
+ {"kor","ko"},
};
static struct map32 country_map[] = {
@@ -72,6 +73,7 @@ static struct map32 country_map[] = {
{"FRA","FR"},
{"USA","US"},
{"JPN","JP"},
+ {"KOR","KO"},
};
static std::string scriptCode = "Latn";
@@ -228,10 +230,12 @@ class Configuration
::DBus::Struct< std::string, std::string, std::string > de_DE { "deu","DEU", "Latn" };
::DBus::Struct< std::string, std::string, std::string > fr_FR { "fra","FRA", "Latn" };
::DBus::Struct< std::string, std::string, std::string > jp_JP { "jpn","JPN", "Hrkt" };
+ ::DBus::Struct< std::string, std::string, std::string > ko_KO { "kor","KOR", "Hang" };
ret.push_back(en_US);
ret.push_back(de_DE);
ret.push_back(fr_FR);
ret.push_back(jp_JP);
+ ret.push_back(ko_KO);
return ret;
}
diff --git a/src/navigation/update_third_party.sh b/src/navigation/update_third_party.sh
index 712ebb4..0657337 100755
--- a/src/navigation/update_third_party.sh
+++ b/src/navigation/update_third_party.sh
@@ -11,8 +11,8 @@ read -r -p "Are you sure ? [y/N] " input
case "$input" in
[y/Y])
- ./update_navit $navit_version
- ./update_positioning $positioning_version
+ ./update_navit.sh $navit_version
+ ./update_positioning.sh $positioning_version
echo "Please rebuild with at least -c option"
;;
*)
diff --git a/src/poi-service/poi-server/main.cpp b/src/poi-service/poi-server/main.cpp
index cb6ee28..a6053b9 100644
--- a/src/poi-service/poi-server/main.cpp
+++ b/src/poi-service/poi-server/main.cpp
@@ -1826,7 +1826,7 @@ uint16_t poiSearchServer::searchPOIRequest(uint16_t categoryIndex, std::string s
m_poiTable.push_back(poi);
LOG_DEBUG(gCtx,"POI name: %s found at distance: %d",poi.name.c_str(),poi.distance);
}
- LOG_DEBUG(gCtx,"Amount of POI found: %d",sqlQueryResult.size());
+ LOG_DEBUG(gCtx,"Amount of POI found: %lu",sqlQueryResult.size());
return(sqlQueryResult.size());
}
@@ -2125,9 +2125,15 @@ std::vector< ::DBus::Struct< std::string, std::string, std::string > > poiConfig
{
std::vector< ::DBus::Struct< std::string, std::string, std::string > > ret;
::DBus::Struct< std::string, std::string, std::string > en_US { "eng","USA", "Latn" };
+ ::DBus::Struct< std::string, std::string, std::string > de_DE { "deu","DEU", "Latn" };
::DBus::Struct< std::string, std::string, std::string > fr_FR { "fra","FRA", "Latn" };
+ ::DBus::Struct< std::string, std::string, std::string > jp_JP { "jpn","JPN", "Hrkt" };
+ ::DBus::Struct< std::string, std::string, std::string > ko_KO { "kor","KOR", "Hang" };
ret.push_back(en_US);
+ ret.push_back(de_DE);
ret.push_back(fr_FR);
+ ret.push_back(jp_JP);
+ ret.push_back(ko_KO);
return ret;
}
diff --git a/test/navigation/resource/location_london.xml b/test/navigation/resource/location_london.xml
new file mode 100644
index 0000000..f3592f6
--- /dev/null
+++ b/test/navigation/resource/location_london.xml
@@ -0,0 +1,10 @@
+<location-set area="London">
+<location>
+<latitude>51.515037</latitude>
+<longitude>-0.172972</longitude>
+<country>United-Kingdom</country>
+<city>London</city>
+<street>Sussex Gardens</street>
+<number>153</number>
+</location>
+</location-set>
diff --git a/test/navigation/resource/location_seoul.xml b/test/navigation/resource/location_seoul.xml
new file mode 100644
index 0000000..7822594
--- /dev/null
+++ b/test/navigation/resource/location_seoul.xml
@@ -0,0 +1,10 @@
+<location-set area="Seoul">
+<location>
+<latitude>37.538835</latitude>
+<longitude>126.993809</longitude>
+<country>Korea</country>
+<city>서울</city>
+<street>hoenamu-ro 28-gil yongsan-gu</street>
+<number>47</number>
+</location>
+</location-set>
diff --git a/test/navigation/resource/location_switzerland.xml b/test/navigation/resource/location_switzerland.xml
new file mode 100644
index 0000000..7070524
--- /dev/null
+++ b/test/navigation/resource/location_switzerland.xml
@@ -0,0 +1,10 @@
+<location-set area="Switzerland extract">
+<location>
+<latitude>47.415637</latitude>
+<longitude>8.614971</longitude>
+<country>Switzerland</country>
+<city>Zürich</city>
+<street>In Lampitzäckern</street>
+<number>24</number>
+</location>
+</location-set>