我正在使用gmaps4rails gem在Google地图上绘制标记。
它的工作正常,除了一个小细节:Developer Tools控制台显示了很多失败的请求:
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:1.410227%2C103.849125,sp:0.06864x0.13733,src:apiv3,ts:nazjhi VM2213:2
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DE_POGazYMv3%26z%3D13&cad=src:apiv3,ts:nazjiy VM2213:2
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DGGFIXwX55eI%26z%3D13&cad=src:apiv3,ts:nazjku VM2213:2
我不确定这是我的错还是gmaps4rails',所以我去查看他们的samples page并受到了一连串错误的欢迎:
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:0%2C0,sp:1.64789x6.25122,src:apiv3,ts:nar16j VM456:2
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:0%2C0,sp:1.64789x6.25122,src:apiv3,ts:nar16u VM456:2
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:0%2C0,sp:1.64789x6.25122,src:apiv3,ts:nar16z VM456:2
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:0%2C0,sp:1.64789x6.25122,src:apiv3,ts:nar172 VM456:2
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:0%2C0,sp:1.64789x6.25122,src:apiv3,ts:nar177 VM456:2
...
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DDrUstzDkra5,MioK6k6FoP…ryQNw,KJaIHv5kEQX,M_PFtL6x9ap,HOzAaWorA9R%26z%3D15&cad=src:apiv3,ts:nar4al VM456:2
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DNWkU-iIxLP5,PVvHSIe22T…cNJQIr,BfOy-lwIId,GbCjuFKSUZo,GGjY6a2AiaE%26z%3D15&cad=src:apiv3,ts:nar4cc VM456:2
GET http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=mt:m,c:41.896837%2C-87.749474,sp:0.61332x3.12561,src:apiv3,ts:nar52b VM456:2
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DLlNRGH16trt%26z%3D15&cad=src:apiv3,ts:nar5td VM456:2
GET http://maps.googleapis.com/maps/gen_204?imp=smimps%3DFocoOsrnywU,DOrlfnWXQcO,LGE7D7W4MJf,Kz78zqn9woS,PH54idy16yE%26z%3D9&cad=src:apiv3,ts:nar7cr VM456:2
你知道造成这种情况的原因吗?
答案 0 :(得分:2)
这些文件对我来说也失败了,但是因为AdBlockPlus正在积极阻止它们。我在EasyPrivacy list中有以下规则(尽管可能有更多同样匹配):
||googleapis.com^*/gen_204?