Arcgis for Android解决中文字体乱码的问题

来源:互联网 发布:查看linux版本命令 编辑:程序博客网 时间:2024/05/29 04:47

首先,在此感谢Arcgis for Android群里的一位成员,大家可以加进来QQ群号:337469080。


不论是Arcgis for Android的哪个版本,都没无法解决中文乱码的问题,这个与Android中自带的字体库有关,可以参考http://mobile.51cto.com/android-265238.htm这篇文章。


所以,要在Arcgis for Android中显示中文,需要对字体进行设置,如下:

TextSymbol ts = new TextSymbol(25, addr, Color.RED);ts.setFontFamily("DroidSansFallback.ttf");  ts.setOffsetX(0);ts.setOffsetY(-30);Graphic gText = new Graphic(mapPoint,ts);gLayerGps.addGraphic(gText);

这样,就能解决中文乱码问题,完成后 显示为:


如有疑问请联系:

QQ:1004740957

Email:niujp08@qq.com

0 0
原创粉丝点击