1

最近我开发了一个 Asp.net Web 应用程序,它使用 Google Map API V3 脚本生成街景,传递地址的全景视图。该代码和应用程​​序与 Chrome、FireFox、Safari 完美配合,但在 Internet Explorer 上我遇到了异常

 "Type Error : Object doesn't support this property or method "

 while executing the API's ***geocoder.geocode*** function. 

我曾尝试在 IE 7 和 8 上运行相同的程序,但都抛出了相同的错误。


代码片段

geocoder.geocode({'address': addresstoshow}, function (results, status) {
            //alert(google.maps.GeocoderStatus.OK);
            if (status == google.maps.GeocoderStatus.OK) {
                mapStreetView.setCenter(results[0].geometry.location);

                marker = new google.maps.Marker({
                    position: results[0].geometry.location,
                    map: mapStreetView,
                    animation: google.maps.Animation.DROP,

                    title: results[0].geometry.location.description
                });
                marker.setAnimation(google.maps.Animation.BOUNCE);
                google.maps.event.addListener(marker, 'click', toggleBounce);


                panormacenter = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng());
                myOptionForPanorama = {
                    position: panormacenter,
                    pov: {
                        heading: 34,
                        pitch: 10,
                        zoom: 1
                    }
                };

                myOptionForPlace = {
                    location: panormacenter,
                    radius: '1000',
                    types: ['lodging']

                };
4

1 回答 1

0

该问题与发布的代码无关。

于 2012-11-05T15:10:37.140 回答