Closed corsc closed 10 years ago
sure, you can call requestRender in any event...
tileView.addTileViewEventListener(new TileViewEventListenerImplementation(){
@Override
public void onDrag(int x, int y){
tileView.requestRender();
}
});
(the above is from the top of my head and may contain syntactical errors, but should give the idea).
Performance is likely to suffer when attempting to render while dragging. Rendering should - by default - happen at the conclusion of a drag or pinch event - if that's not happening and something you're trying to solve, post back.
Thanks for the quick response, my client wanted the the tiles to load during the event so that is was more consistent with their iOS version. I will certainly give this a try.
On most devices, the performance will never match iOS CATiledLayer, which is always, but nature, hardware accelerated. Even totally stripped down to 80 +/- lines, that just scales on pinch, the performance is noticeably worse than can be seen on a similar iOS app. There are some devices (some of the Nexus series, for example) that will come close, but I think it's mostly driven by hardware acceleration (or lack thereof). In any case, gl.
did this work out for you? can i close this issue?
Yeah the end result was about what you said, thanks for your help
Can we also load tiles when scale or zoom operation started? So in that case we can have different layers with different zoom levels so we can also make layers scalable?
The TileViewEventLisenter interface and the TileViewEventListenerImplementation class allow you to react to most events that relate to TileView operations.
By default, the addDetailLevel
methods handle the pretty complex operations needed to handle different tile sets, but feel free to customize at will.
Please forgive me but I can find anything in the code.
Is it possible to trigger an update of the tile rendering during a pinch/drag/etc?