私はこのコードを作成しましたが、エラー ( la compilation conditionnelle est désactiveé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>
助言がありますか?