Open GoogleCodeExporter opened 9 years ago
Sorry Please replace IGeoPoint with GeoPoint... but still the issue gets
reproduced
Original comment by raj.smo...@gmail.com
on 6 Dec 2011 at 4:18
I have the same issue. Calling multiple times to mapController.animateTo seems
to move the map to the correct position sometimes, but is not an option :)
setCenter works as spected. Example :
<code>
public void onCreate(Bundle savedInstanceState)
{
....
detectLocation();
}
private void detectLocation()
{
final Handler handler = new Handler();
myLocationOverlay.runOnFirstFix(new Runnable()
{
public void run()
{
final GeoPoint l = myLocationOverlay.getMyLocation();
handler.post(new Runnable()
{
@Override
public void run()
{
if (l != null) {
Toast.makeText(getApplicationContext(), l.toString(), Toast.LENGTH_LONG).show();
mc.setZoom(15);
//mc.setCenter(l); // works
mc.animateTo(l); // bugged
}
}
});
}
});
}
// App menu
@Override
public boolean onOptionsItemSelected(MenuItem item)
{
// Handle item selection
switch (item.getItemId()) {
case R.id.location:
detectLocation();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
</code>
Original comment by gazer....@gmail.com
on 28 Feb 2012 at 6:18
Original issue reported on code.google.com by
raj.smo...@gmail.com
on 6 Dec 2011 at 4:09