when i use mLayer.getFullExtent() (the mLayer is one of the mapView's layer), but it returns null, so is it possible to setFullExtent to a layer?
You'll have to be sure that mLayer is initialized.
mLayer.setOnStatusChangedListener(new OnStatusChangedListener(){
private static final long serialVersionUID = 1L;
public void onStatusChanged(Object source, STATUS status){
if (OnStatusChangedListener.STATUS.INITIALIZED == status) {
mapView.setExtent(mLayer.getFullExtent());
}
else if(OnStatusChangedListener.STATUS.INITIALIZATION_FAILED == status){
dialog.dismiss();
Toast toast = Toast.makeText(getApplicationContext(), "Failed to load Layer",Toast.LENGTH_SHORT);
toast.setGravity(Gravity.BOTTOM, 0, 0);
toast.show();
}
}
});