开发者

414 Request URI Too Large Error Google Maps v3

开发者 https://www.devze.com 2023-02-20 15:43 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消