Error executing template "Designs/Grundsalg/_parsed/parcels.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_29edcc599ee947d3a44d4d529c3e35f5.Execute() in E:\dynamicweb.net\Solutions\rksk.net.dynamicweb-cms.com\Website\Files\Templates\Designs\Grundsalg\_parsed\parcels.parsed.cshtml:line 231
   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 System.Linq; 183 @using Dynamicweb.Rendering; 184 185 186 187 @functions { 188 public class PlotList 189 { 190 public string Url { get; set; } 191 public string Adress { get; set; } 192 public string Status { get; set; } 193 public string ClassString { get; set; } 194 } 195 } 196 197 @{ 198 199 string pageName = GetString("DwPageName"); 200 string areaNumber = GetString("Item.Omraadenr"); 201 string areaType = GetString("Item.OmraadeType"); 202 string parentPageName = GetString("DwPageName_2"); 203 204 //get all plots from DW 205 IEnumerable<Dynamicweb.Content.Page> plots = RKSK.Api.Page.GetPagesByParentID(GetInteger("DwPageID")); 206 207 //get area 208 string whereGisArea = ""; 209 int groundTypeCode = 1; 210 string plotBaseGisUrl = "https://gisext.rksk.dk/arcgis/rest/services/Temaer/MapServer/2"; 211 string whereGisTown = @"where=""By_navn""=%27{0}%27"; 212 string allgroundsUrl = "/alle-omraader"; 213 if (areaType == "bolig") 214 { 215 whereGisArea = @"where=""Omraadenr""=%27{0}%27 AND ""Paa_web""=%27JA%27"; 216 } 217 else 218 { 219 whereGisArea = @"where=""Omraadenr""=%27{0}%27 AND ""Paa_web_erhverv""=%27JA%27"; 220 groundTypeCode = 4; 221 plotBaseGisUrl = "https://gisext.rksk.dk/arcgis/rest/services/Temaer/MapServer/3"; 222 parentPageName = GetString("DwPageName_3"); 223 allgroundsUrl = "/erhverv/alle-omraader"; 224 } 225 string whereGisWithArea = String.Format(whereGisArea, areaNumber); 226 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); 227 dynamic areasJson = RKSK.Api.GroundSaleUtility.GetJson(urlGisArea); 228 229 //get attributes for area 230 dynamic areaJsonAttributes = null; 231 foreach (var features in areasJson.features) 232 { 233 if (features.attributes != null) 234 { 235 if (areaNumber == features.attributes.Omraadenr.ToString()) 236 { 237 areaJsonAttributes = features.attributes; 238 break; 239 } 240 } 241 } 242 243 244 //get plot from areas 245 string whereGisPlots = @"where=""Omraadenr""=%27{0}%27"; 246 string whereGisWithPlots = String.Format(whereGisPlots, areaNumber); 247 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); 248 dynamic plotsJson = RKSK.Api.GroundSaleUtility.GetJson(urlGisPlots); 249 250 //get cheapest from price 251 int fromPrice = 9999999; 252 foreach (var features in plotsJson.features) 253 { 254 if (features.attributes.pris != null) 255 { 256 int price; 257 if (Int32.TryParse(features.attributes.pris.ToString(), out price)) 258 { 259 if (price > 0 && price < fromPrice) 260 { 261 fromPrice = price; 262 } 263 } 264 } 265 } 266 267 //get town json data 268 string whereGisWithTown = String.Format(whereGisTown, parentPageName); 269 string urlGisTown = String.Format("https://gisext.rksk.dk/arcgis/rest/services/GISext_registrering/MapServer/20/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=&queryByDistance=&returnExtentsOnly=false&datumTransformation=&parameterValues=&rangeValues=&f=pjson", whereGisWithTown); 270 dynamic townsJson = RKSK.Api.GroundSaleUtility.GetJson(urlGisTown); 271 272 //get attributes for town 273 dynamic townJsonAttributes = null; 274 foreach (var features in townsJson.features) 275 { 276 if (features.attributes != null) 277 { 278 if (parentPageName == features.attributes.By_navn.ToString()) 279 { 280 townJsonAttributes = features.attributes; 281 break; 282 } 283 } 284 } 285 286 //init lat converter 287 var LatLngUTMConverter = new RKSK.Api.LatLngUTMConverter(""); 288 var plotsToList = new List<PlotList>(); 289 foreach (var features in plotsJson.features) 290 { 291 string urlList = ""; 292 foreach (var plot in plots) 293 { 294 if (plot.Item["Omraadenr"] != null) 295 { 296 string pageNamePlot = plot.MenuText; 297 string[] pageNamePlotArr = pageNamePlot.Split(','); 298 string addressPlot = pageNamePlotArr[1].Trim(); 299 300 if (plot.Item["Omraadenr"].ToString() == features.attributes.Omraadenr.ToString() && features.attributes.ADRESSE.ToString() == addressPlot) 301 { 302 urlList = "Default.aspx?ID=" + plot.ID; 303 break; 304 } 305 } 306 } 307 308 if (String.IsNullOrEmpty(urlList)) 309 { 310 continue; 311 } 312 313 plotsToList.Add(new PlotList 314 { 315 Url = urlList, 316 Status = features.attributes.STATUS_SALG.ToString(), 317 Adress = features.attributes.ADRESSE.ToString(), 318 ClassString = features.attributes.STATUS_SALG.ToString() == "Solgt" ? "disabled" : "" 319 }); 320 } 321 322 } 323 324 @if (areaJsonAttributes != null && townJsonAttributes != null) 325 { 326 //set toppicture 327 string topPhoto = "/Files/Templates/Designs/Grundsalg/img/area_picture.jpg"; 328 if (!String.IsNullOrEmpty(areaJsonAttributes.Foto_8.ToString())) 329 { 330 topPhoto = areaJsonAttributes.Foto_8.ToString(); 331 } 332 else if (!String.IsNullOrEmpty(areaJsonAttributes.Foto_9.ToString())) 333 { 334 topPhoto = areaJsonAttributes.Foto_9.ToString(); 335 } 336 337 //get town from postalcode 338 RKSK.Api.PostalCode townByPostalCode = null; 339 string townByPostalCodeString = null; 340 if (!String.IsNullOrEmpty(areaJsonAttributes.Postnr.ToString())) 341 { 342 townByPostalCode = RKSK.Api.PostalCode.GetPostalCode(areaJsonAttributes.Postnr.ToString()); 343 townByPostalCodeString = townByPostalCode.Town; 344 } 345 346 <div class="plot__parcels"> 347 <div class="hidden-xs"> 348 <div class="plot__parcels__toppicture" style="background-image: url(@topPhoto)"> 349 <div class="container plot__parcels__toppicture__content"> 350 <div class="plot__parcels__toppicture__content__info"> 351 <div class="plot__parcels__toppicture__content__info__area">@areaJsonAttributes.Omraade_navn</div> 352 <div class="plot__parcels__toppicture__content__info__zip">@areaJsonAttributes.Postnr @townByPostalCodeString</div> 353 </div> 354 <div class="plot__parcels__toppicture__content__plots"> 355 @if (fromPrice != 9999999) 356 { 357 <div class="plot__area__toppicture__content__plots__price"> 358 Grunde fra <span>kr. @String.Format("{0:#,##0.##}", fromPrice)</span> 359 </div> 360 } 361 <a href="@allgroundsUrl?parcel=@areaNumber" class="btn btn-lg btn-primary plot__parcels__toppicture__content__plots__btn">Se alle grunde</a> 362 </div> 363 </div> 364 </div> 365 366 <div class="site--breadcrumb" role="navigation" aria-label="Brødkrummesti"> 367 <div class="container"> 368 <div class="row"> 369 <div class="col-xs-12"> 370 @if (!string.IsNullOrEmpty(GetString("DwNavigation(navbreadcrumb)"))) 371 { 372 <div class="site--breadcrumb-hometext">Du er her:</div> 373 @GetValue("DwNavigation(navbreadcrumb)") 374 } 375 </div> 376 </div> 377 </div> 378 </div> 379 380 <div class="plot__parcels__map__container" style="position:relative;"> 381 <div class="container"> 382 <div class="row"> 383 <div class="col-xs-12"> 384 <div class="plot__parcels__map__areas"> 385 <div class="plot__parcels__map__areas__header"> 386 Grunde til salg 387 </div> 388 <ul class="plot__parcels__map__areas__list" id="leftMenu"> 389 390 @foreach (var plotToList in plotsToList.OrderBy(x => x.Adress)) 391 { 392 <li> 393 <a href="@plotToList.Url" class="@plotToList.ClassString"> 394 @plotToList.Adress 395 (@plotToList.Status) 396 </a> 397 </li> 398 } 399 </ul> 400 </div> 401 <div id="map" class="plot__parcels__map"></div> 402 <div id="polygon_tooltip" style="display:none;padding: 10px; font-weight: bold;position:absolute;right:70px; top: 10px; background: #FFF; text-align: center;"></div> 403 @if (!String.IsNullOrEmpty(areaJsonAttributes.Luftfoto.ToString())) 404 { 405 <div class="clearfix"></div> 406 <div style="text-align: right;margin-top: 10px;"> 407 Bemærk venligst: Satellitbilleder kan være af ældre dato.<br> 408 <a href="@areaJsonAttributes.Luftfoto.ToString()" title="Klik her for at se vores nyeste luftfoto af området">Klik her for at se vores nyeste luftfoto af området</a> 409 </div> 410 } 411 </div> 412 </div> 413 </div> 414 </div> 415 </div> 416 <div class="visible-xs" aria-hidden="true"> 417 <div class="plot__parcels__toppicture" style="background: url(/Files/Templates/Designs/Grundsalg/img/area_picture.jpg) center"> 418 419 </div> 420 <div class="container plot__parcels__toppicture__content"> 421 <div class="plot__parcels__toppicture__content__info"> 422 <div class="plot__parcels__toppicture__content__info__area">@pageName</div> 423 <div class="plot__parcels__toppicture__content__info__zip">@areaJsonAttributes.Postnr, @GetString("DwPageName_2")</div> 424 </div> 425 426 </div> 427 <div class="container"> 428 <div class="row"> 429 <div class="col-xs-12"> 430 <div class="plot__parcels__map__container"> 431 <div class="plot__parcels__map__areas"> 432 <ul class="plot__parcels__map__areas__list" id="leftMenu"> 433 <li class="plot__parcels__map__areas__list__header"> 434 <span>Adresse</span> 435 <span>Status</span> 436 </li> 437 438 @foreach (var plotToList in plotsToList.OrderBy(x => x.Adress)) 439 { 440 <li> 441 <a href="@plotToList.Url" class="@plotToList.ClassString"> 442 @plotToList.Adress 443 (@plotToList.Status) 444 </a> 445 </li> 446 } 447 </ul> 448 </div> 449 <div id="mapmobile" class="plot__parcels__map"></div> 450 @if (!String.IsNullOrEmpty(areaJsonAttributes.Luftfoto.ToString())) 451 { 452 <div class="clearfix"></div> 453 <div style="margin: 10px 0;text-align: center;"> 454 Bemærk satellitbilleder fra google kan være gamle.<br> <a href="@areaJsonAttributes.Luftfoto.ToString()" title="Se nyeste luftfoto">Klip her for at se vores sidste nye luftfotos</a> 455 </div> 456 } 457 </div> 458 </div> 459 </div> 460 </div> 461 <div class="plot__parcels__toppicture__content__plots"> 462 @if (fromPrice != 9999999) 463 { 464 <div class="plot__parcels__toppicture__content__plots__price"> 465 Grunde fra <span>kr. @fromPrice</span> 466 </div> 467 } 468 </div> 469 </div> 470 <div id="Indhold"> 471 <div class="plot__parcels__entries"> 472 <div class="container"> 473 <p class="plot__parcels__entries__text"> 474 @areaJsonAttributes.Omraade_beskrivelse_kort 475 </p> 476 <hr class="plot__parcels__entries__seperator"> 477 @if (areaType == "bolig") 478 { 479 <div class="row plot__parcels__entries__entry__wrapper"> 480 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 481 <span class="icon" aria-hidden="true" aria-label="Afstand til Skole">&#xf19c;</span> 482 <p>Afstand til skole:<br> @areaJsonAttributes.Afstand_til_skole m.</p> 483 </div> 484 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 485 <span class="icon" aria-hidden="true" aria-label="Afstand til indkøbsmuligheder">&#xf291;</span> 486 <p>Afstand til indkøbsmulighed:<br> @areaJsonAttributes.Afstand_til_indkoebsmulighed m.</p> 487 </div> 488 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 489 <span class="icon" aria-hidden="true" aria-label="Afstand til sportsfaciliteter ikon">&#xf1e3;</span> 490 <p>Afstand til sportsfaciliteter:<br> @areaJsonAttributes.Afstand_til_sportsfaciliteter m.</p> 491 </div> 492 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 493 <span class="icon" aria-hidden="true" aria-label="Afstand til offentlig transport ikon">&#xf207;</span> 494 <p>Afstand til offentlig transport:<br> @areaJsonAttributes.Afstand_til_offentlig_transport m.</p> 495 </div> 496 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 497 <span class="icon" aria-hidden="true" aria-label="Afstand til by midte ikon">&#xf015;</span> 498 <p>Afstand til bymidte:<br> @areaJsonAttributes.Afstand_til_bymidte m.</p> 499 </div> 500 <div class="col-xs-4 col-md-2 plot__plot__entries__entry"> 501 <span class="icon" aria-hidden="true" aria-label="Afstand til hav ikon">&#xf21a;</span> 502 @{ 503 if (!String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && !String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 504 { 505 <p>Afstand til hav/fjord:<br> @areaJsonAttributes.Afstand_til_hav m. / @areaJsonAttributes.Afstand_til_fjord m.</p> 506 } 507 else if (!String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 508 { 509 <p>Afstand til hav:<br> @areaJsonAttributes.Afstand_til_hav m.</p> 510 } 511 else if (String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_hav.ToString()) && !String.IsNullOrEmpty(areaJsonAttributes.Afstand_til_fjord.ToString())) 512 { 513 <p>Afstand til fjord:<br> @areaJsonAttributes.Afstand_til_fjord m.</p> 514 } 515 } 516 </div> 517 </div> 518 } 519 else 520 { 521 <div class="row plot__parcels__entries__entry__wrapper"> 522 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry hidden-xs hidden-sm"> 523 &nbsp; 524 </div> 525 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 526 <span class="icon" aria-hidden="true" aria-label="Afstand til motorvej ikon">&#xf1b9;</span> 527 <p>Afstand til motorvej :<br> @areaJsonAttributes.Afstand_til_skole km.</p> 528 </div> 529 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 530 <span class="icon" aria-hidden="true" aria-label="Afstand til lufthavn ikon">&#xf072;</span> 531 <p>Afstand til lufthavn:<br> @areaJsonAttributes.Afstand_til_indkoebsmulighed km.</p> 532 </div> 533 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 534 <span class="icon" aria-hidden="true" aria-label="Afstand til havn ikon">&#xf21a;</span> 535 <p>Afstand til havn:<br> @areaJsonAttributes.Afstand_til_sportsfaciliteter km.</p> 536 </div> 537 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry"> 538 <span class="icon" aria-hidden="true" aria-label="Afstand til storby ikon">&#xf1fe;</span> 539 <p>Afstand til storby:<br> @areaJsonAttributes.Afstand_til_offentlig_transport km.</p> 540 </div> 541 <div class="col-xs-4 col-md-2 plot__parcels__entries__entry hidden-xs hidden-sm"> 542 &nbsp; 543 </div> 544 </div> 545 } 546 547 </div> 548 </div> 549 <div class="container"> 550 <div class="plot__parcels__slider"> 551 <div class="owl-carousel"> 552 @{ 553 for (int i = 1; i <= 6; i++) 554 { 555 string photo = ""; 556 if (i == 1 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_1.ToString())) 557 { 558 photo = areaJsonAttributes.Foto_1.ToString(); 559 } 560 else if (i == 2 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_2.ToString())) 561 { 562 photo = areaJsonAttributes.Foto_2.ToString(); 563 } 564 else if (i == 3 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_3.ToString())) 565 { 566 photo = areaJsonAttributes.Foto_3.ToString(); 567 } 568 else if (i == 4 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_4.ToString())) 569 { 570 photo = areaJsonAttributes.Foto_4.ToString(); 571 } 572 else if (i == 5 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_5.ToString())) 573 { 574 photo = areaJsonAttributes.Foto_5.ToString(); 575 } 576 else if (i == 6 && !String.IsNullOrEmpty(areaJsonAttributes.Foto_6.ToString())) 577 { 578 photo = areaJsonAttributes.Foto_6.ToString(); 579 } 580 581 if (!String.IsNullOrEmpty(photo)) 582 { 583 <a href="@photo" class="fancybox" rel="gallery" title="Billede @i af @areaJsonAttributes.Omraade_navn"> 584 <img src="@photo" class="img-responsive" alt=""> 585 </a> 586 } 587 } 588 } 589 </div> 590 </div> 591 </div> 592 <div class="container"> 593 <div class="row"> 594 <div class="col-xs-12"> 595 <h2>Mere om @pageName</h2> 596 </div> 597 <div class="col-xs-12"> 598 @areaJsonAttributes.Omraade_beskrivelse_uddybende.ToString() 599 </div> 600 </div> 601 </div> 602 603 <div class="container"> 604 <div class="row"> 605 <div class="col-xs-12"> 606 <div class="plot__parcels__docs"> 607 <div class="plot__parcels__docs__header"> 608 <h2 class="">Hent tekniske dokumenter</h2> 609 </div> 610 <div class="plot__parcels__docs__wrapper"> 611 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_1__geotekniske_rapport.ToString())) 612 { 613 <a href="@areaJsonAttributes.Tek_doc_1__geotekniske_rapport.ToString()" class="btn btn-lg btn-primary" title="Geoteknisk rapport" target="_blank"> 614 Geoteknisk rapport <span class="icon" aria-hidden="true">&#xf063;</span> 615 </a> 616 } 617 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_2_lokal_plan.ToString())) 618 { 619 <a href="@areaJsonAttributes.Tek_doc_2_lokal_plan.ToString()" class="btn btn-lg btn-primary" title="Lokalplan o.l." target="_blank"> 620 Lokalplan o.l. <span class="icon" aria-hidden="true">&#xf063;</span> 621 </a> 622 } 623 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_3_Maaleblad.ToString())) 624 { 625 <a href="@areaJsonAttributes.Tek_doc_3_Maaleblad.ToString()" class="btn btn-lg btn-primary" title="Måleblad" target="_blank"> 626 Måleblad <span class="icon" aria-hidden="true">&#xf063;</span> 627 </a> 628 } 629 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_4_omraadespec_salgsbeti.ToString())) 630 { 631 <a href="@areaJsonAttributes.Tek_doc_4_omraadespec_salgsbeti.ToString()" class="btn btn-lg btn-primary" title="Salgsvilkår for området" target="_blank"> 632 Salgsvilkår for området <span class="icon" aria-hidden="true">&#xf063;</span> 633 </a> 634 } 635 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_7_Servitut.ToString())) 636 { 637 <a href="@areaJsonAttributes.Tek_doc_7_Servitut.ToString()" class="btn btn-lg btn-primary" title="Servitut" target="_blank"> 638 Servitut <span class="icon" aria-hidden="true">&#xf063;</span> 639 </a> 640 } 641 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_8_Tingbogsattest.ToString())) 642 { 643 <a href="@areaJsonAttributes.Tek_doc_8_Tingbogsattest.ToString()" class="btn btn-lg btn-primary" title="Tingbogsattest" target="_blank"> 644 Tingbogsattest <span class="icon" aria-hidden="true">&#xf063;</span> 645 </a> 646 } 647 648 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_5_andre_dokumenter.ToString())) 649 { 650 <a href="@areaJsonAttributes.Tek_doc_5_andre_dokumenter.ToString()" class="btn btn-lg btn-primary" title="Andre dokumenter" target="_blank"> 651 Andre dokumenter <span class="icon" aria-hidden="true">&#xf063;</span> 652 </a> 653 } 654 @if (!String.IsNullOrEmpty(areaJsonAttributes.Tek_doc_6_Andre_dokumenter_2.ToString())) 655 { 656 <a href="@areaJsonAttributes.Tek_doc_6_Andre_dokumenter_2.ToString()" class="btn btn-lg btn-primary" title="Andre dokumenter 2" target="_blank"> 657 Andre dokumenter 2 <span class="icon" aria-hidden="true">&#xf063;</span> 658 </a> 659 } 660 </div> 661 </div> 662 </div> 663 </div> 664 </div> 665 </div> 666 </div> 667 668 669 @SnippetStart("JavaScript") 670 671 <script src="https://maps.google.com/maps/api/js?key=AIzaSyAMvetR2U-TCjlHH7NqzCGGiO8WPxbY1eo" type="text/javascript"></script> 672 <script> 673 674 var paths = [ 675 @foreach (var features in plotsJson.features) 676 { 677 string url = ""; 678 string plotPageName = ""; 679 foreach (var plot in plots) 680 { 681 if (plot.Item["Omraadenr"] != null) 682 { 683 684 string pageNamePlot = plot.MenuText; 685 string[] pageNamePlotArr = pageNamePlot.Split(','); 686 string addressPlot = pageNamePlotArr[1].Trim(); 687 688 if (plot.Item["Omraadenr"].ToString() == features.attributes.Omraadenr.ToString() && features.attributes.ADRESSE.ToString() == addressPlot) 689 { 690 url = "/Default.aspx?ID=" + plot.ID; 691 plotPageName = plot.MenuText; 692 break; 693 } 694 } 695 } 696 697 if (String.IsNullOrEmpty(url)) 698 { 699 continue; 700 } 701 702 <text>{url: "@url",title: "@plotPageName", status: "@features.attributes.STATUS_SALG.ToString()",</text> 703 if (features.geometry.rings != null) 704 { 705 <text>path: [</text> 706 foreach (var ring in features.geometry.rings[0]) 707 { 708 double utmLat = ring[0]; 709 double utmLong = ring[1]; 710 var latLng = LatLngUTMConverter.convertUtmToLatLng(utmLat, utmLong, 32, "N"); 711 <text> 712 {lat: @latLng.Lat.ToString().Replace(",","."), lng: @latLng.Lng.ToString().Replace(",", ".")}, 713 </text> 714 } 715 <text>]</text> 716 717 } 718 <text>},</text> 719 } 720 ]; 721 var map; 722 var mapMobile; 723 724 function initialize() { 725 726 var myOptions = { 727 center : {lat: 56.044689, lng: 8.50589}, 728 zoom : 10, 729 mapTypeControl : false, 730 scaleControl : false, 731 streetViewControl: false, 732 rotateControl : false, 733 mapTypeId : google.maps.MapTypeId.SATELLITE, 734 styles : [ 735 { 736 "featureType": "administrative", 737 "elementType": "labels.text.fill", 738 "stylers" : [ 739 { 740 "color": "#444444" 741 } 742 ] 743 }, 744 { 745 "featureType": "landscape", 746 "elementType": "all", 747 "stylers" : [ 748 { 749 "color": "#f2f2f2" 750 } 751 ] 752 }, 753 { 754 "featureType": "poi", 755 "elementType": "all", 756 "stylers" : [ 757 { 758 "visibility": "off" 759 } 760 ] 761 }, 762 { 763 "featureType": "road", 764 "elementType": "all", 765 "stylers" : [ 766 { 767 "saturation": -100 768 }, 769 { 770 "lightness": 45 771 } 772 ] 773 }, 774 { 775 "featureType": "road.highway", 776 "elementType": "all", 777 "stylers" : [ 778 { 779 "visibility": "simplified" 780 } 781 ] 782 }, 783 { 784 "featureType": "road.arterial", 785 "elementType": "labels.icon", 786 "stylers" : [ 787 { 788 "visibility": "off" 789 } 790 ] 791 }, 792 { 793 "featureType": "transit", 794 "elementType": "all", 795 "stylers" : [ 796 { 797 "visibility": "off" 798 } 799 ] 800 }, 801 { 802 "featureType": "water", 803 "elementType": "all", 804 "stylers" : [ 805 { 806 "color": "#46bcec" 807 }, 808 { 809 "visibility": "on" 810 } 811 ] 812 } 813 ] 814 }; 815 map = new google.maps.Map(document.getElementById("map"), myOptions); 816 mapMobile = new google.maps.Map(document.getElementById("mapmobile"), myOptions); 817 bounds = new google.maps.LatLngBounds(); 818 var ploygon = setshape(map, paths); 819 var ploygonMobile = setshape(mapMobile, paths); 820 map.fitBounds(bounds); 821 mapMobile.fitBounds(bounds); 822 823 } 824 825 826 function setshape(map, paths) { 827 $.each(paths, function (count, pathInfo) { 828 829 var fillColor = "#00AA65"; 830 if (this.status == "Solgt") { 831 fillColor = "#ff0000"; 832 } else if (this.status == "Reserveret") { 833 fillColor = "#ffff00"; 834 } 835 836 var polyline = new google.maps.Polygon({ 837 path : pathInfo.path, 838 fillColor: fillColor, 839 fillOpacity : 0.7, 840 strokeColor : "#005331", 841 strokeOpacity: 0.2, 842 strokeWeight : 2, 843 url: pathInfo.url, 844 status: pathInfo.status, 845 }); 846 polyline.setMap(map); 847 848 849 google.maps.event.addListener(polyline, 'mouseover', function () { 850 this.setOptions({strokeOpacity: 1}) 851 852 $('#polygon_tooltip').html(pathInfo.title); 853 $('#polygon_tooltip').show(); 854 855 }); 856 google.maps.event.addListener(polyline, 'mouseout', function () { 857 this.setOptions({strokeOpacity: 0.2}) 858 $('#polygon_tooltip').html(""); 859 $('#polygon_tooltip').hide(); 860 }); 861 google.maps.event.addListener(polyline, 'click', function () { 862 if (this.status != "Solgt") { 863 window.location.href = this.url; 864 } 865 }); 866 for (var i = 0; i < pathInfo.path.length; i++) { 867 bounds.extend(pathInfo.path[i]); 868 } 869 }); 870 } 871 872 // Onload handler to fire off the app. 873 google.maps.event.addDomListener(window, "load", initialize); 874 </script> 875 876 877 <script> 878 $('.owl-carousel').owlCarousel({ 879 margin: 10, 880 nav: true, 881 responsive: { 882 0: { 883 items: 1 884 }, 885 600: { 886 items: 3 887 }, 888 1000: { 889 items: 3 890 } 891 }, 892 navText: ['<span class="icon" aria-hidden="true" >&#xf0a8;</span>', '<span class="icon" >&#xf0a9;</span>'] 893 }); 894 </script> 895 @SnippetEnd("JavaScript") 896 } 897 else 898 { 899 <p>By ikke fundet i feed.</p> 900 } 901 </div> 902 903 <footer class="site--footer-container"> 904 <section class="site--footer" aria-label="Kontakt og åbningstider"> 905 906 <div class="container"> 907 908 <div class="row"> 909 <div class="col-sm-4 col-xs-12"> 910 <div class="site--footer-content-container"> 911 <div class="row"> 912 <div class="site--footer-content col-md-12"> 913 @RenderParagraphContent(18971) 914 </div> 915 </div> 916 </div> 917 </div> 918 919 <div class="col-sm-4 col-xs-12"> 920 <div class="site--footer-content-container"> 921 <div class="row"> 922 <div class="site--footer-content col-md-12"> 923 @RenderParagraphContent(18972) 924 </div> 925 </div> 926 </div> 927 </div> 928 929 <div class="col-sm-4 col-xs-12"> 930 <div class="site--footer-content-container"> 931 <div class="row"> 932 <div class="site--footer-content col-md-12"> 933 @RenderParagraphContent(18973) 934 </div> 935 </div> 936 </div> 937 </div> 938 939 <div class="row"> 940 <div class="col-xs-12"> 941 <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> 942 <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> 943 </div> 944 </div> 945 </div> 946 947 </div> 948 949 </section> 950 </footer> 951 952 953 954 <div class="modal fade" id="sectionTypeModal" role="dialog" aria-labelledby="sectionTypeModalLabel" aria-modal="true" aria-hidden="true" tabindex="-1"> 955 <div class="modal-dialog"> 956 <div class="modal-content"> 957 <div class="site__sectiontype__container"> 958 <div class="h1" id="sectionTypeModalLabel"> 959 @GetString("Item.Area.ModalSectionTypeHeader") 960 </div> 961 <div class="site__sectiontype__content"> 962 @GetString("Item.Area.ModalSectionTypeContent") 963 </div> 964 <div class="site__sectiontype__buttons"> 965 <div class="row"> 966 <div class="col-sm-6"> 967 <a href="/" class="btn btn-block btn-primary" title="Gå til boliggrunde">Boliggrunde</a> 968 </div> 969 <div class="col-sm-6"> 970 <a href="/Default.aspx?ID=20101" class="btn btn-block site__sectiontype__buttons--blue" title="Gå til erhvervsgrunde">Erhvervsgrunde</a> 971 </div> 972 </div> 973 </div> 974 </div> 975 </div> 976 </div> 977 </div> 978 979 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> 980 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> 981 <script type="text/javascript" src="/Files/Templates/Designs/Grundsalg/js/scripts.min.js?v=2"></script> 982 983 @RenderSnippet("JavaScript") 984 985 <script> 986 // INLINE SCRIPT FOR AT SIKRE OS AT REPONSIVE BREDDER OVERHOLDES PÅ WINDOWS PHONE. 987 // http://getbootstrap.com/getting-started/#support-ie10-width 988 if (navigator.userAgent.match(/IEMobile\/10\.0/)) { 989 var msViewportStyle = document.createElement("style") 990 msViewportStyle.appendChild( 991 document.createTextNode( 992 "&#64;-ms-viewport{width:auto!important}" 993 ) 994 ) 995 document.getElementsByTagName("head")[0].appendChild(msViewportStyle) 996 } 997 </script> 998 999 <script type="text/javascript"> 1000 window.addEventListener('CookieInformationConsentGiven', function (event) { 1001 if (CookieInformation.getConsentGivenFor('cookie_cat_statistic')) { 1002 /*<![CDATA[*/ 1003 (function () { 1004 var sz = document.createElement('script'); sz.type = 'text/javascript'; sz.async = true; 1005 sz.src = '//siteimproveanalytics.com/js/siteanalyze_2542.js'; 1006 var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(sz, s); 1007 })(); 1008 /*]]>*/ 1009 } 1010 }, false); 1011 </script> 1012 </body> 1013 </html></div>