draw is being constantly called in my android map overlay

后端 未结 8 1792
走了就别回头了
走了就别回头了 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

    0 讨论(0)
  • 2021-01-04 09:56

    For me it looks like a strange bug - sometimes the draw method is called continously, sometimes not.

    see here.

    0 讨论(0)
提交回复
热议问题