414 请求 URI 太大错误 Google 地图 v3
当我调用构造函数来创建具有超过 15 个不同 KMZ 文件的新 KmlLayer 时,似乎会发生此错误。构造函数调用是:
var layer = new google.maps.KmlLayer('http...');
我每次都可以使用 15 个不同的 KMZ 文件复制此错误。我尝试过减小文件的大小,但这似乎并不重要。一旦您执行第 16 个请求来显示来自 KMZ 的多边形,所有请求都将失败,并显示 414 请求 URI 太大。一旦发生此错误,除非返回到 15 或更低,否则不会显示任何多边形。
我尝试将所有 15 个 KMZ 文件渲染到一个 KMZ 中,然后显示它,但现在我的请求量已从大约 100 增加到大约 350...
有人可以解决这个问题吗?
This error seems to occur when I call the constructor for creating a new KmlLayer with over 15 different KMZ files. The constructor call is:
var layer = new google.maps.KmlLayer('http...');
I can replicate this error every time with 15 different KMZ files. I have tried reducing sizes of the files, but it doesn't seem to matter. Once you go for the 16th request to display a polygon from the KMZ, all the requests will fail stating 414 Request URI Too Large. Once this error happens, none of the polygons will show unless you go back to 15 or under.
I tried to render all 15 KMZ files into a single KMZ, then display that, but now my requests amount has gone from roughly 100 to about 350...
Does anyone have a work around for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
414 Request URI Too Large
表示您正在使用的 URL(例如,http://www.example.com/kmlFile.kml?option1=true&option2=false) 太长,并不是文件太大。您需要以某种方式缩短 URL。414 Request URI Too Large
means that the URL you are using (e.g., http://www.example.com/kmlFile.kml?option1=true&option2=false) is too long, not that the file is too big. You'll need to shorten the URL somehow.