谷歌用其他语言映射V2标记的标题

时间:2014-04-04 14:52:53

标签: android google-maps google-maps-markers google-maps-android-api-2

我想在Google Maps API V2上显示标记:

这是我的代码:

driverMarker = new MarkerOptions();
driverMarker.icon(BitmapDescriptorFactory.fromResource(R.drawable.driver_car));
driverMarker.position(driverLocation);
driverMarker.title(getDriver().getName());
googleMap.addMarker(driverMarker);

驱动程序名称以希伯来语保存,我的Google地图语言也以希伯来语(街道名称)保存。但是,当我的getDriver()。getName()以希伯来语返回字符串时,它不会显示标题(标题为空白,如附图所示)。但是如果poi.getName()以英语返回字符串,它会在标记上显示标题......

我可以做什么才能在标记的标题上显示希伯来语???

screenshot

1 个答案:

答案 0 :(得分:0)

你可以在这里找到@Gavriel的解决方案:
Non-ASCII title for android map marker

简而言之:
您可以在自定义android:textDirection="locale"的{​​{1}}上使用TextView(如果您使用的是api 17及更高版本)

在标题/摘要中添加一个unicode从左到右的标记:

InfoWindowAdapter
相关问题