我如何使用LAC(位置区号)获得位置名称



经过大量的研究,我发现LAC可以用于基于位置的应用程序来查找位置。我有几个关于LAC的问题1)我能从LAC得到什么信息?2)如何使用LAC查找位置名称?3)是否有网站或数据库可以了解我所在地区的LAC ?
我不需要代码,我需要这些问题的答案,请帮助我

下面是获取信号塔信息的代码:

public static void getCellTowerInfo() {
        TelephonyManager mTelephonyManager = (TelephonyManager) POContext.getContext().getSystemService(Context.TELEPHONY_SERVICE);
        GsmCellLocation location = (GsmCellLocation) mTelephonyManager.getCellLocation();
        if (location != null) {
            // cell id of the
            POGlobals.PhoneInfo.CellID = String.valueOf(location.getCid());
            Log.i(POGlobals.TAG, "CellID of the Device-->" + POGlobals.PhoneInfo.CellID);
            // get theLAC
            POGlobals.PhoneInfo.LAC = String.valueOf(location.getLac());
            Log.i(POGlobals.TAG, "LAC of the Device-->" + POGlobals.PhoneInfo.LAC);
        }
        if (mTelephonyManager != null) {
            // get the combination of MNC+MCC for the GSM Networks only
            if (mTelephonyManager.getNetworkOperator() != null && mTelephonyManager.getNetworkOperator().length() > 0) {
                POGlobals.PhoneInfo.MCC = mTelephonyManager.getNetworkOperator().substring(0, 3);
                POGlobals.PhoneInfo.MNC = mTelephonyManager.getNetworkOperator().substring(3);
                mTelephonyManager.getNetworkType();
            } else {
                // Phone is in Airplane Mode situation
                Logger.e(POGlobals.TAG, "TelephonyManager service is NULL");
            }
        }
    }

请删除记录器和全局变量的编译错误。

LAC是由服务提供商给出的位置区号,它取决于您最近的塔。

您可以使用OpenCellID的API来获取使用MCC, MNC, LAC和CellID的位置。

最新更新