Closed mohlendo closed 11 years ago
No, only tiles are managed relative to the viewport, everything else is rendered normally. Are you concerned about memory?
Yes, when I use the ParthViews the MapView does not respond anymore because I have A LOT of PathViews. I have now added a way to draw directly on the bitmap of the tiles which is much faster. This will eventually result in another pull request ;-)
sounds cool - looking forward to seeing it
How'd this go @mohlendo? In another dev's project, they found that adding/removing paths dynamically was buggy, but I found redrawing was stable, so for the next major update I'm going to rewrite the whole path drawing strategy #57 If you've found anything useful, LMK. Thanks.
Just to add a comment to this, I've recently been trying to draw a particularly large path. When trying to use hardware acceleration to draw the MapView I am presented with the error OpenGLRenderer: "Shape path too large to be rendered into a texture"
and the path is not drawn.
This can be resolved by disabling hardware acceleration at a cost of performance. Not sure if your update to the path drawing strategy in #57 is planned to solve this but could be worth looking at.
Cheers and thanks.
@phil-applegate ideally i'd like to limit the shape to the viewport, but i'm not sure how realistic that'll end up being. will definitely keep the note above handy tho, thanks for the input.
I've been doing some more research into this issue and found this post which looks to be similar to the problem I described above.
I've modified my local version of MapView
to use drawLines()
combined with drawCircle()
rather than drawPath()
. As a result the Path does not look quite as good as it did with drawPath()
but it can now be hardware accelerated thus improving performance and smoothness.
Hope the link proves to be some use!
@phil-applegate very good info - i knew the path drawing operations needed to be rewritten for the upcoming TileView replacement, and will definitely keep this info handy when doing that. thanks.
In my use-case I have a lot of stuff that should be drawn on top of the map. Does the MapView only draw those PathViews that are visible on the screen?