CINXE.COM

Norge i bilder

<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="nb"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' /> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-title" content="NiB"> <meta name="application-name" content="NiB"> <meta name="theme-color" content="#ffffff"> <meta property="og:title" content="Norge i Bilder" /> <meta property="og:description" content="Oversikt over ortofoto som samarbeidspartene i Norge digitalt tilbyr p氓 internett." /> <meta property="og:image" content="/Images/NIBlogo_opengraph.png" /> <meta property="og:type" content="website" /> <title>Norge i bilder</title> <link href="/Content/Site.css?v=268Qg-O_yL8OUiaGN45T9gNi6xDJIl0z86CU-W-VYpI" rel="stylesheet" type="text/css" /> <link href="/Content/lavish-bootstrap.css" rel="stylesheet" type="text/css" /> <link href="/Content/bootstrap-datepicker3.css" rel="stylesheet" /> <link href="/Content/BootSideMenu.css?v=CAFYS8-SasLNFedjKItRiYOpZclUb-s-to4zAUdYqxk" rel="stylesheet" type="text/css" /> <link href="/Content/bootstrap-slider.css" rel="stylesheet" type="text/css" /> <link href="/Content/bootstrap-dialog.min.css" rel="stylesheet" type="text/css" /> <link href="//js.arcgis.com/3.23/esri/css/esri.css" rel="stylesheet" type="text/css" /> <link href="//js.arcgis.com/3.23/dijit/themes/claro/claro.css" rel="stylesheet" /> <link href="/Content/NIB.css?v=BCZIr1tVp-MecdAFpZxYIipnYICgQ-5u7n7SwjIf4kg" rel="stylesheet" type="text/css" /> <link href="/Content/ionicons.min.css" rel="stylesheet" type="text/css" /> <link href="/Content/jstree-theme/style.css?v=8uSI4ckPVaTzvAzWCZie5scHhmOnwsZvEBiwTxTH4Lk" rel="stylesheet" type="text/css" /> <link rel="manifest" href="/Content/manifest.json?v=a1KBoXJIsIXt_GeTwShhlTRfZtSFXcYD-1eR4_wpi_A"> <link rel="apple-touch-icon" sizes="180x180" href="/Images/apple-touch-icon.png"> <script src="/Map/javascript/settings.js?v=FZj3yJc81MIa_kWRf57OyOdNmJJx9TmZSZMDcylUM1U"></script> <script src="/Scripts/jquery-3.4.1.min.js"></script> <script src="/Scripts/jquery.ui.widget.js"></script> <script src="/Scripts/modernizr-2.6.2.js"></script> <script src="/Scripts/cookies.js?v=folL_IlW9kcDO63I5VmyjtjWs-QZbmoSB2XrRIrvf5o"></script> <script src="/Scripts/utils.js?v=oxz6sel71fdSgJgyrg-oHhDetCpE5FezOmTX5eP6BR4"></script> <script src="/Scripts/umd/popper.min.js"></script> <script src="/Scripts/bootstrap.min.js"></script> <script src="/Scripts/bootstrap-datepicker.js"></script> <script src="/Scripts/BootSideMenu.js?v=FuY9lxQlWbQXYOtwZf9cHFmKqlx9BLLZJox94Ts_3VU"></script> <script src="/Scripts/bootstrap-slider.js"></script> <script src="/Scripts/bootstrap-dialog.min.js"></script> <!--<script src="~/Scripts/bootbox.min.js"></script>--> <script src="/Scripts/typeahead.bundle.js"></script> <script src="/Scripts/handlebars-v3.0.0.js"></script> <script src="/Scripts/jstree.min.js"></script> <script src="/Scripts/jstree-misc.js"></script> <script src="/Map/javascript/helper.js?v=uTv9BHqIkED_oqK6dFvZTdzYPqZ7SCe3Q5Tx7dZGsXI"></script> <script src="//js.arcgis.com/3.23"></script> <script type="text/javascript"> // poor man's force https ... if (window.location.protocol !== 'https:' && window.location.href.indexOf("localhost") === -1) { location.href = location.href.replace("http://", "https://"); } $(function () { if (hide3d()) $('#btn3d').hide(); }); function hide3d() { var platform = navigator.platform.toLowerCase(); var userAgent = navigator.userAgent.toLowerCase(); return ( (platform.indexOf("ipad") > -1) || (platform.indexOf("iphone") > -1) || (platform.indexOf("ipod") > -1) || (platform.indexOf("ios") > -1) || (userAgent.indexOf("android") > -1) ); } </script> </head> <body class="claro"> <div role="navigation" class="navbar navbar-default navbar-fixed-top"> <div class="navbar-brand mobile-collapse-behaviour" id="logo-normal"><a href="javascript:map.resetStartExtent()" data-localization-token="homeBtnTooltip"><img src="/Images/NIBlogo_normal.png" alt="Norge i Bilder" height="24" /></a></div> <div class="navbar-brand mobile-collapse-behaviour" id="logo-compact"><a href="javascript:map.resetStartExtent()" data-localization-token="homeBtnTooltip"><img src="/Images/NIBlogo_kompakt.png" height="24" alt="NIB" /></a></div> <div id="right-toolbar-mobile" class="mobile-only pull-right"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-fixed-top"> <em class="glyphicon glyphicon-remove"></em> </button> </div> <div class="pull-right" id="right-toolbar"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <div class="pull-left"> <div id="searchContainer"></div> </div> <ul class="nav navbar-nav" id="right-toolbar-buttons"> <li class="pull-left"><a href="https://uustatus.no/nb/erklaringer/publisert/fde14c83-d931-486d-90d2-8e0432aace5e" target="_blank"><em class="icon ion-man icon-lg" data-localization-token="accessibilityTooltip"></em></a></li> <li class="pull-left"><a href="javascript:showPermalinkModal()"><em class="glyphicon glyphicon-link" data-localization-token="permalinkBtnTooltip"></em></a></li> <li class="pull-left"><a href="javascript:showMessageModal()"><em class="glyphicon glyphicon-envelope" data-localization-token="msgBtnTooltip"></em></a></li> <li class="pull-left"><a href="javascript:showHelp()"><em class="icon ion-help-circled icon-lg" data-localization-token="helpBtnTooltip"></em></a></li> <li class="pull-left dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><em class="icon ion-earth icon-lg" data-localization-token="languageBtnTooltip"></em> <span class="caret"></span></a> <ul class="dropdown-menu" role="menu"> <li><a href="javascript:setLanguage('no')"><img src="/Images/flag_no.png" alt="" /> <span data-localization-token="langNo"></span></a></li> <li><a href="javascript:setLanguage('en')"><img src="/Images/flag_en.png" alt="" /> <span data-localization-token="langEn"></span></a></li> </ul> </li> <li class="pull-left" id="loginBtn"> <a href="/User/GeoIdLogin"><em class="glyphicon glyphicon-lock"></em> <span>Logg inn</span></a> </li> </ul> </div> <div class="pull-left" id="left-toolbar"> <ul class="nav navbar-collapse navbar-nav navbar-expand-sm"> <li class="mobile-hide"><a href="javascript:map.showPreviousExtent()" style="padding-right:5px;"><em class="icon ion-arrow-left-a icon-lg" data-localization-token="prevExtentBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="prevExtentBtnCollapseText"></span></a></li> <li class="mobile-hide"><a href="javascript:map.showNextExtent()"><em class="icon ion-arrow-right-a icon-lg" data-localization-token="nextExtentBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="nextExtentBtnCollapseText"></span></a></li> <li class="mobile-only" id="searchContainerMobile"></li> <li class="mobile-collapse-behaviour"><a href="javascript:getGeoLocation()"><em class="icon ion-pinpoint icon-lg" data-localization-token="myPosBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="myPosBtnCollapseText"></span></a></li> <li class="mobile-only mobile-collapse-behaviour"><a href="javascript:map.toggleMeasurementPanel()"><em class="icon ion-edit icon-lg" data-localization-token="measureBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="measureBtnCollapseText"></span></a></li> <li class="mobile-only"><a href="javascript:showPermalinkModal()"><em class="glyphicon glyphicon-link" data-localization-token="permalinkBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="permalinkBtnText"></span></a></li> <li class="mobile-only" id="wmsLayersMenu"> <a href="#extraLayersSelectCollapse" data-toggle="collapse" role="button" aria-expanded="false"> <em class="icon icon-layers"></em> <span class="caret pull-right"></span> <span class="menuCollapseText" data-localization-token="layersBtnText"></span> </a> <ul id="extraLayersSelectCollapse" class="collapse list-group collapse-menu extraLayers" role="menu"> <!-- Dynamic items --> </ul> </li> <li class="mobile-hide"> <a href="#" data-toggle="dropdown" role="button" aria-expanded="false"><em class="icon ion-map icon-lg" data-localization-token="mapCoordSysBtnTooltip"></em> <span class="caret pull-right"></span> <span class="menuCollapseText" data-localization-token="mapCoordSysBtnCollapseText"></span></a> <ul class="collapse dropdown-menu" role="menu"> <li class="mobile-collapse-behaviour" data-coordsys-utm="32"><a href="javascript:map._changeUTMZone(32)">Euref89 UTM32</a></li> <li class="mobile-collapse-behaviour" data-coordsys-utm="33"><a href="javascript:map._changeUTMZone(33)">Euref89 UTM33</a></li> <li class="mobile-collapse-behaviour" data-coordsys-utm="35"><a href="javascript:map._changeUTMZone(35)">Euref89 UTM35</a></li> </ul> </li> <li class="mobile-only"> <a href="#coordinateSystemSelectCollapse" data-toggle="collapse" role="button" aria-expanded="false"><em class="icon ion-map icon-lg" data-localization-token="mapCoordSysBtnTooltip"></em> <span class="caret pull-right"></span> <span class="menuCollapseText" data-localization-token="mapCoordSysBtnCollapseText"></span></a> <ul id="coordinateSystemSelectCollapse" class="collapse list-group collapse-menu" role="menu"> <li class="mobile-collapse-behaviour" data-coordsys-utm="32"><a class="list-group-item list-group-item-action" href="javascript:map._changeUTMZone(32)">Euref89 UTM32</a></li> <li class="mobile-collapse-behaviour" data-coordsys-utm="33"><a class="list-group-item list-group-item-action" href="javascript:map._changeUTMZone(33)">Euref89 UTM33</a></li> <li class="mobile-collapse-behaviour" data-coordsys-utm="35"><a class="list-group-item list-group-item-action" href="javascript:map._changeUTMZone(35)">Euref89 UTM35</a></li> </ul> </li> <li class="mobile-only"> <a href="#languageSelectCollapse" data-toggle="collapse" role="button" aria-expanded="false"> <em class="icon ion-earth icon-lg" data-localization-token="languageBtnTooltip"></em> <span class="caret pull-right"></span> <span class="menuCollapseText" data-localization-token="languageBtnText"></span> </a> <ul id="languageSelectCollapse" class="collapse list-group collapse-menu" role="menu"> <li><a class="list-group-item list-group-item-action" href="javascript:setLanguage('no')"><img src="/Images/flag_no.png" alt="" /> <span data-localization-token="langNo"></span></a></li> <li><a class="list-group-item list-group-item-action" href="javascript:setLanguage('en')"><img src="/Images/flag_en.png" alt="" /> <span data-localization-token="langEn"></span></a></li> </ul> </li> <li class="mobile-hide"><a href="javascript:map.toggleMeasurementPanel()"><em class="icon ion-edit icon-lg" data-localization-token="measureBtnTooltip"></em><span class="caret pull-right"></span><span class="menuCollapseText" data-localization-token="measureBtnCollapseText"></span> </a></li> <li class="mobile-hide"><a href="javascript:togglePrintPanel()"><em class="icon ion-printer icon-lg" data-localization-token="printBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="printBtnCollapseText"></span></a></li> <li class="mobile-hide"><a href="javascript:map.toggleTimeline()"><em class="icon ion-clock icon-lg" data-localization-token="timelineBtnTooltip"></em> <span class="caret"></span> <span class="menuCollapseText" data-localization-token="timelineBtnCollapseText"></span></a></li> <li class="mobile-hide" id="btn3d"><a href="javascript:open3DMap('3D')"><strong>3D</strong></a></li> <li class="mobile-only"><a href="https://uustatus.no/nb/erklaringer/publisert/fde14c83-d931-486d-90d2-8e0432aace5e" target="_blank"><em class="icon ion-man icon-lg" data-localization-token="accessibilityTooltip"></em> <span class="menuCollapseText" data-localization-token="accessibilityText"></span></a></li> <li class="mobile-only mobile-collapse-behaviour"><a href="javascript:map.showAbout(true)"><em class="icon ion-information-circled icon-lg" data-localization-token="aboutBtnTooltip"></em> <span class="menuCollapseText" data-localization-token="aboutBtnText"></span></a></li> <!--<li id="btn3d"><a href="javascript:open3DMap('3D_L15')"><strong>3D</strong> L15</a></li> <li id="btn3d"><a href="javascript:open3DMap('3D_L16')"><strong>3D</strong> L16</a></li> <li id="btn3d"><a href="javascript:open3DMap('3D_L17')"><strong>3D</strong> L17</a></li> <li id="btn3d"><a href="javascript:open3DMap('3D_L17_01')"><strong>3D</strong> L17_01</a></li>--> </ul> </div> </div> <div id="nibMap"> <style> .stdcolor { color: #658B6F; } .form-group { font-size: 12px !important; } span.limiter:after { background-color: #658B6F; content: ""; display: inline-block; height: 1px; position: relative; vertical-align: middle; width: 100%; left: 0.5em; margin-right: -50%; overflow-x: hidden; } </style> <script type="text/javascript"> var map; var language; var compactViewLimit = 990; var isMobile = mobileCheck(); var rightSidebarVisible = true // default var rightSidebarAvailable = true // default var showProjectsInsideMapExtentScaleLimit = 150000; var pictureMapLayerScaleLimit = 300000; // visning av enkeltbilder var userRole = ''; var isSuperUser = false; var mapExtentProjectTimeout; var mapExtentProjectWaitSec = 4; var geoLocationScale = 14; // scale when going to geoloc var deferredPWAPrompt; var resizeTimeout; var projectlist; var aktivesoek = false; $(function () { initSmallScreenBehaviour(); var _lang = docCookies.getItem("language") || "no"; if (_lang !== "no" && _lang !== "en") { _lang = "no" } $.getJSON(webappPath + "Languages/" + _lang + ".json", function (_lang) { language = _lang; _initSidePanels(); _translatePage(); // Fetch new baat token every 10 minutes setTimeout(function () { setInterval(function () { refreshBaatToken(); }, 600000); }, 600000); // Fetch new WMS ticket every 10 minutes setTimeout(function () { setInterval(function () { refreshNibWMSTicket(); }, 600000); }, 600000); require(["nib/NIBMap", "dojo/domReady!"], function (Map) { map = new Map({ settings: nib.settings, gdoToken: 'lr_G1RDNUPGpaAo3U3xupb0l3PljwK84mmJRggicitUkckJyMddYZvTDxQqI_bRx9qzT2LvodQbfU420ZJdP7g..', cacheToken: 'DC7B306974772059BCF81D4D313817F11F7D9A3291350D90AF1D34FDBEDDAFC92B2D511E795D455867CD623FFE30AA192AE428E5136A72E08D018F0853CD0DA1', topo2WMSTicket: '', nibWMSTicket: 'C12J7EL8L', nibToken: 'ALoVFdWK-3_SQgyStM4X6-GPeD29Mo4-H8K3QI6MXktNIsDTPSizhflzd_0iX7-Z', language: _lang, agsSubDomain: 'services', agsCacheSubDomain: 'tilecache', shortlivedTokenUrl: '/Home/GetShortLivedToken?TokenPrefix=', s3ArchiveBucket: 'nibarkiv' }, "map"); _initMapLayersTab(); map.on("mapExtentChange", function (ext) { var mapScale = map.getScale(); if (rightSidebarVisible) { // update list of projects inside current map extent if (_getSoekstatus() || mapScale <= showProjectsInsideMapExtentScaleLimit) { $('#projectResultList').html("<img src='/Images/loading_small.gif'/>"); var _timeout = mapExtentProjectTimeout ? mapExtentProjectWaitSec*1000 : 0; if (mapExtentProjectTimeout) clearTimeout(mapExtentProjectTimeout); mapExtentProjectTimeout = setTimeout(function () { let queryParams = _getSoekstatus ? { queryExtent: true, ortosearch: $("#orthophotoSearch").val() } : { queryExtent: true }; map.getProjectList(queryParams).then(function (res) { if (res.features.length > 0) { projectlist = res.features; res.features = map.sortFeaturesByDate(res.features, true); var categorizedFeatures = map.sortFeaturesByPhotoType(res.features); if (aktivesoek) { _filterProjectList(); //_resizeRightBottomPanel(); initPhotoTypeHideAndShowBehavior(); } else { map.getProjectListHTMLStripped(categorizedFeatures, function (html) { $('#projectResultList').html(html); //_resizeRightBottomPanel(); initPhotoTypeHideAndShowBehavior(); }); } } else { $('#projectResultList').html(map.lang("popupProjectNoHits")); } }); }, _timeout); } else { var msg = map.lang("showAtScale") + " > 1:" + showProjectsInsideMapExtentScaleLimit; $('#projectResultList').html(msg); } } enablePictureLayerTree(mapScale); // enable/disable based on current map scale map.updateTimeline(); updatePageUrlIfApplicable(); }); //reviewerFilters = new ReviewerFilters(); //$("#orthophotoSearchProjectName").on("change", function () { // reviewerFilters.addAttributeFilter("PROSJEKTNAVN", parseInt(chkbox.value)); //}); map.on("visibleProjectsChange", function () { updatePageUrlIfApplicable(); }); map.on("visibleLayersChange", function () { updatePageUrlIfApplicable(); }); }); }); $('#permalinkInput').focus(function () { $(this).select(); }).click(function () { $(this).select(); }); $('#helpModal').on('shown.bs.modal', function () { $(this).find('iframe').attr('src', 'help/'); }); //$(document).on('shown.bs.tab', '#rightSlidePanel .nav-tabs a[data-toggle="tab"]', function (e) { // _resizeRightBottomPanel(); //}) //$(window).resize(_resizeRightBottomPanel); //$('#rightSlideTopPanel').resize(_resizeRightBottomPanel); $(document).on('shown.bs.tab', 'a[data-toggle="tab"]', function (e) { var target = $(e.target).attr("href") // activated tab if (target === "#orthophotosearchDel") { $("#rightSlideBottomPanel").removeClass("hidden"); if ($("#collapseFilter").hasClass('show')) { $('#rightSlideTopPanel').css('height', "30%"); $('#rightSlideBottomPanel').css('height', "70%"); } else { $('#rightSlideTopPanel').css('height', "110px"); $('#rightSlideBottomPanel').css('height', "calc(100% - 110px)"); } } if (target === "#layers" || target === "#last") { if (!$("#rightSlideBottomPanel").hasClass('hidden')) { $('#rightSlideTopPanel').css('height', "100%"); $("#rightSlideBottomPanel").addClass("hidden"); } } }); }); function initSmallScreenBehaviour() { // window resize / orientation change $(window).resize(function (e) { updateSmallScreenBehaviour(); if (isMobile) { $(".navbar-collapse").removeClass("collapse"); } else { if ($(window).width() >= compactViewLimit) { $(".navbar-collapse").removeClass("collapse"); } else { $(".navbar-collapse").addClass("collapse"); } $(".navbar-collapse").removeClass("in"); $(".navbar.navbar-default.navbar-fixed-top").css("width", "auto"); } }); window.addEventListener("orientationchange", function () { if (!isMobile) { // mobile doesn't need this var isLandscape = Math.abs(window.orientation) === 90; if (isLandscape) { var navbarCollapse = $('.navbar-collapse')[0]; $(navbarCollapse).removeClass("in"); $(navbarCollapse).addClass("collapse"); } } }, false); if (isMobile) { // add to home screen window.addEventListener("beforeinstallprompt", function (e) { e.preventDefault(); // Prevent Chrome 67 and earlier from automatically showing the prompt deferredPWAPrompt = e; $("#a2hsPrompt").show(); var a2hsBtn = $("#a2hsPrompt .btn.ok"); a2hsBtn.on("click", addToHomeScreen); }); // register a dummy service worker so we get beforeinstallprompt if ('serviceWorker' in navigator) { navigator.serviceWorker.register('./sw.js'); } } updateSmallScreenBehaviour(); // trigger once } function updateSmallScreenBehaviour() { isMobile = mobileCheck(); var compactView = $(window).width() < compactViewLimit; rightSidebarVisible = !compactView && !isMobile; // hide right panel for pads and phones rightSidebarAvailable = !isMobile; // reset: $("body").removeClass("mobile"); $(".navbar.navbar-fixed-top").removeClass("collapse width") $(".navbar-fixed-top .mobile-collapse-behaviour").off("click"); if (isMobile) { $("body").addClass("mobile"); $(".navbar.navbar-fixed-top").addClass("collapse width"); $(".navbar-fixed-top .mobile-collapse-behaviour").on("click", function () { $(".navbar-fixed-top").collapse("hide"); }); } else if (compactView) { $(".navbar-collapse").removeClass("collapse").addClass("collapse"); } if (map && map.updateSmallScreenBehaviour) { map.updateSmallScreenBehaviour(); } } function enablePictureLayerTree(mapScale) { // disable/enable picture map layer selection var pictureLayerEnabled = mapScale <= pictureMapLayerScaleLimit; map.togglePictureOutlines(pictureLayerEnabled); // toggle map layer on/off $('#pictureOutlineTree input[type=checkbox]').prop("disabled", !pictureLayerEnabled); // disable/enable checkboxes (for visual effect only) var _maskId = "pictureLayerTreeMask"; if (pictureLayerEnabled) { $('#' + _maskId).remove(); } else if ($('#' + _maskId).length == 0) { // add mask div to prevent mouse clicks on tree (if it not already exists) var mask = "<div id='" + _maskId + "' style='position: absolute; top: 0; left: 0; margin-left: 25px; width: 80%; height: 100%; background-color: #ffffff; opacity: 0.3'>"; $('#pictureOutlineTree').prepend(mask); } } //function _resizeRightBottomPanel() { // var parentHeight = $('#rightSlideBottomPanel').parent().height(); // var bottomHeadingHeight = $('#rightSlideBottomPanel div:first-child').height(); // var topHeight = $('#rightSlideTopPanel').height(); // var bottomHeight = parentHeight - topHeight - bottomHeadingHeight; // if (bottomHeight > 0) { // $('#rightSlideBottomPanel').css('height', bottomHeight); // } //} function fireSokFunksjon() { var mapScale = map.getScale(); if (mapScale <= showProjectsInsideMapExtentScaleLimit) { $('#projectResultList').html("<img src='/Images/loading_small.gif'/>"); var _timeout = mapExtentProjectTimeout ? mapExtentProjectWaitSec * 1000 : 0; if (mapExtentProjectTimeout) clearTimeout(mapExtentProjectTimeout); mapExtentProjectTimeout = setTimeout(function () { map.getProjectList({ queryExtent: true }).then(function (res) { if (res.features.length > 0) { projectlist = res.features; res.features = map.sortFeaturesByDate(res.features, true); var categorizedFeatures = map.sortFeaturesByPhotoType(res.features); map.getProjectListHTMLStripped(categorizedFeatures, function (html) { $('#projectResultList').html(html); initPhotoTypeHideAndShowBehavior(); }); } else { $('#projectResultList').html(map.lang("popupProjectNoHits")); } }); }, _timeout); } else { var msg = map.lang("showAtScale") + " > 1:" + showProjectsInsideMapExtentScaleLimit; $('#projectResultList').html(msg); } }; function _initSidePanels() { if (rightSidebarAvailable) { $('#rightSlidePanel').BootSideMenu({ side: "right", autoClose: !rightSidebarVisible // auto close when page loads }); } $('#leftSlidePanel').BootSideMenu({ side: "left", autoClose: true // auto close export gui when page loads }); //if (rightSidebarVisible) { // var _container = $('#rightSlidePanel .toggler').parent(); // _onSidebarAnimation("right", _container.width(), "closed"); //} } function _getSoekstatus() { return ($("#orthophotoSearch").length > 0 && $("#orthophotoSearch").val().trim() != "" && $("#orthophotoSearch").val().trim() != null); }; function _showRasterLayerInfo() { var infoPanel = $('#infopanel_'); var _currentDisplay = $(infoPanel).css("display"); var _display = _currentDisplay == "none" ? "block" : "none"; // toggle $(infoPanel).css("display", _display); } function _initMapLayersTab() { // Kartlag: WMS var wmsLayersHtml = "<div class='col' style='margin: 10px;'><div id='extraLayers' class='extraLayers'><label style='width: -webkit-fill-available;font-weight: bold;' class='stdcolor'>" + "<span class='limiter'>" + language['WMSLayersHeading'] + "</span>" + "</label>"; $(nib.settings.extraLayers.layers).each(function (idx, layer) { var _layerCheckbox = "<div>&nbsp;<input type='checkbox' data-layer-idx='" + idx + "' id='layer_" + idx + "' onchange='map.toggleExtraLayer([\"" + layer.name.join("\",\"") + "\"], this.checked, false)' /> <label for='layer_" + idx + "'>" + layer.alias + "</label></div>"; wmsLayersHtml += _layerCheckbox; }); $(nib.settings.matrikkelLayers.layers).each(function (idx, layer) { var ind = (idx + nib.settings.extraLayers.layers.length); var _layerCheckbox = "<div>&nbsp;<input type='checkbox' data-layer-idx='" + ind + "' id='layer_" + ind + "' onchange='map.toggleExtraLayer([\"" + layer.name.join("\",\"") + "\"], this.checked, true)' /> <label for='layer_" + ind + "'>" + layer.alias + "</label><a href='javascript:_showRasterLayerInfo()'><i class='glyphicon glyphicon-info-sign' style='margin-left: 5px;'></i></a></div>" + "<div id='infopanel_' style='display:none;margin-top:10px;'>" + "<small><img width='20px;' src='/Images/ED-Nmaal.PNG'/>Eiendomsgrense - N酶yaktige m氓linger</small><br>" + "<small><img width='20px;' src='/Images/ED-MdNT.PNG'/>Eiendomsgrense - Middels n酶yaktig og transm氓linger</small><br>" + "<small><img width='20px;' src='/Images/ED-MiNMTK.PNG'/>Eiendomsgrense - Mindre n酶yaktig m氓linger og TK</small><br>" + "<small><img width='20px;' src='/Images/ED-MiNGOEK.PNG'/>Eiendomsgrense - Mindre n酶yaktige grenser og 脴K</small><br>" + "<small><img width='20px;' src='/Images/ED-LNG.PNG'/>Eiendomsgrense - Lite n酶yaktige grenser</small><br>" + "<small><img width='20px;' src='/Images/ED-SkN.PNG'/>Eiendomsgrense - Skissen酶yaktighet</small><br>" + "<small><img width='20px;' src='/Images/Ug-Nmaal.PNG'/>Uavklart grense - N酶yaktige m氓linger</small><br>" + "<small><img width='20px;' src='/Images/Ug-MdNT.PNG'/>Uavklart grense - Middels n酶yaktig og transm氓linger</small><br>" + "<small><img width='20px;' src='/Images/Ug-MiNMTK.PNG'/>Uavklart grense - Mindre n酶yaktig m氓linger og TK</small><br>" + "<small><img width='20px;' src='/Images/Ug-MiNGOEK.PNG'/>Uavklart grense - Mindre n酶yaktige grenser og 脴K</small><br>" + "<small><img width='20px;' src='/Images/Ug-LNG.PNG'/>Uavklart grense - Lite n酶yaktige grenser</small><br>" + "<small><img width='20px;' src='/Images/Ug-SkN.PNG'/>Uavklart grense - Skissen酶yaktighet</small><br>" + "<small><img width='20px;' src='/Images/HLF.PNG'/>Hjelpelinje fiktiv</small><br>" + "<small><img width='20px;' src='/Images/HLP.PNG'/>Hjelpelinje punktfeste</small><br>" + "<small><img width='20px;' src='/Images/HLV.PNG'/>Hjelpelinje vegkant</small><br>" + "<small><img width='20px;' src='/Images/HLVk.PNG'/>Hjelpelinje vannkant</small><br>" + "<small><img width='20px;' src='/Images/MatNr.PNG'/>Matrikkelnummer</small><br>" + "</div>"; wmsLayersHtml += _layerCheckbox; }); wmsLayersHtml += "</div></div>"; $('#rightSlidePanel #layers #wmsLayers').html(wmsLayersHtml); // Mobile? if (isMobile) { // Kartlag: WMS var itemsHtml = ""; $(nib.settings.extraLayers.layers).each(function (idx, layer) { itemsHtml += [ "<li><a class='list-group-item list-group-item-action' href='#'>", " <label class='mobileCheckbox' for='layer_" + idx + "'><input type='checkbox' data-layer-idx='" + idx + "' id='layer_" + idx + "' onchange='map.toggleExtraLayer([\"" + layer.name.join("\",\"") + "\"], this.checked, false)' /> " + layer.alias + "</label>", "</a></li>" ].join("\n"); }); $(nib.settings.matrikkelLayers.layers).each(function (idx, layer) { var ind = (idx + nib.settings.extraLayers.layers.length); itemsHtml += [ "<li><a class='list-group-item list-group-item-action' href='#'>", " <label class='mobileCheckbox' for='layer_" + ind + "'><input type='checkbox' data-layer-idx='" + ind + "' id='layer_" + ind + "' onchange='map.toggleExtraLayer([\"" + layer.name.join("\",\"") + "\"], this.checked, true)' /> " + layer.alias + "</label>", "</a></li>" ].join("\n"); }); $('#wmsLayersMenu ul').html(itemsHtml); // we need to prevent the menu from collapsing when changing layers so we override the li a click: $('#wmsLayersMenu ul li input, #wmsLayersMenu ul li label').on("click", function (e) { e.stopPropagation(); var cb = $(this).parent().find("input"); if ($(e.target).prop("tagName") === "INPUT") { // click on the actual input btn, just trigger change: cb.change(); } else { e.preventDefault(); cb.prop("checked", !cb.prop("checked")).change(); } }); } // Kartlag: prosjekt-/bildeomriss var projectLayersHtml = "<div class='col' style='margin: 10px;'><label style='width: -webkit-fill-available;font-weight: bold;'><span class='limiter stdcolor'>" + language['ProjectLayersHeading'] + "</span></label>"; projectLayersHtml += "<div id='projectOutlineTree'><ul><li id='allProjectOutlines'>" + language['ProjectLayersAllProjects'] + "<ul>"; for (key in nib.settings.ortophotoTypesNew) { projectLayersHtml += "<li id='projectOutlineCB_" + key + "'>" + nib.settings.ortophotoTypesNew[key] + "</li>"; } projectLayersHtml += "</ul></li></ul></div>"; projectLayersHtml += "<div id='pictureOutlineTree' style='position: relative;'><ul><li id='allPictureOutlines'>" + language['ProjectLayersAllPictures'] + "<ul>"; for (key in nib.settings.ortophotoTypesNew) { projectLayersHtml += "<li id='pictureOutlineCB_" + key + "'>" + nib.settings.ortophotoTypesNew[key] + "</li>"; } projectLayersHtml += "</ul></li></ul></div>"; projectLayersHtml += "<div id='plannedProjectTree' style='position: relative;'><ul><li id='plannedProjects'>" + language['WMSPlannedProjects'] + "<ul>"; projectLayersHtml += "<li id='plannedProjectsOmlopCB_' > Oml酶p</li>"; projectLayersHtml += "<li id='plannedProjectsGeovekstCB_' > Geovekst</li>"; projectLayersHtml += "</ul></li></ul></div></div>"; $('#rightSlidePanel #layers #projectLayers').html(projectLayersHtml); var jsTreeConf = { plugins: ["checkbox", "realcheckboxes"], core: { animation: false, themes: { icons: false, dots: false } } }; // Prosjektomriss $('#projectOutlineTree').jstree(jsTreeConf).on("changed.jstree", function (e, data) { var orthoTypes = []; $(data.selected).each(function (idx, value) { if (value.indexOf("_") > -1) { orthoTypes.push(value.substring(17)); // parse type id (id='projectOutlineCB_X') } }); map.showProjectOutlines(orthoTypes); }); // Bildeomriss $('#pictureOutlineTree').jstree(jsTreeConf).on("changed.jstree", function (e, data) { var orthoTypes = []; $(data.selected).each(function (idx, value) { if (value.indexOf("_") > -1) { orthoTypes.push(value.substring(17)); // parse type id (id='pictureOutlineCB_X') } }); map.showPictureOutlines(orthoTypes); }); // PlanlagteProsjekter $('#plannedProjectTree').jstree(jsTreeConf).on("changed.jstree", function (e, data) { map.togglePlannedProjectsOmlopLayer(data.selected.indexOf("plannedProjectsOmlopCB_") != -1) map.togglePlannedProjectsGeovekstLayer(data.selected.indexOf("plannedProjectsGeovekstCB_") != -1) }); enablePictureLayerTree(pictureMapLayerScaleLimit + 1); // will disable it at startup } function _onSidebarAnimation(sidebarSide, containerWidth, sidebarStatus) { var _padding = sidebarStatus == 'closed' ? containerWidth : 0; var _delay = sidebarStatus == 'closed' ? 400 : 0; // because of animation setTimeout(function () { // adjust map left/right padding so it will not overlap with sidebars $('#nibMap').css("margin-" + sidebarSide, _padding); if (map) map.resizeMap(); }, _delay); if (sidebarSide == "left" && map) { // Export GUI open/close setExportVisible(sidebarStatus == "closed"); } else if (sidebarSide == "right") { rightSidebarVisible = sidebarStatus == "closed"; } } function _translatePartial(id) { var test = __translate($("#" + id + " [data-localization-token]")); return test; } function _translatePage() { __translate($("[data-localization-token]")); } function __translate(localizationTokens) { $(localizationTokens).each(function () { var token = $(this).data('localizationToken'); var trans = typeof language[token] != 'undefined' ? language[token] : token; if (token.toLowerCase().indexOf('placeholder') > -1) $(this).attr('placeholder', trans); else if (token.toLowerCase().indexOf('tooltip') > -1) $(this).attr('title', trans); else $(this).html(trans); }); } function setLanguage(language) { docCookies.setItem("language", language); location.reload(); } function _getPermalink(forceHttps) { var _level = map.getZoomLevel(); var _center = map.getCenterPoint(); var _utmZone = map.utmZone; var _projectIDs = map.visibleProjects.join(); var _wmsLayers = _getWMSCheckedLayers(); var _plannedProjectsOmlop = map.isPlannedProjectsOmlopVisible() ? 1 : 0; var _plannedProjectsGeovekst = map.isPlannedProjectsGeovekstVisible() ? 1 : 0; var _protocol = forceHttps && location.hostname != "localhost" ? "https:" : location.protocol; return _protocol + "//" + location.host + webappPath + "?x=" + Math.round(_center.x) + "&y=" + Math.round(_center.y) + "&level=" + _level + "&utm=" + _utmZone + "&projects=" + _projectIDs + "&layers=" + _wmsLayers.join() + "&plannedOmlop=" + _plannedProjectsOmlop+ "&plannedGeovekst=" + _plannedProjectsGeovekst; } function _getWMSCheckedLayers() { var _wmsLayers = []; $('.extraLayers input:checked').each(function () { var layerIdx = $(this).data('layer-idx'); _wmsLayers.push(layerIdx); }); $('.matrikkelLayers input:checked').each(function () { var layerIdx = $(this).data('layer-idx'); _wmsLayers.push(layerIdx); }); return _wmsLayers; } function showPermalinkModal() { var _url = _getPermalink(); $('#permalinkInput').val(_url); $('#sendPermalinkAlert').removeClass("alert alert-danger").html(""); // clear previous error $('#permalinkModal').modal('show'); $('#permalinkInput').select(); } function updatePageUrl() { if (history.replaceState) { var newurl = this._getPermalink() history.replaceState({ path: newurl }, '', newurl); } } function updatePageUrlIfApplicable() { if (isMobile) { // on mobile we constantly update the browser url so that the page can be shared this.updatePageUrl(); } } function togglePrintPanel() { var show = $('#printPanel').css("visibility") != "visible"; map.closeTopPanels(); map.showPrint(show); /*if ($('#printPanel').css("visibility") == "visible") { map.showPrint(false); } else { map.showPrint(true); //TODO - hide both right- and leftsidepanel $('#leftslidePanel').prop("data-status", "closed"); // ????? }*/ } /*function generatePrint() { $('#printPanel').css("visibility", "hidden"); //TODO - implement call to GP tool }*/ function showUserModal() { $('#userModal').modal('show'); $.ajax({ url: '/User/Profile', cache: false, success: function (viewData) { $('#userProfilePanel').html(viewData); // populate partial view _translatePartial("userProfilePanel"); } }); } function showLoginModal() { $('#loginModal').modal('show'); } function refreshBaatToken() { $.ajax({ url: '/Home/GetBaatToken', cache: false, success: function (token) { map.refreshBackgroundLayer(token); } }); } function refreshNibWMSTicket() { $.ajax({ url: '/Home/GetNibWMSTicket', cache: false, success: function (ticket) { map.refreshExtraLayers(ticket); } }); } function _doLogin() { $('#loginSpinner').html("<img src='/Images/loading_small.gif'/>"); $.ajax({ type: 'POST', cache: false, url: "/User/Login", data: $('#loginForm').serialize(), async: true, success: function (res) { if (res.success) { _loginResult(res); } else { $('#loginErrAlert').addClass("alert alert-danger").html(res.error); $('#loginSpinner').html(''); } return; }, error: function (res) { $('#loginErrAlert').addClass("alert alert-danger").html(res.error); $('#loginSpinner').html(''); } }); return; } function _doLoginKey(event) { if (event.keyCode === 13) { _doLogin(); return false; } } function _loginResult(res) { var _cred = $('#userName').val() + ";" + $('#loginPassword').val(); $.ajax({ async: false, url: "/Home/GetEnk", data: { cred: _cred }, type: 'POST', success: function (result) { var _exp = 60 * 60 * 6; // 6 hours docCookies.setItem("token", result, _exp, null, null, true); } }); location.href = _getPermalink(true); } function _sendPermalink() { $.ajax({ type: 'post', url: "Home/SendPermalink", data: $('#permalinkForm').serialize(), success: function (res) { if (res.success) $('#permalinkModal').modal('hide'); else $('#sendPermalinkAlert').addClass("alert alert-danger").html(res.error); } }); } function showMessageModal() { var msgLink = _getPermalink(); $('#MsgPermalink').val(_getPermalink()); //Sets permalink in hidden field var info = detectBrowserAndOS(); //$('#MsgBrowser').val(navigator.appName+" vers: " + navigator.appVersion); //Sets users browser var msgLink = info.browserName + " " + info.version; $('#MsgBrowser').val(info.browserName + " " + info.version); //Sets users browser var msgOs = info.os; $('#MsgOS').val(info.os); //Sets users OS. $('#messageModal').modal({ show: true, keyboard: false, // Make sure the modal doesn't close when clicking outside of it backdrop: 'static' // Make sure the modal doesn't close when clicking outside of it }); $.ajax({ url: '/User/Message', data: $('#userMessageForm').serialize(), success: function (viewData) { $('#userMessagePanel').html(viewData); // populate partial view _translatePartial("userMessagePanel"); $('#MsgPermalink').val(_getPermalink()); //Sets permalink in hidden field var info = detectBrowserAndOS(); //$('#MsgBrowser').val(navigator.appName+" vers: " + navigator.appVersion); //Sets users browser var msgLink = info.browserName + " " + info.version; $('#MsgBrowser').val(info.browserName + " " + info.version); //Sets users browser var msgOs = info.os; $('#MsgOS').val(info.os); //Sets users OS. $('#sendMsgAlert').removeClass("alert alert-danger").html(""); $('#sendMsgAlertEmail').removeClass("alert alert-danger").html(""); $('#sendMsgSuccess').removeClass("alert alert-success").html(""); } }); } function _sendMessage() { var valid = _validateMsgInput(); if (valid) { $('#sendMsgAlert').removeClass("alert alert-danger").html(""); $('#sendMsgAlertEmail').removeClass("alert alert-danger").html(""); $.ajax({ type: 'POST', url: "/User/SendMessage", data: $('#userMessageForm').serialize(), success: function (res) { if (res.success) { $('#sendMsgAlert').addClass("alert alert-success").html(language["userMsgSentOk"]); window.setTimeout(function () { $('#messageModal').modal('hide'); }, 4000); } else { $('#sendMsgAlert').addClass("alert alert-danger").html(res.error); } } }); } else { $('#sendMsgAlert').addClass("alert alert-danger").html(language["userMsgInputError"]); } } function _validateMsgInput() { //check if not empty input values var valid = true; if (($("#Msg").val().length === 0) || ($("#Name").val().length === 0) || ($("#MsgType").val().length === 0) || $("#Email").val().length === 0) { // check values not null valid = false; } return valid; } function showHelp() { var winWidth = $(window).width(); var width = Math.min(winWidth, 900) + 'px'; var height = '600px'; var helpDialog = new BootstrapDialog({ message: '<iframe src="./help/index.htm" style="width: 100%; height: ' + height + '; border: none;"></iframe>', draggable: true, animate: false //title: '<h4 style="color: #333333;">Om l酶sningen</h4>' }); helpDialog.realize(); helpDialog.getModalHeader().css('background-color', '#ffffff'); helpDialog.getModalHeader().css('padding', '5px 15px 0px'); helpDialog.getModalBody().css('padding', '0px 2px'); helpDialog.getModalDialog().css('width', width); // Midlertidig link til webservices-dok: //helpDialog.getModalHeader().append("<span><a href='/Dok/Webtjenester.pdf' target='_blank'>Dokumentasjon webtjenester</a></span>"); helpDialog.open(); } function _searchProjects() { var searchExtent = false; if ($("#kartutsnitt-tab").hasClass('active')) { searchExtent = true; } if (searchExtent == true || searchExtent === "True") { $('#projectResultList').html("<img src='../Images/loading.gif'>"); } else { $('#projectResultHele').html("<img src='../Images/loading.gif'>"); } if (map) { var queryparams = { ortosearch: $("#orthophotoSearch").val(), fromYear: $("#orthophotoSearchFromYear").val(), toYear: $("#orthophotoSearchToYear").val(), projectName: $("#orthophotoSearchProjectName").val(), coverNum: $("#orthophotoSearchCoverNum").val(), type: $("#selectOrthophotoType").val(), eier: $("#eiersearch").val(), flyfirma: $("#flyfirmasearch").val(), opploesning: $("#opploesningsearch").val(), queryExtent: searchExtent }; map.getProjectList(queryparams).then(function (results) { if (results.features.length > 0) { results.features = map.sortFeaturesByDate(results.features, true); projectlist = results.features; if (aktivesoek) { _filterProjectList(); } else { map.getProjectListHTMLStripped(results.features, function (html) { $("#loadingDiv").addClass('hidden'); if (searchExtent == true || searchExtent === "True") { $('#projectResultList').html(html); } else { $('#projectResultHele').html(html); } }); } } else { if (searchExtent == true || searchExtent === "True") { $('#projectResultList').html(map.lang("noHits")); } else { $('#projectResultHele').html(map.lang("noHits")); } } }); $("#clearSearch").removeClass("hidden"); $("#collapseFilter").removeClass("hidden"); } } function _clearSearchProjects(fromYear, toYear) { $('#rightSlideTopPanel').css('height', "110px"); $('#rightSlideBottomPanel').css('height', "calc(100% - 110px)"); $("#orthophotoSearchFromYear").val(fromYear); $("#orthophotoSearchToYear").val(toYear); $("#orthophotoSearch").val(""); //$("#orthophotoSearchCoverNum").val(""); $("#selectOrthophotoType").val(""); $("#eiersearch").val(""); $("#opploesningsearch").val(""); $("#orthophotoSearchProjectName").val(""); $("#flyfirmasearch").val(""); //$("#orthophotosearch_cb").prop('checked', false); $("#projectResultList").html(""); $("#projectResultHele").html(""); map.clearAllProjects(); $("#clearSearch").addClass("hidden"); $("#collapseFilter").addClass("hidden"); $("#filtericon") .removeClass("glyphicon-chevron-down") .addClass("glyphicon-chevron-right"); if ($("#collapseFilter").hasClass('show')) { $("#collapseFilter").removeClass("show"); } aktivesoek = false; if (!$("#innisoekvar").hasClass('hidden')) { $("#innisoekvar").addClass("hidden"); } if (!$("#helesoekvar").hasClass('hidden')) { $("#helesoekvar").addClass("hidden"); } if ($("#kartutsnitt-tab").hasClass('active')) { fireSokFunksjon(); } //$("#orthophotoSearch").attr({ "title": getLanguage("searchButtonPlaceholder") }); } function _searchLastProjects() { $.ajax( { url: '/GeoRSS/GetRSSAsJson', cache: false, success: function (features) { if (features == 'null') { $("#lastProjectsList").html('...'); } else if (map) { map.getProjectListHTMLStripped(JSON.parse(features), function (html) { $("#lastProjectsList").html(html); //_resizeRightBottomPanel(); }); } } }); } // get the user location + pan to it. Optionally disable error msg function getGeoLocation(disableErrorMsg) { if (disableErrorMsg === undefined) disableErrorMsg = false; if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(onGeoLocationSuccess, disableErrorMsg ? undefined : onGeoLocationError); } else { if (!disableErrorMsg) { onGeoLocationError() } } } function onGeoLocationSuccess(pos) { map.showGeoPosition(pos.coords.latitude, pos.coords.longitude, geoLocationScale) } function onGeoLocationError() { this.showLocationErrorMsg() } function hideSearchErrorMsg() { $('#userMsgSearch').hide() } function showLocationErrorMsg() { $('#userMsgLocation').show() } function hideLocationErrorMsg() { $('#userMsgLocation').hide() } function hideAddToHomeScreenMsg() { $('#a2hsPrompt').hide() } function _sjekkSoekfunksjon() { var ortosearch = $("#orthophotoSearch").val(); if (ortosearch) { _searchProjects(); } } function _filterProjectList() { aktivesoek = true; var result = projectlist; var searchExtent = false; var mapScale = map.getScale(); var message = ""; if ($("#kartutsnitt-tab").hasClass('active')) { searchExtent = true; }; //if (searchExtent) { // $('#projectResultList').html("<img src='../Images/loading.gif'>"); //} else { // $('#projectResultHele').html("<img src='../Images/loading.gif'>"); //} var year = new Date().getFullYear(); var fromDateFilter = parseInt($("#orthophotoSearchFromYear").val()); var toDateFilter = parseInt($("#orthophotoSearchToYear").val()); if (fromDateFilter > 1900 || toDateFilter < year) { result = result.filter(x => x.attributes.aar >= fromDateFilter && x.attributes.aar <= toDateFilter); message += " > Fra 氓r:" + fromDateFilter + " til 氓r:" + toDateFilter; } var eierFilter = $("#eiersearch").val(); if (eierFilter) { result = result.filter(x => x.attributes.eier.toLowerCase().includes(eierFilter.toLowerCase())); message += " > Eier:" + eierFilter; } var opploesningFilter = $("#opploesningsearch").val(); if (opploesningFilter) { result = result.filter(x => x.attributes.pixelstorrelse.includes(opploesningFilter)); message += " > Oppl酶sning:" + opploesningFilter; } var prosjektNavnFilter = $("#orthophotoSearchProjectName").val(); if (prosjektNavnFilter) { result = result.filter(x => x.attributes.prosjektnavn.toLowerCase().includes(prosjektNavnFilter.toLowerCase())); message += " > Prosjektnanv:" + prosjektNavnFilter; } var flyFirmaFilter = $("#flyfirmasearch").val(); if (flyFirmaFilter) { result = result.filter(x => x.attributes.flyfirma.toLowerCase().includes(flyFirmaFilter.toLowerCase())); message += " > Flyfirma:" + flyFirmaFilter; } var ortophotoTypeFilter = $("#selectOrthophotoType").val(); if (ortophotoTypeFilter) { result = result.filter(x => x.attributes.ortofototype == ortophotoTypeFilter); message += " > Type:" + nib.settings.ortophotoTypesNew[ortophotoTypeFilter]; } if (message.length > 0) { if (searchExtent) { if ($("#innisoekvar").hasClass('hidden')) { $("#innisoekvar").removeClass("hidden"); } $('#innisoekvar').html(message); } else { if ($("#helesoekvar").hasClass('hidden')) { $("#helesoekvar").removeClass("hidden"); } $('#helesoekvar').html(message); } } else { if (searchExtent) { if (!$("#innisoekvar").hasClass('hidden')) { $("#innisoekvar").addClass("hidden"); } $('#innisoekvar').html(message); } else { if (!$("#helesoekvar").hasClass('hidden')) { $("#helesoekvar").addClass("hidden"); } $('#helesoekvar').html(message); } } if (result.length > 0) { map.getProjectListHTMLStripped(result, function (html) { if (searchExtent) { $('#projectResultList').html(html); //_resizeRightBottomPanel(); initPhotoTypeHideAndShowBehavior(); } else { $('#projectResultHele').html(html); } }); } else { if (searchExtent) { $('#projectResultList').html(map.lang("noHits")); } else { $('#projectResultHele').html(map.lang("noHits")); } } $("#loadingDiv").addClass('hidden'); } function refreshExportListModal() { $('#exportListPanel').html("<img src='../Images/loading.gif'>"); $.ajax({ url: '/Export/GetExportList', success: function (viewData) { $('#exportListPanel').html(viewData); // populate partial view _translatePartial("exportListPanel"); } }); } function open3DMap(config) { var width = '95%'; var height = ((window.innerHeight * 0.95) - 75) + "px"; var mapLevel = map.getZoomLevel(); //var mapCenter = map.getCenterPoint(); var mapExtent = map.getExtent(); var wkid = map.getSpatialReference().wkid; //map.getLatLon(mapCenter).then(function (res) { var mapDialog = new BootstrapDialog({ //message: '<iframe src="/Map3D?lat=' + res[0].y + '&lon=' + res[0].x + '&level=' + mapLevel + '" style="width: 100%; height: ' + height + '; border: none;"></iframe>', message: '<iframe src="/Map3D?config=' + config + '&xmin=' + Math.round(mapExtent.xmin) + '&ymin=' + Math.round(mapExtent.ymin) + '&xmax=' + Math.round(mapExtent.xmax) + '&ymax=' + Math.round(mapExtent.ymax) + '&wkid=' + wkid + '" style="width: 100%; height: ' + height + '; border: none;"></iframe>', draggable: false, animate: false, title: '<h4 style="color: #333333;">3D</h4>' }); mapDialog.realize(); mapDialog.getModalHeader().css('background-color', '#ffffff'); mapDialog.getModalHeader().css('padding', '5px 15px 0px'); mapDialog.getModalBody().css('padding', '0px 2px'); mapDialog.getModalDialog().css('width', width); mapDialog.open(); //}); } function addToHomeScreen() { if (deferredPWAPrompt !== undefined) { hideAddToHomeScreenMsg(); deferredPWAPrompt.prompt(); // Show the prompt } } function initPhotoTypeHideAndShowBehavior() { collapseAndHide(); $('.side.satellitePhotoHeader').click(function () { $('.side.satellitePhoto').toggle(); if ($(this).find('span:visible').hasClass('glyphicon-chevron-down')) { $('.side.satellitePhotoHeader .glyphicon-chevron-up').show(); $('.side.satellitePhotoHeader .glyphicon-chevron-down').hide(); } else if ($(this).find('span:visible').hasClass('glyphicon-chevron-up')) { $('.side.satellitePhotoHeader .glyphicon-chevron-down').show(); $('.side.satellitePhotoHeader .glyphicon-chevron-up').hide(); } }); $('.side.aircraftPhotoHeader').click(function () { $('.side.aircraftPhoto').toggle(); if ($(this).find('span:visible').hasClass('glyphicon-chevron-down')) { $('.side.aircraftPhotoHeader .glyphicon-chevron-up').show(); $('.side.aircraftPhotoHeader .glyphicon-chevron-down').hide(); } else if ($(this).find('span:visible').hasClass('glyphicon-chevron-up')) { $('.side.aircraftPhotoHeader .glyphicon-chevron-down').show(); $('.side.aircraftPhotoHeader .glyphicon-chevron-up').hide(); } }); } function collapseAndHide() { $('.side.satellitePhoto').toggle(); $('.side.satellitePhotoHeader .glyphicon-chevron-down').show(); $('.side.satellitePhotoHeader .glyphicon-chevron-up').hide(); } $('.myTab a').click(function () { $(this).tab('show'); }) function _updateSokeresultat(sjekk) { document.getElementById("orthophotosearch_cb").value = sjekk; _searchProjects(); } function getLanguage(token) { if (language !== undefined) { return language[token]; } } </script> <div id="map"></div> <div id="userMsgSearch" style="display: none;" class="alert-danger top-msg"><span data-localization-token="coordinateErrorMsg"></span><a href="javascript: hideSearchErrorMsg();" class="close" aria-label="close">&times;</a></div> <div id="userMsgLocation" style="display: none;" class="alert-danger top-msg"><span data-localization-token="userLocationErrorMsg"></span><a href="javascript: hideLocationErrorMsg();" class="close" aria-label="close">&times;</a></div> <div id="a2hsPrompt" style="display: none;" class="alert-clear bottom-msg"><div data-localization-token="addToHomeScreenMsg"></div><div class="button-container"><a data-localization-token="addToHomeScreenConfirmMsg" class="btn btn-info ok"></a><a href="javascript: hideAddToHomeScreenMsg();" class="btn btn-danger btn-sm">&times;</a></div></div> <div id="rightSlidePanel"> <div style="height: 30px; float: left;"> <ul class="nav nav-tabs" id="sidehovedtab"> <li class="nav-item"><a class="nav-link active" href="#orthophotosearchDel" data-toggle="tab" data-localization-token="orthophotoSearchDel"></a></li> <li class="nav-item"><a class="nav-link" href="#layers" data-toggle="tab" data-localization-token="mapLayers"></a></li> <li class="nav-item"><a class="nav-link" href="#last" data-toggle="tab" onclick="javascript:_searchLastProjects();" data-localization-token="lastProjects"></a></li> </ul> </div> <div style="height: 100%; padding-top: 30px;"> <div id="rightSlideTopPanel" style="height:110px; overflow-y: auto; overflow-x: hidden;"> <div class="tab-content"> <div class="tab-pane active" id="orthophotosearchDel"> <script type="text/javascript"> $(function () { $('#datepicker').datepicker({ format: "yyyy", startView: 1, minViewMode: 2, language: "no", autoclose: true }); }); function checkEnterKeyPress(e) { if (e.keyCode == 13) { // enter _searchProjects(); } } function doneTyping() { var searchExtent = false; if ($("#kartutsnitt-tab").hasClass('active')) { searchExtent = true; }; if (searchExtent) { $('#projectResultList').html("<img src='../Images/loading.gif'>"); } else { $('#projectResultHele').html("<img src='../Images/loading.gif'>"); } _filterProjectList(); } $('#accordionDel').collapse({ toggle: false }) $('#accordionDel').on('hidden.bs.collapse', function () { // do something... }) $("#orthophotoSearchFromYear, #orthophotoSearchToYear, #selectOrthophotoType").on("change", function () { _filterProjectList(); }); $(document).ready(function () { $(".headingFilter").hover( function () { $(this).addClass('shadow').css('cursor', 'pointer'); }, function () { $(this).removeClass('shadow'); } ); $("#orthophotoSearch").attr({ "title": getLanguage("searchButtonPlaceholder") }); // Set tooltip for search input field every time user types $("#orthophotoSearch").on("keydown", function () { setTimeout(function () { if ($("#orthophotoSearch").val()) { $("#orthophotoSearch").attr({ "title": $("#orthophotoSearch").val() }); } else { $("#orthophotoSearch").attr({ "title": getLanguage("searchButtonPlaceholder") }); } }, 200); }); }); $(document).ready(function () { var typingTimer; var doneTypingInterval = 1000; $('#eiersearch, #opploesningsearch, #orthophotoSearchProjectName, #flyfirmasearch').keyup(function () { clearTimeout(typingTimer); typingTimer = setTimeout(doneTyping, doneTypingInterval); }); $('.collapse') .on('shown.bs.collapse', function () { if (!$("#collapseFilter").hasClass('hidden')) { $('#rightSlideTopPanel').css('height', "30%"); $('#rightSlideBottomPanel').css('height', "70%"); $("#filtericon") .removeClass("glyphicon-chevron-right") .addClass("glyphicon-chevron-down"); } else { if ($("#collapseFilter").hasClass('show')) { $('#rightSlideTopPanel').css('height', "110px"); $('#rightSlideBottomPanel').css('height', "calc(100% - 110px)"); $("#collapseFilter").removeClass("show"); } } }) .on('hidden.bs.collapse', function () { $('#rightSlideTopPanel').css('height', "110px"); $('#rightSlideBottomPanel').css('height', "calc(100% - 110px)"); $("#filtericon") .removeClass("glyphicon-chevron-down") .addClass("glyphicon-chevron-right"); }); }); </script> <div class="container"> <div class="row"> <div class="col" style="margin: 10px;"> <div class="input-group" role="group" style="display:inline-flex;"> <input type="text" class="form-control" data-localization-token="searchButtonPlaceholder" onkeypress="checkEnterKeyPress(event)" id="orthophotoSearch" /> <div class="input-group-append"> <button class="btn btn-outline-secondary" type="button" data-localization-token="searchButton" onclick="_searchProjects();"> <em class="glyphicon glyphicon-search"></em> </button> </div> </div> </div> </div> <div class="row"> <div class="col" style="margin: 10px;"> <div class="accordion" id="accordionDel"> <div class="card"> <div class="card-header container-fluid"> <span class="align-self-start" type="button" data-toggle="collapse" data-target="#collapseFilter" aria-expanded="true" aria-controls="collapseFilter" style="text-align:left; color:#658B6F" id="headingFilter"> <em class="glyphicon glyphicon-chevron-right" id="filtericon"></em> Filter </span> <button type="button" id="clearSearch" class="btn btn-outline-secondary btn-sm pull-right hidden" data-localization-token="clearButton" onclick="_clearSearchProjects(1900, 2024);" style="margin-top: -5px;" /> </div> <div id="collapseFilter" class="collapse hidden" aria-labelledby="headingFilter" data-parent="#accordionDel" style="margin-top: 10px;"> <div class="card-body"> <div class="form-group"> <div class='stdcolor'> 脜rstall <span class='limiter'></span> </div> <div class="col"> <span class="input-daterange input-group" id="datepicker"> <input id="orthophotoSearchFromYear" type="text" class="input-sm form-control" name="start" value="1900" /> <span class="input-group-addon">-</span> <input id="orthophotoSearchToYear" type="text" class="input-sm form-control" name="end" value="2024" /> </span> </div> </div> <div class="form-group"> <div class='stdcolor'> Eier <span class='limiter'></span> </div> <div class="col"> <input id="eiersearch" type="text" class="input-sm form-control" name="eiersearch" value="" /> </div> </div> <div class="form-group"> <div class='stdcolor'> Oppl酶sning <span class='limiter'></span> </div> <div class="col"> <input id="opploesningsearch" type="text" class="input-sm form-control" name="opploesningsearch" value="" /> </div> </div> <div class="form-group"> <div class='stdcolor'> <span class='limiter' data-localization-token="orthophotoSearchProjectName"></span> </div> <div class="col"> <input id="orthophotoSearchProjectName" type="text" class="input-sm form-control" name="orthophotoSearchProjectName" value="" /> </div> </div> <div class="form-group"> <div class='stdcolor'> <span class='limiter' data-localization-token="Flyfirma"></span> </div> <div class="col"> <input id="flyfirmasearch" type="text" class="input-sm form-control" name="flyfirmasearch" value="" /> </div> </div> <div class="form-group"> <div class='stdcolor'> Type <span class='limiter'></span> </div> <div class="col" id="tdOrthoPhotoType"> <script type="text/javascript"> var orthophotoSearchTypeDropdown = "<select id='selectOrthophotoType' class='form-control'>"; orthophotoSearchTypeDropdown += "<option id='' value='' data-localization-token='orthophotoChooseAll'/>"; for (key in nib.settings.ortophotoTypesNew) { orthophotoSearchTypeDropdown += "<option id='' value='" + key + "'>" + nib.settings.ortophotoTypesNew[key] + "</option>"; } orthophotoSearchTypeDropdown += "</select>"; $(tdOrthoPhotoType).html(orthophotoSearchTypeDropdown); </script> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="tab-pane" id="layers"> <div id="projectLayers"> <img src="/Images/loading_small.gif" alt="Laster inn" /> </div> <div id="wmsLayers"></div> </div> <div class="tab-pane" id="last"> <div> <div style="padding: 8px 10px 0 0;"> <label data-localization-token="listLastProjectsHeading"></label> <span style="float: right;"> <a href="/api/GeoRSS/Feed" target="_blank"><img src="/Images/rss.png" alt="RSS" data-localization-token="rssLinkTooltip" /></a> </span> </div> <div id="lastProjectsList"> <img src="/Images/loading_small.gif" alt="Laster inn" /> </div> </div> </div> </div> </div> <input type="hidden" id="orthophotosearch_cb" value="true"/> <div id="rightSlideBottomPanel" style="height:calc(100% - 110px);"> <ul class="nav nav-tabs nav-fill" id="myTab" role="tablist"> <li class="nav-item"> <a class="nav-link active" id="kartutsnitt-tab" data-toggle="tab" href="#kartutsnitt" role="tab" aria-controls="kartutsnitt" aria-selected="true" data-localization-token="projectsInsideMapExtent" onclick="_sjekkSoekfunksjon();">Innenfor kartutsnitt</a> </li> <li class="nav-item"> <a class="nav-link" id="helenorge-tab" data-toggle="tab" href="#helenorge" role="tab" aria-controls="helenorge" aria-selected="false" data-localization-token="projectsAllOfNorway" onclick="_sjekkSoekfunksjon();">Hele Norge</a> </li> </ul> <div class="tab-content" style="height:calc(100% - 30px); overflow-y:auto; overflow-x:hidden;"> <div class="tab-pane active" id="kartutsnitt" role="tabpanel" aria-labelledby="kartutsnitt-tab"> <div id="innisoekvar" class="hidden" role="alert"></div> <hr /> <div id="projectResultList"> <img src="/Images/loading_small.gif" alt="Laster inn" /> </div> </div> <div class="tab-pane" id="helenorge" role="tabpanel" aria-labelledby="helenorge-tab"> <div id="helesoekvar" class="hidden" role="alert"></div> <hr /> <div id="projectResultHele"> </div> </div> </div> </div> </div> </div> <div id="loginModal" class="modal"> <div class="modal-dialog" style="max-width: 300px"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title" data-localization-token="loginHeading"></h4> </div> <div class="modal-body"> <div id="loginErrAlert"></div> <form id="loginForm"> <input name="__RequestVerificationToken" type="hidden" value="CfDJ8AK5j6paNYFDhMTeNjck85vIpfB29pFaLba-V8vm-7AvdxCuMVDlDf5zmkXQeczBa-6c-yrolpHzaz0AFmO2cG82P8ju2IIwXVfrYmL8S3CMg2pTGO8zCb-PMPCgVAEJmYlnvfcCngo8xnZY8kgZroM" /> <div class="input-group"> <span class="input-group-addon"><em class="glyphicon glyphicon-user"></em></span> <input type="text" class="form-control" name="Username" id="userName" onkeydown="return _doLoginKey(event)" required data-localization-token="usernamePlaceholder"> </div> <div class="input-group" style="margin-top: 5px;"> <span class="input-group-addon"><em class="glyphicon glyphicon-lock"></em></span> <input type="password" class="form-control" name="Password" id="loginPassword" onkeydown="return _doLoginKey(event)" required data-localization-token="passwordPlaceholder"> </div> <div style="float: right"> <br /> <span id="loginSpinner"></span> <button type="button" class="btn btn-primary" onclick="_doLogin()" data-localization-token="loginButton"></button> </div> </form> <div style="clear: both"></div> </div> <div class="modal-footer" style="margin-top: 0"> <div style="font-size: 11px; text-align: left"> <strong style="color:red;">NB! Geoid er oppdatert 13.12.2022. Passord m氓 tilbakestilles for 氓 f氓 tilgang.</strong><br /> Dette kan gj酶res p氓: <a href="https://auth2.geoid.no/realms/geoid/login-actions/reset-credentials">auth.geoid.no</a><br /><br /> Det er kun parter i Norge digitalt og forhandlere som f氓r tilgang til nedlastingstjenesten.<br /> <strong style="color:red;">NB! Ny p氓loggingsl酶sning for Norge i Bilder! Autentisering av brukere skjer n氓 gjennom Geoid.</strong><br /> Det betyr at om du har en BAAT bruker fra f酶r, m氓 du overf酶re brukeren til Geoid f酶rste gang f酶r du logger p氓. Gj酶r dette ved 氓 f酶lge lenken her: <a href="https://baat.geonorge.no/baat2geoid/">baat.geonorge.no/baat2geoid/</a><br /> Dersom du 酶nsker 氓 registrere deg som bruker, kan du gj酶re dette her:<br /> <a href="https://www.geonorge.no/NDUserForm/">www.geonorge.no/NDUserForm/</a><br /> Ved p氓loggingsproblemer, kontakt Norge digitalt sektretariatet p氓 e-post: <a href="mailto:post@norgedigitalt.no">post@norgedigitalt.no</a><br /><br /> Ved glemt passord kan du g氓 her: <a href="https://auth2.geoid.no/realms/geoid/login-actions/reset-credentials">auth.geoid.no</a> </div> </div> </div> </div> </div> <div id="permalinkModal" class="modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" data-localization-token="permalinkBoxHeading"></h4> </div> <div class="modal-body"> <div id="sendPermalinkAlert"></div> <form id="permalinkForm"> <input name="__RequestVerificationToken" type="hidden" value="CfDJ8AK5j6paNYFDhMTeNjck85vIpfB29pFaLba-V8vm-7AvdxCuMVDlDf5zmkXQeczBa-6c-yrolpHzaz0AFmO2cG82P8ju2IIwXVfrYmL8S3CMg2pTGO8zCb-PMPCgVAEJmYlnvfcCngo8xnZY8kgZroM" /> <div class="input-group"> <span class="input-group-addon"><em class="glyphicon glyphicon-link"></em></span> <input type="url" class="form-control" name="Permalink" required id="permalinkInput"> </div> <br /> <div data-localization-token="sendPermalinkEmailLabel"></div> <div class="input-group" style="margin-top: 5px;"> <span class="input-group-addon"><em class="glyphicon glyphicon-envelope"></em></span> <input type="email" class="form-control" name="Email" data-localization-token="EmailAddressPlaceholder" required> </div> </form> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" data-localization-token="sendMailButton" onclick="_sendPermalink()"></button> <button type="button" class="btn btn-default" data-dismiss="modal" data-localization-token="closeButton"></button> </div> </div> </div> </div> <div id="messageModal" class="modal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title" data-localization-token="userMsgHeading"></h4> </div> <div class="modal-body" id="userMessagePanel"> <img src="/Images/loading.gif" alt="Laster inn" /> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="_sendMessage()" data-localization-token="sendMailButton"></button> <button type="button" class="btn btn-default" data-dismiss="modal" data-localization-token="cancelButton"></button> </div> </div> </div> </div> <div class="rounded-icon hamburger-map-icon" data-toggle="collapse" data-target=".navbar-fixed-top"> <em class="glyphicon glyphicon-menu-hamburger"></em> </div> <div class="mobile-collapse-overlay"> </div> </div> <script type="text/javascript"> //Google Analytics (function (i, s, o, g, r, a, m) { i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { (i[r].q = i[r].q || []).push(arguments) }, i[r].l = 1 * new Date(); a = s.createElement(o), m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga'); ga('create', 'UA-67735531-1', 'auto'); ga('send', 'pageview'); //End Google Analytics </script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10