draw is being constantly called in my android map overlay

后端 未结 8 1790
走了就别回头了
走了就别回头了 2021-01-04 09:30

I\'m trying to draw a route onto my MapView. I\'ve extended Overlay and implemented the draw() method. The route is displayed properly, although while debugging, I added a b

8条回答
  •  囚心锁ツ
    2021-01-04 09:56

    i think the draw method is called repeatedly because the of the background being redrawn constantly. try setting the "MapView.ReticleDrawMode" to DRAW_RETICLE_UNDER. This basically tells the mapView to draw the reticle under the overlays. So overlay's draw method will not be called when the background is recalled. this fixed the issue for me.

    for more info, look here: MapView Api

提交回复
热议问题