请问如何通过手机获取的经纬度判断当前时区?

haitang59 2011-08-22 10:15:01
rt
...全文
527 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ultrapro 的回复:]
Take a look at Geonames.org

It's a free webservice that allow you to get a lot of informations from a long/lat

They also provide a free (and open source) Java Client for GeoNames Webservices lib……
[/Quote]

不错
2011-11-07
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 haitang59 的回复:]

姐很无奈的发现需求搞错了
[/Quote]XBC
儿大不由爷 2011-08-22
  • 打赏
  • 举报
回复
Take a look at Geonames.org

It's a free webservice that allow you to get a lot of informations from a long/lat

They also provide a free (and open source) Java Client for GeoNames Webservices library (library for other language also provided: ruby, python, perl, lisp...)

Here's some info you can get from long/lat: (complete list of webservices here)

Find nearest Address
Find nearest Intersection
Find nearby Streets
Elevation
Timezone

haitang59 2011-08-22
  • 打赏
  • 举报
回复
姐很无奈的发现需求搞错了
念茜 2011-08-22
  • 打赏
  • 举报
回复
DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,Locale.CHINA);
念茜 2011-08-22
  • 打赏
  • 举报
回复
通过手机? GPS或者network


private String getLocationInfo() {
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Location location = locationManager
.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
return location.getLatitude() + "," + location.getLongitude();
}



private String getLocationInfo() {
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
Location location = locationManager
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
Log.i("location: ",location.getLatitude() + "," + location.getLongitude());
return location.getLatitude() + "," + location.getLongitude();
}
AndyZhang 2011-08-22
  • 打赏
  • 举报
回复
这个很简单吧,通过经纬度,正负,还有子午线,很快就能计算出了吧。这个问题也不是新问题了,lz搜一下帖子吧
maxall0 2011-08-22
  • 打赏
  • 举报
回复
好眼熟的问题哦!!
你看看那这个网址:http://tech.cncms.com/shouji/iphone/113013.html

29,030

社区成员

发帖
与我相关
我的任务
社区描述
主要讨论与iOS相关的软件和技术
社区管理员
  • iOS
  • 大熊猫侯佩
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧