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?


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. DatePicker throw java.lang.StackOverflowError when embbeded with TableRow

You have too many levels of views in your hierarchy. Remove some of them.

Romain Guy
Android framework engineer

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


2. Bluetooth RFCOMM connection refused

Hi all,

I am getting the following error, while trying to port bluetooth.

When use UI to connect headset(Handfree profile). Pair can success but
always disconnect. The fail is happen in
static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj, jint
int nr = read(nat->rfcomm_sock, &ch, 1);
return nr=-1, error=111

Have anyone know how to fix it?

find below the logs:
D/BluetoothDeviceService( 1818): 00:1A:0E:EC:14:B4 bond state 0 -> 2
V/BluetoothEventRedirector( 1972): Received
V/BluetoothEventRedirector( 1972): Received
D/BluetoothDeviceService( 1818): 00:1A:0E:EC:14:B4 bond state 2 -> 1
D/BT HSHFP( 1860): Loaded priority 00:1A:0E:EC:14:B4 = 0
V/BluetoothEventRedirector( 1972): Received
D/BT HSHFP( 1860): Saved priority 00:1A:0E:EC:14:B4 = 100
D/LocalBluetoothDevice( 1972): []
D/LocalBluetoothDevice( 1972): Adding: CONNECT Address:00:1A:0E:EC:
14:B4 Profile:HEADSET TimeSent:not yet
D/LocalBluetoothDevice( 1972): workQueue.size() == 1 || TimeOut ->
process command now
D/LocalBluetoothDevice( 1972): processCommands:[CONNECT Address:00:1A:
0E:EC:14:B4 Profile:HEADSET TimeSent:not yet]
D/BT HSHFP( 1860): Headset state 0 -> 1, result = 1
D/BT HSHFP( 1860): Handsfree SDP request
D/LocalBluetoothDevice( 1972): Command sent successfully:CONNECT
Address:00:1A:0E:EC:14:B4 Profile:HEADSET TimeSent:12:03:08 AM
V/BluetoothEventRedirector( 1972): Received
D/BT HSHFP( 1860): SDP request returned 1 (320 ms)
D/BT HSHFP( 1860): RFCOMM connection try to connect for 20 seconds
I/BT HSHFP( 1860): Created RFCOMM socket fd 38.
I/BT HSHFP( 1860): async connect is in progress (Operation now in
E/BT HSHFP( 1860): RFCOMM async connect() error: Connection refused
(111), nr = -1
D/BT HSHFP( 1860): RFCOMM connection attempt took 132 ms
W/BT HSHFP( 1860): headset.waitForAsyncConnect() error: -1
D/BT HSHFP( 1860): Rfcomm error
D/BT HSHFP( 1860): Headset state 1 -> 0, result = 0
V/BluetoothEventRedirector( 1972): Received
I/BluetoothEventRedirector( 1972): Failed to connect BT headset
D/LocalBluetoothDevice( 1972): onProfileStateChanged:[CONNECT Address:
00:1A:0E:EC:14:B4 Profile:HEADSET TimeSent:12:03:08 AM]
D/LocalBluetoothDevice( 1972):
LocalBluetoothDevice.onProfileStateChanged() called. MAC addr matched
D/LocalBluetoothDevice( 1972): processCommands:[]

unsubscribe: android-porting+unsubscr...@googlegroups.com

3. gcc: error trying to exec 'cc1': execvp: No such file or directory

4. Custom java view and custom attributes or parameters from the XML

5. How to test Handfree profile connection without screen?

6. external/elfcopy/elfcopy.c(1097): gelf_update_phdr(): invalid data

7. InstrumentationTestRunner not specified ??