问题
I'm developing an android project,in this project i have google map view and i use google map v2 . The problem is, i have some MarkerOption and i'm setting a utf8 string for them but the titles are shown as an empty string
here is my code for adding markers:
MarkerOptions marker = new MarkerOptions().position(pos).title("سلام");
marker.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE));
googleMap.addMarker(marker);
how can i solve this?
thanks for any helps
回答1:
you must set an English word then set your string :
MarkerOptions marker = new MarkerOptions().position(pos).title("TEST:"+"سلام");
回答2:
You can add a unicode left-to-right mark ("\u200e") to your text, like:
.title("\u200e" + "سلام");
来源:https://stackoverflow.com/questions/25137146/google-map-v2-issue-with-uft8-string-for-title-in-android