The data was not loaded because data throttling is in effect. This
error can occur if an app makes frequent requests for data over a
short period of time.
我确切地知道正在进行多少请求,一个用于搜索查询中的每个新字符(就像您希望自动完成工作一样).当然,我是一个快速的老板,但只要10或15个请求似乎是荒谬的,可以达到极限.看看以下两个来源引用,我不明白为什么我不断被扼制.
根据Apple dev:
There are no request limits per app or developer ID,so well-written
apps that operate correctly should experience no problems. However,
throttling may occur in a poorly written app that creates an extremely
large number of requests.
和詹姆斯·霍华德said at a WWDC:
And the other thing I want to talk about is the Usage Limits on this
API.
So,I’m happy to announce that there’s no application or developer
identifier wide usage limits.
So,if you have a app that has a lot of users and you want to do a lot
of requests,that’s fine.It’ll work.
And the throttling that we do have is really just a first line of
defense against buggy apps.
So,if you put directions requests or local search requests in an
infinite loop,you’ve got a bug,eventually you’re going to get
throttled.But if you do something reasonable,you say oh,I’m going to just do
directions in response to user input and you know you can do a few of
those because we showed them that example.Like we did two directions request in response to one user input,
that’s fine.
But,you know if you’re doing 10,000 every time the user taps on the
screen,then you’re going to get throttled.
But,just keep it reasonable and you’ll be fine.
任何想法为什么这是发生?
解决方法
你基本上有两个选择:
>使用Google商家信息.他们有一个专门的Places Autocompletion API.甚至有一个完整的图书馆为iOS在GitHub.>减少请求的数量,例如只有当用户已经暂停输入300ms并且只有没有先前的请求未完成时才发送请求.但是,这并不能保证苹果不会限制您的请求.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。