Google glass GDK - 获取地理位置(经纬度)
2014-08-05 10:53
225 查看
与Android类似,直接贴代码~
最后添加权限:
LocationManager lm = (LocationManager) this.getSystemService(LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER); double jingdu = location.getLatitude(); double weidu = location.getLongitude(); double haiba = location.getAltitude(); System.out.println("经度=" + jingdu + " 纬度=" + weidu + " 海拔=" + haiba);
最后添加权限:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
相关文章推荐
- Android 通过经纬度获取地理位置信息
- android 用百度地图API获取经纬度和地理位置
- 用户Ip地址和百度地图api接口获取用户地理位置(经纬度坐标,城市)
- 通过经纬度获取地理位置详细信息
- PHP根据地理位置信息获取经纬度
- 从google的json接口获取地理位置信息的Java代码
- 根据GPS获得的经纬度来获取地理位置信息
- 源码推荐(1.12):ZYDrawString实现对字符串的画线动画,iOS8获取当前经纬度、地理位置
- ios 定位经纬度获取位置信息,地理位置编码与反编码
- 获取某地的经纬度 && 通过经纬度获取相应的地理位置
- Android 通过经纬度获取地理位置信息
- Google glass GDK - 通过MP3路径获取专辑图片
- 利用google提供的API(JavaScript接口)获取网站访问者IP地理位置的代码详解
- 转载]IOS LBS功能详解[0](获取经纬度)[1](获取当前地理位置文本 )
- 使用Google Geocoding API来进行关键字搜索,获取相关的地理位置信息
- 利用HTML5中Geolocation获取地理位置调用Google Map API在Google Map上定位
- 根据经纬度来获取地理位置信息demo
- 根据经纬度来获取地理位置信息demo
- java调用百度地图API根据地理位置获取经纬度
- js 获取地理位置经纬度