English 中文(简体)
环形图象标记没有装在IEE中
原标题:google map markers not loading in IE

我正在使用权势图APIC。

以下是<代码><head>。

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>

以下是<代码>。

<script type="text/javascript">

    var infowindow = new google.maps.InfoWindow({ 
        //size: new google.maps.Size(150,150)
        maxWidth: 500,
    });
    function initialize() {
        var myOptions = {
            zoom: 4,
            center: new google.maps.LatLng(38.90, -99.00),
            mapTypeControl: true,
            mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
            navigationControl: true,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        }

        map = new google.maps.Map(document.getElementById("map"), myOptions);

        var markers = [];


        for (var i = 0; i < businesses.length; i++) {

            var latLng = new google.maps.LatLng(businesses[i].latitude, businesses[i].longitude);
            var marker = createMarker(latLng,businesses[i].name, businesses[i].description);

            markers.push(marker);


        }

    }

    function createMarker(latlng, name, html) {
        var contentString = html;
        var marker = new google.maps.Marker({
            position: latlng,
            map: map,
            zIndex: Math.round(latlng.lat()*-100000)<<5
            });

        google.maps.event.addListener(marker,  click , function() {
            infowindow.setContent(contentString); 
            infowindow.open(map,marker);
        });
    }


</script>
<script type="text/javascript">
    var businesses = new Array();
</script>

然后,我管理着一些营地,并在一个营地内作每次发言。

<script type="text/javascript">
    business = {
        name:"<?php echo $i; ?> - Columbia Gorge Blue Grass",
        description:"<?php echo $row[ display_name ]; ?>",
        address:"$row[ address ];",
        latitude:"<?php echo $row[ lat ]; ?>",
        longitude:"<?php echo $row[ lon ]; ?>",
        url:"$row[ url ];",
        business_type:"Getaway"
    };
    businesses[<?php echo $i; ?>] = business;
</script>

在每次发言之后,我有地图上的<编码>div,并注明初始发言

<div id="map-container"><div id="map"></div></div>
<script>    
    initialize();    
</script>

一切在 Chrome和 Firefox中都奏效,但在IE,我获得“Done,但页错。 地图上载重的是E,但地图上没有标识。

When I click on the IE error icon, this is the message I get: Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8; InfoPath.3)
Timestamp: Fri, 13 Jan 2012 16:54:36 UTC


Message: Object doesn t support this property or method
Line: 111102061
Char: 3
Code: 0
URI: http://www.domain.com/contractor/listings

我确信,问题是在以下情况下发生的:<条码>初始化;被称作“,但我可以说明造成这一问题的原因。

任何帮助或见解都会受到赞赏。

增 编

- ike

问题回答

here:

 maxWidth: 500,

只是一个想法。 纬度和长度是浮动点数。 不清楚你们是否应该把他们归为“在这种情况下”。

latitude:"<?php echo $row[ lat ]; ?>",
longitude:"<?php echo $row[ lon ]; ?>",

显而易见的是,IE正在将他们视为扼杀。 另一项建议:删除这一行文,看这是否造成任何变化:

zIndex: Math.round(latlng.lat()*-100000)<<5




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签