Error executing template "Designs/Grundsalg/_parsed/plots.parsed.cshtml"
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot perform runtime binding on a null reference
   at CallSite.Target(Closure , CallSite , Object , Int32 )
   at CompiledRazorTemplates.Dynamic.RazorEngine_48f72dce70a04270904cd9c8b44bac3d.Execute() in E:\dynamicweb.net\Solutions\rksk.net.dynamicweb-cms.com\Website\Files\Templates\Designs\Grundsalg\_parsed\plots.parsed.cshtml:line 218
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 2 @using System; 3 @using System.Web; 4 @using System.Linq; 5 @using Dynamicweb.Rendering; 6 7 8 @{ 9 bool isCommercialArea = GetGlobalValue("Global:Page.Top.ID") == "20101"; 10 string logoLink = isCommercialArea ? "/Default.aspx?ID=20101" : "/Default.aspx?ID=14315"; 11 bool gisActive = RKSK.Api.GroundSaleUtility.ServiceActive("https://gisext.rksk.dk/arcgis/rest/services/Temaer/MapServer/2/query?f=pjson"); 12 if (!gisActive) 13 { 14 string htmlError = "<div style='padding: 10px; font-size: 20px; font-weight:bold;'>Der er problemer med at indhente boliger lige nu. Vi arbejder p&aring; sagen!<br>Pr&oslash;v igen om 5 minutter.<p>"; 15 HttpContext.Current.Response.Flush(); 16 HttpContext.Current.Response.Write(htmlError); 17 HttpContext.Current.Response.End(); 18 } 19 } 20 21 @using System.IO; 22 @using System.Web; 23 24 @functions { 25 string GetImageUrl(string url, int width = 200, int height = 200){ 26 if (string.IsNullOrWhiteSpace(url)){ 27 url = string.Format("http://placehold.it/{0}x{1}", width, height); 28 } 29 else 30 { 31 url = url.Replace("http://rksk.dk", ""); 32 url = url.Replace("https://rksk.dk", ""); 33 } 34 35 if (!url.StartsWith("http://")){ 36 url = string.Format("/Admin/Public/GetImage.ashx?Image={0}&width={1}&height={2}", url, width, height); 37 } 38 return url; 39 } 40 41 42 string GetRandomImage(string path){ 43 44 string file = ""; 45 if (!string.IsNullOrEmpty(path)){ 46 var extensions = new string[] { ".png", ".jpg", ".gif" }; 47 try{ 48 var di = new DirectoryInfo(HttpContext.Current.Request.MapPath(path)); 49 50 var rgFiles = di.GetFiles("*.*").Where( f => extensions.Contains( f.Extension.ToLower())); 51 Random R = new Random(); 52 file = rgFiles.ElementAt(R.Next(0,rgFiles.Count())).FullName; 53 } 54 catch {} 55 } 56 57 string replace_file_root = System.Web.HttpContext.Current.Server.MapPath("/files"); 58 string file_replaced_root = file.Replace(replace_file_root, "/Files"); 59 60 string replace_slash = @"\"; 61 string file_replaced = file_replaced_root.Replace(replace_slash, "/"); 62 63 return file_replaced; 64 } 65 66 string GetTopImagePath(int pageid){ 67 68 string folder = "Borger"; 69 switch (pageid){ 70 case 74: 71 folder = "Erhverv"; 72 break; 73 case 76: 74 folder = "OmKommunen"; 75 break; 76 } 77 78 return folder; 79 } 80 81 } 82 83 <!DOCTYPE html> 84 <html lang="da"> 85 <head> 86 <meta http-equiv="content-type" content="text/xhtml; charset=utf-8"> 87 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> 88 89 @if (HttpContext.Current.Request.Url.Host.Contains(".rksk.vjm.dk")) 90 { 91 <meta name="robots" content="noindex,nofollow"> 92 } 93 94 <title>@GetValue("Title")</title> 95 @GetValue("MetaTags") 96 @GetValue("CopyRightNotice") 97 98 99 100 <script id="CookieConsent" src="https://policy.app.cookieinformation.com/uc.js" data-culture="DA" type="text/javascript"></script> 101 102 <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'> 103 <link href='https://fonts.googleapis.com/css?family=Bitter:400,700' rel='stylesheet' type='text/css'> 104 <link href='/Files/Templates/Designs/Grundsalg/css/styles.css?v=2' rel='stylesheet' type='text/css'> 105 <link href="/Files/Templates/Designs/rksk/favicon.ico" type="image/x-icon" rel="icon"> 106 <link href="/Files/Templates/Designs/rksk/favicon.ico" type="image/x-icon" rel="shortcut icon"> 107 108 @RenderSnippet("Links") 109 @RenderSnippet("Metas") 110 111 <!--[if lt IE 9]> 112 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.2/html5shiv.js"></script> 113 <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.3.0/respond.js"></script> 114 <![endif]--> 115 116 @GetValue("Stylesheets") 117 @GetValue("Javascripts") 118 </head> 119 <body> 120 121 <nav class="nav--jump" aria-label="Genveje til indhold" title="Genveje til indhold"> 122 <ul> 123 <li> 124 <a href="#leftMenu" title="Spring til sidens menu" accesskey="1" class=""> 125 Navigation 126 </a> 127 </li> 128 <li> 129 <a href="#Indhold" title="Spring til indhold på siden" accesskey="2" class=""> 130 Indhold 131 </a> 132 </li> 133 </ul> 134 </nav> 135 136 <div class="site--topbar clearfix"> 137 <div class="container"> 138 <nav class="nav nav--topbar clearfix" aria-label="Privat eller erhverv grundsalg genveje"> 139 <ul> 140 <li><a href="/" title="Gå til privat grundsalg" class="@if(!isCommercialArea) { <text>active</text> }">Boliggrunde</a></li> 141 <li><a href="/erhverv" title="Gå til erhverv grundsalg" class="@if(isCommercialArea) { <text>active</text> }">Erhvervsgrunde</a></li> 142 </ul> 143 </nav> 144 </div> 145 </div> 146 147 <header class="site--header"> 148 <section class="container" aria-label="logo og hovednavigation"> 149 150 <a href="@logoLink" title="Gå til forside" aria-label="Logo desktop/tablet" class="site--logo hidden-xs hidden-sm"> 151 <img src="/Files/Templates/Designs/Grundsalg/img/logo_naturens_rige.png" alt="Logo Ringkøbing Skjern Kommune"> 152 </a> 153 154 155 <a href="@logoLink" title="Gå til forside" aria-label="Logo mobil" class="site--logo site--logo-mobile visible-xs visible-sm"> 156 <img src="/Files/Templates/Designs/Grundsalg/img/logo_stripped.png" alt="Logo Ringkøbing Skjern Kommune" width="50px"> 157 </a> 158 159 <div class="visible-xs visible-sm"> 160 <a id="DropdownMenu" class="nav-button" href="#"> 161 <span class="nav-button-icon">&#9776; Menu</span> 162 </a> 163 </div> 164 165 <nav aria-label="Hoved menu"> 166 @if (isCommercialArea) 167 { 168 @GetValue("DwNavigation(MainNavigationErhverv)") 169 } 170 else 171 { 172 @GetValue("DwNavigation(MainNavigation)") 173 174 } 175 </nav> 176 </section> 177 </header> 178 179 <div role="main" aria-label="Sidens indhold"> 180 @inherits RazorTemplateBase<RazorTemplateModel<Template>> 181 @using System; 182 @using Dynamicweb.Rendering; 183 184 185 186 @{ 187 string pageName = GetString("DwPageName"); 188 string[] pageNameArr = pageName.Split(','); 189 190 string town = pageNameArr[0].Trim(); 191 string address = pageNameArr[1].Trim(); 192 193 194 195 string areaNumber = GetString("Item.Omraadenr"); 196 string areaType = GetString("Item.OmraadeType"); 197 int areaID = GetInteger("DwPageID_3"); 198 string areaName = GetString("DwPageName_3"); 199 int groundTypeCode = 1; 200 string plotBaseGisUrl = "https://gisext.rksk.dk/arcgis/rest/services/Temaer/MapServer/2"; 201 string whereGisArea = @"where=""Omraadenr""=%27{0}%27 AND ""Paa_web""=%27JA%27"; 202 if (areaType == "erhverv") 203 { 204 areaID = GetInteger("DwPageID_4"); 205 areaName = GetString("DwPageName_4"); 206 groundTypeCode = 4; 207 plotBaseGisUrl = "https://gisext.rksk.dk/arcgis/rest/services/Temaer/MapServer/3"; 208 whereGisArea = @"where=""Omraadenr""=%27{0}%27 AND ""Paa_web_erhverv""=%27JA%27"; 209 } 210 211 //get plot 212 string whereGisPlots = @"where=""ADRESSE""=%27{0}%27 and ""Omraadenr""=%27{1}%27"; 213 string whereGisWithPlots = String.Format(whereGisPlots, address, areaNumber); 214 string urlGisPlots = String.Format(plotBaseGisUrl + "/query?{0} and %22grund_type_kode%22=" + groundTypeCode + "%20and%20ADRESSE+is+not+Null&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=25832&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=25832&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&f=pjson", whereGisWithPlots); 215 dynamic plotsJson = RKSK.Api.GroundSaleUtility.GetJson(urlGisPlots); 216 217 //get attributes for plot 218 dynamic plotJsonAttributes = plotsJson.features[0].attributes; 219 220 //get area 221 string whereGisWithArea = String.Format(whereGisArea, areaNumber); 222 string urlGisArea = String.Format("https://gisext.rksk.dk/arcgis/rest/services/GISext_registrering/MapServer/18/query?{0}&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=25832&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=25832&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&resultOffset=&resultRecordCount=&f=pjson", whereGisWithArea); 223 224 dynamic areasJson = RKSK.Api.GroundSaleUtility.GetJson(urlGisArea); 225 226 //get attributes for area 227 dynamic areaJsonAttributes = null; 228 foreach (var features in areasJson.features) 229 { 230 if (features.attributes != null) 231 { 232 if (areaNumber == features.attributes.Omraadenr.ToString()) 233 { 234 areaJsonAttributes = features.attributes; 235 break; 236 } 237 } 238 } 239 240 //init lat converter 241 var LatLngUTMConverter = new RKSK.Api.LatLngUTMConverter(""); 242 243 string messageCallme = ""; 244 string messageCallmeType = ""; 245 if (HttpContext.Current.Request.HttpMethod == "POST") 246 { 247 bool errorCaallme = false; 248 if (String.IsNullOrEmpty(HttpContext.Current.Request.Form["name"].ToString())) 249 { 250 errorCaallme = true; 251 } 252 if (String.IsNullOrEmpty(HttpContext.Current.Request.Form["phone"].ToString())) 253 { 254 errorCaallme = true; 255 } 256 if (!errorCaallme) 257 { 258 string bodyEmail = "Side: " + GetGlobalValue("Global:Pageview.Url") + "<br><br>"; 259 bodyEmail = bodyEmail + "<p>Navn:" + HttpContext.Current.Request.Form["name"].ToString() + "</p>"; 260 bodyEmail = bodyEmail + "<p>Telefon:" + HttpContext.Current.Request.Form["phone"].ToString() + "</p>"; 261 262 using (var m = new System.Net.Mail.MailMessage()) 263 { 264 m.Subject = "Grundsalg: Ring mig op"; 265 m.From = new System.Net.Mail.MailAddress("noreply@rksk.dk", "rksk.dk"); 266 m.To.Add("conni.bulow@rksk.dk"); 267 m.IsBodyHtml = true; 268 m.Body = bodyEmail; 269 m.BodyEncoding = System.Text.Encoding.UTF8; 270 m.SubjectEncoding = System.Text.Encoding.UTF8; 271 m.HeadersEncoding = System.Text.Encoding.UTF8; 272 273 Dynamicweb.Mailing.EmailHandler.Send(m); 274 } 275 276 messageCallme = "Vi vil kontake dig snarest muligt!"; 277 messageCallmeType = "alert-info"; 278 } 279 else 280 { 281 messageCallme = "Husk at udfylde både navn og telefonnummer!"; 282 messageCallmeType = "alert-danger"; 283 } 284 285 } 286 287 decimal buildingArea = RKSK.Api.GroundSaleUtility.CalculateBuildingArea(plotJsonAttributes.grundareal.ToString()); 288 289 } 290 291 @if (!String.IsNullOrEmpty(messageCallme)) 292 { 293 <div class="alert @messageCallmeType" role="alert"> 294 <div class="container"> 295 <div style="padding: 20px;" class="text-center"><strong>@messageCallme</strong></div> 296 </div> 297 </div> 298 } 299 300 @if (areaJsonAttributes != null) 301 { 302 <div class="plot__plot" id="Indhold"> 303 <div class="plot__plot__map__container hidden-xs "> 304 <div class="container"> 305 <div class="row"> 306 <div class="col-xs-12"> 307 <div class="plot__plot__map__areas"> 308 <a href="Default.aspx?ID=@areaID" class="plot__plot__map__areas__btn" title="Tilbage til: @areaName"><span class="icon" aria-hidden="true">&#xf104;</span> Tilbage til området</a> 309 <div class="plot__plot__map__areas__header"> 310 Information 311 </div> 312 <ul class="plot__plot__map__areas__list"> 313 @if (!String.IsNullOrEmpty(address)) 314 { 315 <li class="plot__plot__map__areas__list__header">Adresse</li> 316 <li>@address</li> 317 } 318 319 @if (!String.IsNullOrEmpty(plotJsonAttributes.grundareal.ToString())) 320 { 321 <li class="plot__plot__map__areas__list__header">Areal</li> 322 <li> 323 @if (areaType == "erhverv") 324 { 325 <span>Ca. </span> 326 } 327 @plotJsonAttributes.grundareal m² 328 </li> 329 } 330 331 @if (buildingArea > 0 && areaType != "erhverv") 332 { 333 <li class="plot__plot__map__areas__list__header">Bygningsareal</li> 334 <li> 335 @buildingArea m² 336 </li> 337 } 338 339 @if (!String.IsNullOrEmpty(plotJsonAttributes.kvm_pris.ToString())) 340 { 341 <li class="plot__plot__map__areas__list__header">Kvadratmeter pris</li> 342 <li> 343 @String.Format("{0:#,##0.##}", Dynamicweb.Core.Converter.ToInt32(plotJsonAttributes.kvm_pris)) kr. 344 </li> 345 } 346 347 @if (!String.IsNullOrEmpty(plotJsonAttributes.pris.ToString())) 348 { 349 <li class="plot__plot__map__areas__list__header">Samlet pris</li> 350 <li> 351 @if (areaType == "erhverv") 352 { 353 <span>Ca. </span> 354 } 355 @String.Format("{0:#,##0.##}", Dynamicweb.Core.Converter.ToInt32(plotJsonAttributes.pris)) kr. 356 </li> 357 } 358 359 360 @if (!String.IsNullOrEmpty(plotJsonAttributes.STATUS_SALG.ToString())) 361 { 362 <li class="plot__plot__map__areas__list__header">Status</li> 363 <li>@plotJsonAttributes.STATUS_SALG</li> 364 } 365 366 367 @if (!String.IsNullOrEmpty(plotJsonAttributes.link.ToString())) 368 { 369 <li class="plot__plot__map__areas__list__link"><a href="@plotJsonAttributes.link" title="Gå til lokalplan" target="_blank">Download lokalplan</a></li> 370 } 371 </ul> 372 <a href="javascript:void(0)" data-toggle="modal" data-target="#callmeModal" class="plot__plot__map__areas__btn plot__plot__map__areas__call" title="Ring mig op" aria-haspopup="dialog"><span class="icon" aria-hidden="true">&#xf025;</span> Ring mig op</a> 373 </div> 374 <div id="map" class="plot__plot__map"></div> 375 </div> 376 </div> 377 </div> 378 </div> 379 <div class="plot__plot__map__container visible-xs" aria-hidden="true"> 380 <div class="container"> 381 <div class="row"> 382 <div class="col-xs-12"> 383 <div id="mapmobile" class="plot__plot__map"></div> 384 <div class="plot__plot__map__areas"> 385 <div class="plot__plot__map__areas__header"> 386 Information 387 </div> 388 <ul class="plot__plot__map__areas__list"> 389 @if (!String.IsNullOrEmpty(address)) 390 { 391 <li class="plot__plot__map__areas__list__header">Adresse</li> 392 <li>@address</li> 393 } 394 395 @if (!String.IsNullOrEmpty(plotJsonAttributes.grundareal.ToString())) 396 { 397 <li> 398 @if (areaType == "erhverv") 399 { 400 <span>Ca. </span> 401 } 402 @plotJsonAttributes.grundareal m² 403 </li> 404 } 405 406 @if (buildingArea > 0 && areaType != "erhverv") 407 { 408 <li class="plot__plot__map__areas__list__header">Bygningsareal</li> 409 <li> 410 @buildingArea m² 411 </li> 412 } 413 414 415 @if (!String.IsNullOrEmpty(plotJsonAttributes.kvm_pris.ToString())) 416 { 417 <li class="plot__plot__map__areas__list__header">Kvadratmeter pris</li> 418 <li> 419 @if (areaType == "erhverv") 420 { 421 <span>Ca. </span> 422 } 423 @String.Format("{0:#,##0.##}", Dynamicweb.Core.Converter.ToInt32(plotJsonAttributes.kvm_pris)) kr. 424 </li> 425 } 426 427 @if (!String.IsNullOrEmpty(plotJsonAttributes.pris.ToString())) 428 { 429 <li class="plot__plot__map__areas__list__header">Samlet pris</li> 430 <li> 431 @String.Format("{0:#,##0.##}", Dynamicweb.Core.Converter.ToInt32(plotJsonAttributes.pris)) kr. 432 </li> 433 } 434 435 436 @if (!String.IsNullOrEmpty(plotJsonAttributes.STATUS_SALG.ToString())) 437 { 438 <li class="plot__plot__map__areas__list__header">Status</li> 439 <li>@plotJsonAttributes.STATUS_SALG</li> 440 } 441 442 443 444 @if (!String.IsNullOrEmpty(plotJsonAttributes.link.ToString())) 445 { 446 <li class="plot__plot__map__areas__list__link"><a href="@plotJsonAttributes.link" title="Gå til lokalplan" target="_blank">Download lokalplan</a></li> 447 } 448 </ul> 449 <a href="Default.aspx?ID=@areaID" class="plot__plot__map__areas__btn"><span class="icon" aria-hidden="true">&#xf104;</span> Tilbage til området</a> 450 <a href="javascript:void(0);" data-toggle="modal" data-target="#callmeModal" class="plot__plot__map__areas__btn plot__plot__map__areas__call" title="Ring mig op" aria-haspopup="dialog"><span class="icon" aria-hidden="true">&#xf025;</span> Ring mig op</a> 451 </div> 452 </div> 453 </div> 454 </div> 455 </div> 456 457 <div class="site--breadcrumb hidden-xs hidden-sm" role="navigation" aria-label="Brødkrummesti"> 458 <div class="container"> 459 <div class="row"> 460 <div class="col-xs-12"> 461 @if (!string.IsNullOrEmpty(GetString("DwNavigation(navbreadcrumb)"))) 462 { 463 <div class="site--breadcrumb-hometext">Du er her:</div> 464 @GetValue("DwNavigation(navbreadcrumb)") 465 } 466 </div> 467 </div> 468 </div> 469 </div> 470 471 <div class="plot__plot__entries"> 472 <div class="container"> 473 <p class="plot__parcels__entries__text"> 474 @areaJsonAttributes.Omraade_beskrivelse_kort 475 </p> 476 477 @if (areaType == "bolig") 478 { 479 <p style="font-size: 14px;">Bem&aelig;rk venligst om bygningsarealet: I de fleste lokalplaner er bebyggelsesprocenten sat til 25, men lovgivningen er efterf&oslash;lgende &aelig;ndret, s&aring; der normalt gives en dispensation til en bebyggelsesprocent p&aring; 30. Derfor er vores arealberegninger her p&aring; siden baseret p&aring; en bebyggelsesprocent p&aring; 30.</p> 480 481 } 482 else 483 { 484 485 <p style="font-size: 14px;"> 486 Bemærk: Erhvervsgrundene udstykkes først, når der er en konkret aftale med dig om den ønskede størrelse grund. Kvadratmeterprisen er som angivet i den grønne boks, men den endelige pris afhænger altså af, om du vil købe hele eller dele af grunden. 487 Se i lokalplanen, hvad arealerne kan bruges til, eller brug kontaktmulighederne for at få mere at vide. 488 </p> 489 490 } 491 492 <p>Grøn farve på grunden på kortet betyder, at den er klar til salg. Gul: Reserveret. Rød: Solgt.</p> 493 494 <hr class="plot__parcels__entries__seperator"> 495 496 @if (areaType == "bolig") 497 { 498 499 <div class="row plot__plot__entries__entry__wrapper"> 500 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 501 <span class="icon" aria-hidden="true" aria-label="Afstand til Skole">&#xf19c;</span> 502 <p>Afstand til skole:<br> @areaJsonAttributes.Afstand_til_skole m.</p> 503 </div> 504 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 505 <span class="icon" aria-hidden="true" aria-label="Afstand til indkøbsmuligheder">&#xf291;</span> 506 <p>Afstand til indkøbsmulighed:<br> @areaJsonAttributes.Afstand_til_indkoebsmulighed m.</p> 507 </div> 508 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 509 <span class="icon" aria-hidden="true" aria-label="Afstand til sportsfaciliteter ikon">&#xf1e3;</span> 510 <p>Afstand til sportsfaciliteter:<br> @areaJsonAttributes.Afstand_til_sportsfaciliteter m.</p> 511 </div> 512 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 513 <span class="icon" aria-hidden="true" aria-label="Afstand til offentlig transport ikon">&#xf207;</span> 514 <p>Afstand til offentlig transport:<br> @areaJsonAttributes.Afstand_til_offentlig_transport m.</p> 515 </div> 516 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 517 <span class="icon" aria-hidden="true" aria-label="Afstand til by midte ikon">&#xf015;</span> 518 <p>Afstand til bymidte:<br> @areaJsonAttributes.Afstand_til_bymidte m.</p> 519 </div> 520 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 521 <span class="icon" aria-hidden="true" aria-label="Afstand til hav ikon">&#xf21a;</span> 522 @{ 523 if (!String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && !String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 524 { 525 <p>Afstand til hav/fjord:<br> @areaJsonAttributes.Afstand_til_hav m. / @areaJsonAttributes.Afstand_til_fjord m.</p> 526 } 527 else if (!String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 528 { 529 <p>Afstand til hav:<br> @areaJsonAttributes.Afstand_til_hav m.</p> 530 } 531 else if (String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && !String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 532 { 533 <p>Afstand til fjord:<br> @areaJsonAttributes.Afstand_til_fjord m.</p> 534 } 535 } 536 </div> 537 </div> 538 } 539 else 540 { 541 <div class="row plot__parcels__entries__entry__wrapper"> 542 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry hidden-xs hidden-sm"> 543 &nbsp; 544 </div> 545 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 546 <span class="icon" aria-hidden="true" aria-label="Afstand til motorvej ikon">&#xf1b9;</span> 547 <p>Afstand til motorvej :<br> @areaJsonAttributes.Afstand_til_skole km.</p> 548 </div> 549 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 550 <span class="icon" aria-hidden="true" aria-label="Afstand til lufthavn ikon">&#xf072;</span> 551 <p>Afstand til lufthavn:<br> @areaJsonAttributes.Afstand_til_indkoebsmulighed km.</p> 552 </div> 553 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 554 <span class="icon" aria-hidden="true" aria-label="Afstand til havn ikon">&#xf21a;</span> 555 <p>Afstand til havn:<br> @areaJsonAttributes.Afstand_til_sportsfaciliteter km.</p> 556 </div> 557 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 558 <span class="icon" aria-hidden="true" aria-label="Afstand til storby ikon">&#xf1fe;</span> 559 <p>Afstand til storby:<br> @areaJsonAttributes.Afstand_til_offentlig_transport km.</p> 560 </div> 561 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry hidden-xs hidden-sm"> 562 &nbsp; 563 </div> 564 </div> 565 } 566 567 568 </div> 569 </div> 570 @if (!String.IsNullOrEmpty(plotJsonAttributes.Foto_1.ToString())) 571 { 572 <div class="plot__plot__slider"> 573 <div class="container"> 574 <h2 class="text-center">Se billeder fra grunden</h2> 575 <div class="owl-carousel"> 576 @{ 577 for (int i = 1; i <= 3; i++) 578 { 579 string photo = ""; 580 if (i == 1) 581 { 582 photo = plotJsonAttributes.Foto_1.ToString(); 583 } 584 else if (i == 2) 585 { 586 photo = plotJsonAttributes.Foto_2.ToString(); 587 } 588 else if (i == 3) 589 { 590 photo = plotJsonAttributes.Foto_3.ToString(); 591 } 592 593 if (!String.IsNullOrEmpty(photo)) 594 { 595 <a href="@photo" class="fancybox" rel="gallery" title="Billede @i af @address"> 596 <img src="@photo" class="img-responsive" alt=""> 597 </a> 598 } 599 } 600 } 601 </div> 602 </div> 603 </div> 604 } 605 </div> 606 607 <div class="modal fade" id="callmeModal" role="dialog" aria-labelledby="callmeModalLabel" aria-modal="true" aria-hidden="true" tabindex="-1"> 608 <div class="modal-dialog"> 609 <div class="modal-content"> 610 <div class="plot__plot__callme-popup"> 611 <div class="callme-popup__content"> 612 <div class="callme-popupp__content__top"> 613 <h2 id="callmeModalLabel">Ring mig op</h2> 614 <p>Hvis du udfylder nedenstående, vil vi kontakte dig hurtigst muligt vedr.: @address</p> 615 </div> 616 <div class="news-popup__content__form"> 617 <form action="" method="post"> 618 <div class="form-group"> 619 <label for="name">Navn</label> 620 <input type="text" class="form-control" id="callmeNameInput" name="name" placeholder="Udfyld navn..." required=""> 621 </div> 622 <div class="form-group"> 623 <label for="phone">Telefonnummer</label> 624 <input type="text" class="form-control" name="phone" placeholder="Udfyld telefonnummer..." required=""> 625 </div> 626 <input type="hidden" value="1" name="callme"> 627 <button type="submit" class="btn btn-primary">Ring mig op</button> 628 </form> 629 </div> 630 </div> 631 </div> 632 </div> 633 </div> 634 </div> 635 636 637 @SnippetStart("JavaScript") 638 639 <script src="https://maps.google.com/maps/api/js?key=AIzaSyAMvetR2U-TCjlHH7NqzCGGiO8WPxbY1eo" type="text/javascript"></script> 640 <script> 641 642 var paths = [ 643 @foreach (var features in plotsJson.features) 644 { 645 <text>{status: "@plotJsonAttributes.STATUS_SALG.ToString()",</text> 646 if (features.geometry.rings != null) 647 { 648 <text>path: [</text> 649 foreach (var ring in features.geometry.rings[0]) 650 { 651 double utmLat = ring[0]; 652 double utmLong = ring[1]; 653 var latLng = LatLngUTMConverter.convertUtmToLatLng(utmLat, utmLong, 32, "N"); 654 <text> 655 {lat: @latLng.Lat.ToString().Replace(",","."), lng: @latLng.Lng.ToString().Replace(",", ".")}, 656 </text> 657 } 658 <text>]</text> 659 660 } 661 <text>},</text> 662 } 663 ]; 664 var map; 665 var mapMobile; 666 667 function initialize() { 668 669 var myOptions = { 670 center : {lat: 56.044689, lng: 8.50589}, 671 zoom : 10, 672 mapTypeControl : false, 673 scaleControl : false, 674 streetViewControl: false, 675 rotateControl : false, 676 mapTypeId : google.maps.MapTypeId.ROADMAP, 677 styles : [ 678 { 679 "featureType": "administrative", 680 "elementType": "labels.text.fill", 681 "stylers" : [ 682 { 683 "color": "#444444" 684 } 685 ] 686 }, 687 { 688 "featureType": "landscape", 689 "elementType": "all", 690 "stylers" : [ 691 { 692 "color": "#f2f2f2" 693 } 694 ] 695 }, 696 { 697 "featureType": "poi", 698 "elementType": "all", 699 "stylers" : [ 700 { 701 "visibility": "off" 702 } 703 ] 704 }, 705 { 706 "featureType": "road", 707 "elementType": "all", 708 "stylers" : [ 709 { 710 "saturation": -100 711 }, 712 { 713 "lightness": 45 714 } 715 ] 716 }, 717 { 718 "featureType": "road.highway", 719 "elementType": "all", 720 "stylers" : [ 721 { 722 "visibility": "simplified" 723 } 724 ] 725 }, 726 { 727 "featureType": "road.arterial", 728 "elementType": "labels.icon", 729 "stylers" : [ 730 { 731 "visibility": "off" 732 } 733 ] 734 }, 735 { 736 "featureType": "transit", 737 "elementType": "all", 738 "stylers" : [ 739 { 740 "visibility": "off" 741 } 742 ] 743 }, 744 { 745 "featureType": "water", 746 "elementType": "all", 747 "stylers" : [ 748 { 749 "color": "#46bcec" 750 }, 751 { 752 "visibility": "on" 753 } 754 ] 755 } 756 ] 757 }; 758 map = new google.maps.Map(document.getElementById("map"), myOptions); 759 mapMobile = new google.maps.Map(document.getElementById("mapmobile"), myOptions); 760 bounds = new google.maps.LatLngBounds(); 761 var ploygon = setshape(map, paths); 762 var ploygonMobile = setshape(mapMobile, paths); 763 map.fitBounds(bounds); 764 mapMobile.fitBounds(bounds); 765 } 766 767 function setshape(map, paths) { 768 $.each(paths, function (count, pathInfo) { 769 770 var fillColor = "#00AA65"; 771 if (this.status == "Solgt") { 772 fillColor = "#ff0000"; 773 } else if (this.status == "Reserveret") { 774 fillColor = "#ffff00"; 775 } 776 777 778 var polyline = new google.maps.Polygon({ 779 path : pathInfo.path, 780 fillColor: fillColor, 781 fillOpacity : 0.7, 782 strokeColor : "#005331", 783 strokeOpacity: 0.2, 784 strokeWeight : 2, 785 url : pathInfo.url 786 }); 787 788 polyline.setMap(map); 789 790 google.maps.event.addListener(polyline, 'mouseover', function () { 791 google.maps.event.trigger($(this).attr('title'), 'mouseover'); 792 this.setOptions({strokeOpacity: 1}) 793 }); 794 google.maps.event.addListener(polyline, 'mouseout', function () { 795 google.maps.event.trigger($(this).attr('title'), 'mouseout'); 796 this.setOptions({strokeOpacity: 0.2}) 797 }); 798 for (var i = 0; i < pathInfo.path.length; i++) { 799 bounds.extend(pathInfo.path[i]); 800 } 801 }); 802 } 803 804 // Onload handler to fire off the app. 805 google.maps.event.addDomListener(window, "load", initialize); 806 </script> 807 808 809 <script> 810 $('.owl-carousel').owlCarousel({ 811 margin: 10, 812 nav: true, 813 responsive: { 814 0: { 815 items: 1 816 }, 817 600: { 818 items: 3 819 }, 820 1000: { 821 items: 3 822 } 823 }, 824 navText: ['<span class="icon" aria-hidden="true">&#xf0a8;</span>', '<span class="icon" >&#xf0a9;</span>'] 825 }); 826 </script> 827 @SnippetEnd("JavaScript") 828 } 829 else 830 { 831 <p>Område ikke fundet i feed.</p> 832 } 833 </div> 834 835 <footer class="site--footer-container"> 836 <section class="site--footer" aria-label="Kontakt og åbningstider"> 837 838 <div class="container"> 839 840 <div class="row"> 841 <div class="col-sm-4 col-xs-12"> 842 <div class="site--footer-content-container"> 843 <div class="row"> 844 <div class="site--footer-content col-md-12"> 845 @RenderParagraphContent(18971) 846 </div> 847 </div> 848 </div> 849 </div> 850 851 <div class="col-sm-4 col-xs-12"> 852 <div class="site--footer-content-container"> 853 <div class="row"> 854 <div class="site--footer-content col-md-12"> 855 @RenderParagraphContent(18972) 856 </div> 857 </div> 858 </div> 859 </div> 860 861 <div class="col-sm-4 col-xs-12"> 862 <div class="site--footer-content-container"> 863 <div class="row"> 864 <div class="site--footer-content col-md-12"> 865 @RenderParagraphContent(18973) 866 </div> 867 </div> 868 </div> 869 </div> 870 871 <div class="row"> 872 <div class="col-xs-12"> 873 <a href="https://www.rksk.dk/om-kommunen/organisation/databeskyttelse#accordion-8" title="Se privatlivspolitik gældende for www.rksk.dk og dens subdomæner" target="_blank">Privatlivspolitik gældende for www.rksk.dk og dens subdomæner</a><br> 874 <a href="https://www.rksk.dk/om-kommunen/organisation/databeskyttelse#accordion-7" title="Se kommunes cookiepolitik for www.rksk.dk og dens subdomæner" target="_blank">Kommunes cookiepolitik for www.rksk.dk og dens subdomæner</a> 875 </div> 876 </div> 877 </div> 878 879 </div> 880 881 </section> 882 </footer> 883 884 885 886 <div class="modal fade" id="sectionTypeModal" role="dialog" aria-labelledby="sectionTypeModalLabel" aria-modal="true" aria-hidden="true" tabindex="-1"> 887 <div class="modal-dialog"> 888 <div class="modal-content"> 889 <div class="site__sectiontype__container"> 890 <div class="h1" id="sectionTypeModalLabel"> 891 @GetString("Item.Area.ModalSectionTypeHeader") 892 </div> 893 <div class="site__sectiontype__content"> 894 @GetString("Item.Area.ModalSectionTypeContent") 895 </div> 896 <div class="site__sectiontype__buttons"> 897 <div class="row"> 898 <div class="col-sm-6"> 899 <a href="/" class="btn btn-block btn-primary" title="Gå til boliggrunde">Boliggrunde</a> 900 </div> 901 <div class="col-sm-6"> 902 <a href="/Default.aspx?ID=20101" class="btn btn-block site__sectiontype__buttons--blue" title="Gå til erhvervsgrunde">Erhvervsgrunde</a> 903 </div> 904 </div> 905 </div> 906 </div> 907 </div> 908 </div> 909 </div> 910 911 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 912 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> 913 <script type="text/javascript" src="/Files/Templates/Designs/Grundsalg/js/scripts.min.js?v=2"></script> 914 915 @RenderSnippet("JavaScript") 916 917 <script> 918 // INLINE SCRIPT FOR AT SIKRE OS AT REPONSIVE BREDDER OVERHOLDES PÅ WINDOWS PHONE. 919 // http://getbootstrap.com/getting-started/#support-ie10-width 920 if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 921 var msViewportStyle = document.createElement("style") 922 msViewportStyle.appendChild( 923 document.createTextNode( 924 "&#64;-ms-viewport{width:auto!important}" 925 ) 926 ) 927 document.getElementsByTagName("head")[0].appendChild(msViewportStyle) 928 } 929 </script> 930 931 <script type="text/javascript"> 932 window.addEventListener('CookieInformationConsentGiven', function (event) { 933 if (CookieInformation.getConsentGivenFor('cookie_cat_statistic')) { 934 /*<![CDATA[*/ 935 (function () { 936 var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true; 937 sz.src = '//siteimproveanalytics.com/js/siteanalyze_2542.js'; 938 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s); 939 })(); 940 /*]]>*/ 941 } 942 }, false); 943 </script> 944 </body> 945 </html></div>