Click here to Skip to main content
15,891,529 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
I used a gif picture in google map as the icon of a marker, and it works in FF, ie8, but not in ie6, it shows "this.G is null or not a object", here is the code

<pre lang="xml">
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false" charset="utf-8"></script>
<script type="text/javascript">
    var map;
    function initialize() 
    {
        var latlng = new google.maps.LatLng(24.886436490787712, -70.2685546875);
        var myOptions = {
              zoom: 5,
              center: latlng,
              mapTypeId: google.maps.MapTypeId.TERRAIN
        };
        map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        var markerImg = "121.gif";
        var markerOptions = {
            icon: markerImg,
            position: latlng,
            map: map
        };
        var marker = new google.maps.Marker(markerOptions);
    }
</script>
</head>
<body onload="initialize()">
  <div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>




so, I need your help, thanks
Posted
Comments
Gibb3h 15-Oct-10 11:32am    
any reason it HAS to be a gif?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900