【发布时间】:2017-12-06 10:58:52
【问题描述】:
我正在尝试在当前位置设置标记,因此我尝试将 Location 转换为 LatLng 类:
LatLng mCurrentPlace= new LatLng(location.getLatitude(),location.getLongitude());
然后我又想起了addMarker方法:
mMap.addMarker(new MarkerOptions()
.title(getString(R.string.default_info_title))
.position(mCurrentPlace)
.snippet(getString(R.string.default_info_snippet)))
但是通过“运行”启动应用程序,它就停止了。
我哪里出错了?
谢谢。
【问题讨论】:
-
被捕了?你的意思是它崩溃了?如果是这样,logcat 上的回溯是什么?
-
被捕了?你什么意思
-
如果我的回答对您有用,请接受。
标签: android google-maps geolocation