Maps 未捕获的SyntaxError:意外标记非法Google地图标记

Maps 未捕获的SyntaxError:意外标记非法Google地图标记,maps,Maps,任何人都可以帮我。我被谷歌地图v3代码卡住了。当我使用google marker对象设置标记图像时,它在浏览器窗口中给出了一个错误未捕获语法错误:意外标记非法。我更改了图像标记字符串中的转义字符,但它不起作用。请帮帮我 <script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script> <table> <tr> <

任何人都可以帮我。我被谷歌地图v3代码卡住了。当我使用google marker对象设置标记图像时,它在浏览器窗口中给出了一个错误未捕获语法错误:意外标记非法。我更改了图像标记字符串中的转义字符,但它不起作用。请帮帮我

<script type='text/javascript' src='http://maps.google.com/maps/api/js?sensor=false'></script>



 <table>
<tr>
 <td><script type="text/javascript" charset="utf-8">
      </script>
    </td>
 <td><div id="sidebar_GoogleMaps1" class="sidebar_GoogleMaps1"></div>
</td>
</tr>
</table>

<script type="text/javascript" charset="utf-8">
//<![CDATA[
            var markersGoogleMaps1  = [];

                var sidebar_htmlGoogleMaps1  = '';
                var marker_htmlGoogleMaps1  = [];
            var iconGoogleMaps1  = []; 


              iconGoogleMaps1['uploads\GoogleMaps\markers\m_28_orangepng'].image =  new google.maps.MarkerImage('http://localhost/sites/sinmar\uploads\GoogleMaps\markers\m_28_orange.png',

                  new google.maps.Size(16, 28),

                  new google.maps.Point(0,0),

                  new google.maps.Point(8, 14)
              );
            var mapGoogleMaps1 = null;
{
 var mapObjGoogleMaps1 = document.getElementById("GoogleMaps1");
 if (mapObjGoogleMaps1 != 'undefined' && mapObjGoogleMaps1 != null) {

            var mapOptionsGoogleMaps1 = {
                zoom: 1,
                panControl: false,
                zoomControl: true,
                scaleControl: false,
                streetViewControl: false,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                mapTypeControl: false,
                mapTypeControlOptions: {style:     google.maps.MapTypeControlStyle.DEFAULT}
            };

                mapOptionsGoogleMaps1.center = new      google.maps.LatLng(
                    29.307260,
                    48.031880
                );

            mapGoogleMaps1 = new google.maps.Map(mapObjGoogleMaps1,mapOptionsGoogleMaps1);
        var point = new google.maps.LatLng(29.3058981,48.0315399);
markersGoogleMaps1.push(createMarker(mapGoogleMaps1, point,"My HO","<p class=\"fl\">My Construction Co. <br \/>P.O. Box 44642-32060 <br \/>Hawali, Kuwait. <br \/>Tel : 22621711<\/p>", iconGoogleMaps1['uploads\GoogleMaps\markers\m_28_orangepng'].image, '', "sidebar_GoogleMaps1", '' ));


          }
}

       function createMarker(map, point, title, html, icon, icon_shadow, sidebar_id, openers){
            var marker_options = {
                position: point,
                map: map,
                title: title};  
            if(icon!=''){marker_options.icon = icon;}
            if(icon_shadow!=''){marker_options.shadow = icon_shadow;}
            //create marker
            var new_marker = new google.maps.Marker(marker_options);
            if(html!=''){

                var infowindow = new google.maps.InfoWindow({content: html});
                google.maps.event.addListener(new_marker, 'mouseover', function() {
                  infowindow.open(map,new_marker);
                });
                if(openers != ''&&!isEmpty(openers)){
                   for(var i in openers){
                     var opener = document.getElementById(openers[i]);
                     opener.onmouseover = function(){infowindow.open(map,new_marker); return false};
                   }
                }

                if(sidebar_id != ''){
                    var sidebar = document.getElementById(sidebar_id);
                    if(sidebar!=null && sidebar!=undefined && title!=null && title!=''){
                        var newlink = document.createElement('a');

                        newlink.onclick=function(){infowindow.open(map,new_marker); return false};

                        newlink.innerHTML = title + ' ';
                        sidebar.appendChild(newlink);
                    }
                }
            }
            return new_marker;  
        }
    function isArray(a) {return isObject(a) && a.constructor == Array;}
function isObject(a) {return (a && typeof a == 'object') || isFunction(a);}
function isFunction(a) {return typeof a == 'function';}
function isEmpty(obj) { for(var i in obj) { return false; } return true; }
//]]>
</script>

//

为什么要使用反斜杠


您可能希望使用正斜杠。

这是因为使用绝对路径。
iconGoogleMaps1['uploads\GoogleMaps\markers\m_28_orangepng'].image =  new google.maps.MarkerImage('http://localhost/sites/sinmar\uploads\GoogleMaps\markers\m_28_orange.png',