嘿,伙计们,当我加载我的网页时,google地图开始加载,但随后它没有完全加载。这是控制台打印出来的内容:
Resource interpreted as Image but transferred with MIME type text/html: "http://maps.googleapis.com/maps/gen_204?ev=api_viewport&cad=src:apiv3".
Resource interpreted as Image but transferred with MIME type text/html: "http://maps.googleapis.com/maps/gen_204?ev=api_ads&cad=src:apiv3,ads:0".
Resource interpreted as Image but transferred with MIME type text/html: "http://maps.googleapis.com/maps/gen_204?ev=api_marker&cad=src:apiv3,m:2,d:0,s:0".我知道这与内容类型有关,但我不确定如何设置它。我把这两个元标签放在我的头中,但没有运气。
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html"; charset=utf-8">
我还尝试了另一种方法,将它放在我的文件的顶部:
<?php // header('Content-Type: application/x-javascript; charset=UTF-8'); ?>
但这也无济于事。
我使用的是PHP和MYSQL。有没有人能带我到正确的方向。谢谢。
发布于 2012-04-18 21:04:19
我弄明白了为什么我的地图没有完全加载。我用这个来获取一个位置:
new google.maps.LatLng(-103.6975488, 36.8813329);
然而,我需要这样做:
new google.maps.LatLng(36.8813329, -103.6975488);
感谢Andrew指出MIME类型错误并不重要。
https://stackoverflow.com/questions/10202076
复制相似问题