Web サイトで Google マップ v2 を使用しようとしていますが、マップは Firefox では表示されず、Chrome では表示されます。問題が見つかりません。コードの問題を知っている人はいますか? 地図はhttp://www.ideiah.com/contatoで見ることができます。
コード:
<script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyAPPKVsGOmTcBlOo_FkNi4QBn19RKBPMeI" type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function MyIndexOf(arr, element)
{
for(i = 0; i < arr.length; i++)
{
if( arr[i] == element)
return i;
}
return -1;
}
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
//mapGDynamicMap2
function GetMapIndex(map)
{
var currentMapType = map.getCurrentMapType();
return MyIndexOf(map.getMapTypes(),currentMapType);
}
function SetMapIndex(map,mapTypeIndex)
{
map.setMapType(map.getMapTypes()[mapTypeIndex]);
}
function LoadMapmapGDynamicMap2(){
var mapGDynamicMap2 = new GMap2(document.getElementById("GDynamicMap2"));
mapGDynamicMap2.setCenter(new GLatLng(-29.789195,-55.768093), 17);
mapGDynamicMap2.setMapType(mapGDynamicMap2.getMapTypes()[2]);
SetMapIndex(mapGDynamicMap2,0);
mapGDynamicMap2.addControl(new GMenuMapTypeControl());
mapGDynamicMap2.addControl(new GSmallMapControl());
mapGDynamicMap2.addControl(new GOverviewMapControl());
var pointGDynamicMarker7141266 = new GLatLng(-29.789241,-55.768329);
var GDynamicMarker7141266 = new GMarker(pointGDynamicMarker7141266, {icon:G_DEFAULT_ICON, draggable: false});
GDynamicMarker7141266.bindInfoWindowHtml('Ideiah Soluções em Software');
mapGDynamicMap2.addOverlay(GDynamicMarker7141266);
GEvent.addListener(mapGDynamicMap2, "zoomend", function(){document.getElementById("mapGDynamicMap2ZoomLevel").value=mapGDynamicMap2.getZoom();;
});
GEvent.addListener(mapGDynamicMap2, "moveend", function(){document.getElementById("mapGDynamicMap2Center").value=mapGDynamicMap2.getCenter().toUrlValue();;
});
GEvent.addListener(mapGDynamicMap2, "maptypechanged", function(){document.getElementById("mapGDynamicMap2MapType").value=GetMapIndex(mapGDynamicMap2);;
});
}
//]]>
</script>
<div>
<span id="mapGDynamicMap2ZoomLevel" value="17"></span>
<span id="mapGDynamicMap2Center" value="-29.789195,-55.768093" ></span>
<span id="mapGDynamicMap2MapType" value="0" ></span>
</div>
<div class="GMPdiv img-polaroid" style="width:90% !important; margin: 0 auto;">
<div id="GDynamicMap2" class="GMPmap" style="width:100%;height:200px;"></div>
</div>
<script type="text/javascript">
//<![CDATA[
LoadMapmapGDynamicMap2();//]]>
</script>