到附近的位置或地标

时间:2011-03-31 10:43:42

标签: android location google-api

google中是否有任何API可用于查找当前GPS lat& long位置的附近位置或地标。

1 个答案:

答案 0 :(得分:0)

使用此:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=business+near+city");
startActivity(intent);

在geo之后你放置了你的坐标,在q =之后输入你的搜索泪,比如旅游+城市。这将启动带有兴趣点的Google地图应用。

如果要在应用程序中使用地图视图,则需要从某些服务获取数据,例如您自己的数据。但是,您可以从Google的ajax搜索中提取数据,如此

http://ajax.googleapis.com/ajax/services/search/local?v=1.0&rsz=large&gl=pl&q=tourism+chicago

更多信息: http://code.google.com/apis/websearch/docs/reference.html#_fonje_local

这将为您提供具有地理坐标的结果,您需要找到解析结果的方法,并将它们放入数据库中。

希望它有所帮助...