前言
实习的日子过得很快,每天都有事可干,有东西可以学习,最近的项目是地图,用的是Arcgis for android Runtime 100 。以前并没接触过这个东西,所以也是不断的查看资料,查看官网的案例。
给上我用到的链接:https://developers.arcgis.com/android/latest/guide/develop-your-first-map-app.htm。
——官方案例
https://developers.arcgis.com/android/latest/api-reference/reference/com/esri/arcgisruntime/mapping/view/LocationDisplay.AutoPanMode.html——官方文档
正文
获取我的位置,底图的加载这边就不写了,官方看一下就能懂了
通过本身自带的一个方法来获取当前位置MapView.getLocationDisplay()
public void location() {
LocationDisplay ldManager = mMapView.getLocationDisplay();
ldManager.setShowLocation(true);
ldManager.setAutoPanMode(LocationDisplay.AutoPanMode.RECENTER); //设置模式
ldManager.setShowPingAnimation(