0
<script type="text/javascript">
    function initialize() {
        var markers = JSON.parse('[{"title":"Chennai","lat":"12.897400","lng":"80.288000","Description":"welcome to chennai"},{"title":"Hyderabad","lat":"17.266700","lng":"78.530200","Description":"welcome to hyderabad"},{"title":"Banglore","lat":"12.897400","lng":"77.519500","Description":"welcome to Banglore"},{"title":"vishkapatnam","lat":"17.518300","lng":"83.320300","Description":"welcome to Vishkapatnam"}]');
        var mapOptions = {
            center: new google.maps.LatLng(markers[0].lat, markers[0].lng),
            zoom: 5,
            mapTypeId: google.maps.MapTypeId.ROADMAP

        };

我得到的 JSON 是找不到 Microsoft?那我该怎么办?

4

2 回答 2

2

检查您是否处于兼容模式。您可以通过元标记确保 IE8 不在 IE7 模式下呈现

<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />

或者最好使用 doctype

<!DOCTYPE html>
于 2013-09-26T09:03:50.600 回答
0

在您的代码之前的某个地方:

window.JSON || 
    document.write('<script src="https://cdnjs.cloudflare.com/ajax/libs/json3/3.2.4/json3.min.js"><\/script>');
于 2013-09-26T09:04:10.123 回答