谷歌地图图片未加载

时间:2012-04-18 02:43:07

标签: php google-maps-api-3 content-type

嘿,当我加载我的网页时谷歌地图开始加载,但它没有完全加载。这是控制台打印出来的:

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标签放在我的标题中,但没有运气。

<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。有人能引导我朝着正确的方向前进吗?感谢。

1 个答案:

答案 0 :(得分:1)

我弄清楚为什么我的地图没有完全加载。我用它来获取一个位置:

new google.maps.LatLng(-103.6975488, 36.8813329);

然而我需要这样做:

new google.maps.LatLng(36.8813329, -103.6975488);

感谢Andrew指出MIME类型错误并非令人反感。

相关问题