问题描述
为什么Google API Loader客户端地址位置多年来一直为工作国家/地区返回空字符串?对象在这里,但地址项为空.
Why Google API Loader Client address location is returning an empty string for a working country for years?.The object is here but address items are empty.
在API密钥之后.
google.load("maps",'3',{other_params:'sensor=true'});
google.setOnLoadCallback(function()
{
if (google.loader.ClientLocation)
{
google.loader.ClientLocation.address.city is ""
google.loader.ClientLocation.address.region is ""
google.loader.ClientLocation.address.country_code is ""
google.loader.ClientLocation.latitude is OK
google.loader.ClientLocation.longitude is OK
Google团队开发人员不再支持
推荐答案
Google.load.ClientLocation
. load.ClientLocation
仅返回非常差的准确纬度和经度,并且没有更多的地址项.
Google.load.ClientLocation
is no more supported by google team dev. The load.ClientLocation
is only returning a very bad accurate latitude and longitude and no more addresses items.
这非常糟糕,因为现在如果用户不接受使用HTML5返回地理位置,则需要使用IPlocation搜索国家和城市.
This is very bad because now if user not accepting to return geolocation using HTML5, you need to use IPlocation to search a country and city.
我认为这是像Google这样的伟大公司的利己主义,许多网站需要以最少的身份提供识别城市,国家/地区和语言的内容,而 ClientLocation
功能则是一种更简单的方法.现在,您需要调用导航器询问用户,获取经纬度,然后使用对其他服务的外部呼叫来查看简单的国家/地区代码!这不是为了简化我的应用程序.国家或城市位置不像100 m的GPS位置.这是许多开发人员和用户的基本功能.干杯.
I think that is very egoist from a great company like Google, many websites need to serve contents identifiing cities, countries, languages as a minimal and ClientLocation
function it was a easier way. Now to make this, you need to call navigators ask to users, get the lat,lon and get use an external call to another service to see a simple country code!. It's not to simplify my applications. Country or city locations in not like GPS position at 100 m It's a basic fonction of many developers an users. Cheers.
请参阅:
这篇关于google.loader.ClientLocation返回地址项的emply字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!