Drawing a line/path on Google Maps

后端 未结 13 780
执笔经年
执笔经年 2020-11-22 05:23

I\'ve been busy for a long time finding out how to draw a line between two (GPS) points on the map in HelloMapView but with no luck.

Could anyone please tell me how

13条回答
  •  南笙
    南笙 (楼主)
    2020-11-22 05:26

    Yes you need to use overlays.

    You need to get the MapView's overlays and add your new overlay onto it.

    Your class extends Overlay, which is a transparent canvas in which you can draw on it like any other canvas.

    You can use mapView.getProjection() to get projection of map view.

    ...

    More info found here: http://blogoscoped.com/archive/2008-12-15-n14.html

提交回复
热议问题