因爲我不想混淆,我會嘗試與SDK示例代碼來解釋。Android Google Maps v2 - OnMyLocationChangeListener - 它究竟需要什麼?
,一切工作正常 - 除了"onMyLocationChange"
回調。
- API 16 & 17 tested
- updated Play Services Rev.5
- Tested with ICS Tablet&Phone
我只是說需要接收位置更新的內容:
UiSettingsDemoActivity implements OnMyLocationChangeListener
連接它的地圖:
mMap.setOnMyLocationChangeListener(this);
並實施回調
@Override
public void onMyLocationChange(Location arg0) {
....
}
但是這種方法從來沒有觸發過紅。
釋放從26月注:https://groups.google.com/d/msg/google-maps-android-api-notify/va_IsjNu5-M/QPtoSn69UMgJ - 所以我想這是工作。
編輯:http://code.google.com/p/gmaps-api-issues/issues/detail?id=4644
[鏈接](http://developer.android.com/reference/com/google/android/gms/maps/GoogleMap.OnMyLocationChangeListener.html)這是自Rev.5(26.02.2013) – everyman
以來的官方奇怪的Eclipse不承認這種方法。我想我需要更新我的SDK。那麼把我的背單詞關於「沒有......」,但無論如何你必須窗臺爲了設置loicationListener得到的位置變化通知。 –
我只是更新我的應用程序V2 - V1與我有一個自定義LocationListener的,但我認爲,根據Google的執行效果更好。 – everyman