draw is being constantly called in my android map overlay

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

    I know this is an old problem, but I just now encountered it. This is a "for what it's worth" post.

    The draw loop turned out to be a coding error on my part. According to the doc, if the draw routine returns true, it is asking for an immediate update. If false is returned, only two passes are made for each overlay; one for shadow true and one for shadow false. I was returning true which resulted in a constant update. After I changed to returning false, only two passes per overlay occurred. No loop.

提交回复
热议问题