-3

我可以在 Google 地图上看到差异,但在 Android MapActivity 上我很难找到差异。对于“地图”,我称之为:mapView.setSatellite(false); 对于“卫星”,我调用:mapView.setSatellite(true); 但是对于混合视图...我尝试使用 mapView.setStreetView(true); 但这似乎对任何一种方式都没有影响。有任何想法吗?

4

2 回答 2

2

有很多帖子可以帮助您实现它:

服务

获取用户位置

祝你好运!

于 2011-07-08T12:54:34.787 回答
1

创建一个扩展服务的类

public class myService extends Service

覆盖

public void onStart(Intent intent, int startId) {

在你的活动中

if(!myService.isInstanceCreated())
startService(new Intent(youractivityclass.this, myService.class)); 
于 2011-07-08T12:55:17.650 回答