我正在为GoogleMaps V2创建MarkerDemo的自定义实现.我有一个奇怪的错误,我将LatLng值提供给LatLngBounds.Builder实例,然后将其作为变量传递给.build.当我通过Eclipse在调试模式下运行应用程序时,Map会加载.当我通过Eclipse正常运行时,会抛出一个带有"no included points"的IllegalStateException作为消息.有人可以帮忙吗?
这是一些协助的代码.
public class MyActivity extends android.support.v4.app.FragmentActivity
implements OnMarkerClickListener, OnInfoWindowClickListener,
OnMarkerDragListener {
private HashMap<DataItem, ArrayList<DataItem>> mUserLocations = new
HashMap<DataItem, ArrayList<DataItem>>();
private ArrayList<DataItem> mFeedData;
private NetworkingHandler mHandler = new NetworkingHandler("tag");
private GoogleMap mMap;
private final String DOWNLOAD_USER_LOCATIONS_URL =
"http://www.myfeedurllocation.com/page.php";
@Override
public void onCreate(Bundle savedBundleInstance) {
super.onCreate(savedBundleInstance);
setContentView(R.layout.activity_myactivitylayout);
downloadUserLocations();
setUpMapIfNeeded();
}
@Override
protected void onResume() {
super.onResume();
setUpMapIfNeeded();
}
private void setUpMapIfNeeded() {
// Do a null check to confirm that we have not already instantiated the
// map. …Run Code Online (Sandbox Code Playgroud) java android android-sdk-2.3 illegalstateexception google-maps-android-api-2