int[] decodedZoomLevels = PolylineDecoder.decodeZoomLevels(levels);
GeoPoint[] gPts = PolylineDecoder.decodePoints(points, decodedZoomLevels.length);我试图用Google的方向API从巴塞罗那到马德里中画出路线:
<DirectionsResponse>
<status>OK</status>
<route>
<leg>
...
</leg>
<copyrights>Datos de mapa ©2012 Google, Tele Atlas</copyrights>
<overview_polyline>
<points>
cjr{F_u(...)rw@bD~]ln@xo@fnB`M|iAxEvV
</points>
</overview_polyline>
<route>
<DirectionsResponse>我设法读取XML并获得\DirectionsResponse\route\overview_polyline\points polyline字符串;但是我找不到<levels>标记。
我试图在用户放大时画出更流畅的线(路线),但当变焦结束时释放智能手机的CPU。
我用错API了吗?还是这门课过时了?
提前谢谢..。
发布于 2012-03-28 10:33:49
ZoomLevel是在折线"string“内展开的。在Kenny的类中,只需给出"decodePoints“方法的第二个参数,即折线字符串的大小。
看看这个1的底部,我想你会明白更多。
https://stackoverflow.com/questions/9653483
复制相似问题