Taurus-Jiang 2016-01-02 16:39 采纳率: 0%
浏览 4450

android百度地图 用不同颜色显示规划路线

需要在百度地图中,显示两条规划路线。 用不同颜色表示。
路线我可以搞定,关键没有找到设置不同颜色的方法。
大神的有做过的吗?提点一下。先谢过。

  • 写回答

2条回答 默认 最新

  • Exploring1024 2016-01-03 01:23
    关注
      List<BitmapDescriptor> customList = new ArrayList<BitmapDescriptor>();
            BitmapDescriptor custom1 = BitmapDescriptorFactory
                    .fromResource(R.color.red);
            BitmapDescriptor custom2 = BitmapDescriptorFactory
                    .fromResource(R.color.red);
            customList.add(custom1);
            customList.add(custom2);
            //添加到地�?
            points = new ArrayList<LatLng>();
            points.add(pointMiddle);
            points.add(pointEnd);
            ooPolyline = new PolylineOptions().width(10).color(0xAAFF0000).
                    points(points).customTextureList(customList).textureIndex(index);
            mBaiduMap.addOverlay(ooPolyline);
            mMapView.refreshDrawableState();
    
    评论

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置