414请求URI太大错误谷歌地图v3 [英] 414 Request URI Too Large Error Google Maps v3

查看:143
本文介绍了414请求URI太大错误谷歌地图v3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调用构造函数创建一个具有超过15个不同KMZ文件的新KmlLayer时,似乎会出现此错误。构造函数调用为:

  var layer = new google.maps.KmlLayer('http ...'); 

我可以每次用15个不同的KMZ文件复制这个错误。我曾尝试减小文件的大小,但似乎并不重要。一旦您请求第16次请求显示来自KMZ的多边形,所有请求都会失败,说明请求URI太大。发生此错误后,除非您回到15或以下,否则这些多边形都不会显示。



我试图将所有15个KMZ文件渲染到一个KMZ中,然后显示那么,但现在我的请求数量已经从大约100到大约350 ...



有没有人有这方面的解决方法?


<请求URI太大表示您正在使用的URL(例如, http://www.example.com/kmlFile.kml?option1=true&option2=falserel =nofollow> http://www.example.com/kmlFile.kml?option1=true&option2=false )太长,而不是文件太大。您需要以某种方式缩短网址。


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?

解决方案

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.

这篇关于414请求URI太大错误谷歌地图v3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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