@Override public void onGetNetworkState(int iError) { if (iError == MKEvent.ERROR_NETWORK_CONNECT) Toast.makeText( MapApplication.getInstance().getApplicationContext(), "网络连接错误", Toast.LENGTH_SHORT) .show(); else if (iError == MKEvent.ERROR_NETWORK_DATA) Toast.makeText( MapApplication.getInstance().getApplicationContext(), "网络数据错误", Toast.LENGTH_SHORT) .show(); }
@Override public void onGetPermissionState(int iError) { if (iError == MKEvent.ERROR_PERMISSION_DENIED) Toast.makeText( MapApplication.getInstance().getApplicationContext(), "请在 MapApplication.java文件输入正确的授权Key", Toast.LENGTH_LONG) .show(); }
public void initBMapManager(Context context) { if (mapManager == null) mapManager = new BMapManager(context); boolean initSucceed = mapManager.init(APP_KEY, new MyGeneralListener()); if (!initSucceed) Toast.makeText( mapApplicationInstance.getApplicationContext(), "BMapManager初始化错误", Toast.LENGTH_SHORT) .show(); }