我正在使用jQuery和Google Maps V3创建一个页面,并尝试在Google地图上显示标记。但是不知何故,在Firefox中出现了错误(标记没有显示在地图上):
Error: IndexSizeError: Index or size is negative or greater than the allowed amount Source
File: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/9/17/main.js
Line: 96
事实: * 在Safari中可以工作 * 如果我更改MarkerImage的URL,它可以工作
我使用以下代码添加标记:
var marker = new google.maps.Marker({
map: map,
icon: new google.maps.MarkerImage(
"/gfx/icons/poi.png",
new google.maps.Size(22,22),
new google.maps.Point(0,0),
new google.maps.Point(11,11),
new google.maps.Size(22,22)),
position: point
});
我的测试可以在这里看到:
(该网页显示测试结果)