是否可以在Android Google地图中将默认位置从南非更改为澳大利亚? [英] Is it possible in Android Google maps to change default location from South Africa to Australia?

查看:124
本文介绍了是否可以在Android Google地图中将默认位置从南非更改为澳大利亚?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确认Google地图中的一件事是 为什么Google地图总是将南非显示为默认位置 ... 我们不能将澳大利亚更改为默认国家/地区. 如果启用了GPRS,我可以跟踪当前位置(如果没有),我想在澳大利亚显示Sidney. 有可能吗?

I want to confirm one thing in Google maps that is why Google maps always showing South Africa as default location... Can't we change Australia as Default one. If GPRS enabled I can trace the current location if not i want to show Sidney in Australia . Is it possible ???

推荐答案

如果需要,Google Maps将显示用户的当前位置.

Google Maps will show the user's current location if you ask for it.

您还可以通过移动地图以指定特定位置来手动设置默认"位置.

You can also manually set the "default" location by moving the map to give a particular location.

CameraUpdate point = CameraUpdateFactory.newLatLng(new LatLng(53, 2));

// moves camera to coordinates
map.moveCamera(point);
// animates camera to coordinates
map.animateCamera(point);

最好使用moveCamera而不是animateCamera作为默认位置.

Best to use moveCamera rather than animateCamera for the default position.

您看到南非的原因是,初始化时地图默认为(0,0),没有任何其他数据,因此除默认值外,没有其他地方可以指向. (0,0)恰好在非洲附近.

The reason you are seeing South Africa is because the map defaults to (0,0) when initialised without any extra data, so it doesn't have somewhere to point to other than it's default. (0,0) happens to be near Africa.

在将地图显示给用户之前使用moveCamera,它将默认显示在您选择的任何位置.

Use moveCamera before the map is shown to the user and it will be showing wherever you have selected by default.

这篇关于是否可以在Android Google地图中将默认位置从南非更改为澳大利亚?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆