Handler for map panning

by jgostylo » Tue, 28 Apr 2009 09:29:39 GMT


Sponsored Links
 I have searched this group extensively and have not found the answer
to my issue.

I have a lot of server data being loaded into overlays and I want to
create the overlays as the user pans.  Ideally it would wait for the
user to stop panning before it started loading the data.

What is the best practices procedure for determining if the map has
changed location or zoom level?  I was looking for something along the
lines of onLocationChanged() for MapView or onPan() but I have not
seen anything like that.

Do I just need to set up my own parameters and Override onDraw() in
the MapView and in that method run tests to see if the map has
changed?  This idea seems like overkill and would lead to overzealous
server hits.

Anyone have a better idea?

Thanks.
--~--~---------~--~----~------------~-------~--~----~



Handler for map panning

by jgostylo » Tue, 28 Apr 2009 19:03:11 GMT


 Ok, I just tried to Override onDraw() in the MapView and it is a final
method so I can't do that.  Then I saw onAnimationEnd() as inherited
from View so I decided to Override that.  I set a break point and pan
around the map but the method never gets executed.

I am still looking for a solution.  The MapController does not appear
to have anything I could use to do this.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Handler for map panning

by jgostylo » Tue, 28 Apr 2009 20:23:52 GMT


 I am getting the panning recognition to work by overriding
dispatchTouchEvent for MapView.  I think I will just have to separate
out the tasks and do the same thing for the zoom control




--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Gallery view --- error

I am new to android.

I tried creating a gallery. I got an error " cannot resolve
android.R.styleable" in the line

mGalleryItemBackground = a.getResourceId(
                    android.R.styleable.Theme_galleryItemBackground,
0);

Am I supposed to create a styleable directory in res and add something
to it ? is that the correct approach?

Actually, even without setting background, gallery works fine... still
I jus wanted to know how i'm supposed to solve this error...

Thanks and Regards,
Dolly

--~--~---------~--~----~------------~-------~--~----~

2. Log various events along with time stamp in Androi

For the most part, you'll need to modify the specific app or part of the
system that you want to monitor.  The activity manager does keep some usage
stats that you may be able to use for time spent in activities.







-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

3. Running the android emulator, easiest way?

4. Image in RemoteView disappearing or changing

5. custom animations for ViewAnimator/ViewFlipper?

6. About "ERROR: unknown virtual device name: 'myavd'"

7. How To Programmatically Reboot The Phone