Testing the sample code from gmap3:
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false&language=zh" type="text/javascript"></script>
<script type="text/javascript" src="js/gmap3.js"></script>
<style>
.gmap3{
margin: 20px auto;
border: 1px dashed #C0C0C0;
width: 500px;
height: 250px;
}
</style>
<script type="text/javascript">
$(function(){
try{
$('#geoTestDiv').gmap3(
{ action: 'addMarker',
latLng : [46.578498,2.457275],
map:{
center: true,
zoom: 14,
mapTypeId: google.maps.MapTypeId.TERRAIN
}
}
);
}catch(exception){
alert(exception);
}
});
</script>
<body>
<div id="geoTestDiv" class="gmap3"></div>
</body>
</html>
on FF 14.0.1, it gives the alert:
TypeError: google.maps.MapTypeId is undefined
on Chrome 16.0.889.0, a div with image shows up.
Why is there such a difference?