strings95
strings95

Reputation: 681

google map v2 issue with uft8 string for title in android

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

Upvotes: 0

Views: 434

Answers (2)

Mbt925
Mbt925

Reputation: 1346

You can add a unicode left-to-right mark ("\u200e") to your text, like:

.title("\u200e" + "سلام");

Upvotes: 0

S.M_Emamian
S.M_Emamian

Reputation: 17393

you must set an English word then set your string :

MarkerOptions marker = new MarkerOptions().position(pos).title("TEST:"+"سلام");

Upvotes: 3

Related Questions