Issue
I have an activity that extends MapActivity and has two main elements, list view on the left and map on the right. I put a refresh button on the map and tried to :
map.setTraffic(true);
map.invalidate();
but nothing changed. the map did not refresh. I did searched a bit on google and understood that invalidate() should do the trick. I would like to avoid recreating the entire activity. Please help? Thank you.
Solution
You should not even need the invalidate(). This sample app toggles between regular and satellite tiles just by calling setSatellite() when you press the <S> key in the emulator.
Temporarily switch to setSatellite() instead of setTraffic(). If that works, then the problem is tied to the traffic tile set, which I have never tried.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.