我创建了这段代码,但是出现了一个错误(la compilation conditionnelle est désactivée)所以这是怎么回事,我该如何纠正它
@model IEnumerable<MvcApplication7.Models.GoogleMarker>
@using System.Threading;
@using System.Globalization;
@{
Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
}
@{
ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Lay2.cshtml";
}
<script src="@Url.Content("~/Scripts/jquery-1.4.4.min.js")" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
$(document).ready(function () {
var bounds = new google.maps.LatLngBounds();
var options = {
zoom : 14,
mapTypeId: google.maps.MapTypeId.TERRAIN
};
var googleMap = new google.maps.Map($("#map")[0],options);
var infoWindow = new google.maps.InfoWindow({ content: "Cargando…" });
@foreach (var marker in Model){
<text>
var point = new google.maps.LatLng(@marker.Latitude, @marker.Longitude);
bounds.extend(point);
var marker = new google.maps.Marker({ position: point,map: googleMap,icon:'/Content/images/ui-bg_glass_75_e6e6e6_1x400.png.png',html: '@marker.InfoWindow'});
google.maps.event.addListener(marker, "click", function () {infoWindow.setContent(this.html);infoWindow.open(googleMap, this);});
</text>
}
googleMap.fitBounds(bounds);}
);
</script>
有什么建议么?