【发布时间】:2016-05-11 05:43:37
【问题描述】:
如何使用适用于 Android 的 ArcGIS Runtime SDK 让我的位置显示在地图上?这是我尝试过的:
mMapView = (MapView) findViewById(R.id.map);
mMapView.setOnStatusChangedListener(new OnStatusChangedListener() {
@Override
public void onStatusChanged(Object o, STATUS status) {
if (o == mMap && status == STATUS.INITIALIZED) {
LocationDisplayManager ldm = mMap.getLocationDisplayManager();
ldm.setAutoPanMode(LocationDisplayManager.AutoPanMode.LOCATION);
ldm.start();
}
}
}
【问题讨论】:
-
你不能在对象之间使用 ==。使用 o.equals(mMap)
标签: android geolocation location arcgis