diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6fdf0a09ad2671b6ff0f96cc30754bfbebac3914..4680f1cb4e3a3bcb5874daa07be76b93e96b475a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,8 @@ image: alpine:latest stages: - - test - deploy -test-job: - stage: test - script: - - echo "Testing files exist..." - - test -f public/index.html - - test -f public/main.js - - test -f public/settings.js - - test -f public/assets/css/style.css - - test -f public/assets/css/mobile.css - - test -f public/assets/images/header.jpg - - test -f public/assets/images/hft_logo.svg - - test -f public/home/index.html - - echo "Test finished, all ok" - only: - - master - pages: stage: deploy script: diff --git a/public/assets/css/mobile.css b/public/assets/css/mobile.css deleted file mode 100644 index b6b8e856857a3a14c0eaa7b3b9219a5148865176..0000000000000000000000000000000000000000 --- a/public/assets/css/mobile.css +++ /dev/null @@ -1,91 +0,0 @@ -@media only screen and (max-width : 800px) { - - .content { - padding-left: 5%; - padding-right: 5%; - } - - nav { - background-color: rgba(16, 16, 16, 0.8); - height: auto; - padding: 0; - position: absolute; - right: -40%; - top: 20px; - width: 40%; - margin: 0; - z-index: 1000; - transition: right 0.4s; - } - - nav ul { - flex-direction: column; - } - - nav li { - display: block; - padding-top: 10px; - padding-bottom: 10px; - margin-top: 10px; - margin-bottom: 10px; - } - - nav a { - font-size: 0.8em; - } - - nav a:hover { - border-bottom: unset; - padding-bottom: unset; - } - - .hamburger { - display: none; - flex-direction: column; - justify-content: space-between; - width: 40px; - height: 40px; - background-color: rgba(16, 16, 16, 0.8); - margin-top: 20px; - padding: 8px; - transition: margin-right 0.4s; - } - - .line { - background-color: white; - height: 2px; - } - - .slide-nav { - right: 0; - } - - .slide-hamburger { - margin-right: 40%; - } - - .overflow-visible{ - overflow: visible; - } - - .logo{ - width: 80px; - height: 80px; - margin-left: 8vw; - } - - -} - -@media only screen and (max-width : 400px) { - - #projectlogo img{ - width: 50px; - } - - #projectname { - font-size: 12px; - } - - -} \ No newline at end of file diff --git a/public/assets/css/style.css b/public/assets/css/style.css deleted file mode 100644 index 1a2bf18d017fcf01b9d14f4954e5ece4662177c8..0000000000000000000000000000000000000000 --- a/public/assets/css/style.css +++ /dev/null @@ -1,244 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); - -* { - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - font-family: 'Roboto', sans-serif; -} - -h1 { - margin-top: 1.5em; -} - -p { - margin-top: 1.25em; -} - -.content{ - padding-left: 25%; - padding-right: 25%; -} - -.content ul { - list-style-image: url(../images/list.png); -} - -.content img { - max-width: 100%; -} - -header { - position: relative; - width: 100%; - height: 43.2vw; - background: url(../images/header.jpg); - background-size: contain; - background-repeat: no-repeat; - display: flex; - flex-direction: column; - justify-content: space-between; - overflow: hidden; -} - -.row { - display: flex; - flex-direction: row; - width: 100%; - justify-content: space-between; -} - -nav { - margin-top: 20px; - margin-right: 5vw; - letter-spacing: .8px; -} - -nav ul { - list-style: none; - margin: 8px; - padding: 0; - display: flex; - flex-wrap: wrap; -} -nav li { - display: inline-block; - padding: 0 20px; - margin-top: 20px; -} - -nav a { - text-decoration: none; - text-transform: uppercase; - font-size: 14px; - font-weight: 700; - color: #fff; - text-shadow: 0 1px 4px rgba(0,0,0,.4); - border-bottom: 5px solid transparent; - padding-bottom: 5px; -} - -nav a:hover { - border-bottom: 5px solid gray; - transition: border-bottom-color 0.5s; -} - -.footer { - margin-top: 3em; - background-image: linear-gradient(45deg, #a999a0, #ded9d6); -} - -.logo{ - width: 120px; - height: 120px; - margin-left: 8vw; -} - -.footer-participants-container { - display: flex; - justify-content: space-evenly; - flex-wrap: wrap; - padding-left: 20px; - padding-right: 20px; - padding-top: 60px; - padding-bottom: 60px; -} - -.participant { - display: flex; - flex-direction: column; - align-items: center; -} - -.participant-avatar { - width: 120px; - height: 120px; - overflow: hidden; - border-radius: 50%; - background-color: white; - box-shadow: 0px 3px 8px 0px #00000069; - margin-left: 40px; - margin-right: 40px; - margin-top: 40px; - margin-bottom: 10px; -} - -.participant-avatar img { - width: 100%; - margin: auto; -} - -.participant-social { - margin-top: 10px; -} - -.social { - margin-left: 3px; - margin-right: 3px; -} - -.footer-logo-container { - display: flex; - justify-content: flex-end; - flex-wrap: wrap; - padding-left: 20px; - padding-right: 20px; - padding-top: 60px; - padding-bottom: 60px; -} - -.footer-logo { - width: 80px; - height: 80px; - overflow: hidden; - border-radius: 25%; - background-color: white; - display: flex; - box-shadow: 0px 2px 6px 0px #00000069; - margin-right: 20px; - margin-top: 40px; -} - -.footer-logo a { - display: flex; -} - -.footer-logo img { - width: 80%; - margin: auto; -} - -#projectlogo { - text-align: center; - margin-top: auto; -} - -#projectlogo img{ - max-width: 300px; - width: 16%; -} - -#projectname { - font-weight: 700; - color: #fff; - text-align: center; - font-size: 4vw; - margin-bottom: 6vw; -} - -.hamburger { - display: none; -} - -.legal { - display: flex; - align-items: center; - flex-wrap: wrap; - background-color: #252525; - padding: 10px 80px; -} - -.legal-text-container { - display: flex; - flex-wrap: wrap; - flex: 1; - justify-content: center; -} - -.legal-text { - color: #c5c5c5; - font-size: 0.8em; - margin-right: 20px; - text-decoration: none; -} - -.top { - display: flex; - align-items: center; - opacity: 0.8; -} - -.top a { - display: inline-block; - line-height: 0; -} - -.top:hover { - opacity: 1; -} - -audio { - width: 100%; -} - -.video-container { - width: 100%; -} - -.video-container iframe { - width: 100%; - max-width: 560px; -} \ No newline at end of file diff --git a/public/assets/images/avatar.png b/public/assets/images/avatar.png deleted file mode 100644 index a031c19a06eda950fce6bcd91a2d21ccde6822ce..0000000000000000000000000000000000000000 Binary files a/public/assets/images/avatar.png and /dev/null differ diff --git a/public/assets/images/charlotte.jpg b/public/assets/images/charlotte.jpg deleted file mode 100644 index 2d12c5b5ea58daa4db3cf3522f9f7b5b16af6c8d..0000000000000000000000000000000000000000 Binary files a/public/assets/images/charlotte.jpg and /dev/null differ diff --git a/public/assets/images/facebook.png b/public/assets/images/facebook.png deleted file mode 100644 index 716d2fc91942580a3bf585b582340e7cce157942..0000000000000000000000000000000000000000 Binary files a/public/assets/images/facebook.png and /dev/null differ diff --git a/public/assets/images/header.jpg b/public/assets/images/header.jpg deleted file mode 100644 index 13ed9f40c2c684801a7a5ed8e9e80eb36fb6ee93..0000000000000000000000000000000000000000 Binary files a/public/assets/images/header.jpg and /dev/null differ diff --git a/public/assets/images/hft_logo.svg b/public/assets/images/hft_logo.svg deleted file mode 100644 index fabcd528fd48e367d7e591ff883554b33ddd7c65..0000000000000000000000000000000000000000 --- a/public/assets/images/hft_logo.svg +++ /dev/null @@ -1,184 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 23.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - viewBox="0 0 166.2 166.2" style="enable-background:new 0 0 166.2 166.2;" xml:space="preserve"> -<style type="text/css"> - .st0{clip-path:url(#SVGID_2_);} - .st1{fill:#D90F15;opacity:0.8} - .st2{enable-background:new ;} - .st3{fill:#FFFFFF;} -</style> -<g id="Group_1316" transform="translate(-140)"> - <g id="Group_519" transform="translate(140)"> - <g> - <defs> - <rect id="SVGID_1_" width="166.2" height="166.2"/> - </defs> - <clipPath id="SVGID_2_"> - <use xlink:href="#SVGID_1_" style="overflow:visible;"/> - </clipPath> - <g id="Group_518" class="st0"> - <g id="Path_371"> - <path class="st1" d="M-8.3-6.6v180.7h184.9V-6.6H-8.3z"/> - </g> - </g> - </g> - </g> - <g class="st2"> - <path class="st3" d="M157.5,44.6V26.7h1.2V35h11.2v-8.3h1.2v17.9h-1.2v-8.4h-11.2v8.4H157.5z"/> - <path class="st3" d="M180.2,31.3c0.3,0,0.6,0,0.9,0.1c0.3,0.1,0.7,0.2,1.1,0.3c0.4,0.1,0.7,0.3,1.1,0.6s0.6,0.5,0.9,0.9 - s0.5,0.8,0.6,1.3c0.2,0.5,0.2,1.1,0.2,1.8v3.7c0,0.1,0,0.4,0,0.7c0,0.3-0.1,0.6-0.2,1c-0.1,0.4-0.2,0.7-0.4,1.1s-0.5,0.7-0.8,1.1 - c-0.4,0.3-0.8,0.6-1.4,0.8c-0.6,0.2-1.2,0.3-2,0.3c-0.8,0-1.5-0.1-2-0.3c-0.6-0.2-1-0.5-1.4-0.8c-0.4-0.3-0.6-0.7-0.8-1.1 - c-0.2-0.4-0.4-0.8-0.4-1.1c-0.1-0.4-0.2-0.7-0.2-1c0-0.3,0-0.5,0-0.7v-3.7c0-0.7,0.1-1.3,0.3-1.8c0.2-0.5,0.4-0.9,0.7-1.3 - c0.3-0.4,0.6-0.7,0.9-0.9c0.3-0.2,0.7-0.4,1.1-0.6c0.4-0.1,0.7-0.2,1.1-0.3C179.6,31.4,179.9,31.3,180.2,31.3z M180.2,32.6 - c-0.3,0-0.7,0.1-1.1,0.2c-0.4,0.1-0.8,0.3-1.2,0.6c-0.4,0.3-0.7,0.6-1,1.1c-0.3,0.5-0.4,1.1-0.4,1.8v3.7c0,0.1,0,0.3,0,0.5 - c0,0.2,0.1,0.5,0.1,0.8c0.1,0.3,0.2,0.6,0.3,0.9c0.2,0.3,0.4,0.6,0.6,0.8c0.3,0.2,0.6,0.4,1,0.6c0.4,0.2,0.9,0.2,1.5,0.2 - c0.6,0,1.1-0.1,1.5-0.2c0.4-0.2,0.8-0.4,1-0.6c0.3-0.2,0.5-0.5,0.6-0.8c0.1-0.3,0.3-0.6,0.3-0.9c0.1-0.3,0.1-0.5,0.1-0.8 - c0-0.2,0-0.4,0-0.5v-3.7c0-0.5-0.1-0.9-0.2-1.3c-0.1-0.4-0.3-0.7-0.5-1c-0.2-0.3-0.4-0.5-0.7-0.7c-0.3-0.2-0.5-0.3-0.8-0.4 - c-0.3-0.1-0.5-0.2-0.8-0.2C180.6,32.6,180.4,32.6,180.2,32.6z"/> - <path class="st3" d="M196.8,32.9h-3.7c-0.1,0-0.2,0-0.4,0c-0.2,0-0.4,0-0.7,0.1c-0.3,0.1-0.5,0.2-0.8,0.3 - c-0.3,0.1-0.5,0.3-0.8,0.6c-0.2,0.2-0.4,0.6-0.6,0.9c-0.2,0.4-0.2,0.8-0.2,1.4v4.3c0,0.2,0,0.3,0,0.6c0,0.2,0,0.4,0.1,0.7 - s0.1,0.5,0.2,0.7c0.1,0.2,0.2,0.4,0.4,0.6c0.2,0.2,0.4,0.3,0.7,0.4c0.3,0.1,0.6,0.2,1,0.2c0.2,0,0.4,0,0.7,0 - c0.2,0,0.5-0.1,0.8-0.1c0.3-0.1,0.5-0.1,0.8-0.2c0.3-0.1,0.5-0.1,0.7-0.2c0.6-0.2,1.1-0.4,1.7-0.6l0.4,1.1 - c-0.6,0.2-1.2,0.4-1.8,0.6c-0.3,0.1-0.5,0.2-0.8,0.2c-0.3,0.1-0.6,0.1-0.8,0.2c-0.3,0.1-0.6,0.1-0.8,0.1c-0.3,0-0.5,0.1-0.8,0.1 - c-0.6,0-1.1-0.1-1.5-0.2c-0.4-0.2-0.8-0.4-1-0.6c-0.3-0.3-0.5-0.5-0.6-0.9c-0.2-0.3-0.3-0.6-0.3-1c-0.1-0.3-0.1-0.6-0.1-0.9 - c0-0.3,0-0.6,0-0.8v-4.3c0-0.8,0.1-1.4,0.3-1.9c0.2-0.5,0.5-0.9,0.8-1.3c0.3-0.3,0.7-0.6,1-0.8c0.4-0.2,0.7-0.3,1.1-0.4 - c0.3-0.1,0.6-0.1,0.9-0.1c0.3,0,0.4,0,0.5,0h3.7V32.9z"/> - <path class="st3" d="M200.5,44.6V26.7h1.2V33c0.2-0.1,0.5-0.2,0.7-0.3c0.3-0.1,0.5-0.2,0.8-0.3c0.3-0.1,0.5-0.2,0.7-0.3 - c0.2-0.1,0.4-0.2,0.5-0.2c0.3-0.1,0.5-0.2,0.7-0.2c0.2-0.1,0.4-0.1,0.6-0.2c0.2,0,0.4-0.1,0.5-0.1c0.2,0,0.3,0,0.5,0 - c0.6,0,1.2,0.1,1.6,0.4c0.4,0.3,0.7,0.6,1,1c0.2,0.4,0.4,0.8,0.5,1.3c0.1,0.4,0.1,0.8,0.1,1.2v9.4h-1.2v-9.4c0-0.2,0-0.5-0.1-0.8 - c-0.1-0.3-0.2-0.6-0.3-0.9c-0.1-0.3-0.3-0.5-0.6-0.7c-0.3-0.2-0.6-0.3-1-0.3c-0.5,0-1.2,0.1-1.9,0.4c-0.2,0.1-0.4,0.2-0.7,0.3 - c-0.3,0.1-0.6,0.2-0.9,0.4c-0.3,0.1-0.6,0.3-0.9,0.4s-0.5,0.2-0.7,0.3v10.3H200.5z"/> - <path class="st3" d="M213.6,42.6c0.2,0.1,0.4,0.2,0.7,0.3c0.3,0.1,0.6,0.3,1,0.4c0.4,0.1,0.8,0.2,1.2,0.3c0.5,0.1,1,0.1,1.5,0.1 - c0.6,0,1.2-0.1,1.6-0.2c0.5-0.1,0.8-0.3,1.1-0.5c0.3-0.2,0.5-0.5,0.6-0.8c0.1-0.3,0.2-0.7,0.2-1.1c0-0.4-0.1-0.7-0.2-0.9 - c-0.1-0.3-0.3-0.5-0.6-0.7s-0.6-0.4-1-0.5c-0.4-0.2-1-0.3-1.6-0.4c-0.9-0.2-1.6-0.5-2.2-0.7c-0.6-0.2-1-0.5-1.4-0.8 - c-0.3-0.3-0.6-0.6-0.7-1c-0.1-0.4-0.2-0.8-0.2-1.3c0-1.1,0.4-2,1.1-2.6c0.7-0.6,1.8-0.9,3.1-0.9c1,0,1.9,0.1,2.6,0.2 - c0.7,0.1,1.2,0.3,1.6,0.4l-0.4,1.1c-0.2-0.1-0.5-0.1-0.7-0.2c-0.2-0.1-0.5-0.1-0.8-0.2c-0.3-0.1-0.6-0.1-1-0.1c-0.4,0-0.8,0-1.3,0 - c-1,0-1.8,0.2-2.3,0.6c-0.5,0.4-0.7,1-0.7,1.8c0,0.4,0.1,0.7,0.2,0.9c0.1,0.2,0.3,0.5,0.6,0.7c0.3,0.2,0.6,0.4,1.1,0.5 - c0.5,0.2,1,0.3,1.7,0.5c0.8,0.2,1.5,0.4,2.1,0.6c0.6,0.2,1,0.4,1.4,0.7c0.3,0.3,0.6,0.6,0.7,1c0.2,0.4,0.2,0.9,0.2,1.4 - c0,1.2-0.4,2.1-1.2,2.7c-0.8,0.6-2,1-3.6,1c-0.6,0-1.2,0-1.7-0.1s-1-0.2-1.4-0.3c-0.4-0.1-0.8-0.3-1.1-0.4 - c-0.3-0.1-0.5-0.3-0.7-0.4L213.6,42.6z"/> - <path class="st3" d="M233.9,32.9h-3.7c-0.1,0-0.2,0-0.4,0c-0.2,0-0.4,0-0.7,0.1c-0.3,0.1-0.5,0.2-0.8,0.3 - c-0.3,0.1-0.5,0.3-0.8,0.6c-0.2,0.2-0.4,0.6-0.6,0.9c-0.2,0.4-0.2,0.8-0.2,1.4v4.3c0,0.2,0,0.3,0,0.6c0,0.2,0,0.4,0.1,0.7 - s0.1,0.5,0.2,0.7c0.1,0.2,0.2,0.4,0.4,0.6c0.2,0.2,0.4,0.3,0.7,0.4c0.3,0.1,0.6,0.2,1,0.2c0.2,0,0.4,0,0.7,0 - c0.2,0,0.5-0.1,0.8-0.1c0.3-0.1,0.5-0.1,0.8-0.2c0.3-0.1,0.5-0.1,0.7-0.2c0.6-0.2,1.1-0.4,1.7-0.6l0.4,1.1 - c-0.6,0.2-1.2,0.4-1.8,0.6c-0.3,0.1-0.5,0.2-0.8,0.2c-0.3,0.1-0.6,0.1-0.8,0.2c-0.3,0.1-0.6,0.1-0.8,0.1c-0.3,0-0.5,0.1-0.8,0.1 - c-0.6,0-1.1-0.1-1.5-0.2c-0.4-0.2-0.8-0.4-1-0.6c-0.3-0.3-0.5-0.5-0.6-0.9c-0.2-0.3-0.3-0.6-0.3-1c-0.1-0.3-0.1-0.6-0.1-0.9 - c0-0.3,0-0.6,0-0.8v-4.3c0-0.8,0.1-1.4,0.3-1.9c0.2-0.5,0.5-0.9,0.8-1.3c0.3-0.3,0.7-0.6,1-0.8c0.4-0.2,0.7-0.3,1.1-0.4 - c0.3-0.1,0.6-0.1,0.9-0.1c0.3,0,0.4,0,0.5,0h3.7V32.9z"/> - <path class="st3" d="M237.6,44.6V26.7h1.2V33c0.2-0.1,0.5-0.2,0.7-0.3c0.3-0.1,0.5-0.2,0.8-0.3c0.3-0.1,0.5-0.2,0.7-0.3 - c0.2-0.1,0.4-0.2,0.5-0.2c0.3-0.1,0.5-0.2,0.7-0.2c0.2-0.1,0.4-0.1,0.6-0.2c0.2,0,0.4-0.1,0.5-0.1c0.2,0,0.3,0,0.5,0 - c0.6,0,1.2,0.1,1.6,0.4c0.4,0.3,0.7,0.6,1,1c0.2,0.4,0.4,0.8,0.5,1.3c0.1,0.4,0.1,0.8,0.1,1.2v9.4H246v-9.4c0-0.2,0-0.5-0.1-0.8 - c-0.1-0.3-0.2-0.6-0.3-0.9c-0.1-0.3-0.3-0.5-0.6-0.7c-0.3-0.2-0.6-0.3-1-0.3c-0.5,0-1.2,0.1-1.9,0.4c-0.2,0.1-0.4,0.2-0.7,0.3 - c-0.3,0.1-0.6,0.2-0.9,0.4c-0.3,0.1-0.6,0.3-0.9,0.4s-0.5,0.2-0.7,0.3v10.3H237.6z"/> - <path class="st3" d="M252.8,31.6v9.4c0,0.2,0,0.5,0.1,0.8c0.1,0.3,0.2,0.6,0.3,0.9s0.3,0.5,0.6,0.7c0.3,0.2,0.6,0.3,1,0.3 - c0.5,0,1.2-0.1,1.9-0.4c0.2-0.1,0.4-0.2,0.7-0.3c0.3-0.1,0.6-0.2,0.9-0.4c0.3-0.1,0.6-0.3,0.9-0.4c0.3-0.1,0.5-0.2,0.7-0.3V31.6 - h1.2v13h-1.2v-1.3c-0.2,0.1-0.5,0.2-0.8,0.3c-0.3,0.1-0.5,0.2-0.8,0.3c-0.3,0.1-0.5,0.2-0.7,0.3c-0.2,0.1-0.4,0.2-0.5,0.2 - c-0.3,0.1-0.5,0.2-0.7,0.2c-0.2,0.1-0.4,0.1-0.6,0.2c-0.2,0-0.4,0.1-0.5,0.1c-0.2,0-0.3,0-0.5,0c-0.6,0-1.2-0.1-1.6-0.4 - c-0.4-0.3-0.7-0.6-1-1c-0.2-0.4-0.4-0.8-0.5-1.3c-0.1-0.4-0.1-0.8-0.1-1.2v-9.4H252.8z"/> - <path class="st3" d="M266.8,26.7v17.9h-1.2V26.7H266.8z"/> - <path class="st3" d="M280.6,43.8c-0.3,0.1-0.7,0.2-1.1,0.4c-0.4,0.1-0.8,0.3-1.3,0.4c-0.4,0.1-0.9,0.2-1.4,0.3 - c-0.5,0.1-1,0.1-1.6,0.1c-0.7,0-1.3-0.1-1.8-0.3c-0.6-0.2-1-0.5-1.4-0.9c-0.4-0.4-0.7-0.9-0.9-1.6c-0.2-0.6-0.3-1.4-0.3-2.2v-3.3 - c0-0.9,0.1-1.6,0.4-2.3c0.2-0.7,0.6-1.2,1-1.7c0.4-0.5,1-0.8,1.6-1c0.6-0.2,1.4-0.3,2.1-0.3c0.8,0,1.5,0.1,2.1,0.4 - c0.6,0.3,1.1,0.6,1.5,1.1c0.4,0.5,0.7,1,0.9,1.6c0.2,0.6,0.3,1.3,0.3,2.1v2.2H272v1.1c0,0.7,0.1,1.2,0.2,1.7 - c0.2,0.5,0.4,0.9,0.7,1.2c0.3,0.3,0.6,0.5,1,0.7c0.4,0.1,0.9,0.2,1.4,0.2c0.5,0,1,0,1.4-0.1c0.5-0.1,0.9-0.2,1.4-0.3 - s0.8-0.2,1.2-0.4c0.4-0.1,0.7-0.2,0.9-0.3L280.6,43.8z M272,37.5h7.4v-1.1c0-1.3-0.3-2.3-0.8-3c-0.6-0.7-1.5-1.1-2.7-1.1 - c-0.6,0-1.2,0.1-1.7,0.2c-0.5,0.2-0.9,0.4-1.2,0.7c-0.3,0.3-0.6,0.8-0.8,1.3c-0.2,0.5-0.3,1.2-0.3,1.9V37.5z"/> - </g> - <g class="st2"> - <path class="st3" d="M156.2,58h1.9v-0.6c0-0.6,0.1-1.1,0.2-1.6s0.4-1,0.7-1.3c0.3-0.4,0.7-0.7,1.2-0.9s1.1-0.3,1.8-0.3 - c0.5,0,0.9,0,1.2,0.1c0.3,0.1,0.6,0.2,0.8,0.3l-0.7,1.9c-0.2-0.1-0.4-0.1-0.6-0.2c-0.2,0-0.4-0.1-0.7-0.1c-0.6,0-1,0.2-1.3,0.5 - c-0.3,0.4-0.5,0.9-0.5,1.6V58h2.5v2.1h-2.5V71H158V60.1h-1.9V58z"/> - <path class="st3" d="M175.9,71h-2.2v-1.1l-1.9,0.7c-0.1,0.1-0.3,0.1-0.5,0.2c-0.2,0.1-0.4,0.1-0.7,0.2s-0.5,0.1-0.8,0.2 - c-0.3,0-0.6,0.1-0.9,0.1c-0.4,0-0.8-0.1-1.3-0.2c-0.4-0.1-0.8-0.4-1.1-0.7c-0.3-0.3-0.6-0.8-0.8-1.3c-0.2-0.6-0.3-1.3-0.3-2.2V58 - h2.2v8.9c0,0.2,0,0.4,0,0.6s0.1,0.5,0.2,0.8c0.1,0.3,0.3,0.5,0.5,0.7c0.2,0.2,0.6,0.3,1,0.3c0.3,0,0.5,0,0.8-0.1 - c0.3-0.1,0.5-0.2,0.8-0.3l2.7-1.1V58h2.2V71z M167.3,55.6v-2.5h2.3v2.5H167.3z M171.9,55.6v-2.5h2.3v2.5H171.9z"/> - <path class="st3" d="M184.6,57.7c0.3,0,0.7,0,0.9,0.1c0.3,0.1,0.5,0.2,0.7,0.3c0.2,0.1,0.4,0.2,0.6,0.4l-0.8,2.1 - c-0.1-0.1-0.3-0.2-0.5-0.2c-0.1-0.1-0.3-0.1-0.5-0.2c-0.2-0.1-0.4-0.1-0.6-0.1c-0.2,0-0.4,0-0.6,0.1c-0.2,0.1-0.4,0.2-0.6,0.4 - c-0.2,0.1-0.4,0.3-0.5,0.5c-0.2,0.2-0.3,0.3-0.4,0.5s-0.3,0.3-0.4,0.5V71h-2.2V58h2.2v1.4c0,0,0,0,0.1-0.1 - c0.1-0.1,0.1-0.2,0.3-0.3c0.1-0.1,0.2-0.3,0.4-0.4c0.2-0.1,0.3-0.3,0.5-0.4c0.2-0.1,0.4-0.2,0.6-0.3 - C184.1,57.8,184.4,57.7,184.6,57.7z"/> - <path class="st3" d="M209.6,55.2h-6.7V71h-2.4V55.2h-6.7v-2.1h15.7V55.2z"/> - </g> - <g class="st2"> - <path class="st3" d="M220.8,70.2c-0.4,0.1-0.8,0.2-1.2,0.4c-0.4,0.1-0.8,0.2-1.3,0.3c-0.5,0.1-0.9,0.2-1.4,0.3 - c-0.5,0.1-1,0.1-1.6,0.1c-0.6,0-1.3-0.1-1.9-0.3c-0.6-0.2-1.1-0.5-1.6-0.9c-0.5-0.4-0.9-1-1.2-1.7c-0.3-0.7-0.4-1.6-0.4-2.7v-2.1 - c0-0.8,0.1-1.6,0.3-2.3c0.2-0.7,0.6-1.3,1-1.9c0.5-0.5,1-0.9,1.7-1.2c0.7-0.3,1.5-0.4,2.5-0.4c0.7,0,1.3,0.1,1.8,0.2 - c0.5,0.1,1,0.3,1.3,0.6c0.4,0.3,0.7,0.6,1,0.9c0.3,0.3,0.5,0.7,0.6,1.1c0.2,0.4,0.3,0.8,0.3,1.3c0.1,0.4,0.1,0.9,0.1,1.3v2.3h-8.5 - v0.6c0,0.6,0.1,1.1,0.2,1.5c0.1,0.4,0.3,0.7,0.6,1c0.3,0.3,0.6,0.4,0.9,0.6c0.3,0.1,0.7,0.2,1.1,0.2c0.5,0,0.9,0,1.4-0.1 - c0.5-0.1,0.9-0.2,1.3-0.3c0.4-0.1,0.8-0.2,1.2-0.3c0.4-0.1,0.7-0.2,1-0.3L220.8,70.2z M212.4,63.6h6.3c0-0.6,0-1.2-0.1-1.7 - c-0.1-0.5-0.2-0.9-0.4-1.3c-0.2-0.4-0.5-0.6-0.9-0.8c-0.4-0.2-0.9-0.3-1.5-0.3c-0.6,0-1.1,0.1-1.5,0.3c-0.4,0.2-0.8,0.4-1,0.7 - s-0.5,0.7-0.6,1.1c-0.1,0.4-0.2,0.9-0.2,1.5V63.6z"/> - <path class="st3" d="M232.7,60h-3.3c-0.5,0-1,0.1-1.4,0.2c-0.4,0.1-0.7,0.3-0.9,0.5s-0.4,0.4-0.6,0.7c-0.1,0.2-0.2,0.5-0.3,0.7 - c-0.1,0.2-0.1,0.5-0.1,0.7c0,0.2,0,0.4,0,0.5v3.7c0,0.4,0.1,0.8,0.2,1.1c0.1,0.3,0.2,0.6,0.4,0.7s0.4,0.3,0.6,0.4 - c0.2,0.1,0.5,0.1,0.7,0.1c0.4,0,0.8,0,1.2-0.1c0.5-0.1,0.9-0.2,1.3-0.3c0.4-0.1,0.9-0.2,1.2-0.3c0.4-0.1,0.7-0.2,0.9-0.3 - c0.1,0.4,0.2,0.7,0.2,1c0.1,0.2,0.1,0.5,0.2,0.7s0.1,0.3,0.1,0.3c-0.4,0.1-0.8,0.3-1.2,0.4c-0.4,0.1-0.8,0.3-1.3,0.4 - c-0.4,0.1-0.9,0.2-1.4,0.2c-0.5,0.1-1.1,0.1-1.7,0.1c-0.4,0-0.9-0.1-1.3-0.2c-0.4-0.1-0.8-0.4-1.2-0.7c-0.4-0.3-0.6-0.8-0.9-1.4 - c-0.2-0.6-0.3-1.3-0.3-2.2v-3.6c0-0.7,0.1-1.4,0.2-1.9c0.2-0.5,0.4-1,0.7-1.4c0.3-0.4,0.6-0.7,1-1c0.4-0.2,0.8-0.4,1.2-0.6 - c0.4-0.1,0.8-0.2,1.3-0.3c0.4-0.1,0.8-0.1,1.2-0.1h3.3V60z"/> - <path class="st3" d="M236.4,53.1h2.2v6l1.9-0.7c0.1-0.1,0.3-0.1,0.5-0.2c0.2-0.1,0.4-0.1,0.6-0.2c0.2-0.1,0.5-0.1,0.8-0.2 - c0.3,0,0.6-0.1,1-0.1c0.4,0,0.8,0.1,1.3,0.2c0.4,0.1,0.8,0.4,1.1,0.7c0.3,0.3,0.6,0.8,0.8,1.3c0.2,0.6,0.3,1.3,0.3,2.2V71h-2.2 - v-8.9c0-0.2,0-0.4,0-0.6c0-0.3-0.1-0.5-0.2-0.8c-0.1-0.3-0.3-0.5-0.5-0.7c-0.2-0.2-0.6-0.3-1-0.3c-0.3,0-0.5,0-0.8,0.1 - c-0.3,0.1-0.5,0.2-0.7,0.2l-2.8,1.1V71h-2.2V53.1z"/> - <path class="st3" d="M250.8,58h2.1v1.1l1.9-0.7c0.1,0,0.3-0.1,0.5-0.2c0.2-0.1,0.4-0.2,0.7-0.2c0.3-0.1,0.5-0.1,0.9-0.2 - c0.3-0.1,0.6-0.1,1-0.1c0.4,0,0.8,0.1,1.3,0.2c0.4,0.1,0.8,0.4,1.1,0.7c0.3,0.3,0.6,0.8,0.8,1.3c0.2,0.6,0.3,1.3,0.3,2.2V71h-2.2 - v-8.9c0-0.2,0-0.4,0-0.6c0-0.3-0.1-0.5-0.2-0.8c-0.1-0.3-0.3-0.5-0.5-0.7c-0.2-0.2-0.6-0.3-1-0.3c-0.3,0-0.5,0-0.8,0.1 - c-0.3,0.1-0.5,0.2-0.7,0.2l-2.8,1.1V71h-2.2V58z"/> - <path class="st3" d="M267.5,56h-2.2v-2.2h2.2V56z M267.5,71h-2.2V58h2.2V71z"/> - <path class="st3" d="M271.4,71V53.1h2.2v10.5l6-5.5h2.8l-5.7,5.3l5.7,7.6h-2.7l-4.6-6.2l-1.5,1.4V71H271.4z"/> - </g> - <g class="st2"> - <path class="st3" d="M158,93.1c0.4,0.3,0.9,0.5,1.4,0.7c0.4,0.2,1,0.3,1.6,0.5c0.6,0.1,1.3,0.2,2,0.2c1.1,0,2-0.2,2.6-0.5 - c0.6-0.3,0.9-0.9,0.9-1.8c0-0.4-0.1-0.7-0.2-0.9c-0.1-0.2-0.3-0.4-0.6-0.6c-0.3-0.1-0.6-0.3-1.1-0.4c-0.5-0.1-1-0.2-1.7-0.4 - c-1.1-0.3-2.1-0.5-2.8-0.8c-0.8-0.3-1.4-0.6-1.9-1c-0.5-0.4-0.9-0.9-1.1-1.5c-0.2-0.6-0.3-1.4-0.3-2.3c0-0.9,0.1-1.7,0.4-2.4 - c0.3-0.7,0.7-1.2,1.3-1.6c0.5-0.4,1.2-0.7,2-0.9c0.8-0.2,1.7-0.3,2.6-0.3c0.7,0,1.3,0,1.9,0.1c0.6,0.1,1.2,0.1,1.7,0.2 - c0.5,0.1,1,0.2,1.4,0.3c0.4,0.1,0.8,0.2,1,0.3l-1,3c-0.3-0.1-0.6-0.2-1-0.3c-0.4-0.1-0.8-0.2-1.2-0.3c-0.4-0.1-0.9-0.2-1.3-0.2 - c-0.5-0.1-0.9-0.1-1.4-0.1c-0.5,0-0.9,0-1.3,0.1c-0.4,0.1-0.6,0.2-0.9,0.4c-0.2,0.2-0.4,0.4-0.5,0.6c-0.1,0.3-0.2,0.6-0.2,0.9 - c0,0.4,0.1,0.6,0.2,0.9c0.1,0.2,0.3,0.4,0.6,0.6c0.3,0.2,0.6,0.3,1.1,0.4c0.4,0.1,1,0.3,1.7,0.4c0.7,0.2,1.4,0.3,2,0.5 - c0.6,0.2,1.1,0.3,1.6,0.5s0.9,0.4,1.2,0.7c0.3,0.3,0.6,0.6,0.8,0.9c0.2,0.4,0.4,0.8,0.5,1.3c0.1,0.5,0.2,1,0.2,1.7 - c0,1-0.2,1.8-0.5,2.5c-0.3,0.7-0.8,1.3-1.4,1.7c-0.6,0.4-1.3,0.7-2.2,0.9c-0.9,0.2-1.9,0.3-3,0.3c-0.5,0-0.9,0-1.4-0.1 - c-0.4-0.1-0.9-0.1-1.3-0.2c-0.4-0.1-0.8-0.2-1.1-0.3c-0.4-0.1-0.7-0.2-1-0.4c-0.7-0.3-1.3-0.6-1.9-1L158,93.1z"/> - <path class="st3" d="M176.1,79.9v4.5h2.7v3h-2.7v5.8c0,0.6,0.1,1,0.3,1.2c0.2,0.2,0.5,0.3,1,0.3c0.1,0,0.3,0,0.4,0 - c0.1,0,0.3-0.1,0.4-0.1c0.1,0,0.2-0.1,0.3-0.1c0.1,0,0.2-0.1,0.2-0.1l0.9,2.8c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.3,0.1-0.5,0.2 - c-0.2,0.1-0.4,0.1-0.7,0.1c-0.3,0-0.6,0.1-0.9,0.1c-0.8,0-1.4-0.1-2-0.3c-0.5-0.2-1-0.5-1.3-0.9c-0.3-0.4-0.6-0.9-0.7-1.4 - c-0.1-0.6-0.2-1.2-0.2-1.9v-5.8h-1.5v-3h1.5v-3.5L176.1,79.9z"/> - <path class="st3" d="M192.6,97.4h-3.1v-0.9c-0.2,0.1-0.3,0.2-0.5,0.2c-0.2,0.1-0.3,0.1-0.5,0.2c-0.2,0.1-0.3,0.1-0.5,0.2 - c-0.1,0-0.3,0.1-0.5,0.2c-0.2,0.1-0.4,0.1-0.6,0.2c-0.2,0.1-0.5,0.1-0.8,0.1c-0.3,0-0.6,0.1-0.9,0.1c-0.4,0-0.8-0.1-1.3-0.2 - c-0.4-0.1-0.8-0.4-1.2-0.7c-0.4-0.3-0.6-0.8-0.9-1.3c-0.2-0.6-0.3-1.3-0.3-2.2v-8.9h3.2V93c0,0.3,0,0.6,0.1,0.8 - c0,0.2,0.1,0.4,0.2,0.6c0.1,0.2,0.2,0.3,0.4,0.4c0.2,0.1,0.4,0.1,0.7,0.1c0.2,0,0.3,0,0.5-0.1c0.2-0.1,0.4-0.1,0.7-0.2 - c0.2-0.1,0.4-0.1,0.7-0.2c0.2-0.1,0.5-0.2,0.7-0.3c0.2-0.1,0.5-0.2,0.7-0.3v-9.4h3.2V97.4z"/> - <path class="st3" d="M199.2,79.9v4.5h2.7v3h-2.7v5.8c0,0.6,0.1,1,0.3,1.2c0.2,0.2,0.5,0.3,1,0.3c0.1,0,0.3,0,0.4,0 - c0.1,0,0.3-0.1,0.4-0.1c0.1,0,0.2-0.1,0.3-0.1c0.1,0,0.2-0.1,0.2-0.1l0.9,2.8c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.3,0.1-0.5,0.2 - c-0.2,0.1-0.4,0.1-0.7,0.1c-0.3,0-0.6,0.1-0.9,0.1c-0.8,0-1.4-0.1-2-0.3c-0.5-0.2-1-0.5-1.3-0.9c-0.3-0.4-0.6-0.9-0.7-1.4 - c-0.1-0.6-0.2-1.2-0.2-1.9v-5.8h-1.5v-3h1.5v-3.5L199.2,79.9z"/> - <path class="st3" d="M207.9,79.9v4.5h2.7v3h-2.7v5.8c0,0.6,0.1,1,0.3,1.2c0.2,0.2,0.5,0.3,1,0.3c0.1,0,0.3,0,0.4,0 - c0.1,0,0.3-0.1,0.4-0.1c0.1,0,0.2-0.1,0.3-0.1c0.1,0,0.2-0.1,0.2-0.1l0.9,2.8c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.3,0.1-0.5,0.2 - c-0.2,0.1-0.4,0.1-0.7,0.1c-0.3,0-0.6,0.1-0.9,0.1c-0.8,0-1.4-0.1-2-0.3c-0.5-0.2-1-0.5-1.3-0.9c-0.3-0.4-0.6-0.9-0.7-1.4 - c-0.1-0.6-0.2-1.2-0.2-1.9v-5.8h-1.5v-3h1.5v-3.5L207.9,79.9z"/> - <path class="st3" d="M218.3,99.7c0.5,0,0.9-0.1,1.2-0.2c0.3-0.1,0.6-0.3,0.8-0.6c0.2-0.2,0.4-0.5,0.5-0.8c0.1-0.3,0.1-0.6,0.1-1 - v-0.8l-0.6,0.3c-0.4,0.2-0.8,0.3-1.2,0.5c-0.5,0.2-1,0.2-1.6,0.2c-0.7,0-1.3-0.1-1.8-0.3c-0.5-0.2-0.9-0.5-1.3-0.8 - c-0.3-0.3-0.6-0.7-0.8-1.1c-0.2-0.4-0.3-0.8-0.4-1.1c-0.1-0.4-0.2-0.7-0.2-1c0-0.3,0-0.6,0-0.7v-2c0-0.9,0.1-1.7,0.3-2.4 - c0.2-0.7,0.5-1.2,0.8-1.7c0.3-0.4,0.7-0.8,1.1-1c0.4-0.3,0.8-0.5,1.2-0.6c0.4-0.1,0.7-0.2,1-0.2c0.3,0,0.5,0,0.7,0h6v12.3 - c0,0.8-0.1,1.5-0.3,2.2c-0.2,0.7-0.5,1.3-1,1.9c-0.5,0.5-1,1-1.8,1.3c-0.7,0.3-1.6,0.5-2.7,0.5c-0.5,0-0.9,0-1.3-0.1 - c-0.4-0.1-0.8-0.2-1.1-0.3c-0.3-0.1-0.6-0.2-0.9-0.4c-0.3-0.1-0.5-0.3-0.7-0.5c-0.5-0.4-0.9-0.8-1.1-1.2l2.5-1.7 - c0.2,0.2,0.4,0.4,0.6,0.6c0.2,0.2,0.5,0.3,0.8,0.4C217.4,99.7,217.8,99.7,218.3,99.7z M219.3,94.1c0.2-0.1,0.3-0.1,0.5-0.2 - c0.2-0.1,0.3-0.1,0.5-0.2c0.2-0.1,0.4-0.1,0.5-0.2v-6.1h-2.8c0,0-0.1,0-0.2,0c-0.1,0-0.2,0-0.4,0.1c-0.1,0.1-0.3,0.1-0.4,0.3 - c-0.2,0.1-0.3,0.3-0.4,0.4c-0.1,0.2-0.2,0.4-0.3,0.7c-0.1,0.3-0.1,0.6-0.1,1v2.4c0,0.2,0,0.3,0.1,0.6c0,0.2,0.1,0.5,0.3,0.7 - c0.1,0.2,0.3,0.4,0.5,0.6c0.2,0.2,0.5,0.2,0.8,0.2c0.2,0,0.4,0,0.7-0.1C218.7,94.3,219,94.2,219.3,94.1z"/> - <path class="st3" d="M234.8,97.4v-0.9l-2.1,0.9c-0.3,0.1-0.6,0.2-0.9,0.3c-0.3,0.1-0.7,0.1-1,0.1c-0.8,0-1.5-0.1-2-0.4 - c-0.5-0.3-0.9-0.6-1.2-1.1c-0.3-0.5-0.5-1-0.6-1.6c-0.1-0.6-0.2-1.3-0.2-2v-2.2c0-0.9,0.1-1.6,0.3-2.3c0.2-0.6,0.4-1.2,0.7-1.6 - c0.3-0.4,0.6-0.8,1-1.1c0.4-0.3,0.8-0.5,1.1-0.6c0.4-0.1,0.7-0.2,1.1-0.3c0.3,0,0.7-0.1,0.9-0.1h5.9v13H234.8z M231.4,94.8 - c0.3,0,0.6,0,0.8-0.1c0.3-0.1,0.6-0.2,1-0.4l1.6-0.7v-6.3h-2.8c-0.2,0-0.5,0-0.7,0.1c-0.2,0.1-0.4,0.2-0.6,0.4 - c-0.2,0.2-0.3,0.4-0.5,0.8c-0.1,0.3-0.2,0.7-0.2,1.2v2.9c0,0.3,0,0.6,0,0.8c0,0.2,0.1,0.5,0.2,0.6c0.1,0.2,0.2,0.3,0.4,0.4 - C230.9,94.8,231.1,94.8,231.4,94.8z"/> - <path class="st3" d="M241.3,97.4v-13h3.2v0.9c0.1-0.1,0.3-0.3,0.4-0.4c0.2-0.1,0.3-0.3,0.5-0.4c0.2-0.1,0.4-0.2,0.6-0.3 - c0.2-0.1,0.4-0.1,0.7-0.1c0.3,0,0.6,0,0.9,0.1c0.3,0.1,0.6,0.2,0.8,0.3c0.3,0.1,0.5,0.3,0.8,0.5l-0.9,2.5 - c-0.2-0.1-0.4-0.2-0.6-0.3c-0.2-0.1-0.4-0.2-0.5-0.2c-0.2-0.1-0.4-0.1-0.5-0.1c-0.2,0-0.4,0-0.6,0.1c-0.2,0.1-0.4,0.2-0.6,0.3 - c-0.2,0.1-0.4,0.3-0.5,0.5c-0.2,0.2-0.3,0.3-0.4,0.5v9.1H241.3z"/> - <path class="st3" d="M254.1,79.9v4.5h2.7v3h-2.7v5.8c0,0.6,0.1,1,0.3,1.2c0.2,0.2,0.5,0.3,1,0.3c0.1,0,0.3,0,0.4,0 - c0.1,0,0.3-0.1,0.4-0.1c0.1,0,0.2-0.1,0.3-0.1c0.1,0,0.2-0.1,0.2-0.1l0.9,2.8c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.3,0.1-0.5,0.2 - c-0.2,0.1-0.4,0.1-0.7,0.1c-0.3,0-0.6,0.1-0.9,0.1c-0.8,0-1.4-0.1-2-0.3c-0.5-0.2-1-0.5-1.3-0.9c-0.3-0.4-0.6-0.9-0.7-1.4 - c-0.1-0.6-0.2-1.2-0.2-1.9v-5.8h-1.5v-3h1.5v-3.5L254.1,79.9z"/> - </g> -</g> -</svg> diff --git a/public/assets/images/linkedin.png b/public/assets/images/linkedin.png deleted file mode 100644 index 4bd3550cd999c0cf4ed12ceb53a75d3a9bfac6b3..0000000000000000000000000000000000000000 Binary files a/public/assets/images/linkedin.png and /dev/null differ diff --git a/public/assets/images/list.png b/public/assets/images/list.png deleted file mode 100644 index e0064d82d673ce22dda7f5bfdcc95173420f1adc..0000000000000000000000000000000000000000 Binary files a/public/assets/images/list.png and /dev/null differ diff --git a/public/assets/images/top.png b/public/assets/images/top.png deleted file mode 100644 index cc720292bcae1ce38dad9e0a104d37384f81efd0..0000000000000000000000000000000000000000 Binary files a/public/assets/images/top.png and /dev/null differ diff --git a/public/assets/images/twitter.png b/public/assets/images/twitter.png deleted file mode 100644 index 6da1f270e1299c803b0b735a67919d03c035b2bb..0000000000000000000000000000000000000000 Binary files a/public/assets/images/twitter.png and /dev/null differ diff --git a/public/assets/images/webpage.png b/public/assets/images/webpage.png deleted file mode 100644 index df05bf018327f31e0e8964ce41ea830da0d77808..0000000000000000000000000000000000000000 Binary files a/public/assets/images/webpage.png and /dev/null differ diff --git a/public/assets/logos/Logo_M4_LAB.jpg b/public/assets/logos/Logo_M4_LAB.jpg deleted file mode 100644 index 7417075b2c4db0a7e510ef8e269b8225abfa2d5d..0000000000000000000000000000000000000000 Binary files a/public/assets/logos/Logo_M4_LAB.jpg and /dev/null differ diff --git a/public/assets/logos/M4_LAB_tr.png b/public/assets/logos/M4_LAB_tr.png deleted file mode 100644 index 799d20dc9f42344201c532b1f18a201d808ab8af..0000000000000000000000000000000000000000 Binary files a/public/assets/logos/M4_LAB_tr.png and /dev/null differ diff --git a/public/assets/logos/logo1.png b/public/assets/logos/logo1.png deleted file mode 100644 index 233410c57727edf0574d45c35a4607ecd9ead11b..0000000000000000000000000000000000000000 Binary files a/public/assets/logos/logo1.png and /dev/null differ diff --git a/public/assets/logos/logo2.png b/public/assets/logos/logo2.png deleted file mode 100644 index e52590c27a9527fd6399f2de4f57ff1cb8da9cbf..0000000000000000000000000000000000000000 Binary files a/public/assets/logos/logo2.png and /dev/null differ diff --git a/public/assets/logos/logo3.png b/public/assets/logos/logo3.png deleted file mode 100644 index f87b0cc02358000d83ce79d6a91439f4ca2b3f2d..0000000000000000000000000000000000000000 Binary files a/public/assets/logos/logo3.png and /dev/null differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..945bb039ace0aa98b8b93d1885e52ce5e42523c4 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/fme/citygml_aggregator_joe_2022_04_08.fmw b/public/fme/citygml_aggregator_joe_2022_04_08.fmw new file mode 100644 index 0000000000000000000000000000000000000000..9a32b6ac8a72303992883d777555bc5c8be44b67 --- /dev/null +++ b/public/fme/citygml_aggregator_joe_2022_04_08.fmw @@ -0,0 +1,5328 @@ +#! <?xml version="1.0" encoding="UTF-8" ?> +#! <WORKSPACE +# Command line to run this workspace: +# D:\Program\FME\fme.exe D:\OneDrive\Work\All_Works\2022_04_SpatialAggregate_CityGML_Demographic\citygml_aggregator_joe_2022_04_08.fmw +# --SourceDataset_CSV2 "" +# --SourceDataset_CSV2_3 "" +# --SourceDataset_CITYGML_4 "" +# --SourceDataset_OGCGEOPACKAGE "" +# --DestDataset_CSV2_2 "" +# --FME_LAUNCH_VIEWER_APP "YES" +# +#! ARCGIS_COMPATIBILITY="ARCGIS_AUTO" +#! ATTR_TYPE_ENCODING="SDF" +#! BEGIN_PYTHON="" +#! BEGIN_TCL="" +#! CATEGORY="" +#! DESCRIPTION="" +#! DESTINATION="NONE" +#! DESTINATION_ROUTING_FILE="" +#! DOC_EXTENTS="5909.52 2561.15" +#! DOC_TOP_LEFT="-2195.09 -2843.27" +#! END_PYTHON="" +#! END_TCL="" +#! EXPLICIT_BOOKMARK_ORDER="false" +#! FME_BUILD_NUM="21806" +#! FME_DOCUMENT_GUID="d12b13d7-627d-4dd9-b0a1-78b54ffb93b1" +#! FME_DOCUMENT_PRIORGUID="da7bb61f-17cb-4949-af60-b3a8562ca88f,bcc7c9df-2f78-4da5-87b7-0cad6cda4eb6,206f592e-b3a2-4b81-be5f-4552a8b24861,dd54c7fc-4850-4a8e-ab6f-6963e1ccd168,47a27ca4-8bca-44e8-860d-84a9804b51d6,0b736697-f129-438e-b7a8-31a56abd44c3,ac7fd401-548a-466d-87e7-4febdfd26ec4,ac427903-ec1b-4d57-8e63-3e753f258e80,19fc36b7-03c0-4850-a5a8-825e200c0227,4c61d3a4-4614-4a01-b2eb-5d6f07e0ed91,634654ea-47d9-434a-8379-e90530afcdec" +#! FME_GEOMETRY_HANDLING="Enhanced" +#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" +#! FME_NAMES_ENCODING="UTF-8" +#! FME_REPROJECTION_ENGINE="FME" +#! FME_SERVER_SERVICES="" +#! FME_STROKE_MAX_DEVIATION="0" +#! HISTORY="" +#! IGNORE_READER_FAILURE="No" +#! LAST_SAVE_BUILD="FME(R) 2021.2.2.0 (20220106 - Build 21806 - WIN64)" +#! LAST_SAVE_DATE="2022-04-08T14:00:02" +#! LOG_FILE="" +#! LOG_MAX_RECORDED_FEATURES="200" +#! MARKDOWN_DESCRIPTION="" +#! MARKDOWN_USAGE="" +#! MAX_LOG_FEATURES="200" +#! MULTI_WRITER_DATASET_ORDER="BY_ID" +#! PASSWORD="" +#! PYTHON_COMPATIBILITY="38" +#! REDIRECT_TERMINATORS="NONE" +#! SAVE_ON_PROMPT_AND_RUN="Yes" +#! SHOW_ANNOTATIONS="true" +#! SHOW_INFO_NODES="true" +#! SOURCE="NONE" +#! SOURCE_ROUTING_FILE="" +#! TERMINATE_REJECTED="YES" +#! TITLE="CityGML Aggregator" +#! USAGE="" +#! USE_MARKDOWN="" +#! VIEW_POSITION="-2797.16 128.075" +#! WARN_INVALID_XFORM_PARAM="Yes" +#! WORKSPACE_VERSION="1" +#! ZOOM_SCALE="61" +#! > +#! <DATASETS> +#! <DATASET +#! IS_SOURCE="true" +#! ROLE="READER" +#! FORMAT="CSV2" +#! DATASET="$(SourceDataset_CSV2)" +#! KEYWORD="CSV2_1" +#! MULTI_GEOM_ALLOWED="false" +#! ATTR_MAX_LENGTH="0" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="csv_line_number uint64 csv_number_of_fields uint32 csv_skipped_line string csv_total_number_of_columns uint32 csv_type string fme_basename string fme_color string fme_dataset string fme_feature_type string fme_fill_color string fme_geometry string fme_primary_axis string fme_rotation string fme_secondary_axis string fme_start_angle string fme_sweep_angle string fme_text_size string fme_text_string string fme_type string multi_reader_full_id string multi_reader_id string multi_reader_keyword string multi_reader_type string" +#! DEFLINE_PARMS="" +#! ATTR_INDEX_TYPES="" +#! ATTR_NAME_INVALID_CHARS="" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILEDIR" +#! FTTR_TYPE="FEATURE_TYPES_ENCODED" +#! GENERATE_FME_BUILD_NUM="21313" +#! COORDSYS="" +#! FEATURE_TYPES="" +#! MAX_FEATURES="" +#! MAX_FEATURES_PER_FEATURE_TYPE="" +#! MIN_FEATURES="" +#! START_FEATURE="" +#! > +#! <METAFILE_PARAMETER +#! NAME="ATTRIBUTE_READING" +#! VALUE="DEFLINE" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="csv file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DEFAULT_ATTR_TYPE" +#! VALUE="string" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_DEFAULT_NAME" +#! VALUE="File1" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_NAME" +#! VALUE="CSV File" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the CSV file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a folder for the CSV file" +#! /> +#! </DATASET> +#! <DATASET +#! IS_SOURCE="true" +#! ROLE="READER" +#! FORMAT="CSV2" +#! DATASET="$(SourceDataset_CSV2_3)" +#! KEYWORD="CSV2_2" +#! MULTI_GEOM_ALLOWED="false" +#! ATTR_MAX_LENGTH="0" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="csv_line_number uint64 csv_number_of_fields uint32 csv_skipped_line string csv_total_number_of_columns uint32 csv_type string fme_basename string fme_color string fme_dataset string fme_feature_type string fme_fill_color string fme_geometry string fme_primary_axis string fme_rotation string fme_secondary_axis string fme_start_angle string fme_sweep_angle string fme_text_size string fme_text_string string fme_type string multi_reader_full_id string multi_reader_id string multi_reader_keyword string multi_reader_type string" +#! DEFLINE_PARMS="" +#! ATTR_INDEX_TYPES="" +#! ATTR_NAME_INVALID_CHARS="" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILEDIR" +#! FTTR_TYPE="FEATURE_TYPES_ENCODED" +#! GENERATE_FME_BUILD_NUM="21313" +#! COORDSYS="" +#! FEATURE_TYPES="" +#! MAX_FEATURES="" +#! MAX_FEATURES_PER_FEATURE_TYPE="" +#! MIN_FEATURES="" +#! START_FEATURE="" +#! > +#! <METAFILE_PARAMETER +#! NAME="ATTRIBUTE_READING" +#! VALUE="DEFLINE" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="csv file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DEFAULT_ATTR_TYPE" +#! VALUE="string" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_DEFAULT_NAME" +#! VALUE="File1" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_NAME" +#! VALUE="CSV File" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the CSV file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a folder for the CSV file" +#! /> +#! </DATASET> +#! <DATASET +#! IS_SOURCE="true" +#! ROLE="READER" +#! FORMAT="CITYGML" +#! DATASET="$(SourceDataset_CITYGML_4)" +#! KEYWORD="CITYGML_1" +#! MULTI_GEOM_ALLOWED="false" +#! ATTR_MAX_LENGTH="0" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="citygml_ambient_intensity xml_real64 citygml_border_color xml_buffer citygml_diffuse_color xml_buffer citygml_emissive_color xml_buffer citygml_image_uri xml_buffer citygml_is_front xml_boolean citygml_is_smooth xml_boolean citygml_level_of_detail xml_ubyte citygml_library_object xml_buffer citygml_lod_name xml_buffer citygml_mime_type xml_buffer citygml_orientation_matrix xml_buffer citygml_prefer_world_file xml_boolean citygml_shininess xml_real64 citygml_specular_color xml_buffer citygml_target xml_buffer citygml_target{}.coordinate_list{}.coordinates xml_buffer citygml_target{}.coordinate_list{}.ring xml_buffer citygml_target{}.uri xml_buffer citygml_target{}.world_to_texture_matrix xml_buffer citygml_texture_type xml_char(16) citygml_theme xml_buffer citygml_transformation_matrix xml_buffer citygml_transparency xml_real64 citygml_wrap_mode xml_char(16) fme_basename xml_char(50) fme_color xml_char(50) fme_dataset xml_char(50) fme_feature_type xml_char(50) fme_fill_color xml_char(50) fme_geometry xml_char(50) fme_primary_axis xml_real64 fme_rotation xml_real64 fme_secondary_axis xml_real64 fme_start_angle xml_real64 fme_sweep_angle xml_real64 fme_text_size xml_real64 fme_text_string xml_char(50) fme_type xml_char(50) gml_id xml_buffer gml_parent_id xml_buffer multi_reader_full_id xml_int32 multi_reader_id xml_int32 multi_reader_keyword xml_char(50) multi_reader_type xml_char(50)" +#! DEFLINE_PARMS="" +#! ATTR_INDEX_TYPES="" +#! ATTR_NAME_INVALID_CHARS="" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILE_OR_URL" +#! FTTR_TYPE="LISTBOX_ENCODED" +#! GENERATE_FME_BUILD_NUM="21313" +#! COORDSYS="" +#! FEATURE_TYPES="" +#! MAX_FEATURES="" +#! MAX_FEATURES_PER_FEATURE_TYPE="" +#! MIN_FEATURES="" +#! START_FEATURE="" +#! > +#! <METAFILE_PARAMETER +#! NAME="ADVANCED_PARMS" +#! VALUE="TEXTURE_DIRECTORY THEME_NAME" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="CityGML file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the CityGML file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_ADD_FEATURE_TYPE_DEFAULT" +#! VALUE="import" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a name for the CityGML file" +#! /> +#! </DATASET> +#! <DATASET +#! IS_SOURCE="true" +#! ROLE="READER" +#! FORMAT="OGCGEOPACKAGE" +#! DATASET="$(SourceDataset_OGCGEOPACKAGE)" +#! KEYWORD="OGCGEOPACKAGE_1" +#! MULTI_GEOM_ALLOWED="false" +#! ATTR_MAX_LENGTH="0" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="geopackage_type {FME_GEN_GEOMETRY}" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="fme_basename text(50) fme_color text(50) fme_dataset text(50) fme_feature_type text(50) fme_fill_color text(50) fme_geometry text(50) fme_primary_axis double fme_rotation double fme_secondary_axis double fme_start_angle double fme_sweep_angle double fme_text_size double fme_text_string text(50) fme_type text(50) geopackage_type text(255) multi_reader_full_id mediumint multi_reader_id mediumint multi_reader_keyword text(50) multi_reader_type text(50)" +#! DEFLINE_PARMS=""GUI OPTIONAL NAMEDGROUP geopackage_reader_table_group geopackage_where_clause Table" "" "GUI OPTIONAL TEXT_ENCODED geopackage_where_clause WHERE Clause" "" " +#! ATTR_INDEX_TYPES="Indexed PrimaryKey" +#! ATTR_NAME_INVALID_CHARS="" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILE" +#! FTTR_TYPE="LISTBOX_ENCODED" +#! GENERATE_FME_BUILD_NUM="21806" +#! COORDSYS="" +#! FEATURE_TYPES="" +#! MAX_FEATURES="" +#! MAX_FEATURES_PER_FEATURE_TYPE="" +#! MIN_FEATURES="" +#! START_FEATURE="" +#! > +#! <METAFILE_PARAMETER +#! NAME="ADVANCED_PARMS" +#! VALUE="OGCGEOPACKAGE_OUT_TRANSACTION_SIZE" +#! /> +#! <METAFILE_PARAMETER +#! NAME="ALLOW_DATASET_CONFLICT" +#! VALUE="YES" +#! /> +#! <METAFILE_PARAMETER +#! NAME="ATTRIBUTE_READING" +#! VALUE="DEFLINE" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="GeoPackage file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_DEFAULT_NAME" +#! VALUE="Table1" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_NAME" +#! VALUE="Table" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the GeoPackage file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a name for the GeoPackage file" +#! /> +#! </DATASET> +#! <DATASET +#! IS_SOURCE="false" +#! ROLE="WRITER" +#! FORMAT="CSV2" +#! DATASET="$(DestDataset_CSV2_2)" +#! KEYWORD="CSV2_4" +#! MULTI_GEOM_ALLOWED="true" +#! ATTR_MAX_LENGTH="255" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="csv_existing_file_handling Yes csv_write_field_names firstrow csv_date_output_format FME" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="csv_type string fme_basename varchar(50) fme_color varchar(50) fme_dataset varchar(50) fme_feature_type varchar(50) fme_fill_color varchar(50) fme_geometry varchar(50) fme_primary_axis string fme_rotation string fme_secondary_axis string fme_start_angle string fme_sweep_angle string fme_text_size string fme_text_string varchar(50) fme_type varchar(50)" +#! DEFLINE_PARMS=""GUI OPTIONAL NAMEDGROUP csv_dataset_group csv_existing_file_handling Dataset" "" "GUI CHOICE csv_existing_file_handling Yes%No Overwrite Existing File" Yes "GUI OPTIONAL NAMEDGROUP csv_fields_group csv_write_field_names Fields" "" "GUI LOOKUP_CHOICE csv_write_field_names If<space>Writing<space>First<space>Row,firstrow%Yes,yes%No,no Write Field Names Row" firstrow "GUI OPTIONAL NAMEDGROUP csv_types_group csv_date_output_format Types" "" "GUI STRING_OR_LOOKUP_CHOICE_ENCODED csv_date_output_format FME<space><openparen>auto<space>format<closeparen>,FME%ISO<space><openparen>auto<space>format<closeparen>,ISO%\"%Y%m%d<space><openparen>FME<space>date<closeparen>,%Y%m%d\"%\"%H%M%S<space><openparen>FME<space>time<closeparen>,%H%M%S\"%\"%H%M%S%z<space><openparen>FME<space>time<space>with<space>offset<closeparen>,%H%M%S%z\"%\"%Y%m%d%H%M%S<space><openparen>FME<space>datetime<closeparen>,%Y%m%d%H%M%S\"%\"%Y%m%d%H%M%S%z<space><openparen>FME<space>datetime<space>with<space>offset<closeparen>,%Y%m%d%H%M%S%z\"%\"%Y-%m-%d<space><openparen>ISO<space>date<closeparen>,%Y-%m-%d\"%\"%H:%M:%S<space><openparen>ISO<space>time<closeparen>,%H:%M:%S\"%\"%H:%M:%S%Ez<space><openparen>ISO<space>time<space>with<space>offset<closeparen>,%H:%M:%S%Ez\"%\"%Y-%m-%dT%H:%M:%S<space><openparen>ISO<space>datetime<closeparen>,%Y-%m-%dT%H:%M:%S\"%\"%Y-%m-%dT%H:%M:%S%Ez<space><openparen>ISO<space>datetime<space>with<space>offset<closeparen>,%Y-%m-%dT%H:%M:%S%Ez\"%\"%Y-W%W-%u<space><openparen>ISO<space>week<closeparen>,%Y-W%W-%u\"%\"%Y-%j<space><openparen>ISO<space>ordinal<space>date<closeparen>,%Y-%j\"%\"%Y:%m:%d<space>%H:%M:%S<space><openparen>Exif<space>datetime<closeparen>,%Y:%m:%d%H:%M:%S\"%\"%d/%m/%Y\"%\"%d.%m.%Y\"%\"%B<space>%e<comma><space>%Y\"%\"%b-%e-%Y\"%\"%I:%M:%S%p\"%\"%s<space><openparen>Epoch<space>Time<closeparen>,%s\"%\"%Es<space><openparen>Unzoned<space>Epoch<space>Time<closeparen>,%Es\" Date Output Format" FME " +#! ATTR_INDEX_TYPES="" +#! ATTR_NAME_INVALID_CHARS=""*{}$" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILEDIR" +#! FTTR_TYPE="" +#! GENERATE_FME_BUILD_NUM="21806" +#! COORDSYS="" +#! FANOUT_EXPRESSION="" +#! FANOUT_GROUP="NO" +#! > +#! <METAFILE_PARAMETER +#! NAME="ADVANCED_PARMS" +#! VALUE="CSV2_OUT_QUALIFY_FIELD_NAMES CSV2_OUT_QUALIFY_FIELD_VALUES CSV2_OUT_FIELD_QUALIFIER_CHARACTER CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER CSV2_OUT_ROW_TERMINATION CSV2_OUT_WRITE_SCHEMA_FILE CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING" +#! /> +#! <METAFILE_PARAMETER +#! NAME="ATTRIBUTE_READING" +#! VALUE="DEFLINE" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="csv file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DEFAULT_ATTR_TYPE" +#! VALUE="string" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_DEFAULT_NAME" +#! VALUE="File1" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_NAME" +#! VALUE="CSV File" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the CSV file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a folder for the CSV file" +#! /> +#! </DATASET> +#! </DATASETS> +#! <DATA_TYPES> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_buffer" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_xml" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_json" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="datetime" +#! FME_TYPE="fme_datetime" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="time" +#! FME_TYPE="fme_time" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="date" +#! FME_TYPE="fme_date" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="real64" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="x_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="y_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="z_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_real32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="real32" +#! FME_TYPE="fme_real32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int64" +#! FME_TYPE="fme_int64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int32" +#! FME_TYPE="fme_int32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int16" +#! FME_TYPE="fme_int16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int8" +#! FME_TYPE="fme_int8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="uint64" +#! FME_TYPE="fme_uint64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="uint32" +#! FME_TYPE="fme_uint32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="uint16" +#! FME_TYPE="fme_uint16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="uint8" +#! FME_TYPE="fme_uint8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_boolean" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="boolean" +#! FME_TYPE="fme_boolean" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(width,decimal)" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_datetime" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_time" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_date" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text" +#! FME_TYPE="fme_buffer" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text" +#! FME_TYPE="fme_xml" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text" +#! FME_TYPE="fme_json" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="blob" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="blob(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="blob(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="date" +#! FME_TYPE="fme_date" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="datetime" +#! FME_TYPE="fme_datetime" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="datetime" +#! FME_TYPE="fme_time" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="float" +#! FME_TYPE="fme_real32" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="double" +#! FME_TYPE="fme_real64" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="double" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="boolean" +#! FME_TYPE="fme_boolean" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="tinyint" +#! FME_TYPE="fme_int8" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="smallint" +#! FME_TYPE="fme_int16" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="smallint" +#! FME_TYPE="fme_uint8" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="mediumint" +#! FME_TYPE="fme_int32" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="mediumint" +#! FME_TYPE="fme_uint16" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int" +#! FME_TYPE="fme_int64" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="int" +#! FME_TYPE="fme_uint32" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="text(20)" +#! FME_TYPE="fme_uint64" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_json" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_xml" +#! FME_TYPE="fme_xml" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_datetime" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_date" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_time" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_int64" +#! FME_TYPE="fme_int64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_uint64" +#! FME_TYPE="fme_uint64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_int32" +#! FME_TYPE="fme_int32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_uint32" +#! FME_TYPE="fme_uint32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_int16" +#! FME_TYPE="fme_int16" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_uint16" +#! FME_TYPE="fme_uint16" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_byte" +#! FME_TYPE="fme_int8" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_ubyte" +#! FME_TYPE="fme_uint8" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_real32" +#! FME_TYPE="fme_real32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_real64" +#! FME_TYPE="fme_real64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_decimal(width,decimal)" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_boolean" +#! FME_TYPE="fme_boolean" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(20)" +#! FME_TYPE="fme_datetime" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(8)" +#! FME_TYPE="fme_date" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_char(12)" +#! FME_TYPE="fme_time" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_geometry" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="citygml_uri" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="citygml_uri" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="citygml_csv" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="citygml_xml_string" +#! FME_TYPE="fme_xml" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="citygml_date" +#! FME_TYPE="fme_date" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_buffer" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_xml" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_json" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="varchar(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="datetime" +#! FME_TYPE="fme_datetime" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="time" +#! FME_TYPE="fme_time" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="date" +#! FME_TYPE="fme_date" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="real64" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="x_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="y_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="z_coordinate" +#! FME_TYPE="fme_real64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_real32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="real32" +#! FME_TYPE="fme_real32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="int64" +#! FME_TYPE="fme_int64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="int32" +#! FME_TYPE="fme_int32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="int16" +#! FME_TYPE="fme_int16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_int8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="int8" +#! FME_TYPE="fme_int8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="uint64" +#! FME_TYPE="fme_uint64" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="uint32" +#! FME_TYPE="fme_uint32" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="uint16" +#! FME_TYPE="fme_uint16" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_uint8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="uint8" +#! FME_TYPE="fme_uint8" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_boolean" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="boolean" +#! FME_TYPE="fme_boolean" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="number(width,decimal)" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_datetime" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_time" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_date" +#! FORMAT="CSV2" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="string" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CSV2" +#! /> +#! </DATA_TYPES> +#! <GEOM_TYPES> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_feature_table" +#! FME_TYPE="fme_feature_table" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_point" +#! FME_TYPE="fme_point" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_line" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_area" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_text" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_ellipse" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_arc" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_rectangle" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="fme_no_map" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="fme_no_map" +#! FME_TYPE="fme_no_map" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_collection" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_raster" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_surface" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_solid" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_voxel_grid" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_point" +#! FME_TYPE="fme_point" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_multipoint" +#! FME_TYPE="fme_point" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_point" +#! FME_TYPE="fme_text" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_linestring" +#! FME_TYPE="fme_line" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_multilinestring" +#! FME_TYPE="fme_line" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_circularstring" +#! FME_TYPE="fme_arc" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_compoundcurve" +#! FME_TYPE="fme_line" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_curve" +#! FME_TYPE="fme_line" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_multicurve" +#! FME_TYPE="fme_line" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_linestring" +#! FME_TYPE="fme_solid" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_linestring" +#! FME_TYPE="fme_surface" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_polygon" +#! FME_TYPE="fme_area" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_multipolygon" +#! FME_TYPE="fme_area" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_curvepolygon" +#! FME_TYPE="fme_area" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_curvepolygon" +#! FME_TYPE="fme_ellipse" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_curvepolygon" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_surface" +#! FME_TYPE="fme_area" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_multisurface" +#! FME_TYPE="fme_area" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_polygon" +#! FME_TYPE="fme_rectangle" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_polygon" +#! FME_TYPE="fme_raster" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_polygon" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_geometrycollection" +#! FME_TYPE="fme_collection" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_geometry" +#! FME_TYPE="fme_no_geom" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_none" +#! FME_TYPE="fme_no_geom" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_polygon" +#! FME_TYPE="fme_voxel_grid" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="geopackage_geometry" +#! FME_TYPE="fme_feature_table" +#! FORMAT="OGCGEOPACKAGE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_no_geom" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_point" +#! FME_TYPE="fme_point" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_line" +#! FME_TYPE="fme_line" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_area" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_aggregate" +#! FME_TYPE="fme_collection" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_text" +#! FME_TYPE="fme_text" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_ellipse" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_rectangle" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_arc" +#! FME_TYPE="fme_arc" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_surface" +#! FME_TYPE="fme_surface" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_solid" +#! FME_TYPE="fme_solid" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_mesh" +#! FME_TYPE="fme_surface" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_raster" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_raster" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_voxel_grid" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="xml_no_geom" +#! FME_TYPE="fme_feature_table" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_feature_table" +#! FME_TYPE="fme_feature_table" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_point" +#! FME_TYPE="fme_point" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_line" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_area" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_text" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_ellipse" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_arc" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_rectangle" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="fme_no_map" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="fme_no_map" +#! FME_TYPE="fme_no_map" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_collection" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_raster" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_surface" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_solid" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="CSV2" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="csv_none" +#! FME_TYPE="fme_voxel_grid" +#! FORMAT="CSV2" +#! /> +#! </GEOM_TYPES> +#! <FEATURE_TYPES> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="CSV" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="10" +#! FEAT_GEOMTYPE="csv_none csv_point" +#! POSITION="-640.0066000660006 -989.00352503525039" +#! BOUNDING_RECT="-640.0066000660006 -989.00352503525039 454 71" +#! ORDER="500000000000011" +#! COLLAPSED="true" +#! KEYWORD="CSV2_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! READ_SELECT_ATTRS="false" +#! MERGE_FILTER="*" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="true" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="GMLId" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Latitude" ATTR_TYPE="y_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Longitude" ATTR_TYPE="x_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="X-coordinate" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Y-coordinate" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="LOD" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Year of construction" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Refurbishment Variant" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ALKIS code" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PrimaryUsageZoneType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PrimaryUsageZoneArea" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="SecondaryUsageZoneType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="SecondaryUsageZoneArea" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="BuildingType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Footprint area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total wall thermal area above ground" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total wall thermal area below ground" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total outwall area" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total sharedwall area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total roof area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Gross volume" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Is Gross volume approximated?" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Heated volume" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Ridge/mean Height" ATTR_TYPE="z_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Eaves/mean Height" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Storey number" ATTR_TYPE="uint8" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Average Storey Height" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Number of households" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Number of occupants" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Attic Heating" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Basement Heating" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Basement ceiling height above ground" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Surface area to volume ratio" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Heated area" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Mean Uvalue" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Specific domestic hot water demand" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Specific space heating demand" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total Yearly Heat+DHW demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="January Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="February Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="March Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="April Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="May Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="June Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="July Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="August Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="September Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="October Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="November Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="December Heating demand" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="fme_feature_type" ATTR_TYPE="string" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="CSV" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="17" +#! FEAT_GEOMTYPE="csv_none" +#! POSITION="-640.0066000660006 -1352.0945042783758" +#! BOUNDING_RECT="-640.0066000660006 -1352.0945042783758 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CSV2_2" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! READ_SELECT_ATTRS="false" +#! MERGE_FILTER="*" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="true" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="BuildingID" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PV potential yield [MWh/a]" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="fme_feature_type" ATTR_TYPE="string" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="GroundSurface" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="32" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2101.3792654266413 -1607.4054578454284" +#! BOUNDING_RECT="-2101.3792654266413 -1607.4054578454284 546.50072500725037 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_opening{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="CityModel" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="33" +#! FEAT_GEOMTYPE="xml_no_geom" +#! POSITION="-2008.8785404193904 -1464.4054578454279" +#! BOUNDING_RECT="-2008.8785404193904 -1464.4054578454279 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_city_object_member{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance_member{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_feature_member{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="Building" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="34" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2008.8785404193904 -1321.4054578454279" +#! BOUNDING_RECT="-2008.8785404193904 -1321.4054578454279 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_class" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_class_codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_function{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_function{}.codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_usage{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_usage{}.codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_year_of_construction" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_year_of_demolition" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_roof_type" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_roof_type_codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_measured_height" ATTR_TYPE="xml_real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_measured_height_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storeys_above_ground" ATTR_TYPE="xml_uint64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storeys_below_ground" ATTR_TYPE="xml_uint64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_above_ground" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_above_ground_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_below_ground" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_below_ground_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_outer_building_installation{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_interior_building_installation{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_bounded_by{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_interior_room{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_consists_of_building_part{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_address{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="Address" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="35" +#! FEAT_GEOMTYPE="xml_aggregate xml_point" +#! POSITION="-2008.8785404193904 -1178.4054578454279" +#! BOUNDING_RECT="-2008.8785404193904 -1178.4054578454279 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_address" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="infas360_AGS27_Adressen_Stuttgart_WGS84" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="44" +#! FEAT_GEOMTYPE="geopackage_point" +#! POSITION="-1095.8042831247981 -2307.0440384194853" +#! BOUNDING_RECT="-1095.8042831247981 -2307.0440384194853 1128.3447048776043 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="OGCGEOPACKAGE_1" +#! PARMS_EDITED="false" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! READ_SELECT_ATTRS="true" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="ags27" ATTR_TYPE="text(27)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="plz" ATTR_TYPE="text(5)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ort" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ortz" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ot1" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ot2" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="stn" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="hnr" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="hnrz" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_solar" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_basistyp" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_str_typ" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_vorwahl" ATTR_TYPE="text" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_n" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_bj_kl" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_kompl" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="fid" ATTR_TYPE="int,PrimaryKey" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="geopackage_reader_table_group" PARM_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="geopackage_where_clause" PARM_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="infas360_AGS20_Siedlungsblock_Stuttgart_WGS84" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="45" +#! FEAT_GEOMTYPE="geopackage_multipolygon" +#! POSITION="-1107.0547983784891 -2461.0898639414927" +#! BOUNDING_RECT="-1107.0547983784891 -2461.0898639414927 1158.7269531445318 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="OGCGEOPACKAGE_1" +#! PARMS_EDITED="false" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! READ_SELECT_ATTRS="true" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="ags20" ATTR_TYPE="text(20)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_1p" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_2p" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_3p" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_4p" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_5p" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_dichte" ATTR_TYPE="double" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_00u03_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_00u18_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_03u06_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_06u10_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_10u15_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_15u18_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_18u30_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_30u45_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_45u60_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_60u65_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_65_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_65u75_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_75_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ausl_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_gesch" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_lebpar" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ledig" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ledig18" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_m" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_verh" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_verw" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_w" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_rentner_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl1" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl2" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl3" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl4" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl5" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl6" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_euro27_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_eusonst_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_sonst_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_welt_anz" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg1" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg2" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg3" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg4" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg5" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg6" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg7" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg8" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg9" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg10" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg11" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg12" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg13" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg14" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg99" ATTR_TYPE="mediumint" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="fid" ATTR_TYPE="int,PrimaryKey" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="geopackage_reader_table_group" PARM_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="geopackage_where_clause" PARM_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="false" +#! NODE_NAME="output" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="true" +#! IDENTIFIER="65" +#! FEAT_GEOMTYPE="All" +#! POSITION="3011.6789072556503 -1882.0883407034416" +#! BOUNDING_RECT="3011.6789072556503 -1882.0883407034416 430 71" +#! ORDER="500000000000031" +#! COLLAPSED="true" +#! KEYWORD="CSV2_4" +#! PARMS_EDITED="false" +#! ENABLED="true" +#! SCHEMA_ATTRIBUTE_SOURCE="1" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Latitude" ATTR_TYPE="y_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Longitude" ATTR_TYPE="x_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="X-coordinate" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Y-coordinate" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="LOD" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Year of construction" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Refurbishment Variant" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ALKIS code" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PrimaryUsageZoneType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PrimaryUsageZoneArea" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="SecondaryUsageZoneType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="SecondaryUsageZoneArea" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="BuildingType" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Footprint area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total wall thermal area above ground" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total wall thermal area below ground" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total outwall area" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total sharedwall area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total roof area" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Gross volume" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Is Gross volume approximated?" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Heated volume" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Ridge/mean Height" ATTR_TYPE="z_coordinate" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Eaves/mean Height" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Storey number" ATTR_TYPE="uint8" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Average Storey Height" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Number of households" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Number of occupants" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Attic Heating" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Basement Heating" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Basement ceiling height above ground" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Surface area to volume ratio" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Heated area" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Mean Uvalue" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Specific domestic hot water demand" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Specific space heating demand" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Total Yearly Heat+DHW demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="January Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="February Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="March Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="April Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="May Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="June Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="July Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="August Heating Demand" ATTR_TYPE="uint16" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="September Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="October Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="November Heating Demand" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="December Heating demand" ATTR_TYPE="real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="PV potential yield [MWh/a]" ATTR_TYPE="real32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ags27" ATTR_TYPE="varchar(27)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="plz" ATTR_TYPE="varchar(5)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ort" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ortz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ot1" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ot2" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="stn" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="hnr" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="hnrz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_solar" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_basistyp" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_str_typ" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_vorwahl" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_n" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_bj_kl" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="casa_kompl" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="fid" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="_overlaps" ATTR_TYPE="uint32" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="ags20" ATTR_TYPE="varchar(20)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_1p" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_2p" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_3p" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_4p" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_5p" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_dichte" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_00u03_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_00u18_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_03u06_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_06u10_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_10u15_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_15u18_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_18u30_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_30u45_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_45u60_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_60u65_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_65_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_65u75_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_75_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ausl_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_gesch" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_lebpar" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ledig" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_ledig18" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_m" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_verh" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_verw" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ew_w" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_rentner_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl1" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl2" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl3" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl4" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl5" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_hh_eink_kl6" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_euro27_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_eusonst_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_sonst_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_ausl_welt_anz" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg1" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg2" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg3" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg4" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg5" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg6" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg7" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg8" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg9" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg10" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg11" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg12" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg13" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg14" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="sb_kba_seg99" ATTR_TYPE="string" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="csv_dataset_group" PARM_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="csv_date_output_format" PARM_VALUE="FME"/> +#! <DEFLINE_PARM PARM_NAME="csv_existing_file_handling" PARM_VALUE="Yes"/> +#! <DEFLINE_PARM PARM_NAME="csv_fields_group" PARM_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="csv_types_group" PARM_VALUE=""/> +#! <DEFLINE_PARM PARM_NAME="csv_write_field_names" PARM_VALUE="firstrow"/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="WallSurface" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="28" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2008.8785404193904 -2179.4054578454302" +#! BOUNDING_RECT="-2008.8785404193904 -2179.4054578454302 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_opening{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="RoofSurface" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="29" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2008.8785404193904 -2036.4054578454293" +#! BOUNDING_RECT="-2008.8785404193904 -2036.4054578454293 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_opening{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="OuterFloorSurface" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="30" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2081.9785404193904 -1893.4054578454297" +#! BOUNDING_RECT="-2081.9785404193904 -1893.4054578454297 527.10000000000002 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_opening{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="OuterCeilingSurface" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="31" +#! FEAT_GEOMTYPE="xml_aggregate xml_arc xml_area xml_line xml_no_geom xml_point xml_solid xml_surface" +#! POSITION="-2113.9785404193908 -1750.4054578454302" +#! BOUNDING_RECT="-2113.9785404193908 -1750.4054578454302 559.10000000000002 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_opening{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! </FEATURE_TYPES> +#! <FMESERVER> +#! <READER_DATASETS> +#! <DATASET +#! NAME="CITYGML_1" +#! OVERRIDE="-CITYGML_1_DATASET" +#! DATASET="CITYGML_1/" +#! /> +#! <DATASET +#! NAME="CSV2_1" +#! OVERRIDE="-CSV2_1_DATASET" +#! DATASET="CSV2_1/" +#! /> +#! <DATASET +#! NAME="CSV2_2" +#! OVERRIDE="-CSV2_2_DATASET" +#! DATASET="CSV2_2/" +#! /> +#! <DATASET +#! NAME="OGCGEOPACKAGE_1" +#! OVERRIDE="-OGCGEOPACKAGE_1_DATASET" +#! DATASET="OGCGEOPACKAGE_1/" +#! /> +#! </READER_DATASETS> +#! <WRITER_DATASETS> +#! <DATASET +#! NAME="CSV2_4" +#! OVERRIDE="-CSV2_4_DATASET" +#! DATASET="CSV2_4/" +#! /> +#! </WRITER_DATASETS> +#! </FMESERVER> +#! <GLOBAL_PARAMETERS> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI MULTIFILE SourceDataset_CSV2 INCLUDE_WEB_BROWSER%CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CSV (SimStadt Heating Demand)" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="false" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI MULTIFILE SourceDataset_CSV2_3 INCLUDE_WEB_BROWSER%CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CSV (SimStadt PV Potentail)" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="false" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI MULTIFILE SourceDataset_CITYGML_4 INCLUDE_WEB_BROWSER%CityGML_Files(*.gml;*.xml;*.gz)|*.gml;*.xml;*.gz|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|Compressed_CityGML_Files(*.gz)|*.gz|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CityGML File (Stuttgart - Stoeckach)" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="false" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI MULTIFILE SourceDataset_OGCGEOPACKAGE INCLUDE_WEB_BROWSER%GeoPackage_Files(*.gpkg)|*.gpkg|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_files(*)|* Input GeoPackage Demographic Data (INFAS360)" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="false" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI DIRNAME DestDataset_CSV2_2 Destination CSV" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="false" +#! /> +#! </GLOBAL_PARAMETERS> +#! <USER_PARAMETERS +#! FORM="eyJwYXJhbWV0ZXJzIjpbeyJhY2Nlc3NNb2RlIjoicmVhZCIsImZpbHRlcnMiOlt7ImRlc2NyaXB0aW9uIjoiQ1NWL0NvbXByZXNzZWQgQ1NWL1RFWFQgRmlsZXMiLCJmaWx0ZXIiOlsiKi5jc3YiLCIqLmd6IiwiKi50eHQiXX0seyJkZXNjcmlwdGlvbiI6IkNTViBGaWxlcyIsImZpbHRlciI6WyIqLmNzdiJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBDU1YgRmlsZXMiLCJmaWx0ZXIiOlsiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiVGV4dCBGaWxlcyIsImZpbHRlciI6WyIqLnR4dCJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBGaWxlcyIsImZpbHRlciI6WyIqLmJ6MiIsIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IkFyY2hpdmUgRmlsZXMiLCJmaWx0ZXIiOlsiKi43eiIsIiouN3ppcCIsIioucmFyIiwiKi5ydnoiLCIqLnRhciIsIioudGFyLmJ6MiIsIioudGFyLmd6IiwiKi50Z3oiLCIqLnppcCIsIiouemlweCJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpbmNsdWRlV2ViQnJvd3NlciI6dHJ1ZSwiaXRlbXNUb1NlbGVjdCI6ImZpbGVzIiwibmFtZSI6IlNvdXJjZURhdGFzZXRfQ1NWMiIsInByb21wdCI6IlNvdXJjZSBDU1YgKFNpbVN0YWR0IEhlYXRpbmcgRGVtYW5kKSIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6dHJ1ZSwidHlwZSI6ImZpbGUiLCJ2YWxpZGF0ZUV4aXN0ZW5jZSI6ZmFsc2UsInZhbHVlVHlwZSI6InN0cmluZyJ9LHsiYWNjZXNzTW9kZSI6InJlYWQiLCJmaWx0ZXJzIjpbeyJkZXNjcmlwdGlvbiI6IkNTVi9Db21wcmVzc2VkIENTVi9URVhUIEZpbGVzIiwiZmlsdGVyIjpbIiouY3N2IiwiKi5neiIsIioudHh0Il19LHsiZGVzY3JpcHRpb24iOiJDU1YgRmlsZXMiLCJmaWx0ZXIiOlsiKi5jc3YiXX0seyJkZXNjcmlwdGlvbiI6IkNvbXByZXNzZWQgQ1NWIEZpbGVzIiwiZmlsdGVyIjpbIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IlRleHQgRmlsZXMiLCJmaWx0ZXIiOlsiKi50eHQiXX0seyJkZXNjcmlwdGlvbiI6IkNvbXByZXNzZWQgRmlsZXMiLCJmaWx0ZXIiOlsiKi5iejIiLCIqLmd6Il19LHsiZGVzY3JpcHRpb24iOiJBcmNoaXZlIEZpbGVzIiwiZmlsdGVyIjpbIiouN3oiLCIqLjd6aXAiLCIqLnJhciIsIioucnZ6IiwiKi50YXIiLCIqLnRhci5iejIiLCIqLnRhci5neiIsIioudGd6IiwiKi56aXAiLCIqLnppcHgiXX0seyJkZXNjcmlwdGlvbiI6IkFsbCBGaWxlcyIsImZpbHRlciI6WyIqIl19XSwiaW5jbHVkZVdlYkJyb3dzZXIiOnRydWUsIml0ZW1zVG9TZWxlY3QiOiJmaWxlcyIsIm5hbWUiOiJTb3VyY2VEYXRhc2V0X0NTVjJfMyIsInByb21wdCI6IlNvdXJjZSBDU1YgKFNpbVN0YWR0IFBWIFBvdGVudGFpbCkiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOnRydWUsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImFjY2Vzc01vZGUiOiJyZWFkIiwiZmlsdGVycyI6W3siZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIiouZ21sIiwiKi54bWwiLCIqLmd6Il19LHsiZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIiouZ21sIl19LHsiZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIioueG1sIl19LHsiZGVzY3JpcHRpb24iOiJDb21wcmVzc2VkIENpdHlHTUwgRmlsZXMiLCJmaWx0ZXIiOlsiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBGaWxlcyIsImZpbHRlciI6WyIqLmJ6MiIsIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IkFyY2hpdmUgRmlsZXMiLCJmaWx0ZXIiOlsiKi43eiIsIiouN3ppcCIsIioucmFyIiwiKi5ydnoiLCIqLnRhciIsIioudGFyLmJ6MiIsIioudGFyLmd6IiwiKi50Z3oiLCIqLnppcCIsIiouemlweCJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpbmNsdWRlV2ViQnJvd3NlciI6dHJ1ZSwiaXRlbXNUb1NlbGVjdCI6ImZpbGVzIiwibmFtZSI6IlNvdXJjZURhdGFzZXRfQ0lUWUdNTF80IiwicHJvbXB0IjoiU291cmNlIENpdHlHTUwgRmlsZSAoU3R1dHRnYXJ0IC0gU3RvZWNrYWNoKSIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6dHJ1ZSwidHlwZSI6ImZpbGUiLCJ2YWxpZGF0ZUV4aXN0ZW5jZSI6ZmFsc2UsInZhbHVlVHlwZSI6InN0cmluZyJ9LHsiYWNjZXNzTW9kZSI6InJlYWQiLCJmaWx0ZXJzIjpbeyJkZXNjcmlwdGlvbiI6Ikdlb1BhY2thZ2UgRmlsZXMiLCJmaWx0ZXIiOlsiKi5ncGtnIl19LHsiZGVzY3JpcHRpb24iOiJDb21wcmVzc2VkIEZpbGVzIiwiZmlsdGVyIjpbIiouYnoyIiwiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiQXJjaGl2ZSBGaWxlcyIsImZpbHRlciI6WyIqLjd6IiwiKi43emlwIiwiKi5yYXIiLCIqLnJ2eiIsIioudGFyIiwiKi50YXIuYnoyIiwiKi50YXIuZ3oiLCIqLnRneiIsIiouemlwIiwiKi56aXB4Il19LHsiZGVzY3JpcHRpb24iOiJBbGwgZmlsZXMiLCJmaWx0ZXIiOlsiKiJdfV0sImluY2x1ZGVXZWJCcm93c2VyIjp0cnVlLCJpdGVtc1RvU2VsZWN0IjoiZmlsZXMiLCJuYW1lIjoiU291cmNlRGF0YXNldF9PR0NHRU9QQUNLQUdFIiwicHJvbXB0IjoiSW5wdXQgR2VvUGFja2FnZSBEZW1vZ3JhcGhpYyBEYXRhIChJTkZBUzM2MCkiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOnRydWUsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImFjY2Vzc01vZGUiOiJ3cml0ZSIsIml0ZW1zVG9TZWxlY3QiOiJmb2xkZXJzIiwibmFtZSI6IkRlc3REYXRhc2V0X0NTVjJfMiIsInByb21wdCI6IkRlc3RpbmF0aW9uIENTViIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6ZmFsc2UsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifV19" +#! > +#! <PARAMETER_INFO> +#! <INFO NAME="DestDataset_CSV2_2" IS_STAND_ALONE="false" /> +#! <INFO NAME="SourceDataset_CITYGML_4" IS_STAND_ALONE="false" /> +#! <INFO NAME="SourceDataset_CSV2" IS_STAND_ALONE="false" /> +#! <INFO NAME="SourceDataset_CSV2_3" IS_STAND_ALONE="false" /> +#! <INFO NAME="SourceDataset_OGCGEOPACKAGE" IS_STAND_ALONE="false" /> +#! </PARAMETER_INFO> +#! </USER_PARAMETERS> +#! <COMMENTS> +#! <COMMENT +#! IDENTIFIER="11" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt; font-weight:600;">DATASET 1 to integrate to the CityGML</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt;">: medium_stoeckach_DIN18599_HEATING_clean [CSV2]</span></p></body></html>" +#! POSITION="-1126.5032325323248 -761.75208752087531" +#! TOP_LEFT="-1126.5032325323248 -761.75208752087531" +#! BOTTOM_RIGHT="27.496767467675227 -762.75208752087531" +#! BOUNDING_RECT="-1126.5032325323248 -761.75208752087531 1154 1" +#! ORDER="500000000000003" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="10" +#! /> +#! <COMMENT +#! IDENTIFIER="21" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt; font-weight:600;">DATASET 2 to integrate to the CityGML</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Sans'; font-size:10pt;">: PvPotentialAggregationStoeckach_Clean [CSV2]</span></p></body></html>" +#! POSITION="-1126.5422954229539 -1127.9680980143132" +#! TOP_LEFT="-1126.5422954229539 -1127.9680980143132" +#! BOTTOM_RIGHT="-76.542295422953885 -1128.9680980143132" +#! BOUNDING_RECT="-1126.5422954229539 -1127.9680980143132 1050 1" +#! ORDER="500000000000007" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="17" +#! /> +#! <COMMENT +#! IDENTIFIER="43" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Only GroundSurface selected in case we want to show in 2D Visualization</p></body></html>" +#! POSITION="-935.96477152271518 -342.88537329817746" +#! TOP_LEFT="-935.96477152271518 -342.88537329817746" +#! BOTTOM_RIGHT="-185.96477152271518 -392.88537329817746" +#! BOUNDING_RECT="-935.96477152271518 -342.88537329817746 750 50" +#! ORDER="500000000000020" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.28627450980392155,0.29803921568627451,0.0078431372549019607,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="0" +#! /> +#! <COMMENT +#! IDENTIFIER="57" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Overlaying the Polygon Demographic data to CityGML Centerpoint</p></body></html>" +#! POSITION="1979.7301495093429 -2095.6713837469865" +#! TOP_LEFT="1979.7301495093429 -2095.6713837469865" +#! BOTTOM_RIGHT="2456.4082745093428 -2096.6713837469865" +#! BOUNDING_RECT="1979.7301495093429 -2095.6713837469865 476.67812499999997 1" +#! ORDER="500000000000026" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.42352941176470588,0.16862745098039217,0.46666666666666667,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="47" +#! /> +#! <COMMENT +#! IDENTIFIER="60" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Overlaying the Point Demographic data to CityGML Footprint</p></body></html>" +#! POSITION="1147.9065345030335 -1865.0447274804239" +#! TOP_LEFT="1147.9065345030335 -1865.0447274804239" +#! BOTTOM_RIGHT="1624.5846595030334 -1866.0447274804239" +#! BOUNDING_RECT="1147.9065345030335 -1865.0447274804239 476.67812499999997 1" +#! ORDER="500000000000026" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.42352941176470588,0.16862745098039217,0.46666666666666667,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="59" +#! /> +#! <COMMENT +#! IDENTIFIER="67" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:13pt; font-weight:600;">DEMOGRAPHIC DATA in Point/ Area</span></p></body></html>" +#! POSITION="-1107.0547983784891 -1997.0255556857519" +#! TOP_LEFT="-1107.0547983784891 -1997.0255556857519" +#! BOTTOM_RIGHT="-3.8733923021336523 -2117.6514619448144" +#! BOUNDING_RECT="-1107.0547983784891 -1997.0255556857519 1103.1814060763554 120.62590625906259" +#! ORDER="500000000000032" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="0" +#! /> +#! </COMMENTS> +#! <CONSTANTS> +#! </CONSTANTS> +#! <BOOKMARKS> +#! <BOOKMARK +#! IDENTIFIER="25" +#! NAME="CSV Data (SimStadt)" +#! DESCRIPTION="" +#! TOP_LEFT="-1219.630251858074 -633.68689242447977" +#! ORDER="500000000000009" +#! PALETTE_COLOR="Color2" +#! BOTTOM_RIGHT="167.5016750167506 -1585.0158501585029" +#! BOUNDING_RECT="-1219.630251858074 -633.68689242447977 1387.1319268748246 951.32895773402311" +#! STICKY="true" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,1" +#! CONTENTS="21 10 17 11 " +#! > +#! </BOOKMARK> +#! <BOOKMARK +#! IDENTIFIER="26" +#! NAME="CityGML Input" +#! DESCRIPTION="" +#! TOP_LEFT="-2195.0939458414186 -989.00352503525039" +#! ORDER="500000000000014" +#! PALETTE_COLOR="Color2" +#! BOTTOM_RIGHT="-1328.39359439346 -2638.3255738112935" +#! BOUNDING_RECT="-2195.0939458414186 -989.00352503525039 866.70035144795861 1649.3220487760429" +#! STICKY="true" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,1" +#! CONTENTS="32 28 33 34 31 35 29 30 " +#! > +#! </BOOKMARK> +#! <BOOKMARK +#! IDENTIFIER="27" +#! NAME="Aggregate SimStadt Result" +#! DESCRIPTION="" +#! TOP_LEFT="271.51910863370927 -282.12087676432316" +#! ORDER="500000000000016.13" +#! PALETTE_COLOR="Color9" +#! BOTTOM_RIGHT="2556.394572403573 -1434.4405739139356" +#! BOUNDING_RECT="271.51910863370927 -282.12087676432316 2284.8754637698639 1152.3196971496125" +#! STICKY="true" +#! COLOUR="0.42352941176470588,0.16862745098039217,0.46666666666666667,1" +#! CONTENTS="15 18 7 14 20 " +#! > +#! </BOOKMARK> +#! <BOOKMARK +#! IDENTIFIER="58" +#! NAME="Demographic data from INFRA360" +#! DESCRIPTION="" +#! TOP_LEFT="-1254.6257185321344 -1781.0970459431369" +#! ORDER="500000000000027" +#! PALETTE_COLOR="Color2" +#! BOTTOM_RIGHT="198.2396873149064 -2685.7113552441247" +#! BOUNDING_RECT="-1254.6257185321344 -1781.0970459431369 1452.8654058470408 904.61430930098777" +#! STICKY="true" +#! COLOUR="0.24313725490196078,0.40784313725490196,0.20784313725490197,1" +#! CONTENTS="44 67 45 " +#! > +#! </BOOKMARK> +#! <BOOKMARK +#! IDENTIFIER="64" +#! NAME="Output Data (CityGML + SimStadt Result + Demographic)" +#! DESCRIPTION="" +#! TOP_LEFT="2715.6626654776319 -1547.706864482976" +#! ORDER="500000000000017" +#! PALETTE_COLOR="Color6" +#! BOTTOM_RIGHT="3714.4268462856771 -2368.0275676900083" +#! BOUNDING_RECT="2715.6626654776319 -1547.706864482976 998.76418080804524 820.32070320703201" +#! STICKY="true" +#! COLOUR="0.20000000000000001,0.49803921568627452,0.51764705882352946,1" +#! CONTENTS="65 " +#! > +#! </BOOKMARK> +#! <BOOKMARK +#! IDENTIFIER="68" +#! NAME="Aggregate INFAS360 DATA" +#! DESCRIPTION="" +#! TOP_LEFT="265.00176832108286 -1547.706864482976" +#! ORDER="500000000000016.13" +#! PALETTE_COLOR="Color9" +#! BOTTOM_RIGHT="2556.3780227966208 -2843.2661375794082" +#! BOUNDING_RECT="265.00176832108286 -1547.706864482976 2291.3762544755382 1295.5592730964322" +#! STICKY="true" +#! COLOUR="0.42352941176470588,0.16862745098039217,0.46666666666666667,1" +#! CONTENTS="48 50 56 59 52 54 61 47 57 60 62 63 49 " +#! > +#! </BOOKMARK> +#! </BOOKMARKS> +#! <TRANSFORMERS> +#! <TRANSFORMER +#! IDENTIFIER="7" +#! TYPE="FeatureMerger" +#! VERSION="19" +#! POSITION="471.67197894201161 -441.37849378493797" +#! BOUNDING_RECT="471.67197894201161 -441.37849378493797 516 71" +#! ORDER="500000000000002" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21313" +#! > +#! <OUTPUT_FEAT NAME="MERGED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="UNMERGED_REQUESTOR"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <OUTPUT_FEAT NAME="USED_SUPPLIER"/> +#! <FEAT_COLLAPSED COLLAPSED="2"/> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="numReferences" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <OUTPUT_FEAT NAME="UNUSED_SUPPLIER"/> +#! <FEAT_COLLAPSED COLLAPSED="3"/> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <OUTPUT_FEAT NAME="<REJECTED>"/> +#! <FEAT_COLLAPSED COLLAPSED="4"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_PARM PARM_NAME="ADVANCED_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_MODE" PARM_VALUE="Merge Supplier"/> +#! <XFORM_PARM PARM_NAME="ATTR_CONFLICT_RES" PARM_VALUE="Use Requestor"/> +#! <XFORM_PARM PARM_NAME="CLEANING_TOLERANCE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CONNECT_Z_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GENERATE_LIST_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="GEOM_TYPE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_PROCESSING_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="IGNORE_NULLS" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="JOIN_ATTRIBUTES_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="JOIN_KEYS" PARM_VALUE="<at>Value<openparen>gml_parent_id<closeparen> <at>Value<openparen>GMLId<closeparen> AUTO"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="MERGE_COUNT_ATTR" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="MERGE_TYPE" PARM_VALUE="Attributes Only"/> +#! <XFORM_PARM PARM_NAME="MODE_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="PARAMETERS" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="PRESERVE_FEATURE_ORDER" PARM_VALUE="Per Output Port"/> +#! <XFORM_PARM PARM_NAME="PROCESS_DUPS" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="REJECT_NULL_MISSING_KEYS" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="SUPPLIERS_FIRST" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="SUPPLIER_PREFIX" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="FeatureMerger"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="14" +#! TYPE="AttributeManager" +#! VERSION="3" +#! POSITION="697.42161643838517 -1191.8845688456884" +#! BOUNDING_RECT="697.42161643838517 -1191.8845688456884 454 71" +#! ORDER="500000000000004" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21313" +#! > +#! <OUTPUT_FEAT NAME="OUTPUT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_GRP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_HANDLING" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_TABLE" PARM_VALUE="gml_id gml_id REMOVE gml_parent_id gml_id RENAME_SET_VALUE citygml_target_uri citygml_target_uri REMOVE citygml_feature_role citygml_feature_role REMOVE citygml_feature_role_attr_name citygml_feature_role_attr_name REMOVE citygml_feature_role_attr_val citygml_feature_role_attr_val REMOVE gml_description gml_description REMOVE gml_name gml_name REMOVE citygml_creationDate citygml_creationDate REMOVE citygml_terminationDate citygml_terminationDate REMOVE externalReference<opencurly><closecurly>.externalObject.name externalReference<opencurly><closecurly>.externalObject.name REMOVE externalReference<opencurly><closecurly>.externalObject.uri externalReference<opencurly><closecurly>.externalObject.uri REMOVE externalReference<opencurly><closecurly>.informationSystem externalReference<opencurly><closecurly>.informationSystem REMOVE citygml_generalizes_to<opencurly><closecurly>.xlink_href citygml_generalizes_to<opencurly><closecurly>.xlink_href REMOVE citygml_relative_to_terrain citygml_relative_to_terrain REMOVE citygml_relative_to_water citygml_relative_to_water REMOVE citygml_appearance<opencurly><closecurly>.xlink_href citygml_appearance<opencurly><closecurly>.xlink_href REMOVE citygml_level_of_detail<opencurly><closecurly> citygml_level_of_detail<opencurly><closecurly> REMOVE citygml_opening<opencurly><closecurly>.xlink_href citygml_opening<opencurly><closecurly>.xlink_href REMOVE citygml_address citygml_address REMOVE citygml_address<opencurly><closecurly>.xlink_href citygml_address<opencurly><closecurly>.xlink_href REMOVE citygml_appearance_member<opencurly><closecurly>.xlink_href citygml_appearance_member<opencurly><closecurly>.xlink_href REMOVE citygml_bounded_by<opencurly><closecurly>.xlink_href citygml_bounded_by<opencurly><closecurly>.xlink_href REMOVE citygml_city_object_member<opencurly><closecurly>.xlink_href citygml_city_object_member<opencurly><closecurly>.xlink_href REMOVE citygml_class citygml_class REMOVE citygml_class_codeSpace citygml_class_codeSpace REMOVE citygml_consists_of_building_part<opencurly><closecurly>.xlink_href citygml_consists_of_building_part<opencurly><closecurly>.xlink_href REMOVE citygml_function<opencurly><closecurly> citygml_function<opencurly><closecurly> REMOVE citygml_function<opencurly><closecurly>.codeSpace citygml_function<opencurly><closecurly>.codeSpace REMOVE citygml_interior_building_installation<opencurly><closecurly>.xlink_href citygml_interior_building_installation<opencurly><closecurly>.xlink_href REMOVE citygml_interior_room<opencurly><closecurly>.xlink_href citygml_interior_room<opencurly><closecurly>.xlink_href REMOVE citygml_measured_height citygml_measured_height REMOVE citygml_measured_height_units citygml_measured_height_units REMOVE citygml_outer_building_installation<opencurly><closecurly>.xlink_href citygml_outer_building_installation<opencurly><closecurly>.xlink_href REMOVE citygml_roof_type citygml_roof_type NO_OP citygml_roof_type_codeSpace citygml_roof_type_codeSpace NO_OP citygml_storey_heights_above_ground citygml_storey_heights_above_ground REMOVE citygml_storey_heights_above_ground_units citygml_storey_heights_above_ground_units REMOVE citygml_storey_heights_below_ground citygml_storey_heights_below_ground REMOVE citygml_storey_heights_below_ground_units citygml_storey_heights_below_ground_units REMOVE citygml_storeys_above_ground citygml_storeys_above_ground REMOVE citygml_storeys_below_ground citygml_storeys_below_ground NO_OP citygml_usage<opencurly><closecurly> citygml_usage<opencurly><closecurly> NO_OP citygml_usage<opencurly><closecurly>.codeSpace citygml_usage<opencurly><closecurly>.codeSpace NO_OP citygml_year_of_construction citygml_year_of_construction NO_OP citygml_year_of_demolition citygml_year_of_demolition REMOVE gml_feature_member<opencurly><closecurly>.xlink_href gml_feature_member<opencurly><closecurly>.xlink_href REMOVE fme_feature_type fme_feature_type REMOVE GMLId GMLId REMOVE Latitude Latitude NO_OP Longitude Longitude NO_OP X-coordinate X-coordinate NO_OP Y-coordinate Y-coordinate NO_OP LOD LOD NO_OP Year<space>of<space>construction Year<space>of<space>construction NO_OP Refurbishment<space>Variant Refurbishment<space>Variant NO_OP ALKIS<space>code ALKIS<space>code NO_OP PrimaryUsageZoneType PrimaryUsageZoneType NO_OP PrimaryUsageZoneArea PrimaryUsageZoneArea NO_OP SecondaryUsageZoneType SecondaryUsageZoneType NO_OP SecondaryUsageZoneArea SecondaryUsageZoneArea NO_OP BuildingType BuildingType NO_OP Footprint<space>area Footprint<space>area NO_OP Total<space>wall<space>thermal<space>area<space>above<space>ground Total<space>wall<space>thermal<space>area<space>above<space>ground NO_OP Total<space>wall<space>thermal<space>area<space>below<space>ground Total<space>wall<space>thermal<space>area<space>below<space>ground NO_OP Total<space>outwall<space>area Total<space>outwall<space>area NO_OP Total<space>sharedwall<space>area Total<space>sharedwall<space>area NO_OP Total<space>roof<space>area Total<space>roof<space>area NO_OP Gross<space>volume Gross<space>volume NO_OP Is<space>Gross<space>volume<space>approximated? Is<space>Gross<space>volume<space>approximated? NO_OP Heated<space>volume Heated<space>volume NO_OP Ridge<solidus>mean<space>Height Ridge<solidus>mean<space>Height NO_OP Eaves<solidus>mean<space>Height Eaves<solidus>mean<space>Height NO_OP Storey<space>number Storey<space>number NO_OP Average<space>Storey<space>Height Average<space>Storey<space>Height NO_OP Number<space>of<space>households Number<space>of<space>households NO_OP Number<space>of<space>occupants Number<space>of<space>occupants NO_OP Attic<space>Heating Attic<space>Heating NO_OP Basement<space>Heating Basement<space>Heating NO_OP Basement<space>ceiling<space>height<space>above<space>ground Basement<space>ceiling<space>height<space>above<space>ground NO_OP Surface<space>area<space>to<space>volume<space>ratio Surface<space>area<space>to<space>volume<space>ratio NO_OP Heated<space>area Heated<space>area NO_OP Mean<space>Uvalue Mean<space>Uvalue NO_OP Specific<space>domestic<space>hot<space>water<space>demand Specific<space>domestic<space>hot<space>water<space>demand NO_OP Specific<space>space<space>heating<space>demand Specific<space>space<space>heating<space>demand NO_OP Total<space>Yearly<space>Heat+DHW<space>demand Total<space>Yearly<space>Heat+DHW<space>demand NO_OP January<space>Heating<space>Demand January<space>Heating<space>Demand NO_OP February<space>Heating<space>Demand February<space>Heating<space>Demand NO_OP March<space>Heating<space>Demand March<space>Heating<space>Demand NO_OP April<space>Heating<space>Demand April<space>Heating<space>Demand NO_OP May<space>Heating<space>Demand May<space>Heating<space>Demand NO_OP June<space>Heating<space>Demand June<space>Heating<space>Demand NO_OP July<space>Heating<space>Demand July<space>Heating<space>Demand NO_OP August<space>Heating<space>Demand August<space>Heating<space>Demand NO_OP September<space>Heating<space>Demand September<space>Heating<space>Demand NO_OP October<space>Heating<space>Demand October<space>Heating<space>Demand NO_OP November<space>Heating<space>Demand November<space>Heating<space>Demand NO_OP December<space>Heating<space>demand December<space>Heating<space>demand NO_OP BuildingID BuildingID REMOVE PV<space>potential<space>yield<space><openbracket>MWh<solidus>a<closebracket> PV<space>potential<space>yield<space><openbracket>MWh<solidus>a<closebracket> NO_OP"/> +#! <XFORM_PARM PARM_NAME="MULTI_FEATURE_MODE" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_MODE_DISPLAY" PARM_VALUE="No Substitution"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_VALUE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_PRIOR_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_SUBSEQUENT_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeManager"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="18" +#! TYPE="FeatureMerger" +#! VERSION="19" +#! POSITION="1086.1366858113024 -441.37849378493797" +#! BOUNDING_RECT="1086.1366858113024 -441.37849378493797 516 71" +#! ORDER="500000000000005" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21313" +#! > +#! <OUTPUT_FEAT NAME="MERGED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingID" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="UNMERGED_REQUESTOR"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <OUTPUT_FEAT NAME="USED_SUPPLIER"/> +#! <FEAT_COLLAPSED COLLAPSED="2"/> +#! <XFORM_ATTR ATTR_NAME="BuildingID" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="numReferences" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <OUTPUT_FEAT NAME="UNUSED_SUPPLIER"/> +#! <FEAT_COLLAPSED COLLAPSED="3"/> +#! <XFORM_ATTR ATTR_NAME="BuildingID" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="3" /> +#! <OUTPUT_FEAT NAME="<REJECTED>"/> +#! <FEAT_COLLAPSED COLLAPSED="4"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_parent_id" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_target_uri" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role_attr_val" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_description" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="gml_name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_creationDate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_terminationDate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.name" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.externalObject.uri" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="externalReference{}.informationSystem" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_generalizes_to{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_terrain" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_relative_to_water" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_appearance{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_level_of_detail{}" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="citygml_opening{}.xlink_href" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="GMLId" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="fme_feature_type" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="BuildingID" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="4" /> +#! <XFORM_PARM PARM_NAME="ADVANCED_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_MODE" PARM_VALUE="Merge Supplier"/> +#! <XFORM_PARM PARM_NAME="ATTR_CONFLICT_RES" PARM_VALUE="Use Requestor"/> +#! <XFORM_PARM PARM_NAME="CLEANING_TOLERANCE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CONNECT_Z_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GENERATE_LIST_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="GEOM_TYPE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_PROCESSING_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="IGNORE_NULLS" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="JOIN_ATTRIBUTES_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="JOIN_KEYS" PARM_VALUE="<at>Value<openparen>gml_parent_id<closeparen> <at>Value<openparen>BuildingID<closeparen> AUTO"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="MERGE_COUNT_ATTR" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="MERGE_TYPE" PARM_VALUE="Attributes Only"/> +#! <XFORM_PARM PARM_NAME="MODE_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="PARAMETERS" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="PRESERVE_FEATURE_ORDER" PARM_VALUE="Per Output Port"/> +#! <XFORM_PARM PARM_NAME="PROCESS_DUPS" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="REJECT_NULL_MISSING_KEYS" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="SUPPLIERS_FIRST" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="SUPPLIER_PREFIX" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="FeatureMerger_2"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="47" +#! TYPE="PointOnAreaOverlayer" +#! VERSION="9" +#! POSITION="1813.69916223072 -2406.7280929095837" +#! BOUNDING_RECT="1813.69916223072 -2406.7280929095837 598.43433410424291 71" +#! ORDER="500000000000021" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="POINT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ags20" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_1p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_2p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_3p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_4p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_5p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_dichte" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u03_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u18_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_03u06_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_06u10_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_10u15_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_15u18_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_18u30_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_30u45_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_45u60_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_60u65_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65u75_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_75_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ausl_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_gesch" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_lebpar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig18" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_m" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verh" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verw" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_w" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_rentner_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl3" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl4" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl5" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl6" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_euro27_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_eusonst_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_sonst_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_welt_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg3" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg4" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg5" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg6" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg7" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg8" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg9" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg10" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg11" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg12" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg13" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg14" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg99" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="AREA"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ags20" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_1p" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_2p" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_3p" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_4p" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_5p" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_dichte" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u03_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u18_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_03u06_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_06u10_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_10u15_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_15u18_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_18u30_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_30u45_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_45u60_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_60u65_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65u75_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_75_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ausl_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_gesch" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_lebpar" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig18" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_m" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verh" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verw" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_w" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_rentner_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl1" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl2" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl3" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl4" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl5" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl6" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_euro27_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_eusonst_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_sonst_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_welt_anz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg1" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg2" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg3" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg4" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg5" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg6" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg7" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg8" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg9" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg10" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg11" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg12" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg13" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg14" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg99" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <OUTPUT_FEAT NAME="<REJECTED>"/> +#! <FEAT_COLLAPSED COLLAPSED="2"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ags20" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_1p" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_2p" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_3p" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_4p" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_5p" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_dichte" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u03_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u18_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_03u06_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_06u10_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_10u15_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_15u18_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_18u30_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_30u45_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_45u60_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_60u65_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65u75_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_75_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ausl_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_gesch" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_lebpar" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig18" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_m" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verh" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verw" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_w" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_rentner_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl1" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl2" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl3" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl4" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl5" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl6" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_euro27_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_eusonst_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_sonst_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_welt_anz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg1" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg2" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg3" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg4" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg5" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg6" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg7" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg8" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg9" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg10" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg11" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg12" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg13" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg14" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg99" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP" PARM_VALUE="YES"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP1" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP_CANDIDATE" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_MODE" PARM_VALUE="Merge Incoming"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_SUPER_GROUP" PARM_VALUE="FME_DISCLOSURE_OPEN"/> +#! <XFORM_PARM PARM_NAME="ATTR_CONFLICT_RES" PARM_VALUE="Use Original"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="DEAGGREGATE_INPUT" PARM_VALUE="Yes"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_PROCESSING_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="INCOMING_PREFIX" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="OV_ATTR" PARM_VALUE="_overlaps"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="POLYS_FIRST" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="CityGMLOverlayer"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="50" +#! TYPE="Reprojector" +#! VERSION="5" +#! POSITION="400.39933639102435 -2147.9364424930795" +#! BOUNDING_RECT="400.39933639102435 -2147.9364424930795 454 71" +#! ORDER="500000000000022" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="REPROJECTED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="DEST" PARM_VALUE="EPSG:31463"/> +#! <XFORM_PARM PARM_NAME="INTERPOLATION_TYPE_NAME" PARM_VALUE="Nearest Neighbor"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="RASTER_CELL_SIZE" PARM_VALUE="Preserve Cells"/> +#! <XFORM_PARM PARM_NAME="RASTER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="RASTER_TOLERANCE" PARM_VALUE="0.0"/> +#! <XFORM_PARM PARM_NAME="SOURCE" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="Reprojector"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="48" +#! TYPE="2DForcer" +#! VERSION="0" +#! POSITION="1183.4127845030334 -1698.7262843521721" +#! BOUNDING_RECT="1183.4127845030334 -1698.7262843521721 454 71" +#! ORDER="500000000000024" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="2D"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="2DForcer"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="49" +#! TYPE="Reprojector" +#! VERSION="5" +#! POSITION="400.39933639102441 -2461.8088817730281" +#! BOUNDING_RECT="400.39933639102441 -2461.8088817730281 454 71" +#! ORDER="500000000000022" +#! PARMS_EDITED="false" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="REPROJECTED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="ags20" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_1p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_2p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_3p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_4p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_5p" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_dichte" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u03_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_00u18_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_03u06_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_06u10_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_10u15_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_15u18_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_18u30_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_30u45_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_45u60_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_60u65_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_65u75_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_75_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ausl_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_gesch" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_lebpar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_ledig18" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_m" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verh" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_verw" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ew_w" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_rentner_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl3" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl4" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl5" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_hh_eink_kl6" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_euro27_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_eusonst_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_sonst_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_ausl_welt_anz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg3" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg4" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg5" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg6" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg7" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg8" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg9" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg10" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg11" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg12" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg13" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg14" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="sb_kba_seg99" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="DEST" PARM_VALUE="EPSG:31463"/> +#! <XFORM_PARM PARM_NAME="INTERPOLATION_TYPE_NAME" PARM_VALUE="Nearest Neighbor"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="RASTER_CELL_SIZE" PARM_VALUE="Preserve Cells"/> +#! <XFORM_PARM PARM_NAME="RASTER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="RASTER_TOLERANCE" PARM_VALUE="0.0"/> +#! <XFORM_PARM PARM_NAME="SOURCE" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="Reprojector_2"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="54" +#! TYPE="CenterPointReplacer" +#! VERSION="3" +#! POSITION="1958.1334963349627 -1698.7262843521721" +#! BOUNDING_RECT="1958.1334963349627 -1698.7262843521721 454 71" +#! ORDER="500000000000030" +#! PARMS_EDITED="false" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="POINT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="UNTOUCHED"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="POINTTYPE" PARM_VALUE="CENTER"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="CenterPointReplacer"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="59" +#! TYPE="PointOnAreaOverlayer" +#! VERSION="9" +#! POSITION="1147.9065345030335 -2095.6713837469865" +#! BOUNDING_RECT="1147.9065345030335 -2095.6713837469865 489.50624999999997 71" +#! ORDER="500000000000021" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="21806" +#! > +#! <OUTPUT_FEAT NAME="POINT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="AREA"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="_overlaps" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <OUTPUT_FEAT NAME="<REJECTED>"/> +#! <FEAT_COLLAPSED COLLAPSED="2"/> +#! <XFORM_ATTR ATTR_NAME="ags27" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="plz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ort" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ortz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ot1" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ot2" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="stn" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="hnr" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="hnrz" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_solar" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_basistyp" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_str_typ" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_vorwahl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_n" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_bj_kl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="casa_kompl" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fid" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_roof_type_codeSpace" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_storeys_below_ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_usage{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Latitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Longitude" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="X-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Y-coordinate" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="LOD" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Year of construction" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Refurbishment Variant" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="ALKIS code" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PrimaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="SecondaryUsageZoneArea" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="BuildingType" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Footprint area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total wall thermal area below ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total outwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total sharedwall area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total roof area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Gross volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Is Gross volume approximated?" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated volume" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Ridge/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Eaves/mean Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Storey number" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Average Storey Height" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of households" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Number of occupants" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Attic Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement Heating" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Basement ceiling height above ground" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Surface area to volume ratio" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Heated area" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Mean Uvalue" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific domestic hot water demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Specific space heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="Total Yearly Heat+DHW demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="January Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="February Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="March Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="April Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="May Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="June Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="July Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="August Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="September Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="October Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="November Heating Demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="December Heating demand" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="PV potential yield [MWh/a]" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="2" /> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP" PARM_VALUE="YES"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP1" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_GROUP_CANDIDATE" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_MODE" PARM_VALUE="Merge Incoming"/> +#! <XFORM_PARM PARM_NAME="ATTR_ACCUM_SUPER_GROUP" PARM_VALUE="FME_DISCLOSURE_OPEN"/> +#! <XFORM_PARM PARM_NAME="ATTR_CONFLICT_RES" PARM_VALUE="Use Original"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="CANDIDATE_LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="DEAGGREGATE_INPUT" PARM_VALUE="Yes"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_BY_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GROUP_PROCESSING_GROUP" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="INCOMING_PREFIX" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_ATTRS_TO_INCLUDE_MODE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="LIST_NAME" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="OV_ATTR" PARM_VALUE="_overlaps"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="POLYS_FIRST" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="CityGMLPointOverlayer"/> +#! </TRANSFORMER> +#! </TRANSFORMERS> +#! <FEAT_LINKS> +#! <FEAT_LINK +#! IDENTIFIER="12" +#! SOURCE_NODE="10" +#! TARGET_NODE="7" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 1 SUPPLIER" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="19" +#! SOURCE_NODE="17" +#! TARGET_NODE="18" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 1 SUPPLIER" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="36" +#! SOURCE_NODE="32" +#! TARGET_NODE="7" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 0 REQUESTOR" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="-1066 -539" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="51" +#! SOURCE_NODE="44" +#! TARGET_NODE="50" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="55" +#! SOURCE_NODE="45" +#! TARGET_NODE="49" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="20" +#! SOURCE_NODE="7" +#! TARGET_NODE="18" +#! SOURCE_PORT_DESC="fo 0 MERGED" +#! TARGET_PORT_DESC="fi 0 REQUESTOR" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="53" +#! SOURCE_NODE="14" +#! TARGET_NODE="48" +#! SOURCE_PORT_DESC="fo 0 OUTPUT" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="15" +#! SOURCE_NODE="18" +#! TARGET_NODE="14" +#! SOURCE_PORT_DESC="fo 0 MERGED" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="66" +#! SOURCE_NODE="47" +#! TARGET_NODE="65" +#! SOURCE_PORT_DESC="fo 0 POINT" +#! TARGET_PORT_DESC="-1" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="61" +#! SOURCE_NODE="48" +#! TARGET_NODE="59" +#! SOURCE_PORT_DESC="fo 0 2D" +#! TARGET_PORT_DESC="fi 1 AREA" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="56" +#! SOURCE_NODE="49" +#! TARGET_NODE="47" +#! SOURCE_PORT_DESC="fo 0 REPROJECTED" +#! TARGET_PORT_DESC="fi 1 AREA" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="63" +#! SOURCE_NODE="50" +#! TARGET_NODE="59" +#! SOURCE_PORT_DESC="fo 0 REPROJECTED" +#! TARGET_PORT_DESC="fi 0 POINT" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="52" +#! SOURCE_NODE="54" +#! TARGET_NODE="47" +#! SOURCE_PORT_DESC="fo 0 POINT" +#! TARGET_PORT_DESC="fi 0 POINT" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="62" +#! SOURCE_NODE="59" +#! TARGET_NODE="54" +#! SOURCE_PORT_DESC="fo 1 AREA" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0.82352941176470584,0.82352941176470584,0.82352941176470584,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! </FEAT_LINKS> +#! <BREAKPOINTS> +#! </BREAKPOINTS> +#! <ATTR_LINKS> +#! </ATTR_LINKS> +#! <SUBDOCUMENTS> +#! </SUBDOCUMENTS> +#! <LOOKUP_TABLES> +#! </LOOKUP_TABLES> +#! </WORKSPACE> + +FME_PYTHON_VERSION 38 +ARCGIS_COMPATIBILITY ARCGIS_AUTO +GUI IGNORE SourceDataset_CSV2_1,CSV2_IN_FIELDS_GROUP_CSV2_1,CSV2_IN_DELIMITER_CSV2_1,CSV2_IN_FIELD_NAMES_LINE_CSV2_1,CSV2_IN_DATA_START_LINE_CSV2_1,CSV2_IN_ADVANCED_GROUP_CSV2_1,CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_1,CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_1,CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_1,CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1,CSV2_IN_FIELD_NAMES_GROUP_CSV2_1,CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_1,CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_1,CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_1,CSV2_IN_FIELD_VALUES_GROUP_CSV2_1,CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_1,CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_1,CSV2_IN_ENCODING_GROUP_CSV2_1,CSV2_IN_ENCODING_CSV2_1,CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_1,CSV2_IN_SKIPPED_LINES_GROUP_CSV2_1,CSV2_IN_READ_SKIPPED_LINES_CSV2_1,CSV2_IN_NETWORK_AUTHENTICATION_CSV2_1,SourceDataset_CSV2_2,CSV2_IN_FIELDS_GROUP_CSV2_2,CSV2_IN_DELIMITER_CSV2_2,CSV2_IN_FIELD_NAMES_LINE_CSV2_2,CSV2_IN_DATA_START_LINE_CSV2_2,CSV2_IN_ADVANCED_GROUP_CSV2_2,CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_2,CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_2,CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_2,CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_2,CSV2_IN_FIELD_NAMES_GROUP_CSV2_2,CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_2,CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_2,CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_2,CSV2_IN_FIELD_VALUES_GROUP_CSV2_2,CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_2,CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_2,CSV2_IN_ENCODING_GROUP_CSV2_2,CSV2_IN_ENCODING_CSV2_2,CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_2,CSV2_IN_SKIPPED_LINES_GROUP_CSV2_2,CSV2_IN_READ_SKIPPED_LINES_CSV2_2,CSV2_IN_NETWORK_AUTHENTICATION_CSV2_2,SourceDataset_CITYGML_1,CITYGML_IN_FME_GROUP_NAMED1_CITYGML_1,CITYGML_IN_USE_CITYGML_SCHEMA_FILES_CITYGML_1,CITYGML_IN_ADE_XSD_DOC_CITYGML_1,CITYGML_IN_VALIDATE_DATASET_CITYGML_1,CITYGML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_CITYGML_1,CITYGML_IN_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1,CITYGML_IN_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE_CITYGML_1,CITYGML_IN_FME_GROUP_NAMED3_CITYGML_1,CITYGML_IN_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1,CITYGML_IN_LODS_TO_READ_CITYGML_1,CITYGML_IN_FME_GROUP_NAMED4_CITYGML_1,CITYGML_IN_SRS_AXIS_ORDER_CITYGML_1,CITYGML_IN_TEXTURE_COORDINATES_ORDER_FIX_CITYGML_1,CITYGML_IN_USE_SEARCH_ENVELOPE_CITYGML_1,CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1,CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1,CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1,CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1,CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1,CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1,CITYGML_IN_NETWORK_AUTHENTICATION_CITYGML_1,SourceDataset_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_FME_CONNECTION_GROUP_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_ADVANCED_GROUP_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_ENFORCE_FOREIGN_KEY_INTEGRITY_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_USE_SEARCH_ENVELOPE_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1,OGCGEOPACKAGE_IN_NETWORK_AUTHENTICATION_OGCGEOPACKAGE_1,DestDataset_CSV2_4,CSV2_OUT_DATASET_GROUP_CSV2_4,CSV2_OUT_EXTENSION_CSV2_4,CSV2_OUT_FIELDS_GROUP_CSV2_4,CSV2_OUT_DELIMITER_CSV2_4,CSV2_OUT_ENCODING_GROUP_CSV2_4,CSV2_OUT_ENCODING_CSV2_4,CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_4,CSV2_OUT_ADVANCED_GROUP_CSV2_4,CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_4,CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_4,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4,CSV2_OUT_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE_CSV2_4,CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_4,CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_4,CSV2_OUT_ROW_TERMINATION_CSV2_4,CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_4,CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_4 +# ============================================================================ +DEFAULT_MACRO SourceDataset_CSV2 +DEFAULT_MACRO SourceDataset_CSV2_3 +DEFAULT_MACRO SourceDataset_CITYGML_4 +DEFAULT_MACRO SourceDataset_OGCGEOPACKAGE +DEFAULT_MACRO DestDataset_CSV2_2 +# ============================================================================ +GUI MULTIFILE SourceDataset_CSV2 INCLUDE_WEB_BROWSER%CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CSV (SimStadt Heating Demand) +GUI MULTIFILE SourceDataset_CSV2_3 INCLUDE_WEB_BROWSER%CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CSV (SimStadt PV Potentail) +GUI MULTIFILE SourceDataset_CITYGML_4 INCLUDE_WEB_BROWSER%CityGML_Files(*.gml;*.xml;*.gz)|*.gml;*.xml;*.gz|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|Compressed_CityGML_Files(*.gz)|*.gz|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source CityGML File (Stuttgart - Stoeckach) +GUI MULTIFILE SourceDataset_OGCGEOPACKAGE INCLUDE_WEB_BROWSER%GeoPackage_Files(*.gpkg)|*.gpkg|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_files(*)|* Input GeoPackage Demographic Data (INFAS360) +GUI DIRNAME DestDataset_CSV2_2 Destination CSV +# ============================================================================ +USER_PARAMETERS eyJwYXJhbWV0ZXJzIjpbeyJhY2Nlc3NNb2RlIjoicmVhZCIsImZpbHRlcnMiOlt7ImRlc2NyaXB0aW9uIjoiQ1NWL0NvbXByZXNzZWQgQ1NWL1RFWFQgRmlsZXMiLCJmaWx0ZXIiOlsiKi5jc3YiLCIqLmd6IiwiKi50eHQiXX0seyJkZXNjcmlwdGlvbiI6IkNTViBGaWxlcyIsImZpbHRlciI6WyIqLmNzdiJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBDU1YgRmlsZXMiLCJmaWx0ZXIiOlsiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiVGV4dCBGaWxlcyIsImZpbHRlciI6WyIqLnR4dCJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBGaWxlcyIsImZpbHRlciI6WyIqLmJ6MiIsIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IkFyY2hpdmUgRmlsZXMiLCJmaWx0ZXIiOlsiKi43eiIsIiouN3ppcCIsIioucmFyIiwiKi5ydnoiLCIqLnRhciIsIioudGFyLmJ6MiIsIioudGFyLmd6IiwiKi50Z3oiLCIqLnppcCIsIiouemlweCJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpbmNsdWRlV2ViQnJvd3NlciI6dHJ1ZSwiaXRlbXNUb1NlbGVjdCI6ImZpbGVzIiwibmFtZSI6IlNvdXJjZURhdGFzZXRfQ1NWMiIsInByb21wdCI6IlNvdXJjZSBDU1YgKFNpbVN0YWR0IEhlYXRpbmcgRGVtYW5kKSIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6dHJ1ZSwidHlwZSI6ImZpbGUiLCJ2YWxpZGF0ZUV4aXN0ZW5jZSI6ZmFsc2UsInZhbHVlVHlwZSI6InN0cmluZyJ9LHsiYWNjZXNzTW9kZSI6InJlYWQiLCJmaWx0ZXJzIjpbeyJkZXNjcmlwdGlvbiI6IkNTVi9Db21wcmVzc2VkIENTVi9URVhUIEZpbGVzIiwiZmlsdGVyIjpbIiouY3N2IiwiKi5neiIsIioudHh0Il19LHsiZGVzY3JpcHRpb24iOiJDU1YgRmlsZXMiLCJmaWx0ZXIiOlsiKi5jc3YiXX0seyJkZXNjcmlwdGlvbiI6IkNvbXByZXNzZWQgQ1NWIEZpbGVzIiwiZmlsdGVyIjpbIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IlRleHQgRmlsZXMiLCJmaWx0ZXIiOlsiKi50eHQiXX0seyJkZXNjcmlwdGlvbiI6IkNvbXByZXNzZWQgRmlsZXMiLCJmaWx0ZXIiOlsiKi5iejIiLCIqLmd6Il19LHsiZGVzY3JpcHRpb24iOiJBcmNoaXZlIEZpbGVzIiwiZmlsdGVyIjpbIiouN3oiLCIqLjd6aXAiLCIqLnJhciIsIioucnZ6IiwiKi50YXIiLCIqLnRhci5iejIiLCIqLnRhci5neiIsIioudGd6IiwiKi56aXAiLCIqLnppcHgiXX0seyJkZXNjcmlwdGlvbiI6IkFsbCBGaWxlcyIsImZpbHRlciI6WyIqIl19XSwiaW5jbHVkZVdlYkJyb3dzZXIiOnRydWUsIml0ZW1zVG9TZWxlY3QiOiJmaWxlcyIsIm5hbWUiOiJTb3VyY2VEYXRhc2V0X0NTVjJfMyIsInByb21wdCI6IlNvdXJjZSBDU1YgKFNpbVN0YWR0IFBWIFBvdGVudGFpbCkiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOnRydWUsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImFjY2Vzc01vZGUiOiJyZWFkIiwiZmlsdGVycyI6W3siZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIiouZ21sIiwiKi54bWwiLCIqLmd6Il19LHsiZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIiouZ21sIl19LHsiZGVzY3JpcHRpb24iOiJDaXR5R01MIEZpbGVzIiwiZmlsdGVyIjpbIioueG1sIl19LHsiZGVzY3JpcHRpb24iOiJDb21wcmVzc2VkIENpdHlHTUwgRmlsZXMiLCJmaWx0ZXIiOlsiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiQ29tcHJlc3NlZCBGaWxlcyIsImZpbHRlciI6WyIqLmJ6MiIsIiouZ3oiXX0seyJkZXNjcmlwdGlvbiI6IkFyY2hpdmUgRmlsZXMiLCJmaWx0ZXIiOlsiKi43eiIsIiouN3ppcCIsIioucmFyIiwiKi5ydnoiLCIqLnRhciIsIioudGFyLmJ6MiIsIioudGFyLmd6IiwiKi50Z3oiLCIqLnppcCIsIiouemlweCJdfSx7ImRlc2NyaXB0aW9uIjoiQWxsIEZpbGVzIiwiZmlsdGVyIjpbIioiXX1dLCJpbmNsdWRlV2ViQnJvd3NlciI6dHJ1ZSwiaXRlbXNUb1NlbGVjdCI6ImZpbGVzIiwibmFtZSI6IlNvdXJjZURhdGFzZXRfQ0lUWUdNTF80IiwicHJvbXB0IjoiU291cmNlIENpdHlHTUwgRmlsZSAoU3R1dHRnYXJ0IC0gU3RvZWNrYWNoKSIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6dHJ1ZSwidHlwZSI6ImZpbGUiLCJ2YWxpZGF0ZUV4aXN0ZW5jZSI6ZmFsc2UsInZhbHVlVHlwZSI6InN0cmluZyJ9LHsiYWNjZXNzTW9kZSI6InJlYWQiLCJmaWx0ZXJzIjpbeyJkZXNjcmlwdGlvbiI6Ikdlb1BhY2thZ2UgRmlsZXMiLCJmaWx0ZXIiOlsiKi5ncGtnIl19LHsiZGVzY3JpcHRpb24iOiJDb21wcmVzc2VkIEZpbGVzIiwiZmlsdGVyIjpbIiouYnoyIiwiKi5neiJdfSx7ImRlc2NyaXB0aW9uIjoiQXJjaGl2ZSBGaWxlcyIsImZpbHRlciI6WyIqLjd6IiwiKi43emlwIiwiKi5yYXIiLCIqLnJ2eiIsIioudGFyIiwiKi50YXIuYnoyIiwiKi50YXIuZ3oiLCIqLnRneiIsIiouemlwIiwiKi56aXB4Il19LHsiZGVzY3JpcHRpb24iOiJBbGwgZmlsZXMiLCJmaWx0ZXIiOlsiKiJdfV0sImluY2x1ZGVXZWJCcm93c2VyIjp0cnVlLCJpdGVtc1RvU2VsZWN0IjoiZmlsZXMiLCJuYW1lIjoiU291cmNlRGF0YXNldF9PR0NHRU9QQUNLQUdFIiwicHJvbXB0IjoiSW5wdXQgR2VvUGFja2FnZSBEZW1vZ3JhcGhpYyBEYXRhIChJTkZBUzM2MCkiLCJyZXF1aXJlZCI6dHJ1ZSwic2VsZWN0TXVsdGlwbGUiOnRydWUsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifSx7ImFjY2Vzc01vZGUiOiJ3cml0ZSIsIml0ZW1zVG9TZWxlY3QiOiJmb2xkZXJzIiwibmFtZSI6IkRlc3REYXRhc2V0X0NTVjJfMiIsInByb21wdCI6IkRlc3RpbmF0aW9uIENTViIsInJlcXVpcmVkIjp0cnVlLCJzZWxlY3RNdWx0aXBsZSI6ZmFsc2UsInR5cGUiOiJmaWxlIiwidmFsaWRhdGVFeGlzdGVuY2UiOmZhbHNlLCJ2YWx1ZVR5cGUiOiJzdHJpbmcifV19 +# ============================================================================ +INCLUDE [ if {{$(SourceDataset_CSV2)} == {}} { puts_real {Parameter 'SourceDataset_CSV2' must be given a value.}; exit 1; }; ] +INCLUDE [ if {{$(SourceDataset_CSV2_3)} == {}} { puts_real {Parameter 'SourceDataset_CSV2_3' must be given a value.}; exit 1; }; ] +INCLUDE [ if {{$(SourceDataset_CITYGML_4)} == {}} { puts_real {Parameter 'SourceDataset_CITYGML_4' must be given a value.}; exit 1; }; ] +INCLUDE [ if {{$(SourceDataset_OGCGEOPACKAGE)} == {}} { puts_real {Parameter 'SourceDataset_OGCGEOPACKAGE' must be given a value.}; exit 1; }; ] +INCLUDE [ if {{$(DestDataset_CSV2_2)} == {}} { puts_real {Parameter 'DestDataset_CSV2_2' must be given a value.}; exit 1; }; ] +#! START_HEADER +#! START_WB_HEADER +READER_TYPE MULTI_READER +MULTI_READER_TYPE{0} CSV2 +MULTI_READER_KEYWORD{0} CSV2_1 +MULTI_READER_GEN_DIRECTIVES{0} SKIPPED_LINES_GROUP,,CASE_SENSITIVE_FIELD_NAMES,Yes,ENCODING_GROUP,,TRIM_FIELD_VALUE_QUALIFIERS,Yes,TRIM_FIELD_NAME_WHITESPACE,Yes,EXPOSE_ATTRS_GROUP,,DYNAMIC_WORKFLOW,yes,_MERGE_SCHEMAS,YES,FIELD_QUALIFIER_ESCAPE_CHARACTER,<lt>quote<gt>,READ_EMPTY_VALUES_AS,Null,FIELDS_GROUP,,FIELD_NAMES_GROUP,,CSV2_EXPOSE_FORMAT_ATTRS,,FIELD_NAMES_LINE,1,PRESERVE_SOURCE_ENCODING,No,DATA_START_LINE,2,ENFORCE_STRICT_SCHEMA,No,TRIM_FEATURE_TYPE_NAME,Yes,TRIM_FIELD_NAME_QUALIFIERS,Yes,ENCODING,UTF-8,DELIMITER,auto,SCAN_TYPES,Yes,REPLACE_ATTR_NAME_INVALID_CHARS,Yes,SCAN_MAX_ROWS,10000,FIELD_VALUES_GROUP,,USE_CUSTOM_SCHEMA,YES,DATASET_GROUP,,SCHEMA_GENERATION_GROUP,,SKIP_DUPLICATE_DELIMITERS,No,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,ADVANCED_GROUP,,PREVIEW_PLACEHOLDER,,FIELD_SEPARATION_GROUP,,FIELD_QUALIFIER_CHARACTER,<lt>quote<gt>,FEATURE_TYPE_NAME,FORMAT_NAME,READ_SKIPPED_LINES,No,SCAN_ADDITIONAL_FIELDS,No,SCHEMA,GMLId<comma>string<comma>YES<semicolon>ParentGMLId<comma>string<comma>NO<semicolon>Latitude<comma>y_coordinate<comma>YES<semicolon>Longitude<comma>x_coordinate<comma>YES<semicolon>X-coordinate<comma>real64<comma>YES<semicolon>Y-coordinate<comma>real64<comma>YES<semicolon>LOD<comma>string<comma>YES<semicolon>Year<lt>space<gt>of<lt>space<gt>construction<comma>uint16<comma>YES<semicolon>Year<lt>space<gt>of<lt>space<gt>refurbishment<comma>string<comma>NO<semicolon>Refurbishment<lt>space<gt>Variant<comma>string<comma>YES<semicolon>ALKIS<lt>space<gt>code<comma>uint16<comma>YES<semicolon>PrimaryUsageZoneType<comma>string<comma>YES<semicolon>PrimaryUsageZoneArea<comma>real64<comma>YES<semicolon>SecondaryUsageZoneType<comma>string<comma>YES<semicolon>SecondaryUsageZoneArea<comma>real32<comma>YES<semicolon>BuildingType<comma>string<comma>YES<semicolon>Footprint<lt>space<gt>area<comma>real32<comma>YES<semicolon>Total<lt>space<gt>wall<lt>space<gt>thermal<lt>space<gt>area<lt>space<gt>above<lt>space<gt>ground<comma>real64<comma>YES<semicolon>Total<lt>space<gt>wall<lt>space<gt>thermal<lt>space<gt>area<lt>space<gt>below<lt>space<gt>ground<comma>real32<comma>YES<semicolon>Total<lt>space<gt>outwall<lt>space<gt>area<comma>real64<comma>YES<semicolon>Total<lt>space<gt>sharedwall<lt>space<gt>area<comma>real32<comma>YES<semicolon>Total<lt>space<gt>roof<lt>space<gt>area<comma>real32<comma>YES<semicolon>Gross<lt>space<gt>volume<comma>real64<comma>YES<semicolon>Is<lt>space<gt>Gross<lt>space<gt>volume<lt>space<gt>approximated?<comma>string<comma>YES<semicolon>Heated<lt>space<gt>volume<comma>real64<comma>YES<semicolon>Ridge<lt>solidus<gt>mean<lt>space<gt>Height<comma>z_coordinate<comma>YES<semicolon>Eaves<lt>solidus<gt>mean<lt>space<gt>Height<comma>real32<comma>YES<semicolon>Storey<lt>space<gt>number<comma>uint8<comma>YES<semicolon>Average<lt>space<gt>Storey<lt>space<gt>Height<comma>real32<comma>YES<semicolon>Number<lt>space<gt>of<lt>space<gt>households<comma>uint16<comma>YES<semicolon>Number<lt>space<gt>of<lt>space<gt>occupants<comma>uint16<comma>YES<semicolon>Attic<lt>space<gt>Heating<comma>string<comma>YES<semicolon>Basement<lt>space<gt>Heating<comma>string<comma>YES<semicolon>Basement<lt>space<gt>ceiling<lt>space<gt>height<lt>space<gt>above<lt>space<gt>ground<comma>real32<comma>YES<semicolon>Surface<lt>space<gt>area<lt>space<gt>to<lt>space<gt>volume<lt>space<gt>ratio<comma>real64<comma>YES<semicolon>Heated<lt>space<gt>area<comma>real64<comma>YES<semicolon>Mean<lt>space<gt>Uvalue<comma>real32<comma>YES<semicolon>Specific<lt>space<gt>domestic<lt>space<gt>hot<lt>space<gt>water<lt>space<gt>demand<comma>string<comma>YES<semicolon>Specific<lt>space<gt>space<lt>space<gt>heating<lt>space<gt>demand<comma>real32<comma>YES<semicolon>Total<lt>space<gt>Yearly<lt>space<gt>Heat+DHW<lt>space<gt>demand<comma>uint32<comma>YES<semicolon>January<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>February<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>March<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>April<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>May<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>June<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint16<comma>YES<semicolon>July<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint16<comma>YES<semicolon>August<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint16<comma>YES<semicolon>September<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>October<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>November<lt>space<gt>Heating<lt>space<gt>Demand<comma>uint32<comma>YES<semicolon>December<lt>space<gt>Heating<lt>space<gt>demand<comma>real64<comma>YES,CHUNK_SIZE,100000 +MULTI_READER_TYPE{1} CSV2 +MULTI_READER_KEYWORD{1} CSV2_2 +MULTI_READER_GEN_DIRECTIVES{1} SKIPPED_LINES_GROUP,,CASE_SENSITIVE_FIELD_NAMES,Yes,ENCODING_GROUP,,TRIM_FIELD_VALUE_QUALIFIERS,Yes,TRIM_FIELD_NAME_WHITESPACE,Yes,EXPOSE_ATTRS_GROUP,,DYNAMIC_WORKFLOW,yes,_MERGE_SCHEMAS,YES,FIELD_QUALIFIER_ESCAPE_CHARACTER,<lt>quote<gt>,READ_EMPTY_VALUES_AS,Null,FIELDS_GROUP,,FIELD_NAMES_GROUP,,CSV2_EXPOSE_FORMAT_ATTRS,,FIELD_NAMES_LINE,1,PRESERVE_SOURCE_ENCODING,No,DATA_START_LINE,2,ENFORCE_STRICT_SCHEMA,No,TRIM_FEATURE_TYPE_NAME,Yes,TRIM_FIELD_NAME_QUALIFIERS,Yes,ENCODING,UTF-8,DELIMITER,auto,SCAN_TYPES,Yes,REPLACE_ATTR_NAME_INVALID_CHARS,Yes,SCAN_MAX_ROWS,10000,FIELD_VALUES_GROUP,,USE_CUSTOM_SCHEMA,NO,DATASET_GROUP,,SCHEMA_GENERATION_GROUP,,SKIP_DUPLICATE_DELIMITERS,No,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,ADVANCED_GROUP,,PREVIEW_PLACEHOLDER,,FIELD_SEPARATION_GROUP,,FIELD_QUALIFIER_CHARACTER,<lt>quote<gt>,FEATURE_TYPE_NAME,FORMAT_NAME,READ_SKIPPED_LINES,No,SCAN_ADDITIONAL_FIELDS,No,SCHEMA,,CHUNK_SIZE,100000 +MULTI_READER_TYPE{2} CITYGML +MULTI_READER_KEYWORD{2} CITYGML_1 +MULTI_READER_GEN_DIRECTIVES{2} TEXTURE_COORDINATES_ORDER_FIX,No,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,GENERIC_ATTRS_AS_FEATURES,No,CLIP_TO_ENVELOPE,NO,USE_SEARCH_ENVELOPE,NO,GENERIC_ATTRS_AS_SCHEMA_ATTRS,Yes,VALIDATE_DATASET,no,ADE_XSD_DOC,,VERSION,,SEARCH_ENVELOPE_MINY,0,_MERGE_SCHEMAS,YES,SRS_AXIS_ORDER,,EXPOSE_ATTRS_GROUP,,ONLY_FEATURE_TYPES_IN_DATASET,YES,SEARCH_ENVELOPE_MAXY,0,LODS_TO_READ,0<space>1<space>2<space>3<space>4,SEARCH_ENVELOPE_MAXX,0,MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE,400,CITYGML_EXPOSE_FORMAT_ATTRS,,ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES,No,SEARCH_ENVELOPE_MINX,0,SKIP_SCHEMA_LOCATION_IN_DATASET,No,USE_XLINK_HREF_GEOMETRY_TRAITS,Yes,MATERIAL_FEATURES,No,USE_CITYGML_SCHEMA_FILES,Yes +MULTI_READER_TYPE{3} OGCGEOPACKAGE +MULTI_READER_KEYWORD{3} OGCGEOPACKAGE_1 +MULTI_READER_GEN_DIRECTIVES{3} _MERGE_SCHEMAS,YES,USE_SEARCH_ENVELOPE,NO,QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS,Yes,READER_REPLACE_INVALID_CHARS,YES,TABLELIST,,SEARCH_ENVELOPE_MAXX,0,SEARCH_ENVELOPE_MAXY,0,READ_BOOLEANS_AS_YES_NO,YES,CLIP_TO_ENVELOPE,NO,EXPOSE_ATTRS_GROUP,,OPEN_SINGLE_RASTER_AS_SUBDATASET,YES,ENCODE_FEATURE_TYPE_AND_ATTR_NAMES,YES,ENFORCE_FOREIGN_KEY_INTEGRITY,YES,SEARCH_ENVELOPE_MINX,0,ADVANCED_GROUP,,EXPOSE_PRIMARY_KEY_ATTRIBUTE,YES,OGCGEOPACKAGE_EXPOSE_FORMAT_ATTRS,,READ_NULLS,YES,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,SEARCH_ENVELOPE_MINY,0 +WRITER_TYPE MULTI_WRITER +MULTI_WRITER_DATASET_ORDER BY_ID +MULTI_WRITER_FIRST_WRITER_ID 0 +MULTI_WRITER_TYPE{0} CSV2 +MULTI_WRITER_KEYWORD{0} CSV2_4 +#! END_WB_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "CSV2_1" +#! END_WB_HEADER +#! START_SOURCE_HEADER CSV2 CSV2_1 +CSV2_1_DYNAMIC_WORKFLOW YES +# ===================================================================== +# The following GUI line prompts for a file to be used as the source CSV file. +# The user input is stored in a macro, which is then used to define +# the dataset to be read. +# The dataset this mapping file was generated from was: +#! END_SOURCE_HEADER +#! START_WB_HEADER +DEFAULT_MACRO SourceDataset +INCLUDE [ if {{$(SourceDataset)} != ""} { \ + puts {DEFAULT_MACRO SourceDataset_CSV2_1 $(SourceDataset)} \ + } ] +#! END_WB_HEADER +#! START_SOURCE_HEADER CSV2 CSV2_1 +DEFAULT_MACRO SourceDataset_CSV2_1 $(SourceDataset_CSV2) +GUI MULTIFILE SourceDataset_CSV2_1 CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|All_Files|* Source CSV (Comma Separated Value) File(s): +DEFAULT_MACRO CSV2_IN_TRIM_FEATURE_TYPE_NAME_CSV2_1 Yes +CSV2_1_TRIM_FEATURE_TYPE_NAME "$(CSV2_IN_TRIM_FEATURE_TYPE_NAME_CSV2_1)" +DEFAULT_MACRO CSV2_IN_REPLACE_ATTR_NAME_INVALID_CHARS_CSV2_1 Yes +CSV2_1_REPLACE_ATTR_NAME_INVALID_CHARS "$(CSV2_IN_REPLACE_ATTR_NAME_INVALID_CHARS_CSV2_1)" +DEFAULT_MACRO CSV2_IN_FEATURE_TYPE_NAME_CSV2_1 FORMAT_NAME +CSV2_1_FEATURE_TYPE_NAME "$(CSV2_IN_FEATURE_TYPE_NAME_CSV2_1)" +DEFAULT_MACRO CSV2_IN_FIELDS_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELDS_GROUP_CSV2_1 CSV2_IN_DELIMITER_CSV2_1%CSV2_IN_FIELD_NAMES_LINE_CSV2_1%CSV2_IN_DATA_START_LINE_CSV2_1 Fields +DEFAULT_MACRO CSV2_IN_DELIMITER_CSV2_1 auto +CSV2_1_DELIMITER "$(CSV2_IN_DELIMITER_CSV2_1)" +GUI STRING_OR_CHOICE_ENCODED CSV2_IN_DELIMITER_CSV2_1 auto%,%;%|%space%tab Delimiter Character: +DEFAULT_MACRO CSV2_IN_FIELD_NAMES_LINE_CSV2_1 1 +CSV2_1_FIELD_NAMES_LINE "$(CSV2_IN_FIELD_NAMES_LINE_CSV2_1)" +GUI OPTIONAL INT_OR_CHOICE CSV2_IN_FIELD_NAMES_LINE_CSV2_1 None%1%2%3%4%5 Field Names Line: +GUI LOOKUP CSV2_IN_FIELD_NAMES_LINE_CSV2_1 None, +DEFAULT_MACRO CSV2_IN_DATA_START_LINE_CSV2_1 2 +CSV2_1_DATA_START_LINE "$(CSV2_IN_DATA_START_LINE_CSV2_1)" +GUI RANGE_SLIDER CSV2_IN_DATA_START_LINE_CSV2_1 1%MAX%0 Data Start Line: +DEFAULT_MACRO CSV2_IN_ADVANCED_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_ADVANCED_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_1%CSV2_IN_FIELD_NAMES_GROUP_CSV2_1%CSV2_IN_FIELD_VALUES_GROUP_CSV2_1%CSV2_IN_ENCODING_GROUP_CSV2_1%CSV2_IN_SKIPPED_LINES_GROUP_CSV2_1%CSV2_IN_SCHEMA_GENERATION_GROUP Advanced +DEFAULT_MACRO CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_1%CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_1%CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1 Field Separation +DEFAULT_MACRO CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_1 No +CSV2_1_SKIP_DUPLICATE_DELIMITERS "$(CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_1)" +GUI CHOICE CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_1 Yes%No Skip Duplicate Delimiters: +DEFAULT_MACRO CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_1 <quote> +CSV2_1_FIELD_QUALIFIER_CHARACTER "$(CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_1)" +GUI OPTIONAL STRING_ENCODED CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_1 Field Qualifier Character: +DEFAULT_MACRO CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1 <quote> +CSV2_1_FIELD_QUALIFIER_ESCAPE_CHARACTER "$(CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1)" +GUI OPTIONAL STRING_ENCODED CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_1 Field Qualifier Escape Character: +DEFAULT_MACRO CSV2_IN_FIELD_NAMES_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_NAMES_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_1%CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_1%CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_1 Field Names +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_NAME_QUALIFIERS_CSV2_1 Yes +CSV2_1_TRIM_FIELD_NAME_QUALIFIERS "$(CSV2_IN_TRIM_FIELD_NAME_QUALIFIERS_CSV2_1)" +DEFAULT_MACRO CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_1 Yes +CSV2_1_CASE_SENSITIVE_FIELD_NAMES "$(CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_1)" +GUI CHOICE CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_1 Yes%No Case Sensitive Field Names: +DEFAULT_MACRO CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_1 No +CSV2_1_ENFORCE_STRICT_SCHEMA "$(CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_1)" +GUI CHOICE CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_1 Yes%No Enforce Strict Schema: +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_1 Yes +CSV2_1_TRIM_FIELD_NAME_WHITESPACE "$(CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_1)" +GUI CHOICE CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_1 Yes%No Trim Whitespaces From Field Names: +DEFAULT_MACRO CSV2_IN_FIELD_VALUES_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_VALUES_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_1%CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_1 Field Values +DEFAULT_MACRO CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_1 Null +CSV2_1_READ_EMPTY_VALUES_AS "$(CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_1)" +GUI CHOICE CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_1 Missing%Null Read Empty Values As: +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_1 Yes +CSV2_1_TRIM_FIELD_VALUE_QUALIFIERS "$(CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_1)" +GUI CHOICE CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_1 Yes%No Trim Field Qualifier Characters: +DEFAULT_MACRO CSV2_IN_ENCODING_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_ENCODING_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_ENCODING_CSV2_1%CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_1 Encoding +DEFAULT_MACRO CSV2_IN_ENCODING_CSV2_1 UTF-8 +CSV2_1_ENCODING "$(CSV2_IN_ENCODING_CSV2_1)" +GUI STRING_OR_ENCODING CSV2_IN_ENCODING_CSV2_1 fme-system%* Character Encoding: +DEFAULT_MACRO CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_1 No +CSV2_1_PRESERVE_SOURCE_ENCODING "$(CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_1)" +GUI CHOICE CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_1 Yes%No Preserve Source Encoding: +DEFAULT_MACRO CSV2_IN_SKIPPED_LINES_GROUP_CSV2_1 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_SKIPPED_LINES_GROUP_CSV2_1 FME_DISCLOSURE_CLOSED%CSV2_IN_READ_SKIPPED_LINES_CSV2_1 Skipped Lines +DEFAULT_MACRO CSV2_IN_READ_SKIPPED_LINES_CSV2_1 No +CSV2_1_READ_SKIPPED_LINES "$(CSV2_IN_READ_SKIPPED_LINES_CSV2_1)" +GUI CHOICE CSV2_IN_READ_SKIPPED_LINES_CSV2_1 Yes%No Read Skipped Lines: +DEFAULT_MACRO CSV2_IN_SCAN_MAX_ROWS_CSV2_1 10000 +CSV2_1_SCAN_MAX_ROWS "$(CSV2_IN_SCAN_MAX_ROWS_CSV2_1)" +DEFAULT_MACRO CSV2_IN_SCAN_TYPES_CSV2_1 Yes +CSV2_1_SCAN_TYPES "$(CSV2_IN_SCAN_TYPES_CSV2_1)" +DEFAULT_MACRO CSV2_IN_SCAN_ADDITIONAL_FIELDS_CSV2_1 No +CSV2_1_SCAN_ADDITIONAL_FIELDS "$(CSV2_IN_SCAN_ADDITIONAL_FIELDS_CSV2_1)" +DEFAULT_MACRO CSV2_IN_EXPOSE_ATTRS_GROUP_CSV2_1 +CSV2_1_EXPOSE_ATTRS_GROUP "$(CSV2_IN_EXPOSE_ATTRS_GROUP_CSV2_1)" +DEFAULT_MACRO CSV2_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_CSV2_1 Yes +CSV2_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(CSV2_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_CSV2_1)" +DEFAULT_MACRO CSV2_IN_CHUNK_SIZE_CSV2_1 100000 +CSV2_1_CHUNK_SIZE "$(CSV2_IN_CHUNK_SIZE_CSV2_1)" +# =========================================================================== +DEFAULT_MACRO CSV2_IN_NETWORK_AUTHENTICATION_CSV2_1 +CSV2_1_NETWORK_AUTHENTICATION "$(CSV2_IN_NETWORK_AUTHENTICATION_CSV2_1)" +GUI OPTIONAL AUTHENTICATOR CSV2_IN_NETWORK_AUTHENTICATION_CSV2_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication +# ============================================================================ +DEFAULT_MACRO CSV2_IN_ATTRIBUTE_READING_CSV2_1 DEFLINE +CSV2_1_ATTRIBUTE_READING "$(CSV2_IN_ATTRIBUTE_READING_CSV2_1)" +# ============================================================================ +CSV2_1_GENERATE_FME_BUILD_NUM 21313 +CSV2_1_DATASET "$(SourceDataset_CSV2_1)" +#! END_SOURCE_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "CSV2_2" +#! END_WB_HEADER +#! START_SOURCE_HEADER CSV2 CSV2_2 +CSV2_2_DYNAMIC_WORKFLOW YES +# ===================================================================== +# The following GUI line prompts for a file to be used as the source CSV file. +# The user input is stored in a macro, which is then used to define +# the dataset to be read. +# The dataset this mapping file was generated from was: +#! END_SOURCE_HEADER +#! START_WB_HEADER +DEFAULT_MACRO SourceDataset +INCLUDE [ if {{$(SourceDataset)} != ""} { \ + puts {DEFAULT_MACRO SourceDataset_CSV2_2 $(SourceDataset)} \ + } ] +#! END_WB_HEADER +#! START_SOURCE_HEADER CSV2 CSV2_2 +DEFAULT_MACRO SourceDataset_CSV2_2 $(SourceDataset_CSV2_3) +GUI MULTIFILE SourceDataset_CSV2_2 CSV/Compressed_CSV/TEXT_Files(*.csv;*.gz;*.txt)|*.csv;*.gz;*.txt|CSV_Files(*.csv)|*.csv|Compressed_CSV_Files(*.gz)|*.gz|Text_Files(*.txt)|*.txt|All_Files|* Source CSV (Comma Separated Value) File(s): +DEFAULT_MACRO CSV2_IN_TRIM_FEATURE_TYPE_NAME_CSV2_2 Yes +CSV2_2_TRIM_FEATURE_TYPE_NAME "$(CSV2_IN_TRIM_FEATURE_TYPE_NAME_CSV2_2)" +DEFAULT_MACRO CSV2_IN_REPLACE_ATTR_NAME_INVALID_CHARS_CSV2_2 Yes +CSV2_2_REPLACE_ATTR_NAME_INVALID_CHARS "$(CSV2_IN_REPLACE_ATTR_NAME_INVALID_CHARS_CSV2_2)" +DEFAULT_MACRO CSV2_IN_FEATURE_TYPE_NAME_CSV2_2 FORMAT_NAME +CSV2_2_FEATURE_TYPE_NAME "$(CSV2_IN_FEATURE_TYPE_NAME_CSV2_2)" +DEFAULT_MACRO CSV2_IN_FIELDS_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELDS_GROUP_CSV2_2 CSV2_IN_DELIMITER_CSV2_2%CSV2_IN_FIELD_NAMES_LINE_CSV2_2%CSV2_IN_DATA_START_LINE_CSV2_2 Fields +DEFAULT_MACRO CSV2_IN_DELIMITER_CSV2_2 auto +CSV2_2_DELIMITER "$(CSV2_IN_DELIMITER_CSV2_2)" +GUI STRING_OR_CHOICE_ENCODED CSV2_IN_DELIMITER_CSV2_2 auto%,%;%|%space%tab Delimiter Character: +DEFAULT_MACRO CSV2_IN_FIELD_NAMES_LINE_CSV2_2 1 +CSV2_2_FIELD_NAMES_LINE "$(CSV2_IN_FIELD_NAMES_LINE_CSV2_2)" +GUI OPTIONAL INT_OR_CHOICE CSV2_IN_FIELD_NAMES_LINE_CSV2_2 None%1%2%3%4%5 Field Names Line: +GUI LOOKUP CSV2_IN_FIELD_NAMES_LINE_CSV2_2 None, +DEFAULT_MACRO CSV2_IN_DATA_START_LINE_CSV2_2 2 +CSV2_2_DATA_START_LINE "$(CSV2_IN_DATA_START_LINE_CSV2_2)" +GUI RANGE_SLIDER CSV2_IN_DATA_START_LINE_CSV2_2 1%MAX%0 Data Start Line: +DEFAULT_MACRO CSV2_IN_ADVANCED_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_ADVANCED_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_2%CSV2_IN_FIELD_NAMES_GROUP_CSV2_2%CSV2_IN_FIELD_VALUES_GROUP_CSV2_2%CSV2_IN_ENCODING_GROUP_CSV2_2%CSV2_IN_SKIPPED_LINES_GROUP_CSV2_2%CSV2_IN_SCHEMA_GENERATION_GROUP Advanced +DEFAULT_MACRO CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_SEPARATION_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_2%CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_2%CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_2 Field Separation +DEFAULT_MACRO CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_2 No +CSV2_2_SKIP_DUPLICATE_DELIMITERS "$(CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_2)" +GUI CHOICE CSV2_IN_SKIP_DUPLICATE_DELIMITERS_CSV2_2 Yes%No Skip Duplicate Delimiters: +DEFAULT_MACRO CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_2 <quote> +CSV2_2_FIELD_QUALIFIER_CHARACTER "$(CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_2)" +GUI OPTIONAL STRING_ENCODED CSV2_IN_FIELD_QUALIFIER_CHARACTER_CSV2_2 Field Qualifier Character: +DEFAULT_MACRO CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_2 <quote> +CSV2_2_FIELD_QUALIFIER_ESCAPE_CHARACTER "$(CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_2)" +GUI OPTIONAL STRING_ENCODED CSV2_IN_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_2 Field Qualifier Escape Character: +DEFAULT_MACRO CSV2_IN_FIELD_NAMES_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_NAMES_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_2%CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_2%CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_2 Field Names +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_NAME_QUALIFIERS_CSV2_2 Yes +CSV2_2_TRIM_FIELD_NAME_QUALIFIERS "$(CSV2_IN_TRIM_FIELD_NAME_QUALIFIERS_CSV2_2)" +DEFAULT_MACRO CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_2 Yes +CSV2_2_CASE_SENSITIVE_FIELD_NAMES "$(CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_2)" +GUI CHOICE CSV2_IN_CASE_SENSITIVE_FIELD_NAMES_CSV2_2 Yes%No Case Sensitive Field Names: +DEFAULT_MACRO CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_2 No +CSV2_2_ENFORCE_STRICT_SCHEMA "$(CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_2)" +GUI CHOICE CSV2_IN_ENFORCE_STRICT_SCHEMA_CSV2_2 Yes%No Enforce Strict Schema: +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_2 Yes +CSV2_2_TRIM_FIELD_NAME_WHITESPACE "$(CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_2)" +GUI CHOICE CSV2_IN_TRIM_FIELD_NAME_WHITESPACE_CSV2_2 Yes%No Trim Whitespaces From Field Names: +DEFAULT_MACRO CSV2_IN_FIELD_VALUES_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_FIELD_VALUES_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_2%CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_2 Field Values +DEFAULT_MACRO CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_2 Null +CSV2_2_READ_EMPTY_VALUES_AS "$(CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_2)" +GUI CHOICE CSV2_IN_READ_EMPTY_VALUES_AS_CSV2_2 Missing%Null Read Empty Values As: +DEFAULT_MACRO CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_2 Yes +CSV2_2_TRIM_FIELD_VALUE_QUALIFIERS "$(CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_2)" +GUI CHOICE CSV2_IN_TRIM_FIELD_VALUE_QUALIFIERS_CSV2_2 Yes%No Trim Field Qualifier Characters: +DEFAULT_MACRO CSV2_IN_ENCODING_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_ENCODING_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_ENCODING_CSV2_2%CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_2 Encoding +DEFAULT_MACRO CSV2_IN_ENCODING_CSV2_2 UTF-8 +CSV2_2_ENCODING "$(CSV2_IN_ENCODING_CSV2_2)" +GUI STRING_OR_ENCODING CSV2_IN_ENCODING_CSV2_2 fme-system%* Character Encoding: +DEFAULT_MACRO CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_2 No +CSV2_2_PRESERVE_SOURCE_ENCODING "$(CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_2)" +GUI CHOICE CSV2_IN_PRESERVE_SOURCE_ENCODING_CSV2_2 Yes%No Preserve Source Encoding: +DEFAULT_MACRO CSV2_IN_SKIPPED_LINES_GROUP_CSV2_2 +GUI OPTIONAL DISCLOSUREGROUP CSV2_IN_SKIPPED_LINES_GROUP_CSV2_2 FME_DISCLOSURE_CLOSED%CSV2_IN_READ_SKIPPED_LINES_CSV2_2 Skipped Lines +DEFAULT_MACRO CSV2_IN_READ_SKIPPED_LINES_CSV2_2 No +CSV2_2_READ_SKIPPED_LINES "$(CSV2_IN_READ_SKIPPED_LINES_CSV2_2)" +GUI CHOICE CSV2_IN_READ_SKIPPED_LINES_CSV2_2 Yes%No Read Skipped Lines: +DEFAULT_MACRO CSV2_IN_SCAN_MAX_ROWS_CSV2_2 10000 +CSV2_2_SCAN_MAX_ROWS "$(CSV2_IN_SCAN_MAX_ROWS_CSV2_2)" +DEFAULT_MACRO CSV2_IN_SCAN_TYPES_CSV2_2 Yes +CSV2_2_SCAN_TYPES "$(CSV2_IN_SCAN_TYPES_CSV2_2)" +DEFAULT_MACRO CSV2_IN_SCAN_ADDITIONAL_FIELDS_CSV2_2 No +CSV2_2_SCAN_ADDITIONAL_FIELDS "$(CSV2_IN_SCAN_ADDITIONAL_FIELDS_CSV2_2)" +DEFAULT_MACRO CSV2_IN_EXPOSE_ATTRS_GROUP_CSV2_2 +CSV2_2_EXPOSE_ATTRS_GROUP "$(CSV2_IN_EXPOSE_ATTRS_GROUP_CSV2_2)" +DEFAULT_MACRO CSV2_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_CSV2_2 Yes +CSV2_2_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(CSV2_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_CSV2_2)" +DEFAULT_MACRO CSV2_IN_CHUNK_SIZE_CSV2_2 100000 +CSV2_2_CHUNK_SIZE "$(CSV2_IN_CHUNK_SIZE_CSV2_2)" +# =========================================================================== +DEFAULT_MACRO CSV2_IN_NETWORK_AUTHENTICATION_CSV2_2 +CSV2_2_NETWORK_AUTHENTICATION "$(CSV2_IN_NETWORK_AUTHENTICATION_CSV2_2)" +GUI OPTIONAL AUTHENTICATOR CSV2_IN_NETWORK_AUTHENTICATION_CSV2_2 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication +# ============================================================================ +DEFAULT_MACRO CSV2_IN_ATTRIBUTE_READING_CSV2_2 DEFLINE +CSV2_2_ATTRIBUTE_READING "$(CSV2_IN_ATTRIBUTE_READING_CSV2_2)" +# ============================================================================ +CSV2_2_GENERATE_FME_BUILD_NUM 21313 +CSV2_2_DATASET "$(SourceDataset_CSV2_2)" +#! END_SOURCE_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "CITYGML_1" +#! END_WB_HEADER +#! START_SOURCE_HEADER CITYGML CITYGML_1 +# The dataset this mapping file was generated from was: +#! END_SOURCE_HEADER +#! START_WB_HEADER +DEFAULT_MACRO SourceDataset +INCLUDE [ if {{$(SourceDataset)} != ""} { \ + puts {DEFAULT_MACRO SourceDataset_CITYGML_1 $(SourceDataset)} \ + } ] +#! END_WB_HEADER +#! START_SOURCE_HEADER CITYGML CITYGML_1 +DEFAULT_MACRO SourceDataset_CITYGML_1 $(SourceDataset_CITYGML_4) +GUI MULTIFILE SourceDataset_CITYGML_1 CityGML_Files(*.gml;*.xml;*.gz)|*.gml;*.xml;*.gz|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|Compressed_CityGML_Files(*.gz)|*.gz|All_Files|* Source CityGML File(s): +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_FME_GROUP_NAMED1_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_IN_FME_GROUP_NAMED1_CITYGML_1 CITYGML_IN_USE_CITYGML_SCHEMA_FILES_CITYGML_1%CITYGML_IN_ADE_XSD_DOC_CITYGML_1%CITYGML_IN_VALIDATE_DATASET_CITYGML_1%CITYGML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_CITYGML_1%CITYGML_IN_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1%CITYGML_IN_VERSION%CITYGML_IN_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE_CITYGML_1 CityGML Schema Options +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_USE_CITYGML_SCHEMA_FILES_CITYGML_1 Yes +CITYGML_1_USE_CITYGML_SCHEMA_FILES "$(CITYGML_IN_USE_CITYGML_SCHEMA_FILES_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_IN_USE_CITYGML_SCHEMA_FILES_CITYGML_1 "\"Yes (Recommended)\",Yes"%"\"No (Deprecated - Backward-compatible)\",No" Reader Driven by CityGML Schema: +# ============================================================================ +# The ADE_XSD_DOC keyword overwrites the location of the XML Schema document that +# is specified in the xsi:schemaLocation of the XML dataset. +DEFAULT_MACRO CITYGML_IN_ADE_XSD_DOC_CITYGML_1 +CITYGML_1_ADE_XSD_DOC "$(CITYGML_IN_ADE_XSD_DOC_CITYGML_1)" +GUI OPTIONAL MULTIFILE CITYGML_IN_ADE_XSD_DOC_CITYGML_1 ADE_Schema_Files(*.xsd)|*.xsd|All_Files(*)|* Additional ADE Schema File(s): +# ============================================================================ +# This specifies whether the XML dataset should be validated against its +# DTD file. If set to 'auto', the XML document will only be validated if +# its DTD file is available. +DEFAULT_MACRO CITYGML_IN_VALIDATE_DATASET_CITYGML_1 no +CITYGML_1_VALIDATE_DATASET "$(CITYGML_IN_VALIDATE_DATASET_CITYGML_1)" +GUI CHOICE CITYGML_IN_VALIDATE_DATASET_CITYGML_1 yes%no Validate CityGML Dataset File: +# ============================================================================ +# The ADE_XSD_DOC keyword overwrites the location of the XML Schema document that +# is specified in the xsi:schemaLocation of the XML dataset. +DEFAULT_MACRO CITYGML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_CITYGML_1 No +CITYGML_1_SKIP_SCHEMA_LOCATION_IN_DATASET "$(CITYGML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_CITYGML_1)" +GUI CHOICE CITYGML_IN_SKIP_SCHEMA_LOCATION_IN_DATASET_CITYGML_1 Yes%No Ignore xsi:schemaLocation in Dataset: +DEFAULT_MACRO CITYGML_IN_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1 No +CITYGML_1_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES "$(CITYGML_IN_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1)" +GUI CHOICE CITYGML_IN_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1 Yes%No Add XML Namespace Prefix to Feature Types: +# ============================================================================ +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE_CITYGML_1 400 +CITYGML_1_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE "$(CITYGML_IN_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE_CITYGML_1)" +GUI OPTIONAL INTEGER CITYGML_IN_MAX_ATTRIBUTES_PER_NESTED_ATTRIBUTE_CITYGML_1 Max Atttributes Per Nested Attribute +# ============================================================================ +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_ONLY_FEATURE_TYPES_IN_DATASET_CITYGML_1 YES +CITYGML_1_ONLY_FEATURE_TYPES_IN_DATASET "$(CITYGML_IN_ONLY_FEATURE_TYPES_IN_DATASET_CITYGML_1)" +# ============================================================================ +# Allow the user to choose if GenericAttribute should be included as Feature types +DEFAULT_MACRO CITYGML_IN_GENERIC_ATTRS_AS_FEATURES_CITYGML_1 No +CITYGML_1_GENERIC_ATTRS_AS_FEATURES "$(CITYGML_IN_GENERIC_ATTRS_AS_FEATURES_CITYGML_1)" +# ============================================================================ +# Allow the user to choose if X3DMaterials and ParameterizedTextures should be included as Feature types +# The default is No. +DEFAULT_MACRO CITYGML_IN_MATERIAL_FEATURES_CITYGML_1 No +CITYGML_1_MATERIAL_FEATURES "$(CITYGML_IN_MATERIAL_FEATURES_CITYGML_1)" +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_GENERIC_ATTRS_AS_SCHEMA_ATTRS_CITYGML_1 Yes +CITYGML_1_GENERIC_ATTRS_AS_SCHEMA_ATTRS "$(CITYGML_IN_GENERIC_ATTRS_AS_SCHEMA_ATTRS_CITYGML_1)" +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_FME_GROUP_NAMED3_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_IN_FME_GROUP_NAMED3_CITYGML_1 CITYGML_IN_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1%CITYGML_IN_LODS_TO_READ_CITYGML_1 CityGML Options +DEFAULT_MACRO CITYGML_IN_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1 Yes +CITYGML_1_USE_XLINK_HREF_GEOMETRY_TRAITS "$(CITYGML_IN_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1)" +GUI CHOICE CITYGML_IN_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1 Yes%No Add xlink_href Traits from Geometry References: +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_LODS_TO_READ_CITYGML_1 0 1 2 3 4 +CITYGML_1_LODS_TO_READ "$(CITYGML_IN_LODS_TO_READ_CITYGML_1)" +GUI OPTIONAL LOOKUP_LISTBOX CITYGML_IN_LODS_TO_READ_CITYGML_1 "\"LOD 0\",0"%"\"LOD 1\",1"%"\"LOD 2\",2"%"\"LOD 3\",3"%"\"LOD 4\",4" LODs to Read: +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_FME_GROUP_NAMED4_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_IN_FME_GROUP_NAMED4_CITYGML_1 CITYGML_IN_SRS_AXIS_ORDER_CITYGML_1%CITYGML_IN_TEXTURE_COORDINATES_ORDER_FIX_CITYGML_1 SRS Parameters +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_SRS_AXIS_ORDER_CITYGML_1 +CITYGML_1_SRS_AXIS_ORDER "$(CITYGML_IN_SRS_AXIS_ORDER_CITYGML_1)" +GUI OPTIONAL CHOICE CITYGML_IN_SRS_AXIS_ORDER_CITYGML_1 1,2%2,1%1,2,3%2,1,3 GML SRS Axis Order: +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_TEXTURE_COORDINATES_ORDER_FIX_CITYGML_1 No +CITYGML_1_TEXTURE_COORDINATES_ORDER_FIX "$(CITYGML_IN_TEXTURE_COORDINATES_ORDER_FIX_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_IN_TEXTURE_COORDINATES_ORDER_FIX_CITYGML_1 "\"No (Recommended)\",No"%"\"Yes (Deprecated - Backward-compatible)\",Yes" Texture Coordinate Order to follow SRS Axis Order: +DEFAULT_MACRO CITYGML_IN_EXPOSE_ATTRS_GROUP_CITYGML_1 +CITYGML_1_EXPOSE_ATTRS_GROUP "$(CITYGML_IN_EXPOSE_ATTRS_GROUP_CITYGML_1)" +# Include this file in source setting section to add external search envelope processing +# Zero as a default means we don't do any search -- this makes workbench happier +DEFAULT_MACRO CITYGML_IN_USE_SEARCH_ENVELOPE_CITYGML_1 NO +CITYGML_1_USE_SEARCH_ENVELOPE "$(CITYGML_IN_USE_SEARCH_ENVELOPE_CITYGML_1)" +GUI ACTIVEDISCLOSUREGROUP CITYGML_IN_USE_SEARCH_ENVELOPE_CITYGML_1 CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1%CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1%CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1%CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1%CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1%CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1%CITYGML_IN_SEARCH_METHOD%CITYGML_IN_SEARCH_METHOD_FILTER%CITYGML_IN_SEARCH_ORDER%CITYGML_IN_SEARCH_FEATURE%CITYGML_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope +# =========================================================================== +GUI LOOKUP CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1 <Unused>,0 +DEFAULT_MACRO CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1 0 +CITYGML_1_SEARCH_ENVELOPE "$(CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1)" +GUI OPTIONAL FLOAT CITYGML_IN_SEARCH_ENVELOPE_MINX_CITYGML_1 Minimum X: +# =========================================================================== +GUI LOOKUP CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1 <Unused>,0 +DEFAULT_MACRO CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1 0 +CITYGML_1_SEARCH_ENVELOPE "$(CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1)" +GUI OPTIONAL FLOAT CITYGML_IN_SEARCH_ENVELOPE_MINY_CITYGML_1 Minimum Y: +# =========================================================================== +GUI LOOKUP CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1 <Unused>,0 +DEFAULT_MACRO CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1 0 +CITYGML_1_SEARCH_ENVELOPE "$(CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1)" +GUI OPTIONAL FLOAT CITYGML_IN_SEARCH_ENVELOPE_MAXX_CITYGML_1 Maximum X: +# =========================================================================== +GUI LOOKUP CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1 <Unused>,0 +DEFAULT_MACRO CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1 0 +CITYGML_1_SEARCH_ENVELOPE "$(CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1)" +GUI OPTIONAL FLOAT CITYGML_IN_SEARCH_ENVELOPE_MAXY_CITYGML_1 Maximum Y: +# =========================================================================== +GUI LOOKUP CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1 <Unused>, +DEFAULT_MACRO CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1 +CITYGML_1_SEARCH_ENVELOPE "$(CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1)" +GUI OPTIONAL COORDSYS CITYGML_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_CITYGML_1 Search Envelope Coordinate System: +# =========================================================================== +# BUG18999: We now have a soft clip to fall back on like native spatial index +# thus we are reintroducing the clip to envelop as an option for users. +# Defualt to soft clip as per the existing database readers we are emulating +GUI LOOKUP CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1 <Unused>,NO +DEFAULT_MACRO CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1 NO +CITYGML_1_CLIP_TO_ENVELOPE "$(CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1)" +GUI OPTIONAL CHECKBOX CITYGML_IN_CLIP_TO_ENVELOPE_CITYGML_1 YES%NO Clip to Search Envelope +# =========================================================================== +DEFAULT_MACRO CITYGML_IN_NETWORK_AUTHENTICATION_CITYGML_1 +CITYGML_1_NETWORK_AUTHENTICATION "$(CITYGML_IN_NETWORK_AUTHENTICATION_CITYGML_1)" +GUI OPTIONAL AUTHENTICATOR CITYGML_IN_NETWORK_AUTHENTICATION_CITYGML_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication +# ============================================================================ +DEFAULT_MACRO CITYGML_IN_ATTRIBUTE_READING_CITYGML_1 ALL +CITYGML_1_ATTRIBUTE_READING "$(CITYGML_IN_ATTRIBUTE_READING_CITYGML_1)" +# ============================================================================ +CITYGML_1_GENERATE_FME_BUILD_NUM 21313 +CITYGML_1_DATASET "$(SourceDataset_CITYGML_1)" +#! END_SOURCE_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "OGCGEOPACKAGE_1" +#! END_WB_HEADER +#! START_SOURCE_HEADER OGCGEOPACKAGE OGCGEOPACKAGE_1 +# ============================================================================ +# The following GUI line prompts for a folder to be used as the +# source of the GEOPACKAGE Files. +# The user input is stored in a macro, which is then used to define +# the dataset to be read. +# The dataset this mapping file was generated from was: +#! END_SOURCE_HEADER +#! START_WB_HEADER +DEFAULT_MACRO SourceDataset +INCLUDE [ if {{$(SourceDataset)} != ""} { \ + puts {DEFAULT_MACRO SourceDataset_OGCGEOPACKAGE_1 $(SourceDataset)} \ + } ] +#! END_WB_HEADER +#! START_SOURCE_HEADER OGCGEOPACKAGE OGCGEOPACKAGE_1 +DEFAULT_MACRO SourceDataset_OGCGEOPACKAGE_1 $(SourceDataset_OGCGEOPACKAGE) +GUI MULTIFILE SourceDataset_OGCGEOPACKAGE_1 GeoPackage_Files(*.gpkg)|*.gpkg|All_files(*)|* GeoPackage File: +DEFAULT_MACRO OGCGEOPACKAGE_IN_FME_CONNECTION_GROUP_OGCGEOPACKAGE_1 +GUI OPTIONAL DISCLOSUREGROUP OGCGEOPACKAGE_IN_FME_CONNECTION_GROUP_OGCGEOPACKAGE_1 OGCGEOPACKAGE_IN_NAMED_CONNECTION Database Connection +DEFAULT_MACRO OGCGEOPACKAGE_IN_TABLELIST_OGCGEOPACKAGE_1 +OGCGEOPACKAGE_1_TABLELIST "$(OGCGEOPACKAGE_IN_TABLELIST_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_ADVANCED_GROUP_OGCGEOPACKAGE_1 +GUI OPTIONAL DISCLOSUREGROUP OGCGEOPACKAGE_IN_ADVANCED_GROUP_OGCGEOPACKAGE_1 FME_DISCLOSURE_CLOSED%OGCGEOPACKAGE_IN_ENFORCE_FOREIGN_KEY_INTEGRITY_OGCGEOPACKAGE_1 Advanced +DEFAULT_MACRO OGCGEOPACKAGE_IN_ENFORCE_FOREIGN_KEY_INTEGRITY_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_ENFORCE_FOREIGN_KEY_INTEGRITY "$(OGCGEOPACKAGE_IN_ENFORCE_FOREIGN_KEY_INTEGRITY_OGCGEOPACKAGE_1)" +GUI LOOKUP_CHOICE OGCGEOPACKAGE_IN_ENFORCE_FOREIGN_KEY_INTEGRITY_OGCGEOPACKAGE_1 Yes,YES%No,NO Enforce Foreign Key Integrity: +DEFAULT_MACRO OGCGEOPACKAGE_IN_EXPOSE_ATTRS_GROUP_OGCGEOPACKAGE_1 +OGCGEOPACKAGE_1_EXPOSE_ATTRS_GROUP "$(OGCGEOPACKAGE_IN_EXPOSE_ATTRS_GROUP_OGCGEOPACKAGE_1)" +# Include this file in source setting section to add external search envelope processing +# Zero as a default means we don't do any search -- this makes workbench happier +DEFAULT_MACRO OGCGEOPACKAGE_IN_USE_SEARCH_ENVELOPE_OGCGEOPACKAGE_1 NO +OGCGEOPACKAGE_1_USE_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_USE_SEARCH_ENVELOPE_OGCGEOPACKAGE_1)" +GUI ACTIVEDISCLOSUREGROUP OGCGEOPACKAGE_IN_USE_SEARCH_ENVELOPE_OGCGEOPACKAGE_1 OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1%OGCGEOPACKAGE_IN_SEARCH_METHOD%OGCGEOPACKAGE_IN_SEARCH_METHOD_FILTER%OGCGEOPACKAGE_IN_SEARCH_ORDER%OGCGEOPACKAGE_IN_SEARCH_FEATURE%OGCGEOPACKAGE_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope +# =========================================================================== +GUI LOOKUP OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1 <Unused>,0 +DEFAULT_MACRO OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1 0 +OGCGEOPACKAGE_1_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1)" +GUI OPTIONAL FLOAT OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINX_OGCGEOPACKAGE_1 Minimum X: +# =========================================================================== +GUI LOOKUP OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1 <Unused>,0 +DEFAULT_MACRO OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1 0 +OGCGEOPACKAGE_1_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1)" +GUI OPTIONAL FLOAT OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MINY_OGCGEOPACKAGE_1 Minimum Y: +# =========================================================================== +GUI LOOKUP OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1 <Unused>,0 +DEFAULT_MACRO OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1 0 +OGCGEOPACKAGE_1_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1)" +GUI OPTIONAL FLOAT OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXX_OGCGEOPACKAGE_1 Maximum X: +# =========================================================================== +GUI LOOKUP OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1 <Unused>,0 +DEFAULT_MACRO OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1 0 +OGCGEOPACKAGE_1_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1)" +GUI OPTIONAL FLOAT OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_MAXY_OGCGEOPACKAGE_1 Maximum Y: +# =========================================================================== +GUI LOOKUP OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1 <Unused>, +DEFAULT_MACRO OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1 +OGCGEOPACKAGE_1_SEARCH_ENVELOPE "$(OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1)" +GUI OPTIONAL COORDSYS OGCGEOPACKAGE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_OGCGEOPACKAGE_1 Search Envelope Coordinate System: +# =========================================================================== +# BUG18999: We now have a soft clip to fall back on like native spatial index +# thus we are reintroducing the clip to envelop as an option for users. +# Defualt to soft clip as per the existing database readers we are emulating +GUI LOOKUP OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1 <Unused>,NO +DEFAULT_MACRO OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1 NO +OGCGEOPACKAGE_1_CLIP_TO_ENVELOPE "$(OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1)" +GUI OPTIONAL CHECKBOX OGCGEOPACKAGE_IN_CLIP_TO_ENVELOPE_OGCGEOPACKAGE_1 YES%NO Clip to Search Envelope +DEFAULT_MACRO OGCGEOPACKAGE_IN_READ_BOOLEANS_AS_YES_NO_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_READ_BOOLEANS_AS_YES_NO "$(OGCGEOPACKAGE_IN_READ_BOOLEANS_AS_YES_NO_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_READ_NULLS_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_READ_NULLS "$(OGCGEOPACKAGE_IN_READ_NULLS_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_OGCGEOPACKAGE_1 Yes +OGCGEOPACKAGE_1_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS "$(OGCGEOPACKAGE_IN_QUERY_FEATURE_TYPES_FOR_MERGE_FILTERS_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_ENCODE_FEATURE_TYPE_AND_ATTR_NAMES_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_ENCODE_FEATURE_TYPE_AND_ATTR_NAMES "$(OGCGEOPACKAGE_IN_ENCODE_FEATURE_TYPE_AND_ATTR_NAMES_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_OPEN_SINGLE_RASTER_AS_SUBDATASET_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_OPEN_SINGLE_RASTER_AS_SUBDATASET "$(OGCGEOPACKAGE_IN_OPEN_SINGLE_RASTER_AS_SUBDATASET_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_READER_REPLACE_INVALID_CHARS_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_READER_REPLACE_INVALID_CHARS "$(OGCGEOPACKAGE_IN_READER_REPLACE_INVALID_CHARS_OGCGEOPACKAGE_1)" +DEFAULT_MACRO OGCGEOPACKAGE_IN_EXPOSE_PRIMARY_KEY_ATTRIBUTE_OGCGEOPACKAGE_1 YES +OGCGEOPACKAGE_1_EXPOSE_PRIMARY_KEY_ATTRIBUTE "$(OGCGEOPACKAGE_IN_EXPOSE_PRIMARY_KEY_ATTRIBUTE_OGCGEOPACKAGE_1)" +# =========================================================================== +DEFAULT_MACRO OGCGEOPACKAGE_IN_NETWORK_AUTHENTICATION_OGCGEOPACKAGE_1 +OGCGEOPACKAGE_1_NETWORK_AUTHENTICATION "$(OGCGEOPACKAGE_IN_NETWORK_AUTHENTICATION_OGCGEOPACKAGE_1)" +GUI OPTIONAL AUTHENTICATOR OGCGEOPACKAGE_IN_NETWORK_AUTHENTICATION_OGCGEOPACKAGE_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication +# ============================================================================ +DEFAULT_MACRO OGCGEOPACKAGE_IN_ATTRIBUTE_READING_OGCGEOPACKAGE_1 DEFLINE +OGCGEOPACKAGE_1_ATTRIBUTE_READING "$(OGCGEOPACKAGE_IN_ATTRIBUTE_READING_OGCGEOPACKAGE_1)" +# ============================================================================ +OGCGEOPACKAGE_1_GENERATE_FME_BUILD_NUM 21806 +OGCGEOPACKAGE_1_DATASET "$(SourceDataset_OGCGEOPACKAGE_1)" +#! END_SOURCE_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "CSV2_4" +#! END_WB_HEADER +#! START_DEST_HEADER CSV2 CSV2_4 +# ===================================================================== +# The following GUI line prompts for a folder where the +# CSV files will be stored +#! END_DEST_HEADER +#! START_WB_HEADER +DEFAULT_MACRO DestDataset +INCLUDE [ if {"$(DestDataset)" != ""} { \ + puts {DEFAULT_MACRO DestDataset_CSV2_4 $(DestDataset)} \ + } ] +#! END_WB_HEADER +#! START_DEST_HEADER CSV2 CSV2_4 +DEFAULT_MACRO DestDataset_CSV2_4 $(DestDataset_CSV2_2) +GUI DIRNAME DestDataset_CSV2_4 Destination CSV (Comma Separated Value) Folder: +DEFAULT_MACRO CSV2_OUT_DATASET_GROUP_CSV2_4 +GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_DATASET_GROUP_CSV2_4 CSV2_OUT_EXTENSION_CSV2_4%CSV2_OUT_EXISTING_FILE_HANDLING Dataset +DEFAULT_MACRO CSV2_OUT_EXTENSION_CSV2_4 csv +CSV2_4_EXTENSION "$(CSV2_OUT_EXTENSION_CSV2_4)" +GUI OPTIONAL TEXT CSV2_OUT_EXTENSION_CSV2_4 Extension: +DEFAULT_MACRO CSV2_OUT_EXISTING_FILE_HANDLING_CSV2_4 Yes +CSV2_4_EXISTING_FILE_HANDLING "$(CSV2_OUT_EXISTING_FILE_HANDLING_CSV2_4)" +DEFAULT_MACRO CSV2_OUT_FIELDS_GROUP_CSV2_4 +GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_FIELDS_GROUP_CSV2_4 CSV2_OUT_DELIMITER_CSV2_4%CSV2_OUT_WRITE_FIELD_NAMES Fields +DEFAULT_MACRO CSV2_OUT_DELIMITER_CSV2_4 <comma> +CSV2_4_DELIMITER "$(CSV2_OUT_DELIMITER_CSV2_4)" +GUI STRING_OR_CHOICE_ENCODED CSV2_OUT_DELIMITER_CSV2_4 ,%;%|%space%tab Delimiter Character: +DEFAULT_MACRO CSV2_OUT_WRITE_FIELD_NAMES_CSV2_4 firstrow +CSV2_4_WRITE_FIELD_NAMES "$(CSV2_OUT_WRITE_FIELD_NAMES_CSV2_4)" +DEFAULT_MACRO CSV2_OUT_ENCODING_GROUP_CSV2_4 +GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_ENCODING_GROUP_CSV2_4 CSV2_OUT_ENCODING_CSV2_4%CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_4 Encoding +DEFAULT_MACRO CSV2_OUT_ENCODING_CSV2_4 UTF-8 +CSV2_4_ENCODING "$(CSV2_OUT_ENCODING_CSV2_4)" +GUI STRING_OR_ENCODING CSV2_OUT_ENCODING_CSV2_4 fme-system%* Character Encoding: +DEFAULT_MACRO CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_4 Yes +CSV2_4_WRITE_BOM_FOR_UNICODE "$(CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_4)" +GUI CHOICE CSV2_OUT_WRITE_BOM_FOR_UNICODE_CSV2_4 Yes%No Write Byte Order Mark for Unicode: +DEFAULT_MACRO CSV2_OUT_ADVANCED_GROUP_CSV2_4 +GUI OPTIONAL DISCLOSUREGROUP CSV2_OUT_ADVANCED_GROUP_CSV2_4 FME_DISCLOSURE_CLOSED%CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_4%CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_4%CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4%CSV2_OUT_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE_CSV2_4%CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_4%CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_4%CSV2_OUT_ROW_TERMINATION_CSV2_4%CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_4 Advanced +DEFAULT_MACRO CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_4 if_needed +CSV2_4_QUALIFY_FIELD_NAMES "$(CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_4)" +GUI LOOKUP_CHOICE CSV2_OUT_QUALIFY_FIELD_NAMES_CSV2_4 Yes,yes%No,no%If<space>Needed,if_needed Qualify Field Names: +DEFAULT_MACRO CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_4 if_needed +CSV2_4_QUALIFY_FIELD_VALUES "$(CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_4)" +GUI ACTIVECHOICE_LOOKUP CSV2_OUT_QUALIFY_FIELD_VALUES_CSV2_4 Yes,yes,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4%No,no%If<space>Needed,if_needed,CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4 Qualify Field Values: +DEFAULT_MACRO CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4 <Unused> +CSV2_4_UNQUALIFIED_FIELD_VALUE_HANDLING "$(CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4)" +GUI LOOKUP_CHOICE CSV2_OUT_UNQUALIFIED_FIELD_VALUE_HANDLING_CSV2_4 Remove<space>Unsafe<space>Characters,remove_unsafe%Preserve<space>Unsafe<space>Characters,preserve_unsafe Unqualified Field Value Handling: +DEFAULT_MACRO CSV2_OUT_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE_CSV2_4 Yes +CSV2_4_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE "$(CSV2_OUT_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE_CSV2_4)" +GUI CHOICE CSV2_OUT_TREAT_EMBEDDED_FIELD_QUALIFIERS_AS_UNSAFE_CSV2_4 Yes%No Treat Embedded Field Qualifiers As Unsafe: +DEFAULT_MACRO CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_4 <quote> +CSV2_4_FIELD_QUALIFIER_CHARACTER "$(CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_4)" +GUI STRING_ENCODED CSV2_OUT_FIELD_QUALIFIER_CHARACTER_CSV2_4 Field Qualifier Character: +DEFAULT_MACRO CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_4 <quote> +CSV2_4_FIELD_QUALIFIER_ESCAPE_CHARACTER "$(CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_4)" +GUI STRING_ENCODED CSV2_OUT_FIELD_QUALIFIER_ESCAPE_CHARACTER_CSV2_4 Field Qualifier Escape Character: +DEFAULT_MACRO CSV2_OUT_ROW_TERMINATION_CSV2_4 System +CSV2_4_ROW_TERMINATION "$(CSV2_OUT_ROW_TERMINATION_CSV2_4)" +GUI CHOICE CSV2_OUT_ROW_TERMINATION_CSV2_4 System%Windows%Unix%Macintosh Row Termination: +DEFAULT_MACRO CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_4 NO +CSV2_4_WRITE_SCHEMA_FILE "$(CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_4)" +GUI ACTIVEDISCLOSUREGROUP CSV2_OUT_WRITE_SCHEMA_FILE_CSV2_4 FME_DISCLOSURE_CLOSED%CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_4 Write Schema Configuration File +DEFAULT_MACRO CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_4 <Unused> +CSV2_4_EXISTING_SCHEMA_FILE_HANDLING "$(CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_4)" +GUI CHOICE CSV2_OUT_EXISTING_SCHEMA_FILE_HANDLING_CSV2_4 Overwrite%Prepend Existing Schema File Handling: +DEFAULT_MACRO CSV2_OUT_COORDINATE_SYSTEM_GRANULARITY_CSV2_4 FEATURE_TYPE +CSV2_4_COORDINATE_SYSTEM_GRANULARITY "$(CSV2_OUT_COORDINATE_SYSTEM_GRANULARITY_CSV2_4)" +# ============================================================================ +CSV2_4_GENERATE_FME_BUILD_NUM 21806 +CSV2_4_DATASET "$(DestDataset_CSV2_4)" +#! END_DEST_HEADER +#! START_WB_HEADER +#! END_WB_HEADER +#! END_HEADER + +LOG_FILENAME "$(FME_MF_DIR)citygml_aggregator_joe_2022_04_08.log" +LOG_APPEND NO +LOG_FILTER_MASK -1 +LOG_MAX_FEATURES 200 +LOG_MAX_RECORDED_FEATURES 200 +FME_REPROJECTION_ENGINE FME +FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto +FME_GEOMETRY_HANDLING Enhanced +FME_STROKE_MAX_DEVIATION 0 +FME_NAMES_ENCODING UTF-8 +LAST_SAVE_BUILD "FME 2021.2.2.0 (20220106 - Build 21806 - WIN64)" +MAPPING_FILE_ID CityGML<space>Aggregator +DEFAULT_MACRO DATASET_KEYWORD_CSV2_1 CSV2_1 +DEFAULT_MACRO DATASET_KEYWORD_CSV2_2 CSV2_2 +DEFAULT_MACRO DATASET_KEYWORD_CITYGML_1 CITYGML_1 +DEFAULT_MACRO DATASET_KEYWORD_OGCGEOPACKAGE_1 OGCGEOPACKAGE_1 +DEFAULT_MACRO DATASET_KEYWORD_CSV2_4 CSV2_4 +# ------------------------------------------------------------------------- + +CSV2_1_READER_META_ATTRIBUTES fme_feature_type + +# ------------------------------------------------------------------------- + +CSV2_2_READER_META_ATTRIBUTES fme_feature_type + +# ------------------------------------------------------------------------- + +CITYGML_1_READER_META_ATTRIBUTES fme_feature_type + +# ------------------------------------------------------------------------- + +OGCGEOPACKAGE_1_READER_META_ATTRIBUTES fme_feature_type + +# ------------------------------------------------------------------------- + +MULTI_READER_CONTINUE_ON_READER_FAILURE No + +# ------------------------------------------------------------------------- + +MACRO WORKSPACE_NAME citygml_aggregator_joe_2022_04_08 +MACRO FME_VIEWER_APP fmedatainspector +# ------------------------------------------------------------------------- +CITYGML_1_DEF WallSurface citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_opening{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF Address citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_address xml_xml +# ------------------------------------------------------------------------- +CITYGML_1_DEF CityModel citygml_target_uri xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_city_object_member{}.xlink_href xml_buffer citygml_appearance_member{}.xlink_href xml_buffer gml_feature_member{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF OuterCeilingSurface citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_opening{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF GroundSurface citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_opening{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF OuterFloorSurface citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_opening{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF RoofSurface citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_opening{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- +CITYGML_1_DEF Building citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_class xml_buffer citygml_class_codeSpace xml_buffer citygml_function{} xml_buffer citygml_function{}.codeSpace xml_buffer citygml_usage{} xml_buffer citygml_usage{}.codeSpace xml_buffer citygml_year_of_construction xml_buffer citygml_year_of_demolition xml_buffer citygml_roof_type xml_buffer citygml_roof_type_codeSpace xml_buffer citygml_measured_height xml_real64 citygml_measured_height_units xml_buffer citygml_storeys_above_ground xml_uint64 citygml_storeys_below_ground xml_uint64 citygml_storey_heights_above_ground xml_buffer citygml_storey_heights_above_ground_units xml_buffer citygml_storey_heights_below_ground xml_buffer citygml_storey_heights_below_ground_units xml_buffer citygml_outer_building_installation{}.xlink_href xml_buffer citygml_interior_building_installation{}.xlink_href xml_buffer citygml_bounded_by{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_interior_room{}.xlink_href xml_buffer citygml_consists_of_building_part{}.xlink_href xml_buffer citygml_address{}.xlink_href xml_buffer +# ------------------------------------------------------------------------- + +FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE CSV2 CSV2_1::CSV multi_reader_keyword,$(DATASET_KEYWORD_CSV2_1) TO FME_GENERIC ::CSV ALIAS_GEOMETRY ROUTE CSV2 CSV2_2::CSV multi_reader_keyword,$(DATASET_KEYWORD_CSV2_2) TO FME_GENERIC ::CSV ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::WallSurface multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::WallSurface ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::Address multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::Address ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::CityModel multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::CityModel ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::OuterCeilingSurface multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::OuterCeilingSurface ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::GroundSurface multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::GroundSurface ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::OuterFloorSurface multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::OuterFloorSurface ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::RoofSurface multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::RoofSurface ALIAS_GEOMETRY ROUTE CITYGML CITYGML_1::Building multi_reader_keyword,$(DATASET_KEYWORD_CITYGML_1) TO FME_GENERIC ::Building ALIAS_GEOMETRY ROUTE OGCGEOPACKAGE OGCGEOPACKAGE_1::infas360_AGS20_Siedlungsblock_Stuttgart_WGS84 multi_reader_keyword,$(DATASET_KEYWORD_OGCGEOPACKAGE_1) TO FME_GENERIC ::infas360_AGS20_Siedlungsblock_Stuttgart_WGS84 ALIAS_GEOMETRY ROUTE OGCGEOPACKAGE OGCGEOPACKAGE_1::infas360_AGS27_Adressen_Stuttgart_WGS84 multi_reader_keyword,$(DATASET_KEYWORD_OGCGEOPACKAGE_1) TO FME_GENERIC ::infas360_AGS27_Adressen_Stuttgart_WGS84 ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * +CSV2_1_MERGE_DEF CSV2_1::CSV GLOB * DEFLINE fme_attribute_reading,all,GMLId,string,Latitude,y_coordinate,Longitude,x_coordinate,X-coordinate,real64,Y-coordinate,real64,LOD,string,Year<space>of<space>construction,uint16,Refurbishment<space>Variant,string,ALKIS<space>code,uint16,PrimaryUsageZoneType,string,PrimaryUsageZoneArea,real64,SecondaryUsageZoneType,string,SecondaryUsageZoneArea,real32,BuildingType,string,Footprint<space>area,real32,Total<space>wall<space>thermal<space>area<space>above<space>ground,real64,Total<space>wall<space>thermal<space>area<space>below<space>ground,real32,Total<space>outwall<space>area,real64,Total<space>sharedwall<space>area,real32,Total<space>roof<space>area,real32,Gross<space>volume,real64,Is<space>Gross<space>volume<space>approximated?,string,Heated<space>volume,real64,Ridge<solidus>mean<space>Height,z_coordinate,Eaves<solidus>mean<space>Height,real32,Storey<space>number,uint8,Average<space>Storey<space>Height,real32,Number<space>of<space>households,uint16,Number<space>of<space>occupants,uint16,Attic<space>Heating,string,Basement<space>Heating,string,Basement<space>ceiling<space>height<space>above<space>ground,real32,Surface<space>area<space>to<space>volume<space>ratio,real64,Heated<space>area,real64,Mean<space>Uvalue,real32,Specific<space>domestic<space>hot<space>water<space>demand,string,Specific<space>space<space>heating<space>demand,real32,Total<space>Yearly<space>Heat+DHW<space>demand,uint32,January<space>Heating<space>Demand,uint32,February<space>Heating<space>Demand,uint32,March<space>Heating<space>Demand,uint32,April<space>Heating<space>Demand,uint32,May<space>Heating<space>Demand,uint32,June<space>Heating<space>Demand,uint16,July<space>Heating<space>Demand,uint16,August<space>Heating<space>Demand,uint16,September<space>Heating<space>Demand,uint32,October<space>Heating<space>Demand,uint32,November<space>Heating<space>Demand,uint32,December<space>Heating<space>demand,real64 +CSV2_2_MERGE_DEF CSV2_2::CSV GLOB * DEFLINE fme_attribute_reading,all,BuildingID,string,PV<space>potential<space>yield<space><openbracket>MWh<solidus>a<closebracket>,real32 +CITYGML_1_MERGE_DEF CITYGML_1::WallSurface EXACT WallSurface +CITYGML_1_MERGE_DEF CITYGML_1::Address EXACT Address +CITYGML_1_MERGE_DEF CITYGML_1::CityModel EXACT CityModel +CITYGML_1_MERGE_DEF CITYGML_1::OuterCeilingSurface EXACT OuterCeilingSurface +CITYGML_1_MERGE_DEF CITYGML_1::GroundSurface EXACT GroundSurface +CITYGML_1_MERGE_DEF CITYGML_1::OuterFloorSurface EXACT OuterFloorSurface +CITYGML_1_MERGE_DEF CITYGML_1::RoofSurface EXACT RoofSurface +CITYGML_1_MERGE_DEF CITYGML_1::Building EXACT Building +OGCGEOPACKAGE_1_MERGE_DEF OGCGEOPACKAGE_1::infas360_AGS20_Siedlungsblock_Stuttgart_WGS84 EXACT infas360_AGS20_Siedlungsblock_Stuttgart_WGS84 DEFLINE geopackage_type,geopackage_multipolygon,geopackage_where_clause,,fme_attribute_reading,defined,ags20,text<openparen>20<closeparen>,sb_hh_1p,mediumint,sb_hh_2p,mediumint,sb_hh_3p,mediumint,sb_hh_4p,mediumint,sb_hh_5p,mediumint,sb_hh_dichte,double,sb_ew_00u03_anz,mediumint,sb_ew_00u18_anz,mediumint,sb_ew_03u06_anz,mediumint,sb_ew_06u10_anz,mediumint,sb_ew_10u15_anz,mediumint,sb_ew_15u18_anz,mediumint,sb_ew_18u30_anz,mediumint,sb_ew_30u45_anz,mediumint,sb_ew_45u60_anz,mediumint,sb_ew_60u65_anz,mediumint,sb_ew_65_anz,mediumint,sb_ew_65u75_anz,mediumint,sb_ew_75_anz,mediumint,sb_ew_ausl_anz,mediumint,sb_ew_gesch,mediumint,sb_ew_lebpar,mediumint,sb_ew_ledig,mediumint,sb_ew_ledig18,mediumint,sb_ew_m,mediumint,sb_ew_verh,mediumint,sb_ew_verw,mediumint,sb_ew_w,mediumint,sb_rentner_anz,mediumint,sb_hh_eink_kl1,mediumint,sb_hh_eink_kl2,mediumint,sb_hh_eink_kl3,mediumint,sb_hh_eink_kl4,mediumint,sb_hh_eink_kl5,mediumint,sb_hh_eink_kl6,mediumint,sb_ausl_euro27_anz,mediumint,sb_ausl_eusonst_anz,mediumint,sb_ausl_sonst_anz,mediumint,sb_ausl_welt_anz,mediumint,sb_kba_seg1,mediumint,sb_kba_seg2,mediumint,sb_kba_seg3,mediumint,sb_kba_seg4,mediumint,sb_kba_seg5,mediumint,sb_kba_seg6,mediumint,sb_kba_seg7,mediumint,sb_kba_seg8,mediumint,sb_kba_seg9,mediumint,sb_kba_seg10,mediumint,sb_kba_seg11,mediumint,sb_kba_seg12,mediumint,sb_kba_seg13,mediumint,sb_kba_seg14,mediumint,sb_kba_seg99,mediumint,fid,int<comma>PrimaryKey +OGCGEOPACKAGE_1_MERGE_DEF OGCGEOPACKAGE_1::infas360_AGS27_Adressen_Stuttgart_WGS84 EXACT infas360_AGS27_Adressen_Stuttgart_WGS84 DEFLINE geopackage_type,geopackage_point,geopackage_where_clause,,fme_attribute_reading,defined,ags27,text<openparen>27<closeparen>,plz,text<openparen>5<closeparen>,ort,text,ortz,text,ot1,text,ot2,text,stn,text,hnr,mediumint,hnrz,text,casa_solar,mediumint,casa_basistyp,mediumint,casa_str_typ,mediumint,casa_vorwahl,text,casa_n,mediumint,casa_bj_kl,mediumint,casa_kompl,mediumint,fid,int<comma>PrimaryKey +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "infas360_AGS27_Adressen_Stuttgart_WGS84_OGCGEOPACKAGE_1 Splitter" INPUT FEATURE_TYPE infas360_AGS27_Adressen_Stuttgart_WGS84 OUTPUT FEATURE_TYPE infas360_AGS27_Adressen_Stuttgart_WGS84_OGCGEOPACKAGE_1 +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "infas360_AGS20_Siedlungsblock_Stuttgart_WGS84_OGCGEOPACKAGE_1 Splitter" INPUT FEATURE_TYPE infas360_AGS20_Siedlungsblock_Stuttgart_WGS84 OUTPUT FEATURE_TYPE infas360_AGS20_Siedlungsblock_Stuttgart_WGS84_OGCGEOPACKAGE_1 +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "CSV_CSV2_1 Splitter" INPUT FEATURE_TYPE CSV multi_reader_keyword $(DATASET_KEYWORD_CSV2_1) OUTPUT FEATURE_TYPE CSV_CSV2_1 +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "GroundSurface_CITYGML_1 Splitter" INPUT FEATURE_TYPE GroundSurface OUTPUT FEATURE_TYPE GroundSurface_CITYGML_1 +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "CityModel_CITYGML_1 Splitter" INPUT FEATURE_TYPE CityModel +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "Building_CITYGML_1 Splitter" INPUT FEATURE_TYPE Building +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "Address_CITYGML_1 Splitter" INPUT FEATURE_TYPE Address +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "WallSurface_CITYGML_1 Splitter" INPUT FEATURE_TYPE WallSurface +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "RoofSurface_CITYGML_1 Splitter" INPUT FEATURE_TYPE RoofSurface +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "OuterFloorSurface_CITYGML_1 Splitter" INPUT FEATURE_TYPE OuterFloorSurface +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "OuterCeilingSurface_CITYGML_1 Splitter" INPUT FEATURE_TYPE OuterCeilingSurface +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "CSV_CSV2_2 Splitter" INPUT FEATURE_TYPE CSV multi_reader_keyword $(DATASET_KEYWORD_CSV2_2) OUTPUT FEATURE_TYPE CSV_CSV2_2 +DEFAULT_MACRO WB_CURRENT_CONTEXT +# ------------------------------------------------------------------------- +FACTORY_DEF {*} TeeFactory FACTORY_NAME { Reprojector_2 } INPUT FEATURE_TYPE infas360_AGS20_Siedlungsblock_Stuttgart_WGS84_OGCGEOPACKAGE_1 OUTPUT { FEATURE_TYPE Reprojector_2_REPROJECTED @Reproject("","EPSG:31463",NearestNeighbor,PreserveCells,Reprojector_2,"COORD_SYS_WARNING",RASTER_TOLERANCE,0.0) } +# ------------------------------------------------------------------------- +FACTORY_DEF {*} TeeFactory FACTORY_NAME { Reprojector } INPUT FEATURE_TYPE infas360_AGS27_Adressen_Stuttgart_WGS84_OGCGEOPACKAGE_1 OUTPUT { FEATURE_TYPE Reprojector_REPROJECTED @Reproject("","EPSG:31463",NearestNeighbor,PreserveCells,Reprojector,"COORD_SYS_WARNING",RASTER_TOLERANCE,0.0) } +# ------------------------------------------------------------------------- +INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {POLYGONS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {AGGREGATES}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] +FACTORY_DEF {*} ReferenceFactory FACTORY_NAME { FeatureMerger } FLUSH_WHEN_GROUPS_CHANGE { <Unused> } INPUT REFERENCER FEATURE_TYPE GroundSurface_CITYGML_1 INPUT REFERENCEE FEATURE_TYPE CSV_CSV2_1 REFERENCE_INFO { $(FeatureMerger_REFERENCE_INFO) } REFERENCE_TABLE { @EvaluateExpression(FDIV,STRING_ENCODED,<at>Value<openparen>gml_parent_id<closeparen>,FeatureMerger) @EvaluateExpression(FDIV,STRING_ENCODED,<at>Value<openparen>GMLId<closeparen>,FeatureMerger) AUTO } ATTR_ACCUM_MODE { "HANDLE_CONFLICT" } ATTR_CONFLICT_RES { "REQUESTOR_IF_CONFLICT" } IGNORE_NULLS { "No" } HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 { No } LIST_ATTRS_TO_INCLUDE { <Unused> } LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES { NO } REFERENCEES_FIRST { No } REJECT_INVALID_GEOM YES CLEANING_TOLERANCE { <Unused> } PRESERVE_FEATURE_ORDER { PER_OUTPUT_PORT } OUTPUT { COMPLETE FEATURE_TYPE FeatureMerger_MERGED } OUTPUT { REJECTED FEATURE_TYPE FeatureMerger_<REJECTED> } +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_<Rejected> INPUT FEATURE_TYPE FeatureMerger_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMerger<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- +INCLUDE [if { {ATTRIBUTES} == {ATTRIBUTES} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO ATTRIBUTES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} && {<Unused>} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {POLYGONS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_POLYS"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {AGGREGATES}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} && {<Unused>} == {LINESFROMPOINTS}} { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_LINES_FROM_POINTS"; } elseif { {ATTRIBUTES} == {GEOM_BUILD} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_BUILD_AGGREGATES"; } elseif { {ATTRIBUTES} == {GEOM_AND_ATTRS} } { puts "MACRO FeatureMerger_2_REFERENCE_INFO GEOM_AND_ATTR_BUILD_AGGREGATES"; } else {}; ] +FACTORY_DEF {*} ReferenceFactory FACTORY_NAME { FeatureMerger_2 } FLUSH_WHEN_GROUPS_CHANGE { <Unused> } INPUT REFERENCER FEATURE_TYPE FeatureMerger_MERGED INPUT REFERENCEE FEATURE_TYPE CSV_CSV2_2 REFERENCE_INFO { $(FeatureMerger_2_REFERENCE_INFO) } REFERENCE_TABLE { @EvaluateExpression(FDIV,STRING_ENCODED,<at>Value<openparen>gml_parent_id<closeparen>,FeatureMerger_2) @EvaluateExpression(FDIV,STRING_ENCODED,<at>Value<openparen>BuildingID<closeparen>,FeatureMerger_2) AUTO } ATTR_ACCUM_MODE { "HANDLE_CONFLICT" } ATTR_CONFLICT_RES { "REQUESTOR_IF_CONFLICT" } IGNORE_NULLS { "No" } HANDLE_NULL_MISSING_KEYS_LIKE_FME2013 { No } LIST_ATTRS_TO_INCLUDE { <Unused> } LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } MERGE_ATTRIBUTES Yes MANAGE_FME_TYPE Yes MODE COMPLETE PROCESS_DUPLICATE_REFERENCEES { NO } REFERENCEES_FIRST { No } REJECT_INVALID_GEOM YES CLEANING_TOLERANCE { <Unused> } PRESERVE_FEATURE_ORDER { PER_OUTPUT_PORT } OUTPUT { COMPLETE FEATURE_TYPE FeatureMerger_2_MERGED } OUTPUT { REJECTED FEATURE_TYPE FeatureMerger_2_<REJECTED> } +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME FeatureMerger_2_<Rejected> INPUT FEATURE_TYPE FeatureMerger_2_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, FeatureMerger_2<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- +FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME { AttributeManager } INPUT FEATURE_TYPE FeatureMerger_2_MERGED MULTI_FEATURE_MODE { NO } NULL_ATTR_MODE { NO_OP } ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ACTION_COLUMN 3 DEF_VAL_COLUMN 2 MISSING_INPUT_ATTR_HANDLING RENAME_SET_VALUE REMOVE ATTR_ACTION { "gml_id" "gml_id" "" "REMOVE" } ATTR_ACTION { "gml_parent_id" "gml_id" "" "RENAME_SET_VALUE" } ATTR_ACTION { "citygml_target_uri" "citygml_target_uri" "" "REMOVE" } ATTR_ACTION { "citygml_feature_role" "citygml_feature_role" "" "REMOVE" } ATTR_ACTION { "citygml_feature_role_attr_name" "citygml_feature_role_attr_name" "" "REMOVE" } ATTR_ACTION { "citygml_feature_role_attr_val" "citygml_feature_role_attr_val" "" "REMOVE" } ATTR_ACTION { "gml_description" "gml_description" "" "REMOVE" } ATTR_ACTION { "gml_name" "gml_name" "" "REMOVE" } ATTR_ACTION { "citygml_creationDate" "citygml_creationDate" "" "REMOVE" } ATTR_ACTION { "citygml_terminationDate" "citygml_terminationDate" "" "REMOVE" } ATTR_ACTION { "externalReference<opencurly><closecurly>.externalObject.name" "externalReference<opencurly><closecurly>.externalObject.name" "" "REMOVE" } ATTR_ACTION { "externalReference<opencurly><closecurly>.externalObject.uri" "externalReference<opencurly><closecurly>.externalObject.uri" "" "REMOVE" } ATTR_ACTION { "externalReference<opencurly><closecurly>.informationSystem" "externalReference<opencurly><closecurly>.informationSystem" "" "REMOVE" } ATTR_ACTION { "citygml_generalizes_to<opencurly><closecurly>.xlink_href" "citygml_generalizes_to<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_relative_to_terrain" "citygml_relative_to_terrain" "" "REMOVE" } ATTR_ACTION { "citygml_relative_to_water" "citygml_relative_to_water" "" "REMOVE" } ATTR_ACTION { "citygml_appearance<opencurly><closecurly>.xlink_href" "citygml_appearance<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_level_of_detail<opencurly><closecurly>" "citygml_level_of_detail<opencurly><closecurly>" "" "REMOVE" } ATTR_ACTION { "citygml_opening<opencurly><closecurly>.xlink_href" "citygml_opening<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_address" "citygml_address" "" "REMOVE" } ATTR_ACTION { "citygml_address<opencurly><closecurly>.xlink_href" "citygml_address<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_appearance_member<opencurly><closecurly>.xlink_href" "citygml_appearance_member<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_bounded_by<opencurly><closecurly>.xlink_href" "citygml_bounded_by<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_city_object_member<opencurly><closecurly>.xlink_href" "citygml_city_object_member<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_class" "citygml_class" "" "REMOVE" } ATTR_ACTION { "citygml_class_codeSpace" "citygml_class_codeSpace" "" "REMOVE" } ATTR_ACTION { "citygml_consists_of_building_part<opencurly><closecurly>.xlink_href" "citygml_consists_of_building_part<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_function<opencurly><closecurly>" "citygml_function<opencurly><closecurly>" "" "REMOVE" } ATTR_ACTION { "citygml_function<opencurly><closecurly>.codeSpace" "citygml_function<opencurly><closecurly>.codeSpace" "" "REMOVE" } ATTR_ACTION { "citygml_interior_building_installation<opencurly><closecurly>.xlink_href" "citygml_interior_building_installation<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_interior_room<opencurly><closecurly>.xlink_href" "citygml_interior_room<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_measured_height" "citygml_measured_height" "" "REMOVE" } ATTR_ACTION { "citygml_measured_height_units" "citygml_measured_height_units" "" "REMOVE" } ATTR_ACTION { "citygml_outer_building_installation<opencurly><closecurly>.xlink_href" "citygml_outer_building_installation<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "citygml_storey_heights_above_ground" "citygml_storey_heights_above_ground" "" "REMOVE" } ATTR_ACTION { "citygml_storey_heights_above_ground_units" "citygml_storey_heights_above_ground_units" "" "REMOVE" } ATTR_ACTION { "citygml_storey_heights_below_ground" "citygml_storey_heights_below_ground" "" "REMOVE" } ATTR_ACTION { "citygml_storey_heights_below_ground_units" "citygml_storey_heights_below_ground_units" "" "REMOVE" } ATTR_ACTION { "citygml_storeys_above_ground" "citygml_storeys_above_ground" "" "REMOVE" } ATTR_ACTION { "citygml_year_of_demolition" "citygml_year_of_demolition" "" "REMOVE" } ATTR_ACTION { "gml_feature_member<opencurly><closecurly>.xlink_href" "gml_feature_member<opencurly><closecurly>.xlink_href" "" "REMOVE" } ATTR_ACTION { "fme_feature_type" "fme_feature_type" "" "REMOVE" } ATTR_ACTION { "GMLId" "GMLId" "" "REMOVE" } ATTR_ACTION { "BuildingID" "BuildingID" "" "REMOVE" } OUTPUT { OUTPUT FEATURE_TYPE AttributeManager_OUTPUT } +# ------------------------------------------------------------------------- +FACTORY_DEF {*} TeeFactory FACTORY_NAME { 2DForcer } INPUT FEATURE_TYPE AttributeManager_OUTPUT OUTPUT { FEATURE_TYPE 2DForcer_2D @Dimension(2) } +# ------------------------------------------------------------------------- +FACTORY_DEF {*} OverlayFactory FACTORY_NAME { CityGMLPointOverlayer } INPUT POINT FEATURE_TYPE Reprojector_REPROJECTED INPUT POLYGON FEATURE_TYPE 2DForcer_2D FLUSH_WHEN_GROUPS_CHANGE { <Unused> } OVERLAP_COUNT_ATTRIBUTE { "_overlaps" } DEAGGREGATE_INPUT { Yes } MERGE_ATTRS { "YES" } ATTR_ACCUM_MODE { "HANDLE_CONFLICT" } ATTR_CONFLICT_RES { "ORIGINAL_IF_CONFLICT" } INCOMING_PREFIX { "<Unused>" } LIST_NAME { "<Unused>" } LIST_ATTRS_TO_INCLUDE { <Unused> } LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } CANDIDATE_LIST_NAME { "<Unused>" } CANDIDATE_LIST_ATTRS_TO_INCLUDE { <Unused> } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST { "NO" } REJECT_INVALID_GEOM YES OUTPUT { POLYGON FEATURE_TYPE CityGMLPointOverlayer_AREA } OUTPUT { ILLEGAL_GEOM FEATURE_TYPE CityGMLPointOverlayer_<REJECTED> } +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME CityGMLPointOverlayer_<Rejected> INPUT FEATURE_TYPE CityGMLPointOverlayer_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, CityGMLPointOverlayer<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- +INCLUDE [ if { {CENTER} == {CENTER} } { puts {MACRO TEE_OUTPUT OUTPUT FEATURE_TYPE __TO_OUTPUT__ @ConvertToPoint()}; } else { if { {CENTER} == {CENTEROFGRAV} } { puts {MACRO TEE_OUTPUT OUTPUT FEATURE_TYPE __TO_OUTPUT__ @ConvertToPoint(CENTER_OF_GRAVITY)}; } else { puts {MACRO TEE_OUTPUT OUTPUT FEATURE_TYPE __TO_TEST__ @GeneratePoint(3D,__temp_x__,__temp_y__,__temp_z__)}; }; }; ] +FACTORY_DEF {*} TeeFactory FACTORY_NAME { CenterPointReplacer } INPUT FEATURE_TYPE CityGMLPointOverlayer_AREA $(TEE_OUTPUT) +FACTORY_DEF {*} TestFactory FACTORY_NAME { CenterPointReplacer_router } INPUT FEATURE_TYPE __TO_TEST__ TEST &__temp_x__ == "" OUTPUT { PASSED FEATURE_TYPE CenterPointReplacer_UNTOUCHED fme_rejection_code INVALID_GEOMETRY_TYPE } OUTPUT { FAILED FEATURE_TYPE CenterPointReplacer_POINT @XValue(&__temp_x__,RESET) @YValue(&__temp_y__) @ZValue(&__temp_z__) @GeometryType(fme_point) @RemoveAttributes(__temp_x__,__temp_y__,__temp_z__) } +FACTORY_DEF {*} TestFactory FACTORY_NAME { CenterPointReplacer_outputter } INPUT FEATURE_TYPE __TO_OUTPUT__ TEST @Tcl2("FME_AttributeExists fme_untouched") != 0 OUTPUT { PASSED FEATURE_TYPE CenterPointReplacer_UNTOUCHED @RemoveAttributes(fme_untouched) fme_rejection_code INVALID_GEOMETRY_TYPE } OUTPUT { FAILED FEATURE_TYPE CenterPointReplacer_POINT } +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME CenterPointReplacer_<Rejected> INPUT FEATURE_TYPE CenterPointReplacer_UNTOUCHED OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, CenterPointReplacer<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- +FACTORY_DEF {*} OverlayFactory FACTORY_NAME { CityGMLOverlayer } INPUT POINT FEATURE_TYPE CenterPointReplacer_POINT INPUT POLYGON FEATURE_TYPE Reprojector_2_REPROJECTED FLUSH_WHEN_GROUPS_CHANGE { <Unused> } OVERLAP_COUNT_ATTRIBUTE { "_overlaps" } DEAGGREGATE_INPUT { Yes } MERGE_ATTRS { "YES" } ATTR_ACCUM_MODE { "HANDLE_CONFLICT" } ATTR_CONFLICT_RES { "ORIGINAL_IF_CONFLICT" } INCOMING_PREFIX { "<Unused>" } LIST_NAME { "<Unused>" } LIST_ATTRS_TO_INCLUDE { <Unused> } LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } CANDIDATE_LIST_NAME { "<Unused>" } CANDIDATE_LIST_ATTRS_TO_INCLUDE { <Unused> } CANDIDATE_LIST_ATTRS_TO_INCLUDE_MODE { <Unused> } MODE COMPLETE OVERLAY_TYPE POINT_ON_AREA POLYS_FIRST { "NO" } REJECT_INVALID_GEOM YES OUTPUT { POINT FEATURE_TYPE CityGMLOverlayer_POINT } OUTPUT { ILLEGAL_GEOM FEATURE_TYPE CityGMLOverlayer_<REJECTED> } +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME CityGMLOverlayer_<Rejected> INPUT FEATURE_TYPE CityGMLOverlayer_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, CityGMLOverlayer<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- + +FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC CityGMLOverlayer_POINT TO CSV2 __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,<at>SupplyAttributes<openparen>ENCODED<comma>__wb_out_feat_type__<comma>output<closeparen> GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ + +# ------------------------------------------------------------------------- +CSV2_4_DEF output csv_existing_file_handling Yes csv_write_field_names firstrow csv_date_output_format FME gml_id string Latitude y_coordinate Longitude x_coordinate X-coordinate real64 Y-coordinate real64 LOD string "Year of construction" uint16 "Refurbishment Variant" string "ALKIS code" uint16 PrimaryUsageZoneType string PrimaryUsageZoneArea real64 SecondaryUsageZoneType string SecondaryUsageZoneArea real32 BuildingType string "Footprint area" real32 "Total wall thermal area above ground" real64 "Total wall thermal area below ground" real32 "Total outwall area" real64 "Total sharedwall area" real32 "Total roof area" real32 "Gross volume" real64 "Is Gross volume approximated?" string "Heated volume" real64 "Ridge/mean Height" z_coordinate "Eaves/mean Height" real32 "Storey number" uint8 "Average Storey Height" real32 "Number of households" uint16 "Number of occupants" uint16 "Attic Heating" string "Basement Heating" string "Basement ceiling height above ground" real32 "Surface area to volume ratio" real64 "Heated area" real64 "Mean Uvalue" real32 "Specific domestic hot water demand" string "Specific space heating demand" real32 "Total Yearly Heat+DHW demand" uint32 "January Heating Demand" uint32 "February Heating Demand" uint32 "March Heating Demand" uint32 "April Heating Demand" uint32 "May Heating Demand" uint32 "June Heating Demand" uint16 "July Heating Demand" uint16 "August Heating Demand" uint16 "September Heating Demand" uint32 "October Heating Demand" uint32 "November Heating Demand" uint32 "December Heating demand" real64 "PV potential yield [MWh/a]" real32 ags27 varchar(27) plz varchar(5) ort string ortz string ot1 string ot2 string stn string hnr string hnrz string casa_solar string casa_basistyp string casa_str_typ string casa_vorwahl string casa_n string casa_bj_kl string casa_kompl string fid string _overlaps uint32 ags20 varchar(20) sb_hh_1p string sb_hh_2p string sb_hh_3p string sb_hh_4p string sb_hh_5p string sb_hh_dichte string sb_ew_00u03_anz string sb_ew_00u18_anz string sb_ew_03u06_anz string sb_ew_06u10_anz string sb_ew_10u15_anz string sb_ew_15u18_anz string sb_ew_18u30_anz string sb_ew_30u45_anz string sb_ew_45u60_anz string sb_ew_60u65_anz string sb_ew_65_anz string sb_ew_65u75_anz string sb_ew_75_anz string sb_ew_ausl_anz string sb_ew_gesch string sb_ew_lebpar string sb_ew_ledig string sb_ew_ledig18 string sb_ew_m string sb_ew_verh string sb_ew_verw string sb_ew_w string sb_rentner_anz string sb_hh_eink_kl1 string sb_hh_eink_kl2 string sb_hh_eink_kl3 string sb_hh_eink_kl4 string sb_hh_eink_kl5 string sb_hh_eink_kl6 string sb_ausl_euro27_anz string sb_ausl_eusonst_anz string sb_ausl_sonst_anz string sb_ausl_welt_anz string sb_kba_seg1 string sb_kba_seg2 string sb_kba_seg3 string sb_kba_seg4 string sb_kba_seg5 string sb_kba_seg6 string sb_kba_seg7 string sb_kba_seg8 string sb_kba_seg9 string sb_kba_seg10 string sb_kba_seg11 string sb_kba_seg12 string sb_kba_seg13 string sb_kba_seg14 string sb_kba_seg99 string diff --git a/public/fme/shp2CityGML_LoD1Bldg.fmw b/public/fme/shp2CityGML_LoD1Bldg.fmw new file mode 100644 index 0000000000000000000000000000000000000000..828b881e0085b6c66950a9e0c6597b6f43317596 --- /dev/null +++ b/public/fme/shp2CityGML_LoD1Bldg.fmw @@ -0,0 +1,1786 @@ +#! <?xml version="1.0" encoding="UTF-8" ?> +#! <WORKSPACE +# Command-line to run this workspace: +# "C:\Program Files\FME\fme.exe" C:\Users\Rushi\Desktop\FMEWorkbenches\shp2CityGML_LoD1Bldg\shp2CityGML_LoD1Bldg.fmw +# --DestDataset_CITYGML "C:\Users\Rushi\Desktop\FMEWorkbenches\shp2CityGML_LoD1Bldg\CityGMLLoD1_Bldg.gml" +# --SourceDataset_SHAPEFILE "C:\Users\Rushi\Desktop\FMEWorkbenches\shp2CityGML_LoD1Bldg\Example_Input\Bldg_2D.shp" +# +#! ATTR_TYPE_ENCODING="SDF" +#! BEGIN_PYTHON="" +#! BEGIN_TCL="" +#! CATEGORY="" +#! DESCRIPTION="" +#! DESTINATION="NONE" +#! DESTINATION_ROUTING_FILE="" +#! DOC_EXTENTS="4134.13 446.001" +#! DOC_TOP_LEFT="-487.63 -187.249" +#! END_PYTHON="" +#! END_TCL="" +#! EXPLICIT_BOOKMARK_ORDER="false" +#! FME_BUILD_NUM="20594" +#! FME_DOCUMENT_GUID="6010838d-2bfd-44e6-bcc4-909c2f250f66" +#! FME_DOCUMENT_PRIORGUID="4d4db1fa-6544-416f-a5c6-968ce9bfc3b0,ac96e7c9-2bfc-40a1-a3cf-952eac266d98,f605453d-d7e8-46b9-8af7-69fcbcb0ccc8,35e8e9fb-e00d-48c4-81d5-70e6233eae27,6ee23dbc-ae8a-4422-8207-69b1383fda2d,5ed9b51d-ba2f-49ff-b3e4-b6e33f5f793a,e469315a-959d-4fad-8153-a4cca5572016" +#! FME_GEOMETRY_HANDLING="Enhanced" +#! FME_IMPLICIT_CSMAP_REPROJECTION_MODE="Auto" +#! FME_REPROJECTION_ENGINE="FME" +#! FME_SERVER_SERVICES="" +#! FME_STROKE_MAX_DEVIATION="0" +#! HISTORY="" +#! IGNORE_READER_FAILURE="No" +#! LAST_SAVE_BUILD="FME(R) 2020.1.0.0 (20200707 - Build 20594 - WIN64)" +#! LAST_SAVE_DATE="2020-08-15T12:29:07" +#! LOG_FILE="" +#! LOG_MAX_RECORDED_FEATURES="200" +#! MARKDOWN_DESCRIPTION="" +#! MARKDOWN_USAGE="" +#! MAX_LOG_FEATURES="200" +#! MULTI_WRITER_DATASET_ORDER="BY_ID" +#! PASSWORD="" +#! PYTHON_COMPATIBILITY="37" +#! REDIRECT_TERMINATORS="NONE" +#! SAVE_ON_PROMPT_AND_RUN="Yes" +#! SHOW_ANNOTATIONS="true" +#! SHOW_INFO_NODES="true" +#! SOURCE="NONE" +#! SOURCE_ROUTING_FILE="" +#! TERMINATE_REJECTED="YES" +#! TITLE="" +#! USAGE="" +#! USE_MARKDOWN="" +#! VIEW_POSITION="-1109.39 0" +#! WARN_INVALID_XFORM_PARAM="Yes" +#! WORKSPACE_VERSION="1" +#! ZOOM_SCALE="100" +#! > +#! <DATASETS> +#! <DATASET +#! IS_SOURCE="true" +#! ROLE="READER" +#! FORMAT="SHAPEFILE" +#! DATASET="$(SourceDataset_SHAPEFILE)" +#! KEYWORD="SHAPEFILE_1" +#! MULTI_GEOM_ALLOWED="false" +#! ATTR_MAX_LENGTH="0" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="shapefile_type {FME_GEN_GEOMETRY}" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="fme_text_size double fme_dataset char(50) shape_geometry_error char(254) fme_secondary_axis double fme_rotation double shapefile_type char(30) fme_text_string char(50) multi_reader_id long fme_fill_color char(50) fme_geometry char(50) multi_reader_keyword char(50) multi_reader_full_id long fme_start_angle double fme_feature_type char(50) fme_sweep_angle double fme_basename char(50) multi_reader_type char(50) fme_primary_axis double fme_color char(50) fme_type char(50)" +#! DEFLINE_PARMS="" +#! ATTR_INDEX_TYPES="Indexed" +#! ATTR_NAME_INVALID_CHARS="" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILEDIR" +#! FTTR_TYPE="LISTBOX_ENCODED" +#! GENERATE_FME_BUILD_NUM="20594" +#! COORDSYS="" +#! FEATURE_TYPES="" +#! MAX_FEATURES="" +#! MAX_FEATURES_PER_FEATURE_TYPE="" +#! MIN_FEATURES="" +#! START_FEATURE="" +#! > +#! <METAFILE_PARAMETER +#! NAME="ADVANCED_PARMS" +#! VALUE="SHAPEFILE_IN_ENCODING" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="shp file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DEFAULT_GEOMETRY_TYPE" +#! VALUE="shapefile_first_feature" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_DEFAULT_NAME" +#! VALUE="Shapefile1" +#! /> +#! <METAFILE_PARAMETER +#! NAME="FEATURE_TYPE_NAME" +#! VALUE="Shapefile" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the Esri Shapefile(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a folder for the Esri Shapefile" +#! /> +#! </DATASET> +#! <DATASET +#! IS_SOURCE="false" +#! ROLE="WRITER" +#! FORMAT="CITYGML" +#! DATASET="$(DestDataset_CITYGML)" +#! KEYWORD="CITYGML_1" +#! MULTI_GEOM_ALLOWED="true" +#! ATTR_MAX_LENGTH="500" +#! ATTR_CASE="ANY" +#! ALLOWED_FEAT_TYPES="" +#! WRITE_DEFS="true" +#! DEFLINE_TEMPLATE="" +#! DEFLINE_ATTRS="true" +#! EXPOSABLE_ATTRS="fme_text_string xml_char(50) fme_feature_type xml_char(50) citygml_target{}.uri xml_buffer citygml_target{}.coordinate_list{}.coordinates xml_buffer citygml_diffuse_color xml_buffer fme_color xml_char(50) citygml_ambient_intensity xml_real64 gml_id xml_buffer fme_start_angle xml_real64 citygml_is_smooth xml_boolean citygml_image_uri xml_buffer fme_text_size xml_real64 citygml_library_object xml_buffer fme_primary_axis xml_real64 citygml_wrap_mode xml_char(16) citygml_target xml_buffer fme_fill_color xml_char(50) citygml_mime_type xml_buffer fme_basename xml_char(50) citygml_emissive_color xml_buffer citygml_orientation_matrix xml_buffer citygml_level_of_detail xml_ubyte citygml_transformation_matrix xml_buffer citygml_target{}.world_to_texture_matrix xml_buffer fme_geometry xml_char(50) fme_secondary_axis xml_real64 citygml_target{}.coordinate_list{}.ring xml_buffer citygml_transparency xml_real64 citygml_theme xml_buffer fme_type xml_char(50) citygml_border_color xml_buffer citygml_lod_name xml_buffer citygml_is_front xml_boolean citygml_shininess xml_real64 fme_dataset xml_char(50) citygml_specular_color xml_buffer citygml_texture_type xml_char(16) gml_parent_id xml_buffer fme_sweep_angle xml_real64 citygml_prefer_world_file xml_boolean fme_rotation xml_real64" +#! DEFLINE_PARMS="" +#! ATTR_INDEX_TYPES="" +#! ATTR_NAME_INVALID_CHARS="[]=%~!@$&#[^?*'+()\\/":" +#! SUPPORTS_FEATURE_TYPE_FANOUT="true" +#! ENABLED="true" +#! DYNAMIC_FEATURE_TYPES_LIST_ON_MERGE="true" +#! DATASET_TYPE="FILE_OR_URL" +#! FTTR_TYPE="" +#! GENERATE_FME_BUILD_NUM="19238" +#! COORDSYS="" +#! FANOUT_EXPRESSION="" +#! FANOUT_GROUP="NO" +#! > +#! <METAFILE_PARAMETER +#! NAME="ADVANCED_PARMS" +#! VALUE="TEXTURE_DIRECTORY THEME_NAME" +#! /> +#! <METAFILE_PARAMETER +#! NAME="DATASET_NAME" +#! VALUE="CityGML file" +#! /> +#! <METAFILE_PARAMETER +#! NAME="READER_DATASET_HINT" +#! VALUE="Select the CityGML file(s)" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_ADD_FEATURE_TYPE_DEFAULT" +#! VALUE="import" +#! /> +#! <METAFILE_PARAMETER +#! NAME="WRITER_DATASET_HINT" +#! VALUE="Specify a name for the CityGML file" +#! /> +#! </DATASET> +#! </DATASETS> +#! <DATA_TYPES> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(254)" +#! FME_TYPE="fme_buffer" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(254)" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(254)" +#! FME_TYPE="fme_xml" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(254)" +#! FME_TYPE="fme_json" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="datetime" +#! FME_TYPE="fme_datetime" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="char(12)" +#! FME_TYPE="fme_time" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="date" +#! FME_TYPE="fme_date" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="double" +#! FME_TYPE="fme_real64" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(31,15)" +#! FME_TYPE="fme_real64" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="double" +#! FME_TYPE="fme_uint32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(11,0)" +#! FME_TYPE="fme_uint32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="float" +#! FME_TYPE="fme_real32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(15,7)" +#! FME_TYPE="fme_real32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(20,0)" +#! FME_TYPE="fme_int64" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(20,0)" +#! FME_TYPE="fme_uint64" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="logical" +#! FME_TYPE="fme_boolean" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="short" +#! FME_TYPE="fme_int16" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(6,0)" +#! FME_TYPE="fme_int16" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="short" +#! FME_TYPE="fme_int8" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(4,0)" +#! FME_TYPE="fme_int8" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="short" +#! FME_TYPE="fme_uint8" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(4,0)" +#! FME_TYPE="fme_uint8" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="long" +#! FME_TYPE="fme_int32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(11,0)" +#! FME_TYPE="fme_int32" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="long" +#! FME_TYPE="fme_uint16" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(6,0)" +#! FME_TYPE="fme_uint16" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="number(width,decimal)" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="SHAPEFILE" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_varchar(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_varbinary(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(width)" +#! FME_TYPE="fme_binary(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_binarybuffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_buffer" +#! FME_TYPE="fme_json" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_xml" +#! FME_TYPE="fme_xml" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_datetime" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_date" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_time" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_int64" +#! FME_TYPE="fme_int64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_uint64" +#! FME_TYPE="fme_uint64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_int32" +#! FME_TYPE="fme_int32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_uint32" +#! FME_TYPE="fme_uint32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_int16" +#! FME_TYPE="fme_int16" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_uint16" +#! FME_TYPE="fme_uint16" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_byte" +#! FME_TYPE="fme_int8" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_ubyte" +#! FME_TYPE="fme_uint8" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_real32" +#! FME_TYPE="fme_real32" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_real64" +#! FME_TYPE="fme_real64" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_decimal(width,decimal)" +#! FME_TYPE="fme_decimal(width,decimal)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_boolean" +#! FME_TYPE="fme_boolean" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(20)" +#! FME_TYPE="fme_datetime" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(8)" +#! FME_TYPE="fme_date" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_char(12)" +#! FME_TYPE="fme_time" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_geometry" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="citygml_uri" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="citygml_uri" +#! FME_TYPE="fme_char(width)" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="citygml_csv" +#! FME_TYPE="fme_buffer" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="citygml_xml_string" +#! FME_TYPE="fme_xml" +#! FORMAT="CITYGML" +#! /> +#! <DATA_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="citygml_date" +#! FME_TYPE="fme_date" +#! FORMAT="CITYGML" +#! /> +#! </DATA_TYPES> +#! <GEOM_TYPES> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_point" +#! FME_TYPE="fme_point" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_multipoint" +#! FME_TYPE="fme_point" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_point" +#! FME_TYPE="fme_text" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_line" +#! FME_TYPE="fme_line" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_line" +#! FME_TYPE="fme_arc" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_area" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_rectangle" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_ellipse" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_multipatch" +#! FME_TYPE="fme_surface" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_multipatch" +#! FME_TYPE="fme_solid" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_first_feature" +#! FME_TYPE="fme_no_geom" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_null" +#! FME_TYPE="fme_no_geom" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_feature_table" +#! FME_TYPE="fme_feature_table" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_raster" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_polygon" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="true" +#! FORMAT_TYPE="shapefile_first_feature" +#! FME_TYPE="fme_collection" +#! FORMAT="SHAPEFILE" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_no_geom" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_point" +#! FME_TYPE="fme_point" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_line" +#! FME_TYPE="fme_line" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_area" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_aggregate" +#! FME_TYPE="fme_collection" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_text" +#! FME_TYPE="fme_text" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_ellipse" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_rectangle" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_rounded_rectangle" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_arc" +#! FME_TYPE="fme_arc" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_surface" +#! FME_TYPE="fme_surface" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_solid" +#! FME_TYPE="fme_solid" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_mesh" +#! FME_TYPE="fme_surface" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_raster" +#! FME_TYPE="fme_no_geom" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_raster" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_area" +#! FME_TYPE="fme_point_cloud" +#! FORMAT="CITYGML" +#! /> +#! <GEOM_TYPE +#! IS_SOURCE="false" +#! FORMAT_TYPE="xml_no_geom" +#! FME_TYPE="fme_feature_table" +#! FORMAT="CITYGML" +#! /> +#! </GEOM_TYPES> +#! <FEATURE_TYPES> +#! <FEATURE_TYPE +#! IS_SOURCE="false" +#! NODE_NAME="Building" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="true" +#! IDENTIFIER="9" +#! FEAT_GEOMTYPE="All" +#! POSITION="3003.124031240312 -116.24881248812488" +#! BOUNDING_RECT="3003.124031240312 -116.24881248812488 454 71" +#! ORDER="500000000000007" +#! COLLAPSED="true" +#! KEYWORD="CITYGML_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! SCHEMA_ATTRIBUTE_SOURCE="1" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_target_uri" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_feature_role_attr_val" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_description" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_name" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_creationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_terminationDate" ATTR_TYPE="xml_date" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.name" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.externalObject.uri" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="externalReference{}.informationSystem" ATTR_TYPE="xml_xml" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_generalizes_to{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_terrain" ATTR_TYPE="xml_char(33)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_relative_to_water" ATTR_TYPE="xml_char(38)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_appearance{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_class" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_class_codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_function{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_function{}.codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_usage{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_usage{}.codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_year_of_construction" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_year_of_demolition" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_roof_type" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_roof_type_codeSpace" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_measured_height" ATTR_TYPE="xml_real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_measured_height_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storeys_above_ground" ATTR_TYPE="xml_uint64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storeys_below_ground" ATTR_TYPE="xml_uint64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_above_ground" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_above_ground_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_below_ground" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_storey_heights_below_ground_units" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_outer_building_installation{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_interior_building_installation{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_bounded_by{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_level_of_detail{}" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_interior_room{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_consists_of_building_part{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="citygml_address{}.xlink_href" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="footprint_area" ATTR_TYPE="xml_real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="footprint_area_unit" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gross_floor_area" ATTR_TYPE="xml_real64" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gross_floor_area_unit" ATTR_TYPE="xml_buffer" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="gml_parent_id" ATTR_TYPE="xml_buffer" EXPOSABLE_ATTR="true" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! <FEATURE_TYPE +#! IS_SOURCE="true" +#! NODE_NAME="Bldg_2D" +#! FEATURE_TYPE_NAME="" +#! FEATURE_TYPE_NAME_QUALIFIER="" +#! IS_EDITABLE="false" +#! IDENTIFIER="19" +#! FEAT_GEOMTYPE="shapefile_polygon" +#! POSITION="-430.00450004500055 -59.37559375593753" +#! BOUNDING_RECT="-430.00450004500055 -59.37559375593753 454 71" +#! ORDER="500000000000000" +#! COLLAPSED="true" +#! KEYWORD="SHAPEFILE_1" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! HIDDEN_USER_ATTRS="" +#! MERGE_FILTER="" +#! MERGE_FILTER_TYPE="FILTER_TYPE_GLOB" +#! MERGE_FILTER_CASE_SENSITIVE="true" +#! DYNAMIC_SCHEMA="false" +#! > +#! <FEAT_ATTRIBUTE ATTR_NAME="OBJECTID" ATTR_TYPE="long" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="bldg_ht" ATTR_TYPE="double" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="RoofType" ATTR_TYPE="char(50)" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Bldg_Fnct" ATTR_TYPE="long" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Year_Const" ATTR_TYPE="long" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Shape_Leng" ATTR_TYPE="double" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! <FEAT_ATTRIBUTE ATTR_NAME="Shape_Area" ATTR_TYPE="double" ATTR_HAS_PORT="true" ATTR_VALUE=""/> +#! </FEATURE_TYPE> +#! </FEATURE_TYPES> +#! <FMESERVER> +#! <READER_DATASETS> +#! <DATASET +#! NAME="SHAPEFILE_1" +#! OVERRIDE="-SHAPEFILE_1_DATASET" +#! DATASET="SHAPEFILE_1/Bldg_2D.shp" +#! /> +#! </READER_DATASETS> +#! <WRITER_DATASETS> +#! <DATASET +#! NAME="CITYGML_1" +#! OVERRIDE="-CITYGML_1_DATASET" +#! DATASET="CITYGML_1/CityGMLLoD1_Bldg.gml" +#! /> +#! </WRITER_DATASETS> +#! </FMESERVER> +#! <GLOBAL_PARAMETERS> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI FILENAME DestDataset_CITYGML CityGML_Files(*.gml;*.xml)|*.gml;*.xml|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|All_Files|* Destination CityGML Document:" +#! DEFAULT_VALUE="$(FME_MF_DIR)CityGMLLoD1_Bldg.gml" +#! IS_STAND_ALONE="false" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI MULTIFILE SourceDataset_SHAPEFILE Shapefiles(*.shp)|*.shp|Compressed_Shapefiles(*.shz)|*.shz|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source Esri Shapefile(s):" +#! DEFAULT_VALUE="$(FME_MF_DIR)Example_Input\Bldg_2D.shp" +#! IS_STAND_ALONE="false" +#! /> +#! </GLOBAL_PARAMETERS> +#! <COMMENTS> +#! <COMMENT +#! IDENTIFIER="16" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Input 2D building footrpint shapefilewith height attribute</p></body></html>" +#! POSITION="-487.6296562965631 189.75106251062513" +#! TOP_LEFT="-487.6296562965631 189.75106251062513" +#! BOTTOM_RIGHT="147.3703437034369 188.75106251062513" +#! BOUNDING_RECT="-487.6296562965631 189.75106251062513 635 1" +#! ORDER="500000000000008" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="19" +#! /> +#! <COMMENT +#! IDENTIFIER="17" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Extrudes building footrint based on height attribute</p></body></html>" +#! POSITION="252.6279062790627 161.87596875968762" +#! TOP_LEFT="252.6279062790627 161.87596875968762" +#! BOTTOM_RIGHT="706.6279062790627 160.87596875968762" +#! BOUNDING_RECT="252.6279062790627 161.87596875968762 454 1" +#! ORDER="500000000000009" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="7" +#! /> +#! <COMMENT +#! IDENTIFIER="18" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To create CityGML specific attributes such as gml id and so on</p></body></html>" +#! POSITION="983.88521885218802 249.37684376843774" +#! TOP_LEFT="983.88521885218802 249.37684376843774" +#! BOTTOM_RIGHT="1437.885218852188 248.37684376843774" +#! BOUNDING_RECT="983.88521885218802 249.37684376843774 454 1" +#! ORDER="500000000000010" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="10" +#! /> +#! <COMMENT +#! IDENTIFIER="22" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To set the required LoD and feature role of the CityGML model</p></body></html>" +#! POSITION="2303.1480314803157 171.25106251062525" +#! TOP_LEFT="2303.1480314803157 171.25106251062525" +#! BOTTOM_RIGHT="2811.1490997380452 170.25106251062525" +#! BOUNDING_RECT="2303.1480314803157 171.25106251062525 508.00106825772946 1" +#! ORDER="500000000000011" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="12" +#! /> +#! <COMMENT +#! IDENTIFIER="23" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To convert the geometry type to the required brep solids</p></body></html>" +#! POSITION="1717.3670936709368 205.62640626406269" +#! TOP_LEFT="1717.3670936709368 205.62640626406269" +#! BOTTOM_RIGHT="2171.3670936709368 204.62640626406269" +#! BOUNDING_RECT="1717.3670936709368 205.62640626406269 454 1" +#! ORDER="500000000000012" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="13" +#! /> +#! <COMMENT +#! IDENTIFIER="24" +#! COMMENT_VALUE="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Output CityGML building model in LoD1. If any generic attributes are introduced in AttributeCreator transformer please make sure to add it here in the user attributes</p></body></html>" +#! POSITION="2874.4981249812495 258.75193751937536" +#! TOP_LEFT="2874.4981249812495 258.75193751937536" +#! BOTTOM_RIGHT="3646.4981249812495 257.75193751937536" +#! BOUNDING_RECT="2874.4981249812495 258.75193751937536 772 1" +#! ORDER="500000000000013" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="10" +#! ANCHORED_NODE="9" +#! /> +#! </COMMENTS> +#! <CONSTANTS> +#! </CONSTANTS> +#! <BOOKMARKS> +#! </BOOKMARKS> +#! <TRANSFORMERS> +#! <TRANSFORMER +#! IDENTIFIER="7" +#! TYPE="Extruder" +#! VERSION="4" +#! POSITION="290.6279062790627 -59.37559375593753" +#! BOUNDING_RECT="290.6279062790627 -59.37559375593753 454 71" +#! ORDER="500000000000001" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="20594" +#! > +#! <OUTPUT_FEAT NAME="EXTRUDED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="OBJECTID" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="bldg_ht" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="RoofType" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Bldg_Fnct" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Year_Const" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Shape_Leng" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="Shape_Area" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="<REJECTED>"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="OBJECTID" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="bldg_ht" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="RoofType" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Bldg_Fnct" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Year_Const" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Shape_Leng" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="Shape_Area" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="fme_rejection_code" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_PARM PARM_NAME="DIRECTION" PARM_VALUE="Auto"/> +#! <XFORM_PARM PARM_NAME="DISTANCE" PARM_VALUE="@Value(bldg_ht)"/> +#! <XFORM_PARM PARM_NAME="EXTRUSION_X" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="EXTRUSION_Y" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="EXTRUSION_Z" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="Extruder"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="10" +#! TYPE="AttributeManager" +#! VERSION="2" +#! POSITION="1015.6351563515632 -59.37559375593753" +#! BOUNDING_RECT="1015.6351563515632 -59.37559375593753 454 71" +#! ORDER="500000000000002" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="20594" +#! > +#! <OUTPUT_FEAT NAME="OUTPUT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height_units" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{0}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_GRP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_HANDLING" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_TABLE" PARM_VALUE="OBJECTID gml_id gml_<at>Value<openparen>gml_id<closeparen> RENAME_SET_VALUE bldg_ht citygml_measured_height RENAME_SET_VALUE citygml_measured_height_units m SET_TO RoofType RoofType REMOVE Bldg_Fnct citygml_function<opencurly>0<closecurly> RENAME_SET_VALUE Year_Const citygml_year_of_construction RENAME_SET_VALUE Shape_Leng Shape_Leng REMOVE Shape_Area Shape_Area REMOVE citygml_function<opencurly>0<closecurly>.codeSpace http:<solidus><solidus>www.sig3d.org<solidus>codelists<solidus>citygml<solidus>2.0<solidus>building<solidus>2.0<solidus>_AbstractBuilding_function.xml SET_TO"/> +#! <XFORM_PARM PARM_NAME="MULTI_FEATURE_MODE" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_MODE_DISPLAY" PARM_VALUE="No Substitution"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_VALUE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_PRIOR_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_SUBSEQUENT_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeManager"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="13" +#! TYPE="GeometryCoercer" +#! VERSION="6" +#! POSITION="1717.3670936709368 -84.375843758437412" +#! BOUNDING_RECT="1717.3670936709368 -84.375843758437412 454 71" +#! ORDER="500000000000003" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="19238" +#! > +#! <OUTPUT_FEAT NAME="COERCED"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height_units" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{0}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="UNTOUCHED"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height_units" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{0}" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_PARM PARM_NAME="GQUERY" PARM_VALUE="for<space><dollar>geom<space>in<space><solidus><solidus>geometry<lf>where<space><dollar>geom<solidus>count<openparen>parent::geometry<closeparen><space>=<space>0<lf>return<space>number<openparen><dollar>geom<solidus><at>fme_id<closeparen>"/> +#! <XFORM_PARM PARM_NAME="GQUERY_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="KIND" PARM_VALUE="fme_brep_solid"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="GeometryCoercer"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="12" +#! TYPE="SubDocumentTransformer" +#! VERSION="3" +#! POSITION="2303.1480314803157 -84.375843758437441" +#! BOUNDING_RECT="2303.1480314803157 -84.375843758437441 508.00106825772946 71" +#! ORDER="500000000000004" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="20594" +#! > +#! <OUTPUT_FEAT NAME="Output"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="citygml_lod_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="gml_id" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_measured_height_units" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{0}" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_year_of_construction" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_function{}.codeSpace" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="GEOM" PARM_VALUE="lod1Solid"/> +#! <XFORM_PARM PARM_NAME="ROLE" PARM_VALUE="cityObjectMember"/> +#! <XFORM_PARM PARM_NAME="SUB_DOC_NAME" PARM_VALUE="CityGMLGeometrySetter"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="CityGMLGeometrySetter"/> +#! <XFORM_PARM PARM_NAME="__COMPOUND_PARAMETERS" PARM_VALUE=""/> +#! </TRANSFORMER> +#! </TRANSFORMERS> +#! <FEAT_LINKS> +#! <FEAT_LINK +#! IDENTIFIER="20" +#! SOURCE_NODE="19" +#! TARGET_NODE="7" +#! SOURCE_PORT_DESC="-1" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="11" +#! SOURCE_NODE="7" +#! TARGET_NODE="10" +#! SOURCE_PORT_DESC="fo 0 EXTRUDED" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="15" +#! SOURCE_NODE="10" +#! TARGET_NODE="13" +#! SOURCE_PORT_DESC="fo 0 OUTPUT" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="21" +#! SOURCE_NODE="12" +#! TARGET_NODE="9" +#! SOURCE_PORT_DESC="fo 0 Output" +#! TARGET_PORT_DESC="-1" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="14" +#! SOURCE_NODE="13" +#! TARGET_NODE="12" +#! SOURCE_PORT_DESC="fo 0 COERCED" +#! TARGET_PORT_DESC="fi 0 Input" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! </FEAT_LINKS> +#! <BREAKPOINTS> +#! </BREAKPOINTS> +#! <ATTR_LINKS> +#! </ATTR_LINKS> +#! <SUBDOCUMENTS> +#! <SUBDOCUMENT +#! NAME="CityGMLGeometrySetter" +#! CATEGORY="Workflows" +#! DESCRIPTION="<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">This transformer provides a convenient way to set both the CityGML LOD Name and role from a preset list of options. </p> " +#! DOC_DYNAMIC_INPUT_ATTRS="0" +#! DOC_EXTENTS="2504.41 231" +#! DOC_TOP_LEFT="800.5 -998" +#! FME_DOCUMENT_GUID="107f3bd8-e496-4b13-8069-1de61bf270be" +#! FME_DOCUMENT_PRIORGUID="d9ebff36-1e4a-4592-8c48-76d032fdb0d5,fd54e366-46d5-47d2-bc2f-fe73d8ccad93" +#! FME_PROCESS_COUNT="NO_PARALLELISM" +#! FME_PROCESS_GROUPS_ORDERED="No" +#! FME_PROCESS_GROUP_BY="" +#! FME_PROCESS_PRESERVE_GROUP_ATTR="No" +#! FMX_ATTRIBUTE_PROPOGATION_MODE="AUTO" +#! GUID="107f3bd8-e496-4b13-8069-1de61bf270be" +#! HISTORY="2013-04-22,Dave<space>Campanas,Initial<space>Creation,2016-05-19,Natalie<space>Wlock,Update<space>for<space>FME<space>2016,2016-06-24,Dave<space>Campanas,Added<space>more<space>roles<space>and<space>Lod<space>names" +#! IS_VISIBLE="false" +#! LAST_SAVE_BUILD="FME(R) 2016.1.0.0 (20160419 - Build 16492 - WIN32)" +#! LAST_SAVE_DATE="2016-06-24T13:55:08" +#! MARKDOWN_DESCRIPTION="" +#! MARKDOWN_USAGE="" +#! PYTHON_COMPATIBILITY="" +#! REPLACED_BY="" +#! SUPPRESS_UPGRADE="false" +#! TITLE="CityGMLGeometrySetter" +#! USAGE="<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; font-weight:600;">Input Ports</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; text-decoration: underline;">Input</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt;">Features to tag with City LOD name and feature role </span> </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"> <br/> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; font-weight:600;">Output Ports</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; text-decoration: underline;">Output</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt;">Features tagged with City LOD name and feature role </span> </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"> <br/> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; font-weight:600;">Parameters</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; text-decoration: underline;">CityGML Lod Name</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt;">Select the desired CityGML Lod name</span> </p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"> <br/> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt; text-decoration: underline;">Feature Role</span> </p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"> <span style=" font-size:10pt;">Select the desired feature role</span> </p> " +#! USE_MARKDOWN="" +#! VIEW_POSITION="-128.126 0" +#! XFORM_DEPRECATED="No" +#! ZOOM_SCALE="100" +#! > +#! <GLOBAL_PARAMETERS> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI CHOICE_OR_ATTR GEOM breaklines%extent%geometry%grid%multiPoint%referencePoint%relativeGMLGeometry%reliefPoints%ridgeOrValleyLines%tin%lod0FootPrint%lod0Network%lod0RoofEdge%lod0Geometry%lod1Geometry%lod2Geometry%lod3Geometry%lod4Geometry%lod0ImplicitRepresentation%lod1ImplicitRepresentation%lod2ImplicitRepresentation%lod3ImplicitRepresentation%lod4ImplicitRepresentation%lod0MultiCurve%lod1MultiCurve%lod2MultiCurve%lod3MultiCurve%lod4MultiCurve%lod1MultiSolid%lod2MultiSolid%lod3MultiSolid%lod0MultiSurface%lod1MultiSurface%lod2MultiSurface%lod3MultiSurface%lod4MultiSurface%lod1Solid%lod2Solid%lod3Solid%lod4Solid%lod1Surface%lod2Surface%lod3Surface%lod4Surface%lod0TerrainIntersection%lod1TerrainIntersection%lod2TerrainIntersection%lod3TerrainIntersection%lod4TerrainIntersection CityGML Lod Name:" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="true" +#! /> +#! <GLOBAL_PARAMETER +#! GUI_LINE="GUI CHOICE_OR_ATTR ROLE address%appearance%appearanceMember%auxiliaryTrafficArea%boundedBy%bridgeRoomInstallation%cityObjectMember%consistsOfBuildingPart%consistsOfBridgePart%consistsOfTunnelPart%extent%externalObject%externalReference%groupMember%hollowSpaceInstallation%interiorBuildingInstallation%interiorBridgeInstallation%interiorBridgeRoom%interiorFurniture%interiorHollowSpace%interiorRoom%interiorTunnelInstallation%opening%outerBridgeConstruction%outerBuildingInstallation%outerBridgeInstallation%outerTunnelInstallation%referencePoint%reliefComponent%roomInstallation%surfaceDataMember%trafficArea Feature Role:" +#! DEFAULT_VALUE="" +#! IS_STAND_ALONE="true" +#! /> +#! </GLOBAL_PARAMETERS> +#! <COMMENTS> +#! <COMMENT +#! IDENTIFIER="9" +#! COMMENT_VALUE="<html><body>Set LOD name <br>and citygml role</body></html>" +#! POSITION="1431 -767" +#! TOP_LEFT="1431 -767" +#! BOTTOM_RIGHT="1431 -767" +#! BOUNDING_RECT="1431 -767 0 0" +#! ORDER="5" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="8" +#! ANCHORED_NODE="4" +#! /> +#! <COMMENT +#! IDENTIFIER="10" +#! COMMENT_VALUE="<html><body>Convert LOD to geometry trait</body></html>" +#! POSITION="1934 -803" +#! TOP_LEFT="1934 -803" +#! BOTTOM_RIGHT="1934 -803" +#! BOUNDING_RECT="1934 -803 0 0" +#! ORDER="6" +#! FOLLOW_ANCHOR="true" +#! INFO_NODE="false" +#! CUSTOM_USER_COLOR="false" +#! COLOUR="1,1,0.95686274509803926,0.78431372549019607" +#! SIZE_POLICY="8" +#! ANCHORED_NODE="5" +#! /> +#! </COMMENTS> +#! <CONSTANTS> +#! </CONSTANTS> +#! <BOOKMARKS> +#! </BOOKMARKS> +#! <TRANSFORMERS> +#! <TRANSFORMER +#! IDENTIFIER="4" +#! TYPE="AttributeCreator" +#! VERSION="8" +#! POSITION="1388 -925" +#! BOUNDING_RECT="1388 -925 0 0" +#! ORDER="3" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="16492" +#! > +#! <OUTPUT_FEAT NAME="OUTPUT"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="citygml_lod_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_GRP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTRIBUTE_HANDLING" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="ATTR_TABLE" PARM_VALUE=""" citygml_lod_name SET_TO $(GEOM) citygml_feature_role SET_TO $(ROLE)"/> +#! <XFORM_PARM PARM_NAME="MULTI_FEATURE_MODE" PARM_VALUE="NO"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_MODE_DISPLAY" PARM_VALUE="No Substitution"/> +#! <XFORM_PARM PARM_NAME="NULL_ATTR_VALUE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_PRIOR_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="NUM_SUBSEQUENT_FEATURES" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="AttributeCreator"/> +#! </TRANSFORMER> +#! <TRANSFORMER +#! IDENTIFIER="5" +#! TYPE="GeometryPropertySetter" +#! VERSION="3" +#! POSITION="1984 -927" +#! BOUNDING_RECT="1984 -927 514 71" +#! ORDER="4" +#! PARMS_EDITED="true" +#! ENABLED="true" +#! LAST_PARM_EDIT="16492" +#! > +#! <OUTPUT_FEAT NAME="SET"/> +#! <FEAT_COLLAPSED COLLAPSED="0"/> +#! <XFORM_ATTR ATTR_NAME="citygml_lod_name" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="0" /> +#! <OUTPUT_FEAT NAME="UNTOUCHED"/> +#! <FEAT_COLLAPSED COLLAPSED="1"/> +#! <XFORM_ATTR ATTR_NAME="citygml_lod_name" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_ATTR ATTR_NAME="citygml_feature_role" IS_USER_CREATED="false" FEAT_INDEX="1" /> +#! <XFORM_PARM PARM_NAME="CNT_ATTR" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="DOMAIN" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GEOM_NAME_FIELD" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="GQUERY" PARM_VALUE="for<space><dollar>geom<space>in<space><solidus><solidus>geometry<lf>where<space><dollar>geom<solidus>count<openparen>parent::geometry<closeparen><space>=<space>0<lf>return<space>number<openparen><dollar>geom<solidus><at>fme_id<closeparen>"/> +#! <XFORM_PARM PARM_NAME="GQUERY_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="NAME_PARAMETERS_GROUP" PARM_VALUE="FME_DISCLOSURE_CLOSED"/> +#! <XFORM_PARM PARM_NAME="OVERWRITE_CHOICE" PARM_VALUE="Yes"/> +#! <XFORM_PARM PARM_NAME="PARAMETERS_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="REMOVE_ATTRIBUTE" PARM_VALUE="No"/> +#! <XFORM_PARM PARM_NAME="SCOPE" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="SETTYPE_PARAM" PARM_VALUE="Traits From Attributes"/> +#! <XFORM_PARM PARM_NAME="SRC_ATTRS" PARM_VALUE="citygml_lod_name"/> +#! <XFORM_PARM PARM_NAME="START" PARM_VALUE="<Unused>"/> +#! <XFORM_PARM PARM_NAME="TRAIT_ATTR_PARAMETERS_GROUP" PARM_VALUE="FME_DISCLOSURE_OPEN"/> +#! <XFORM_PARM PARM_NAME="TRAIT_COUNTER_PARAMETERS_GROUP" PARM_VALUE="FME_DISCLOSURE_CLOSED"/> +#! <XFORM_PARM PARM_NAME="TRANSFORMER_GROUP" PARM_VALUE=""/> +#! <XFORM_PARM PARM_NAME="XFORMER_NAME" PARM_VALUE="GeometryPropertySetter"/> +#! </TRANSFORMER> +#! </TRANSFORMERS> +#! <SUBDOCUMENT_IOS> +#! <SUBDOCUMENT_IO +#! IDENTIFIER="2" +#! NAME="Input" +#! POSITION="800.5 -925" +#! BOUNDING_RECT="800.5 -925 0 0" +#! COLLAPSED="false" +#! PUBLISHED="true" +#! IS_SOURCE="true" +#! ATTR_MODE="0" +#! > +#! </SUBDOCUMENT_IO> +#! <SUBDOCUMENT_IO +#! IDENTIFIER="3" +#! NAME="Output" +#! POSITION="2734.3800000000001 -927" +#! BOUNDING_RECT="2734.3800000000001 -927 570.53200000000004 71" +#! COLLAPSED="false" +#! IS_SOURCE="false" +#! ATTR_MODE="0" +#! > +#! </SUBDOCUMENT_IO> +#! </SUBDOCUMENT_IOS> +#! <FEAT_LINKS> +#! <FEAT_LINK +#! IDENTIFIER="6" +#! SOURCE_NODE="2" +#! TARGET_NODE="4" +#! SOURCE_PORT_DESC="0" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="7" +#! SOURCE_NODE="4" +#! TARGET_NODE="5" +#! SOURCE_PORT_DESC="fo 0 OUTPUT" +#! TARGET_PORT_DESC="fi 0 " +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! <FEAT_LINK +#! IDENTIFIER="8" +#! SOURCE_NODE="5" +#! TARGET_NODE="3" +#! SOURCE_PORT_DESC="fo 0 SET" +#! TARGET_PORT_DESC="0" +#! ENABLED="true" +#! EXECUTION_IDX="0" +#! HIDDEN="false" +#! COLOUR="0,0,0,1" +#! PEN_WIDTH="4" +#! PEN_STYLE="1" +#! LINK_STYLE_NAME="<Default>" +#! EXTRA_POINTS="" +#! /> +#! </FEAT_LINKS> +#! <BREAKPOINTS> +#! </BREAKPOINTS> +#! <ATTR_LINKS> +#! </ATTR_LINKS> +#! </SUBDOCUMENT> +#! </SUBDOCUMENTS> +#! <LOOKUP_TABLES> +#! </LOOKUP_TABLES> +#! </WORKSPACE> + +FME_PYTHON_VERSION 37 +GUI IGNORE SourceDataset_SHAPEFILE_1,SHAPEFILE_IN_READER_PARAMETERS_SHAPEFILE_1,SHAPEFILE_IN_ENCODING_SHAPEFILE_1,SHAPEFILE_IN_USE_SEARCH_ENVELOPE_SHAPEFILE_1,SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1,SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1,SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1,SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1,SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1,SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1,SHAPEFILE_IN_ADVANCED_SHAPEFILE_1,SHAPEFILE_IN_TRIM_PRECEDING_SPACES_SHAPEFILE_1,SHAPEFILE_IN_READ_BLANK_AS_SHAPEFILE_1,SHAPEFILE_IN_DONUT_DETECTION_SHAPEFILE_1,SHAPEFILE_IN_MEASURES_AS_Z_SHAPEFILE_1,SHAPEFILE_IN_REPORT_BAD_GEOMETRY_SHAPEFILE_1,SHAPEFILE_IN_NETWORK_AUTHENTICATION_SHAPEFILE_1,DestDataset_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED1_CITYGML_1,CITYGML_OUT_VERSION_CITYGML_1,CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1,CITYGML_OUT_ADE_CITYGML_1,CITYGML_OUT_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1,CITYGML_OUT_ADE_XSD_DOC_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED2_CITYGML_1,CITYGML_OUT_DOCUMENT_ENCODING_CITYGML_1,CITYGML_OUT_HEADER_COMMENTS_CITYGML_1,CITYGML_OUT_SCHEMA_LOCATION_CITYGML_1,CITYGML_OUT_RESTRICT_CURVES_TO_POLYLINES_CITYGML_1,CITYGML_OUT_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE_CITYGML_1,CITYGML_OUT_USE_CORE_NAMESPACE_PREFIX_CITYGML_1,CITYGML_OUT_TEXTURE_DIRECTORY_CITYGML_1,CITYGML_OUT_THEME_NAME_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED3_CITYGML_1,CITYGML_OUT_CITYGML_VALIDATION_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED4_CITYGML_1,CITYGML_OUT_TEXTURE_OUTPUT_FORMAT_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED5_CITYGML_1,CITYGML_OUT_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1,CITYGML_OUT_FME_GROUP_NAMED6_CITYGML_1,CITYGML_OUT_SRS_NAME_CITYGML_1,CITYGML_OUT_SRS_AXIS_ORDER_CITYGML_1,CITYGML_OUT_PRETTY_PRINT_SETTINGS_CITYGML_1,CITYGML_OUT_PRETTY_PRINT_CITYGML_1,CITYGML_OUT_INDENT_SIZE_CITYGML_1,CITYGML_OUT_REPLACE_TABS_WITH_SPACES_CITYGML_1 +DEFAULT_MACRO DestDataset_CITYGML $(FME_MF_DIR)CityGMLLoD1_Bldg.gml +GUI FILENAME DestDataset_CITYGML CityGML_Files(*.gml;*.xml)|*.gml;*.xml|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|All_Files|* Destination CityGML Document: +DEFAULT_MACRO SourceDataset_SHAPEFILE $(FME_MF_DIR)Example_Input\Bldg_2D.shp +GUI MULTIFILE SourceDataset_SHAPEFILE Shapefiles(*.shp)|*.shp|Compressed_Shapefiles(*.shz)|*.shz|Compressed_Files(*.bz2;*.gz)|*.bz2;*.gz|Archive_Files(*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx)|*.7z;*.7zip;*.rar;*.rvz;*.tar;*.tar.bz2;*.tar.gz;*.tgz;*.zip;*.zipx|All_Files(*)|* Source Esri Shapefile(s): +INCLUDE [ if {{$(DestDataset_CITYGML)} == {}} { puts_real {Parameter 'DestDataset_CITYGML' must be given a value.}; exit 1; }; ] +INCLUDE [ if {{$(SourceDataset_SHAPEFILE)} == {}} { puts_real {Parameter 'SourceDataset_SHAPEFILE' must be given a value.}; exit 1; }; ] +#! START_HEADER +#! encoding="utf-8" +#! WORKSPACE_VERSION 1 +# ============================================================================ +# +# This mapping file was generated by FME Workbench +# on 06/09/20 for translation between ESRISHAPE and CITYGML +# +# This workspace was generated with FME build 19238 +# +# You may edit this mapping file to customize its operation. Comments are +# placed throughout to assist you. +# +# Modification History: +# +# Name Date Description +# ================= ======== ============================================= +# +# +# ============================================================================ +# ============================================================================ +# The following line defines the title presented to the user when this +# mapping file is run through the FME GUI. You may modify this +# if a more meaningful title would be appropriate. +GUI TITLE ESRISHAPE to CITYGML Translation +# ============================================================================ +# The following line names the log file to which useful statistics about +# the translation will be written. This line can be uncommented and +# updated if you do wish to keep these statistics. +# LOG_FILENAME translation.log +# LOG_APPEND NO +# ============================================================================ +# The following line instructs the FME to log any features that do not +# match any of the source feature patterns listed further down in +# this file. If you are modifying this mapping file, this will be +# useful to describe to you exactly which features you are losing +# during translation, if the statistics indicate that features are +# not being correlated or grouped. Uncorrelated features do not +# match any source specification, ungrouped features do not have +# any corresponding _DEF line. +# FME_DEBUG UNGROUPED UNCORRELATED +# ============================================================================ +# The following two lines define the type of reader and writer to be +# used for this translation. If you want to translate your data +# back into its original format, you may make a copy of this file +# and switch the reader and writer types. If you rerun the FME, you +# will get your original data back again (together with any modifications +# you made in the meantime). Note that several formats are NOT +# bi-directional (for example, GIF can only be used as a WRITER) +# so a reverse translation may not always be possible. +#! START_WB_HEADER +READER_TYPE MULTI_READER +MULTI_READER_TYPE{0} SHAPEFILE +MULTI_READER_KEYWORD{0} SHAPEFILE_1 +MULTI_READER_GEN_DIRECTIVES{0} SEARCH_ENVELOPE_MINX,0,_MERGE_SCHEMAS,YES,SEARCH_ENVELOPE_MAXX,0,ADVANCED,,CLIP_TO_ENVELOPE,NO,REPORT_BAD_GEOMETRY,No,SEARCH_ENVELOPE_MAXY,0,READ_BLANK_AS,MISSING,NUMERIC_TYPE_ATTRIBUTE_HANDLING,STANDARD_TYPES,SHAPEFILE_EXPOSE_FORMAT_ATTRS,,EXPOSE_ATTRS_GROUP,,ENCODING,fme-source-encoding,USE_SEARCH_ENVELOPE,NO,TRIM_PRECEDING_SPACES,Yes,SEARCH_ENVELOPE_COORDINATE_SYSTEM,,MEASURES_AS_Z,No,SEARCH_ENVELOPE_MINY,0,DONUT_DETECTION,ORIENTATION +WRITER_TYPE MULTI_WRITER +MULTI_WRITER_DATASET_ORDER BY_ID +MULTI_WRITER_FIRST_WRITER_ID 0 +MULTI_WRITER_TYPE{0} CITYGML +MULTI_WRITER_KEYWORD{0} CITYGML_1 +#! END_WB_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "SHAPEFILE_1" +#! END_WB_HEADER +#! START_SOURCE_HEADER SHAPEFILE SHAPEFILE_1 +# ============================================================================ +# The following GUI line prompts for the source shapefiles +# The dataset this mapping file was generated from was: +#! END_SOURCE_HEADER +#! START_WB_HEADER +DEFAULT_MACRO SourceDataset +INCLUDE [ if {{$(SourceDataset)} != ""} { \ + puts {DEFAULT_MACRO SourceDataset_SHAPEFILE_1 $(SourceDataset)} \ + } ] +#! END_WB_HEADER +#! START_SOURCE_HEADER SHAPEFILE SHAPEFILE_1 +DEFAULT_MACRO SourceDataset_SHAPEFILE_1 $(SourceDataset_SHAPEFILE) +GUI MULTIFILE SourceDataset_SHAPEFILE_1 Shapefiles(*.shp)|*.shp|Compressed_Shapefiles(*.shz)|*.shz|All_Files(*)|* Source Esri Shapefile(s): +DEFAULT_MACRO SHAPEFILE_IN_READER_PARAMETERS_SHAPEFILE_1 +GUI OPTIONAL DISCLOSUREGROUP SHAPEFILE_IN_READER_PARAMETERS_SHAPEFILE_1 SHAPEFILE_IN_ENCODING_SHAPEFILE_1%SHAPEFILE_IN_NUMERIC_TYPE_ATTRIBUTE_HANDLING Reader Parameters +# ============================================================================ +# The following keyword allows the user to choose what encoding to +# use for reading the shapefile, overrides dbf file LDID or .cpg +# file if present. +DEFAULT_MACRO SHAPEFILE_IN_ENCODING_SHAPEFILE_1 fme-source-encoding +SHAPEFILE_1_ENCODING "$(SHAPEFILE_IN_ENCODING_SHAPEFILE_1)" +GUI STRING_OR_ENCODING SHAPEFILE_IN_ENCODING_SHAPEFILE_1 fme-source-encoding%UTF-8%ISO*%Big5%ibm*%Shift_JIS%GB2312%GBK%win*%KSC_5601%macintosh%x-mac* Character Encoding +# ============================================================================ +# Determines whether numeric attributes should be interpreted as binary or as +# bound number fields (ActualDBFrepresentation) +DEFAULT_MACRO SHAPEFILE_IN_NUMERIC_TYPE_ATTRIBUTE_HANDLING_SHAPEFILE_1 STANDARD_TYPES +SHAPEFILE_1_NUMERIC_TYPE_ATTRIBUTE_HANDLING "$(SHAPEFILE_IN_NUMERIC_TYPE_ATTRIBUTE_HANDLING_SHAPEFILE_1)" +#Note: Using the search envelope requires the shape index files (.sbnand.sbx) +DEFAULT_MACRO SHAPEFILE_IN_EXPOSE_ATTRS_GROUP_SHAPEFILE_1 +SHAPEFILE_1_EXPOSE_ATTRS_GROUP "$(SHAPEFILE_IN_EXPOSE_ATTRS_GROUP_SHAPEFILE_1)" +# Include this file in source setting section to add native search envelope processing +# Zero as a default means we don't do any search -- this makes workbench happier +DEFAULT_MACRO SHAPEFILE_IN_USE_SEARCH_ENVELOPE_SHAPEFILE_1 NO +SHAPEFILE_1_USE_SEARCH_ENVELOPE "$(SHAPEFILE_IN_USE_SEARCH_ENVELOPE_SHAPEFILE_1)" +GUI ACTIVEDISCLOSUREGROUP SHAPEFILE_IN_USE_SEARCH_ENVELOPE_SHAPEFILE_1 SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1%SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1%SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1%SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1%SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1%SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1%SHAPEFILE_IN_SEARCH_METHOD%SHAPEFILE_IN_SEARCH_METHOD_FILTER%SHAPEFILE_IN_SEARCH_ORDER%SHAPEFILE_IN_SEARCH_FEATURE%SHAPEFILE_IN_DUMMY_SEARCH_ENVELOPE_PARAMETER Use Search Envelope +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1 <Unused>,0 +DEFAULT_MACRO SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1 0 +SHAPEFILE_1_SEARCH_ENVELOPE "$(SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1)" +GUI OPTIONAL FLOAT SHAPEFILE_IN_SEARCH_ENVELOPE_MINX_SHAPEFILE_1 Minimum X: +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1 <Unused>,0 +DEFAULT_MACRO SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1 0 +SHAPEFILE_1_SEARCH_ENVELOPE "$(SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1)" +GUI OPTIONAL FLOAT SHAPEFILE_IN_SEARCH_ENVELOPE_MINY_SHAPEFILE_1 Minimum Y: +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1 <Unused>,0 +DEFAULT_MACRO SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1 0 +SHAPEFILE_1_SEARCH_ENVELOPE "$(SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1)" +GUI OPTIONAL FLOAT SHAPEFILE_IN_SEARCH_ENVELOPE_MAXX_SHAPEFILE_1 Maximum X: +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1 <Unused>,0 +DEFAULT_MACRO SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1 0 +SHAPEFILE_1_SEARCH_ENVELOPE "$(SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1)" +GUI OPTIONAL FLOAT SHAPEFILE_IN_SEARCH_ENVELOPE_MAXY_SHAPEFILE_1 Maximum Y: +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1 <Unused>, +DEFAULT_MACRO SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1 +SHAPEFILE_1_SEARCH_ENVELOPE "$(SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1)" +GUI OPTIONAL COORDSYS SHAPEFILE_IN_SEARCH_ENVELOPE_COORDINATE_SYSTEM_SHAPEFILE_1 Search Envelope Coordinate System: +# =========================================================================== +GUI LOOKUP SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1 <Unused>,NO +DEFAULT_MACRO SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1 NO +SHAPEFILE_1_CLIP_TO_ENVELOPE "$(SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1)" +GUI OPTIONAL CHECKBOX SHAPEFILE_IN_CLIP_TO_ENVELOPE_SHAPEFILE_1 YES%NO Clip to Search Envelope +DEFAULT_MACRO SHAPEFILE_IN_ADVANCED_SHAPEFILE_1 +GUI OPTIONAL DISCLOSUREGROUP SHAPEFILE_IN_ADVANCED_SHAPEFILE_1 SHAPEFILE_IN_TRIM_PRECEDING_SPACES_SHAPEFILE_1%SHAPEFILE_IN_READ_BLANK_AS_SHAPEFILE_1%SHAPEFILE_IN_DONUT_DETECTION_SHAPEFILE_1%SHAPEFILE_IN_MEASURES_AS_Z_SHAPEFILE_1%SHAPEFILE_IN_REPORT_BAD_GEOMETRY_SHAPEFILE_1 Advanced +DEFAULT_MACRO SHAPEFILE_IN_TRIM_PRECEDING_SPACES_SHAPEFILE_1 Yes +SHAPEFILE_1_TRIM_PRECEDING_SPACES "$(SHAPEFILE_IN_TRIM_PRECEDING_SPACES_SHAPEFILE_1)" +GUI CHOICE SHAPEFILE_IN_TRIM_PRECEDING_SPACES_SHAPEFILE_1 Yes%No Trim Preceding Spaces +DEFAULT_MACRO SHAPEFILE_IN_READ_BLANK_AS_SHAPEFILE_1 MISSING +SHAPEFILE_1_READ_BLANK_AS "$(SHAPEFILE_IN_READ_BLANK_AS_SHAPEFILE_1)" +GUI LOOKUP_CHOICE SHAPEFILE_IN_READ_BLANK_AS_SHAPEFILE_1 Missing,MISSING%Null,NULL Read Blank Fields as: +# ============================================================================ +# Option to use simple donut geometry creation, which is faster than the +# original creation method, but less meticulous at detecting and correcting +# geometric anomalies (i.e.holeswithinholes) +DEFAULT_MACRO SHAPEFILE_IN_DONUT_DETECTION_SHAPEFILE_1 ORIENTATION +SHAPEFILE_1_DONUT_DETECTION "$(SHAPEFILE_IN_DONUT_DETECTION_SHAPEFILE_1)" +GUI LOOKUP_CHOICE SHAPEFILE_IN_DONUT_DETECTION_SHAPEFILE_1 "\"Orientation Only\",ORIENTATION"%"\"Orientation and Spatial Relationship\",SPATIAL" Donut Geometry Detection +# ============================================================================ +# The following GUI line sets whether measure values in the shapefiles should +# be treated as elevations. +DEFAULT_MACRO SHAPEFILE_IN_MEASURES_AS_Z_SHAPEFILE_1 No +SHAPEFILE_1_MEASURES_AS_Z "$(SHAPEFILE_IN_MEASURES_AS_Z_SHAPEFILE_1)" +GUI CHOICE SHAPEFILE_IN_MEASURES_AS_Z_SHAPEFILE_1 Yes%No Treat Measures as Elevation +# ============================================================================ +# The following keyword sets whether bad geometry should be reported via +# the shape_geometry_errors attribute. +DEFAULT_MACRO SHAPEFILE_IN_REPORT_BAD_GEOMETRY_SHAPEFILE_1 No +SHAPEFILE_1_REPORT_BAD_GEOMETRY "$(SHAPEFILE_IN_REPORT_BAD_GEOMETRY_SHAPEFILE_1)" +GUI CHOICE SHAPEFILE_IN_REPORT_BAD_GEOMETRY_SHAPEFILE_1 Yes%No Report Geometry Anomalies +# =========================================================================== +DEFAULT_MACRO SHAPEFILE_IN_NETWORK_AUTHENTICATION_SHAPEFILE_1 +SHAPEFILE_1_NETWORK_AUTHENTICATION "$(SHAPEFILE_IN_NETWORK_AUTHENTICATION_SHAPEFILE_1)" +GUI OPTIONAL AUTHENTICATOR SHAPEFILE_IN_NETWORK_AUTHENTICATION_SHAPEFILE_1 CONTAINER%GROUP%CONTAINER_TITLE%"Network Authentication"%PROMPT_TYPE%NETWORK Network Authentication +# ============================================================================ +DEFAULT_MACRO SHAPEFILE_IN_ATTRIBUTE_READING_SHAPEFILE_1 ALL +SHAPEFILE_1_ATTRIBUTE_READING "$(SHAPEFILE_IN_ATTRIBUTE_READING_SHAPEFILE_1)" +# ============================================================================ +SHAPEFILE_1_GENERATE_FME_BUILD_NUM 20594 +SHAPEFILE_1_DATASET "$(SourceDataset_SHAPEFILE_1)" +#! END_SOURCE_HEADER +#! START_WB_HEADER +MACRO WB_KEYWORD "CITYGML_1" +#! END_WB_HEADER +#! START_DEST_HEADER CITYGML CITYGML_1 +#! END_DEST_HEADER +#! START_WB_HEADER +DEFAULT_MACRO DestDataset +INCLUDE [ if {"$(DestDataset)" != ""} { \ + puts {DEFAULT_MACRO DestDataset_CITYGML_1 $(DestDataset)} \ + } ] +#! END_WB_HEADER +#! START_DEST_HEADER CITYGML CITYGML_1 +DEFAULT_MACRO DestDataset_CITYGML_1 $(DestDataset_CITYGML) +GUI FILENAME DestDataset_CITYGML_1 CityGML_Files(*.gml;*.xml)|*.gml;*.xml|CityGML_Files(*.gml)|*.gml|CityGML_Files(*.xml)|*.xml|All_Files|* Destination CityGML Document: +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED1_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED1_CITYGML_1 CITYGML_OUT_VERSION_CITYGML_1%CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1%CITYGML_OUT_ADE_CITYGML_1%CITYGML_OUT_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1%CITYGML_OUT_ADE_XSD_DOC_CITYGML_1 CityGML Schema Options +DEFAULT_MACRO CITYGML_OUT_VERSION_CITYGML_1 2.0 +CITYGML_1_VERSION "$(CITYGML_OUT_VERSION_CITYGML_1)" +GUI ACTIVECHOICE CITYGML_OUT_VERSION_CITYGML_1 0.4,CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1,CITYGML_OUT_ADE_CITYGML_1%1.0%2.0 CityGML Version: +DEFAULT_MACRO CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1 Yes +CITYGML_1_USE_CITYGML_SCHEMA_FILES "$(CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_USE_CITYGML_SCHEMA_FILES_CITYGML_1 "\"Yes (Recommended)\",Yes"%"\"No (Deprecated - Backward-compatible)\",No" Writer Driven by CityGML Schema +DEFAULT_MACRO CITYGML_OUT_ADE_CITYGML_1 None +CITYGML_1_ADE "$(CITYGML_OUT_ADE_CITYGML_1)" +GUI ACTIVECHOICE CITYGML_OUT_ADE_CITYGML_1 "\"None\",CITYGML_OUT_ADE_XSD_DOC_CITYGML_1"%NoiseADE,CITYGML_OUT_ADE_XSD_DOC_CITYGML_1%Other Application Domain Extension +DEFAULT_MACRO CITYGML_OUT_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1 No +CITYGML_1_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES "$(CITYGML_OUT_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1)" +GUI CHOICE CITYGML_OUT_ADD_NAMESPACE_PREFIX_TO_FEATURE_TYPES_CITYGML_1 Yes%No Add XML Namespace Prefix to Feature Types: +GUI LOOKUP CITYGML_OUT_ADE_XSD_DOC_CITYGML_1 <Unused>, +DEFAULT_MACRO CITYGML_OUT_ADE_XSD_DOC_CITYGML_1 +CITYGML_1_ADE_XSD_DOC "$(CITYGML_OUT_ADE_XSD_DOC_CITYGML_1)" +GUI OPTIONAL MULTIFILE CITYGML_OUT_ADE_XSD_DOC_CITYGML_1 ADE_Schema_File(*.xsd)|*.xsd|All_Files(*)|* ADE Schema File(s): +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED2_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED2_CITYGML_1 CITYGML_OUT_DOCUMENT_ENCODING_CITYGML_1%CITYGML_OUT_HEADER_COMMENTS_CITYGML_1%CITYGML_OUT_SCHEMA_LOCATION_CITYGML_1%CITYGML_OUT_RESTRICT_CURVES_TO_POLYLINES_CITYGML_1%CITYGML_OUT_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE_CITYGML_1%CITYGML_OUT_USE_CORE_NAMESPACE_PREFIX_CITYGML_1%CITYGML_OUT_TEXTURE_DIRECTORY_CITYGML_1%CITYGML_OUT_THEME_NAME_CITYGML_1 Output File Contents +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_DOCUMENT_ENCODING_CITYGML_1 utf-8 +CITYGML_1_DOCUMENT_ENCODING "$(CITYGML_OUT_DOCUMENT_ENCODING_CITYGML_1)" +GUI STRING_OR_ENCODING CITYGML_OUT_DOCUMENT_ENCODING_CITYGML_1 * Character Encoding: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_HEADER_COMMENTS_CITYGML_1 +CITYGML_1_HEADER_COMMENTS "$(CITYGML_OUT_HEADER_COMMENTS_CITYGML_1)" +GUI OPTIONAL TEXT_EDIT_XML CITYGML_OUT_HEADER_COMMENTS_CITYGML_1 Header Comments: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_SCHEMA_LOCATION_CITYGML_1 +CITYGML_1_SCHEMA_LOCATION "$(CITYGML_OUT_SCHEMA_LOCATION_CITYGML_1)" +GUI OPTIONAL TEXT_EDIT_ CITYGML_OUT_SCHEMA_LOCATION_CITYGML_1 xsi:schemaLocation: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_RESTRICT_CURVES_TO_POLYLINES_CITYGML_1 Yes +CITYGML_1_RESTRICT_CURVES_TO_POLYLINES "$(CITYGML_OUT_RESTRICT_CURVES_TO_POLYLINES_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_RESTRICT_CURVES_TO_POLYLINES_CITYGML_1 "\"Yes (Recommended)\",Yes"%"\"No (Deprecated - Backward-compatible)\",No" Restrict Curves to Polylines +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE_CITYGML_1 Yes +CITYGML_1_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE "$(CITYGML_OUT_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_REMOVE_AUTO_GENERATED_IDS_WHEN_POSSIBLE_CITYGML_1 Yes%No Remove Auto Generated GML IDs When Possible: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_USE_CORE_NAMESPACE_PREFIX_CITYGML_1 Yes +CITYGML_1_USE_CORE_NAMESPACE_PREFIX "$(CITYGML_OUT_USE_CORE_NAMESPACE_PREFIX_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_USE_CORE_NAMESPACE_PREFIX_CITYGML_1 Yes%No Use 'core' Namespace Prefix: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_TEXTURE_DIRECTORY_CITYGML_1 +CITYGML_1_TEXTURE_DIRECTORY "$(CITYGML_OUT_TEXTURE_DIRECTORY_CITYGML_1)" +GUI OPTIONAL TEXT CITYGML_OUT_TEXTURE_DIRECTORY_CITYGML_1 Texture subfolder +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_THEME_NAME_CITYGML_1 FMETheme +CITYGML_1_THEME_NAME "$(CITYGML_OUT_THEME_NAME_CITYGML_1)" +GUI OPTIONAL TEXT CITYGML_OUT_THEME_NAME_CITYGML_1 Theme name +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED3_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED3_CITYGML_1 CITYGML_OUT_CITYGML_VALIDATION_CITYGML_1 Validation +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_CITYGML_VALIDATION_CITYGML_1 No +CITYGML_1_CITYGML_VALIDATION "$(CITYGML_OUT_CITYGML_VALIDATION_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_CITYGML_VALIDATION_CITYGML_1 Yes%No Validate Output File: +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED4_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED4_CITYGML_1 CITYGML_OUT_TEXTURE_OUTPUT_FORMAT_CITYGML_1 Texture +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_TEXTURE_OUTPUT_FORMAT_CITYGML_1 NONE +CITYGML_1_TEXTURE_OUTPUT_FORMAT "$(CITYGML_OUT_TEXTURE_OUTPUT_FORMAT_CITYGML_1)" +GUI LOOKUP_CHOICE CITYGML_OUT_TEXTURE_OUTPUT_FORMAT_CITYGML_1 Auto,NONE%PNG,PNGRASTER%JPEG%GIF,GIFRASTER%BMP%ECW%ERDAS%GEOTIFF%INGR%JPEG2000%MRSID%PCIDSK%SGI%TIFF%XPM Preferred Texture Format: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED5_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED5_CITYGML_1 CITYGML_OUT_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1 CityGML Options +DEFAULT_MACRO CITYGML_OUT_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1 Yes +CITYGML_1_USE_XLINK_HREF_GEOMETRY_TRAITS "$(CITYGML_OUT_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1)" +GUI CHOICE CITYGML_OUT_USE_XLINK_HREF_GEOMETRY_TRAITS_CITYGML_1 Yes%No Use xlink_href Traits for Geometry References: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_FME_GROUP_NAMED6_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_FME_GROUP_NAMED6_CITYGML_1 CITYGML_OUT_SRS_NAME_CITYGML_1%CITYGML_OUT_SRS_AXIS_ORDER_CITYGML_1 SRS Parameters +# ============================================================================ +# Overwrites the GML srsName with the specified value. When left unspecified +# the FME coordinate system name for the input features will be used as the +# value for the srsName in the GML document. +DEFAULT_MACRO CITYGML_OUT_SRS_NAME_CITYGML_1 +CITYGML_1_SRS_NAME "$(CITYGML_OUT_SRS_NAME_CITYGML_1)" +GUI OPTIONAL TEXT CITYGML_OUT_SRS_NAME_CITYGML_1 GML srsName: +# ============================================================================ +# This keyword specifies the axis order for a coordinate tuple for the specified +# SRS_NAME in the GML document. This keyword only applies when used conjunction +# with the SRS_NAME keyword. The valid values for this keyword are 1,2, 2,1, +# 1,2,3 and 2,1,3. +DEFAULT_MACRO CITYGML_OUT_SRS_AXIS_ORDER_CITYGML_1 +CITYGML_1_SRS_AXIS_ORDER "$(CITYGML_OUT_SRS_AXIS_ORDER_CITYGML_1)" +GUI OPTIONAL CHOICE CITYGML_OUT_SRS_AXIS_ORDER_CITYGML_1 1,2%2,1%1,2,3%2,1,3 GML SRS Axis Order: +# ============================================================================ +DEFAULT_MACRO CITYGML_OUT_PRETTY_PRINT_SETTINGS_CITYGML_1 +GUI OPTIONAL DISCLOSUREGROUP CITYGML_OUT_PRETTY_PRINT_SETTINGS_CITYGML_1 CITYGML_OUT_PRETTY_PRINT_CITYGML_1%CITYGML_OUT_INDENT_SIZE_CITYGML_1%CITYGML_OUT_REPLACE_TABS_WITH_SPACES_CITYGML_1 Pretty Printing +DEFAULT_MACRO CITYGML_OUT_PRETTY_PRINT_CITYGML_1 No +CITYGML_1_PRETTY_PRINT "$(CITYGML_OUT_PRETTY_PRINT_CITYGML_1)" +GUI CHOICE CITYGML_OUT_PRETTY_PRINT_CITYGML_1 Yes%No Pretty Print: +DEFAULT_MACRO CITYGML_OUT_INDENT_SIZE_CITYGML_1 1 +CITYGML_1_INDENT_SIZE "$(CITYGML_OUT_INDENT_SIZE_CITYGML_1)" +GUI CHOICE CITYGML_OUT_INDENT_SIZE_CITYGML_1 0%1%2%3%4%5%6%7%8%9 Indent Size: +DEFAULT_MACRO CITYGML_OUT_REPLACE_TABS_WITH_SPACES_CITYGML_1 No +CITYGML_1_REPLACE_TABS_WITH_SPACES "$(CITYGML_OUT_REPLACE_TABS_WITH_SPACES_CITYGML_1)" +GUI CHOICE CITYGML_OUT_REPLACE_TABS_WITH_SPACES_CITYGML_1 Yes%No Replace Tabs with Spaces: +# ============================================================================ +# Opt in for destination dataset type vs format type validation +DEFAULT_MACRO CITYGML_OUT_DESTINATION_DATASETTYPE_VALIDATION_CITYGML_1 Yes +CITYGML_1_DESTINATION_DATASETTYPE_VALIDATION "$(CITYGML_OUT_DESTINATION_DATASETTYPE_VALIDATION_CITYGML_1)" +DEFAULT_MACRO CITYGML_OUT_COORDINATE_SYSTEM_GRANULARITY_CITYGML_1 DATASET +CITYGML_1_COORDINATE_SYSTEM_GRANULARITY "$(CITYGML_OUT_COORDINATE_SYSTEM_GRANULARITY_CITYGML_1)" +# ============================================================================ +CITYGML_1_GENERATE_FME_BUILD_NUM 19238 +CITYGML_1_DATASET "$(DestDataset_CITYGML_1)" +#! END_DEST_HEADER +#! START_WB_HEADER +#! END_WB_HEADER +#! END_HEADER + +LOG_FILENAME "$(FME_MF_DIR)shp2CityGML_LoD1Bldg.log" +LOG_APPEND NO +LOG_FILTER_MASK -1 +LOG_MAX_FEATURES 200 +LOG_MAX_RECORDED_FEATURES 200 +FME_REPROJECTION_ENGINE FME +FME_IMPLICIT_CSMAP_REPROJECTION_MODE Auto +FME_GEOMETRY_HANDLING Enhanced +FME_STROKE_MAX_DEVIATION 0 +DEFAULT_MACRO DATASET_KEYWORD_SHAPEFILE_1 SHAPEFILE_1 +DEFAULT_MACRO DATASET_KEYWORD_CITYGML_1 CITYGML_1 +# ------------------------------------------------------------------------- + +SHAPEFILE_1_READER_META_ATTRIBUTES fme_feature_type + +# ------------------------------------------------------------------------- + +MULTI_READER_CONTINUE_ON_READER_FAILURE No + +# ------------------------------------------------------------------------- + +MACRO WORKSPACE_NAME shp2CityGML_LoD1Bldg +MACRO FME_VIEWER_APP fmedatainspector +# ------------------------------------------------------------------------- +SHAPEFILE_1_DEF Bldg_2D shapefile_type shapefile_polygon OBJECTID long bldg_ht double RoofType char(50) Bldg_Fnct long Year_Const long Shape_Leng double Shape_Area double +# ------------------------------------------------------------------------- + +FACTORY_DEF * RoutingFactory FACTORY_NAME "Router and Unexpected Input Remover" COMMAND_PARM_EVALUATION SINGLE_PASS MULTI_READER_KEYWORD $(DATASET_KEYWORD_SHAPEFILE_1) INPUT FEATURE_TYPE * ROUTE SHAPEFILE SHAPEFILE_1::Bldg_2D multi_reader_keyword,$(DATASET_KEYWORD_SHAPEFILE_1) TO FME_GENERIC ::Bldg_2D ALIAS_GEOMETRY MERGE_INPUT Yes OUTPUT ROUTED FEATURE_TYPE * +SHAPEFILE_1_MERGE_DEF SHAPEFILE_1::Bldg_2D EXACT Bldg_2D +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "Bldg_2D_SHAPEFILE_1 Splitter" INPUT FEATURE_TYPE Bldg_2D OUTPUT FEATURE_TYPE Bldg_2D_SHAPEFILE_1 +DEFAULT_MACRO WB_CURRENT_CONTEXT +# ------------------------------------------------------------------------- +INCLUDE [ if { ({AUTO} == {SPECIFIED}) } { puts {MACRO Extruder_func @GeometryType(REJECTABLE, fme_extrusion_exact,"<Unused>","<Unused>","<Unused>")}; } else { puts {MACRO Extruder_func @GeometryType(REJECTABLE, fme_extrusion_exact,0.0,0.0,0.0,"@EvaluateExpression(FDIV,FLOAT,<at>Value<openparen>bldg_ht<closeparen>,Extruder)","AUTO")}; } ] +FACTORY_DEF * TeeFactory FACTORY_NAME Extruder INPUT FEATURE_TYPE Bldg_2D_SHAPEFILE_1 OUTPUT FEATURE_TYPE ___TOREJECTOR___ @RenameAttributes(FME_STRICT,___fme_rejection_code___,fme_rejection_code) $(Extruder_func) +FACTORY_DEF * TestFactory FACTORY_NAME Extruder_Rejector INPUT FEATURE_TYPE ___TOREJECTOR___ TEST @Value(fme_rejection_code) == "" OUTPUT PASSED FEATURE_TYPE Extruder_EXTRUDED @RenameAttributes(FME_STRICT,fme_rejection_code,___fme_rejection_code___) OUTPUT FAILED FEATURE_TYPE Extruder_<REJECTED> @RemoveAttributes(___fme_rejection_code___) +DEFAULT_MACRO _WB_BYPASS_TERMINATION No +FACTORY_DEF * TeeFactory FACTORY_NAME Extruder_<Rejected> INPUT FEATURE_TYPE Extruder_<REJECTED> OUTPUT FAILED FEATURE_TYPE * @Abort(ENCODED, Extruder<space>output<space>a<space><lt>Rejected<gt><space>feature.<space><space>To<space>continue<space>translation<space>when<space>features<space>are<space>rejected<comma><space>change<space><apos>Workspace<space>Parameters<apos><space><gt><space>Translation<space><gt><space><apos>Rejected<space>Feature<space>Handling<apos><space>to<space><apos>Continue<space>Translation<apos>) +# ------------------------------------------------------------------------- +FACTORY_DEF {*} AttrSetFactory COMMAND_PARM_EVALUATION SINGLE_PASS FACTORY_NAME AttributeManager INPUT FEATURE_TYPE Extruder_EXTRUDED MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ACTION_COLUMN 3 DEF_VAL_COLUMN 2 ATTR_ACTION { "OBJECTID" "gml_id" "gml_<at>Value<openparen>gml_id<closeparen>" "RENAME_SET_VALUE" } ATTR_ACTION { "bldg_ht" "citygml_measured_height" "" "RENAME_SET_VALUE" } ATTR_ACTION { "" "citygml_measured_height_units" "m" "SET_TO" } ATTR_ACTION { "RoofType" "RoofType" "" "REMOVE" } ATTR_ACTION { "Bldg_Fnct" "citygml_function<opencurly>0<closecurly>" "" "RENAME_SET_VALUE" } ATTR_ACTION { "Year_Const" "citygml_year_of_construction" "" "RENAME_SET_VALUE" } ATTR_ACTION { "Shape_Leng" "Shape_Leng" "" "REMOVE" } ATTR_ACTION { "Shape_Area" "Shape_Area" "" "REMOVE" } ATTR_ACTION { "" "citygml_function<opencurly>0<closecurly>.codeSpace" "http:<solidus><solidus>www.sig3d.org<solidus>codelists<solidus>citygml<solidus>2.0<solidus>building<solidus>2.0<solidus>_AbstractBuilding_function.xml" "SET_TO" } OUTPUT OUTPUT FEATURE_TYPE AttributeManager_OUTPUT +# ------------------------------------------------------------------------- +FACTORY_DEF * GQueryFactory FACTORY_NAME GeometryCoercer INPUT FEATURE_TYPE AttributeManager_OUTPUT GQUERY "@EvaluateExpression(FDIV,STRING_ENCODED,for<space><dollar>geom<space>in<space><solidus><solidus>geometry<lf>where<space><dollar>geom<solidus>count<openparen>parent::geometry<closeparen><space>=<space>0<lf>return<space>number<openparen><dollar>geom<solidus><at>fme_id<closeparen>,GeometryCoercer)" ACTION COERCE_GEOMETRY PARAMETER fme_brep_solid BASENAME GeometryCoercer OUTPUT RESULT FEATURE_TYPE GeometryCoercer_COERCED +# ------------------------------------------------------------------------- +FACTORY_DEF * TeeFactory FACTORY_NAME "CityGMLGeometrySetter Input Input Collector" INPUT FEATURE_TYPE GeometryCoercer_COERCED OUTPUT FEATURE_TYPE CityGMLGeometrySetter_Input +MACRO CityGMLGeometrySetter_WORKSPACE_NAME CityGMLGeometrySetter +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_XFORMER_NAME CityGMLGeometrySetter +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_TRANSFORMER_GROUP +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)___COMPOUND_PARAMETERS +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_SUB_DOC_NAME CityGMLGeometrySetter +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_GEOM lod1Solid +MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_ROLE cityObjectMember +DEFAULT_MACRO CityGMLGeometrySetter_WORKSPACE_NAME "" +INCLUDE [puts {MACRO WB_OLD_CONTEXT_$(CityGMLGeometrySetter_WORKSPACE_NAME) $(WB_CURRENT_CONTEXT)}; puts {MACRO WB_CURRENT_CONTEXT $(CityGMLGeometrySetter_WORKSPACE_NAME)}] +FACTORY_DEF * TeeFactory FACTORY_NAME "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Input1597487347 Input Splitter" INPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Input" OUTPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Input" +# ------------------------------------------------------------------------- +FACTORY_DEF {*} AttrSetFactory FACTORY_NAME $(CityGMLGeometrySetter_WORKSPACE_NAME)_AttributeCreator INPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Input" MULTI_FEATURE_MODE NO NULL_ATTR_MODE NO_OP ATTRSET_CREATE_DIRECTIVES _PROPAGATE_MISSING_FDIV ATTR_ACTION { "" "citygml_lod_name" "SET_TO" "$($(CityGMLGeometrySetter_WORKSPACE_NAME)_GEOM$encode)" } ATTR_ACTION { "" "citygml_feature_role" "SET_TO" "$($(CityGMLGeometrySetter_WORKSPACE_NAME)_ROLE$encode)" } OUTPUT OUTPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_AttributeCreator_OUTPUT" +# ------------------------------------------------------------------------- +Tcl2 proc $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_889d7a88_0893_4a8a_a05a_82c9e37f7f241_createDomain { in_domainName } { set domainName $in_domainName; if { {<Unused>} != {Global} } { set xFormName [FME_EncodeText {$(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_}]; set domainName $xFormName$domainName; }; return $domainName; } +INCLUDE [ set macroLine "MACRO $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_SRC_ATTRS_EXP "; foreach attr [split "citygml_lod_name"] { append macroLine ",$attr"; }; puts $macroLine; ] +FACTORY_DEF {*} GQueryFactory FACTORY_NAME $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_GQuery INPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_AttributeCreator_OUTPUT" GQUERY "@EvaluateExpression(FDIV,STRING_ENCODED,for<space><dollar>geom<space>in<space><solidus><solidus>geometry<lf>where<space><dollar>geom<solidus>count<openparen>parent::geometry<closeparen><space>=<space>0<lf>return<space>number<openparen><dollar>geom<solidus><at>fme_id<closeparen>,$(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter)" ACTION SET_TRAITS PARAMETER { yes citygml_lod_name } OUTPUT RESULT FEATURE_TYPE $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter___RemoveAttrs___ +FACTORY_DEF NOT_THIS_TIME TeeFactory FACTORY_NAME $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_AttrRemover INPUT FEATURE_TYPE $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter___RemoveAttrs___ OUTPUT FEATURE_TYPE * @RemoveAttributes(fme_encoded"$($(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_SRC_ATTRS_EXP)") +FACTORY_DEF * TeeFactory FACTORY_NAME $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_Outputter INPUT FEATURE_TYPE $(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter___RemoveAttrs___ OUTPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_SET" +FACTORY_DEF * TeeFactory FACTORY_NAME "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Output1597487347 Output Collector" INPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_GeometryPropertySetter_SET" OUTPUT FEATURE_TYPE "$(CityGMLGeometrySetter_WORKSPACE_NAME)_Output" +INCLUDE [puts {MACRO WB_CURRENT_CONTEXT $(WB_OLD_CONTEXT_$(CityGMLGeometrySetter_WORKSPACE_NAME))}] +FACTORY_DEF * TeeFactory FACTORY_NAME "CityGMLGeometrySetter Output Output Renamer/Nuker" INPUT FEATURE_TYPE CityGMLGeometrySetter_Output OUTPUT FEATURE_TYPE CityGMLGeometrySetter_Output +# ------------------------------------------------------------------------- + +FACTORY_DEF * RoutingFactory FACTORY_NAME "Destination Feature Type Routing Correlator" COMMAND_PARM_EVALUATION SINGLE_PASS INPUT FEATURE_TYPE * ROUTE FME_GENERIC CityGMLGeometrySetter_Output TO CITYGML __GO_TO_FINAL_OUTPUT_ROUTER__ multi_writer_id,0,<at>SupplyAttributes<openparen>ENCODED<comma>__wb_out_feat_type__<comma>Building<closeparen> GEOMETRY FEATURE_TYPE_ATTRIBUTE __wb_out_feat_type__ OUTPUT ROUTED FEATURE_TYPE * OUTPUT NOT_ROUTED FEATURE_TYPE __nuke_me__ @Tcl2("FME_StatMessage 818059 [FME_GetAttribute fme_template_feature_type] 818060 818061 fme_warn") +# ------------------------------------------------------------------------- + +FACTORY_DEF * TeeFactory FACTORY_NAME "Final Output Nuker" INPUT FEATURE_TYPE __nuke_me__ + +# ------------------------------------------------------------------------- +CITYGML_1_DEF Building citygml_target_uri xml_buffer citygml_feature_role xml_buffer citygml_feature_role_attr_name xml_buffer citygml_feature_role_attr_val xml_buffer gml_description xml_buffer gml_name xml_buffer citygml_creationDate xml_date citygml_terminationDate xml_date externalReference{}.externalObject.name xml_xml externalReference{}.externalObject.uri xml_xml externalReference{}.informationSystem xml_xml citygml_generalizes_to{}.xlink_href xml_buffer citygml_relative_to_terrain xml_char(33) citygml_relative_to_water xml_char(38) citygml_appearance{}.xlink_href xml_buffer citygml_class xml_buffer citygml_class_codeSpace xml_buffer citygml_function{} xml_buffer citygml_function{}.codeSpace xml_buffer citygml_usage{} xml_buffer citygml_usage{}.codeSpace xml_buffer citygml_year_of_construction xml_buffer citygml_year_of_demolition xml_buffer citygml_roof_type xml_buffer citygml_roof_type_codeSpace xml_buffer citygml_measured_height xml_real64 citygml_measured_height_units xml_buffer citygml_storeys_above_ground xml_uint64 citygml_storeys_below_ground xml_uint64 citygml_storey_heights_above_ground xml_buffer citygml_storey_heights_above_ground_units xml_buffer citygml_storey_heights_below_ground xml_buffer citygml_storey_heights_below_ground_units xml_buffer citygml_outer_building_installation{}.xlink_href xml_buffer citygml_interior_building_installation{}.xlink_href xml_buffer citygml_bounded_by{}.xlink_href xml_buffer citygml_level_of_detail{} xml_buffer citygml_interior_room{}.xlink_href xml_buffer citygml_consists_of_building_part{}.xlink_href xml_buffer citygml_address{}.xlink_href xml_buffer footprint_area xml_real64 footprint_area_unit xml_buffer gross_floor_area xml_real64 gross_floor_area_unit xml_buffer diff --git a/public/home/audio.mp3 b/public/home/audio.mp3 deleted file mode 100644 index ead8e4436d572bde26e41e55c6151c2cb8838704..0000000000000000000000000000000000000000 Binary files a/public/home/audio.mp3 and /dev/null differ diff --git a/public/home/bau1.jpg b/public/home/bau1.jpg deleted file mode 100644 index dfebee75c1e8341e4c98250c9e432d5ec62ca391..0000000000000000000000000000000000000000 Binary files a/public/home/bau1.jpg and /dev/null differ diff --git a/public/home/index.html b/public/home/index.html deleted file mode 100644 index 53de2527d45ef405cb8512b8477f5f1d642342fc..0000000000000000000000000000000000000000 --- a/public/home/index.html +++ /dev/null @@ -1,120 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <meta name="generator" content="GitLab Pages"> - <title></title> - <link rel="stylesheet" href="../assets/css/style.css"> - <link rel="stylesheet" href="../assets/css/mobile.css"> -</head> - -<body> - <header id="header"> - <div class="row"> - <div class="logo" id="logo"></div> - <div class="hamburger"> - <div class="line"></div> - <div class="line"></div> - <div class="line"></div> - </div> - <nav></nav> - </div> - <div id="projectlogo"></div> - <div id="projectname"></div> - </header> - <div class="content"> - - <h1>Here goes a title</h1> - - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pellentesque diam ipsum, nec - ultricies sem mollis et. Phasellus porttitor nec felis quis ultricies. In venenatis faucibus nisl - sed facilisis. Cras sapien nibh, dignissim at eros quis, commodo lobortis eros. Sed a massa - eleifend, dictum elit at, blandit magna. Nullam auctor enim nec orci luctus sagittis. Nunc blandit - quam nec laoreet egestas. Nulla feugiat nisl lacus, a viverra nisi hendrerit vitae. In nibh arcu, - sodales in enim tincidunt, tempus imperdiet ex. Aliquam fermentum augue magna, vel accumsan augue - consequat et. Vestibulum id interdum orci, a aliquam sapien. Vivamus eu ipsum sollicitudin, aliquet - arcu ut, ornare massa. Suspendisse tincidunt lectus a odio ultrices interdum. Praesent vitae sodales - urna, vitae sagittis ex. Vivamus tincidunt nisi ultrices lectus dapibus, at placerat nisl elementum. - Fusce cursus, sapien in tincidunt pellentesque, mi erat mollis nibh, ut maximus tortor magna vitae - nibh. - </p> - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque pellentesque diam ipsum, nec - ultricies sem mollis et. Phasellus porttitor nec felis quis ultricies. In venenatis faucibus nisl - sed facilisis. Cras sapien nibh, dignissim at eros quis, commodo lobortis eros. Sed a massa - eleifend, dictum elit at, blandit magna. Nullam auctor enim nec orci luctus sagittis. Nunc blandit - quam nec laoreet egestas. Nulla feugiat nisl lacus, a viverra nisi hendrerit vitae. In nibh arcu, - sodales in enim tincidunt, tempus imperdiet ex. Aliquam fermentum augue magna, vel accumsan augue - consequat et. Vestibulum id interdum orci, a aliquam sapien. Vivamus eu ipsum sollicitudin, aliquet - arcu ut, ornare massa. Suspendisse tincidunt lectus a odio ultrices interdum. Praesent vitae sodales - urna, vitae sagittis ex. Vivamus tincidunt nisi ultrices lectus dapibus, at placerat nisl elementum. - Fusce cursus, sapien in tincidunt pellentesque, mi erat mollis nibh, ut maximus tortor magna vitae - nibh. - </p> - - <h1>Here goes a title</h1> - - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor - incididunt ut labore et dolore magna aliqua. Ornare massa eget egestas purus viverra. - Molestie nunc non blandit massa enim nec dui. Arcu ac tortor dignissim convallis aenean - et tortor at. Nisi quis eleifend quam adipiscing vitae. Eget nunc lobortis mattis aliquam. - Integer vitae justo eget magna. Sed risus pretium quam vulputate dignissim suspendisse. - Nunc scelerisque viverra mauris in aliquam sem fringilla ut morbi. - Venenatis lectus magna fringilla urna porttitor rhoncus. Lectus vestibulum mattis ullamcorper velit sed. - </p> - - <h1>Here goes a title</h1> - - <p> - Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor - incididunt ut labore et dolore magna aliqua. Ornare massa eget egestas purus viverra. - Molestie nunc non blandit massa enim nec dui. Arcu ac tortor dignissim convallis aenean - et tortor at. Nisi quis eleifend quam adipiscing vitae. Eget nunc lobortis mattis aliquam. - Integer vitae justo eget magna. Sed risus pretium quam vulputate dignissim suspendisse. - Nunc scelerisque viverra mauris in aliquam sem fringilla ut morbi. - Venenatis lectus magna fringilla urna porttitor rhoncus. Lectus vestibulum mattis ullamcorper velit sed. - </p> - - <h1>Figure demo</h1> - - <p> - <img src="bau1.jpg"> - </p> - - <h1>Audio demo</h1> - - <p> - <audio controls src="audio.mp3" type="audio/mp3"></audio> - </p> - - <h1>Embed Youtube video</h1> - - <p> - <div class="video-container"> - <iframe width="560" height="315" src="https://www.youtube.com/embed/AZjduAZwm6w" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope" allowfullscreen></iframe> - </div> - </p> - - <h1>List of external links</h1> - - <p> - <ul> - <li><a href="https://stadtlabor.podigee.io">HFT Stadtlabor</a></li> - <li><a href="https://stadtlabor.podigee.io/5-05-vergessen-in-der-stadt-wie-die-stadtplanung-menschen-mit-demenz-helfen-kann">Vergessen in der Stadt</a></li> - </ul> - </p> - - </div> - - <div class="footer"></div> - <div class="legal"></div> - - <script src="../settings.js"> </script> - <script src="../main.js"> </script> -</body> - -</html> \ No newline at end of file diff --git a/public/images/data.jpg b/public/images/data.jpg new file mode 100644 index 0000000000000000000000000000000000000000..46847e3d8145e8318dff2123bc91d90b8047a92a Binary files /dev/null and b/public/images/data.jpg differ diff --git a/public/images/fme.jpg b/public/images/fme.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0cf679294ad993d1e74d78c43b1fb2b5a57b0dab Binary files /dev/null and b/public/images/fme.jpg differ diff --git a/public/images/fme2.jpg b/public/images/fme2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d94c19c9c6265ab7f4b8c71b916e7960d0fdd60e Binary files /dev/null and b/public/images/fme2.jpg differ diff --git a/public/images/fme_shp2citygml.jpg b/public/images/fme_shp2citygml.jpg new file mode 100644 index 0000000000000000000000000000000000000000..26b5e699033d3bab813c972b701f08e082680cc2 Binary files /dev/null and b/public/images/fme_shp2citygml.jpg differ diff --git a/public/index.html b/public/index.html index d0e0b2ab8f859f3cb00ca9596c5fe7d62f257c77..ecf734092e5fdaa00306bc3c1ddea1a3d69e09da 100644 --- a/public/index.html +++ b/public/index.html @@ -1,5 +1,238 @@ <!DOCTYPE html> -<meta charset="utf-8"> -<title>Redirecting...</title> -<meta http-equiv="refresh" content="0; URL=home/"> -<link rel="canonical" href="home/"> +<html> + +<head> + <title>Joe BBOX Finder</title> + <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" + integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> + <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.8.1/font/bootstrap-icons.css"> + <link rel="stylesheet" href="libs/leaflet.css" /> + <link rel="stylesheet" href="./src/leaflet.draw.css" /> + + <script src="libs/leaflet-src.js"></script> + + <script src="./src/Leaflet.draw.js"></script> + <script src="./src/Leaflet.Draw.Event.js"></script> + + <script src="./src/edit/handler/Edit.Poly.js"></script> + <script src="./src/edit/handler/Edit.SimpleShape.js"></script> + <script src="./src/edit/handler/Edit.Rectangle.js"></script> + <script src="./src/edit/handler/Edit.Marker.js"></script> + <script src="./src/edit/handler/Edit.CircleMarker.js"></script> + <script src="./src/edit/handler/Edit.Circle.js"></script> + + <script src="./src/draw/handler/Draw.Feature.js"></script> + <script src="./src/draw/handler/Draw.Polyline.js"></script> + <script src="./src/draw/handler/Draw.Polygon.js"></script> + <script src="./src/draw/handler/Draw.SimpleShape.js"></script> + <script src="./src/draw/handler/Draw.Rectangle.js"></script> + <script src="./src/draw/handler/Draw.Circle.js"></script> + <script src="./src/draw/handler/Draw.Marker.js"></script> + <script src="./src/draw/handler/Draw.CircleMarker.js"></script> + + <script src="./src/ext/TouchEvents.js"></script> + <script src="./src/ext/LatLngUtil.js"></script> + <script src="./src/ext/GeometryUtil.js"></script> + <script src="./src/ext/LineUtil.Intersect.js"></script> + <script src="./src/ext/Polyline.Intersect.js"></script> + <script src="./src/ext/Polygon.Intersect.js"></script> + + <script src="./src/Control.Draw.js"></script> + <script src="./src/Tooltip.js"></script> + <script src="./src/Toolbar.js"></script> + + <script src="./src/draw/DrawToolbar.js"></script> + <script src="./src/edit/EditToolbar.js"></script> + <script src="./src/edit/handler/EditToolbar.Edit.js"></script> + <script src="./src/edit/handler/EditToolbar.Delete.js"></script> + + <link rel="shortcut icon" href="joeicon.png" /> + +</head> + +<body> + <style> + .calculation-box { + min-height: 90 px; + height: auto; + width: 600px; + position: absolute; + bottom: 25px; + left: 25px; + background-color: rgba(255, 255, 255, 0.9); + padding: 15px; + /* text-align: center; */ + z-index: 1000; + } + + p { + /* font-family: 'Open Sans'; */ + margin: 0; + font-size: 13px; + font-weight: 600; + } + </style> + <div id="map" style="width: 100%; height: 100vh;"></div> + <div class="calculation-box text-left"> + <p class="text-bold text-wrap"> <b> + <img src="joeicon.png" alt="" width="20px"> + BBOX Finder <i class="bi bi-bounding-box"></i></b> + <br> + <span id="calculated_area">[Hint: Draw a bbox using tool on the right-bottom menu.]</span> + </p> + </div> + <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" + integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"> + </script> + <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> + <script src="./libs/proj4js.min.js"></script> + <script> + var Stadia_Outdoors = L.tileLayer('https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png', { + maxZoom: 20, + attribution: '© <a href="https://stadiamaps.com/">Stadia Maps</a>, © <a href="https://openmaptiles.org/">OpenMapTiles</a> © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors' + }); + var Esri_WorldTopoMap = L.tileLayer( + 'https://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{z}/{y}/{x}', { + attribution: 'Tiles © Esri — Esri, DeLorme, NAVTEQ, TomTom, Intermap, iPC, USGS, FAO, NPS, NRCAN, GeoBase, Kadaster NL, Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), and the GIS User Community' + }); + var tmp_layer + var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', + osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors', + osm = L.tileLayer(osmUrl, { + maxZoom: 18, + attribution: osmAttrib + }), + map = new L.Map('map', { + layers: [Esri_WorldTopoMap], + center: new L.LatLng(48.7758, 9.1829), + zoom: 15 + }); + + var drawnItems = new L.FeatureGroup(); + map.addLayer(drawnItems); + + // Set the title to show on the polygon button + L.drawLocal.draw.toolbar.buttons.polygon = 'Draw a polygon!'; + + var drawControl = new L.Control.Draw({ + position: 'bottomright', + draw: { + polyline: false, + polygon: true, + circle: false, + marker: false, + circlemarker: false + + }, + edit: { + featureGroup: drawnItems, + remove: true + } + }); + map.addControl(drawControl); + + map.on(L.Draw.Event.CREATED, function (e) { + if (tmp_layer !== undefined) { + try { + map.removeLayer(tmp_layer) + } catch (error) {} + } + var type = e.layerType, + layer = e.layer; + tmp_layer = layer + if (type === 'marker') { + layer.bindPopup('A popup!'); + } + + drawnItems.addLayer(layer); + const answer = document.getElementById('calculated_area'); + // $("#") + var source = new proj4.Proj('EPSG:4326'); //source coordinates will be in Longitude/Latitude + proj4.defs("EPSG:31463", + "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=3500000 +y_0=0 +ellps=bessel +towgs84=598.1,73.7,418.2,0.202,0.045,-2.455,6.7 +units=m +no_defs" + ); + var dest = new proj4.Proj('EPSG:31463'); //source coordinates will be in Longitude/Latitude + + var p_min = new proj4.toPoint([tmp_layer._bounds._southWest.lng, tmp_layer._bounds._southWest + .lat + ]); //any object will do as long as it has 'x' and 'y' properties + var p_max = new proj4.toPoint([tmp_layer._bounds._northEast.lng, tmp_layer._bounds._northEast + .lat + ]); //any object will do as long as it has 'x' and 'y' properties + p_dest_min = proj4.transform(source, dest, + p_min); //do the transformation. x and y are modified in place + p_dest_max = proj4.transform(source, dest, + p_max); //do the transformation. x and y are modified in place + answer.innerHTML = ` + BBOX (4326): + <input type="text" value="${tmp_layer._bounds._southWest.lng.toFixed(10)},${tmp_layer._bounds._southWest.lat.toFixed(10)},${tmp_layer._bounds._northEast.lng.toFixed(10)},${tmp_layer._bounds._northEast.lat.toFixed(10)}" id="4326" size="60"> + + <button class="badge bg-secondary" onclick="clickToCopy('4326')">click to copy</button> + + <br> + + BBOX (31463): + <input type="text" value="${p_dest_min.x.toFixed(4)},${p_dest_min.y.toFixed(4)},${p_dest_max.x.toFixed(4)},${p_dest_max.y.toFixed(4)}" id="31463" size="60"> + <button class="badge bg-secondary" onclick="clickToCopy('31463')">click to copy</button> + + <hr> + + Try other epsg: + <input type="number" placeholder="e.g. 31464, 3857" id="input_epsg"/> <button class="badge bg-secondary" onclick="convert_epsg()">convert</button> + + <span id="conversion_result"></span> + + `; + console.log(`WFS Request (31463): http://193.196.137.147:8080/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=bldg:Building&bbox=${p_dest_min.x.toFixed(4)},${p_dest_min.y.toFixed(4)},${p_dest_max.x.toFixed(4)},${p_dest_max.y.toFixed(4)}&srsName=EPSG:31463`) + }); + + map.on(L.Draw.Event.EDITED, function (e) { + var layers = e.layers; + var countOfEditedLayers = 0; + layers.eachLayer(function (layer) { + countOfEditedLayers++; + }); + console.log("Edited " + countOfEditedLayers + " layers"); + }); + + function clickToCopy(id) { + /* Get the text field */ + var copyText = document.getElementById(id); + + /* Select the text field */ + copyText.select(); + copyText.setSelectionRange(0, 99999); /* For mobile devices */ + + /* Copy the text inside the text field */ + navigator.clipboard.writeText(copyText.value); + + /* Alert the copied text */ + alert("BBox Copied:<br>" + copyText.value); + } + + function convert_epsg() { + var input_epsg = $("#input_epsg").val() + var bbox_latlng = + `${tmp_layer._bounds._southWest.lng},${tmp_layer._bounds._southWest.lat};${tmp_layer._bounds._northEast.lng},${tmp_layer._bounds._northEast.lat}` + var conversion_service = + `https://epsg.io/trans?data=${bbox_latlng}&s_srs=4326&t_srs=${input_epsg}` + // console.log(`request to ${conversion_service}...`) + $.getJSON(conversion_service, function (data) { + if (data.status) { + $("#conversion_result").html("ESPG Code not support or invalid EPSG Code.") + } else { + var result = ` + <br> + BBOX (${input_epsg}): + <input type="text" value="${parseFloat(data[0]["x"]).toFixed(4)},${parseFloat(data[0]["y"]).toFixed(4)},${parseFloat(data[1]["x"]).toFixed(4)},${parseFloat(data[1]["y"]).toFixed(4)}" id="${input_epsg}" size="60"> + <button class="badge bg-secondary" onclick="clickToCopy('31463')">click to copy</button> + ` + $("#conversion_result").html(result) + console.log(`WFS Request (${input_epsg}): http://193.196.137.147:8080/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeNames=bldg:Building&bbox=${parseFloat(data[0]["x"]).toFixed(4)},${parseFloat(data[0]["y"]).toFixed(4)},${parseFloat(data[1]["x"]).toFixed(4)},${parseFloat(data[1]["y"]).toFixed(4)}&srsName=EPSG:${input_epsg}`) + } + }); + } + </script> +</body> + +</html> \ No newline at end of file diff --git a/public/joeicon.png b/public/joeicon.png new file mode 100644 index 0000000000000000000000000000000000000000..de596b28d65f1df56cfbce8e63a6c82f4e59a0cb Binary files /dev/null and b/public/joeicon.png differ diff --git a/public/libs/Leaflet.draw.drag-src.js b/public/libs/Leaflet.draw.drag-src.js new file mode 100644 index 0000000000000000000000000000000000000000..c7468241ae039794b740969591efbcb8b378cbe6 --- /dev/null +++ b/public/libs/Leaflet.draw.drag-src.js @@ -0,0 +1,894 @@ +/** + * Matrix transform path for SVG/VML + * TODO: adapt to Leaflet 0.8 upon release + */ + +"use strict"; + +if (L.Browser.svg) { // SVG transformation + + L.Path.include({ + + /** + * Reset transform matrix + */ + _resetTransform: function() { + this._container.setAttributeNS(null, 'transform', ''); + }, + + /** + * Applies matrix transformation to SVG + * @param {Array.<Number>} matrix + */ + _applyTransform: function(matrix) { + this._container.setAttributeNS(null, "transform", + 'matrix(' + matrix.join(' ') + ')'); + } + + }); + +} else { // VML transform routines + + L.Path.include({ + + /** + * Reset transform matrix + */ + _resetTransform: function() { + if (this._skew) { + // super important! workaround for a 'jumping' glitch: + // disable transform before removing it + this._skew.on = false; + this._container.removeChild(this._skew); + this._skew = null; + } + }, + + /** + * Applies matrix transformation to VML + * @param {Array.<Number>} matrix + */ + _applyTransform: function(matrix) { + var skew = this._skew; + + if (!skew) { + skew = this._createElement('skew'); + this._container.appendChild(skew); + skew.style.behavior = 'url(#default#VML)'; + this._skew = skew; + } + + // handle skew/translate separately, cause it's broken + var mt = matrix[0].toFixed(8) + " " + matrix[1].toFixed(8) + " " + + matrix[2].toFixed(8) + " " + matrix[3].toFixed(8) + " 0 0"; + var offset = Math.floor(matrix[4]).toFixed() + ", " + + Math.floor(matrix[5]).toFixed() + ""; + + var s = this._container.style; + var l = parseFloat(s.left); + var t = parseFloat(s.top); + var w = parseFloat(s.width); + var h = parseFloat(s.height); + + if (isNaN(l)) l = 0; + if (isNaN(t)) t = 0; + if (isNaN(w) || !w) w = 1; + if (isNaN(h) || !h) h = 1; + + var origin = (-l / w - 0.5).toFixed(8) + " " + (-t / h - 0.5).toFixed(8); + + skew.on = "f"; + skew.matrix = mt; + skew.origin = origin; + skew.offset = offset; + skew.on = true; + } + + }); +} + +// Renderer-independent +L.Path.include({ + + /** + * Check if the feature was dragged, that'll supress the click event + * on mouseup. That fixes popups for example + * + * @param {MouseEvent} e + */ + _onMouseClick: function(e) { + if ((this.dragging && this.dragging.moved()) || + (this._map.dragging && this._map.dragging.moved())) { + return; + } + + this._fireMouseEvent(e); + } +}); +/** + * Leaflet vector features drag functionality + * @preserve + */ + +"use strict"; + +/** + * Drag handler + * @class L.Path.Drag + * @extends {L.Handler} + */ +L.Handler.PathDrag = L.Handler.extend( /** @lends L.Path.Drag.prototype */ { + + /** + * @param {L.Path} path + * @constructor + */ + initialize: function(path) { + + /** + * @type {L.Path} + */ + this._path = path; + + /** + * @type {Array.<Number>} + */ + this._matrix = null; + + /** + * @type {L.Point} + */ + this._startPoint = null; + + /** + * @type {L.Point} + */ + this._dragStartPoint = null; + + }, + + /** + * Enable dragging + */ + addHooks: function() { + this._path.on('mousedown', this._onDragStart, this); + L.DomUtil.addClass(this._path._container, 'leaflet-path-draggable'); + }, + + /** + * Disable dragging + */ + removeHooks: function() { + this._path.off('mousedown', this._onDragStart, this); + L.DomUtil.removeClass(this._path._container, 'leaflet-path-draggable'); + }, + + /** + * @return {Boolean} + */ + moved: function() { + return this._path._dragMoved; + }, + + /** + * Start drag + * @param {L.MouseEvent} evt + */ + _onDragStart: function(evt) { + this._startPoint = evt.containerPoint.clone(); + this._dragStartPoint = evt.containerPoint.clone(); + this._matrix = [1, 0, 0, 1, 0, 0]; + + this._path._map + .on('mousemove', this._onDrag, this) + .on('mouseup', this._onDragEnd, this) + this._path._dragMoved = false; + }, + + /** + * Dragging + * @param {L.MouseEvent} evt + */ + _onDrag: function(evt) { + var x = evt.containerPoint.x; + var y = evt.containerPoint.y; + + var dx = x - this._startPoint.x; + var dy = y - this._startPoint.y; + + if (!this._path._dragMoved && (dx || dy)) { + this._path._dragMoved = true; + this._path.fire('dragstart'); + } + + this._matrix[4] += dx; + this._matrix[5] += dy; + + this._startPoint.x = x; + this._startPoint.y = y; + + this._path._applyTransform(this._matrix); + this._path.fire('drag'); + L.DomEvent.stop(evt.originalEvent); + }, + + /** + * Dragging stopped, apply + * @param {L.MouseEvent} evt + */ + _onDragEnd: function(evt) { + L.DomEvent.stop(evt); + // undo container transform + this._path._resetTransform(); + // apply matrix + this._transformPoints(this._matrix); + + this._path._map + .off('mousemove', this._onDrag, this) + .off('mouseup', this._onDragEnd, this); + + // consistency + this._path.fire('dragend', { + distance: Math.sqrt( + L.LineUtil._sqDist(this._dragStartPoint, evt.containerPoint) + ) + }); + + this._matrix = null; + this._startPoint = null; + this._dragStartPoint = null; + }, + + /** + * Applies transformation, does it in one sweep for performance, + * so don't be surprised about the code repetition. + * + * [ x ] [ a b tx ] [ x ] [ a * x + b * y + tx ] + * [ y ] = [ c d ty ] [ y ] = [ c * x + d * y + ty ] + * + * @param {Array.<Number>} matrix + */ + _transformPoints: function(matrix) { + var path = this._path; + var i, len, latlng; + + var px = L.point(matrix[4], matrix[5]); + + var crs = path._map.options.crs; + var transformation = crs.transformation; + var scale = crs.scale(path._map.getZoom()); + var projection = crs.projection; + + var diff = transformation.untransform(px, scale) + .subtract(transformation.untransform(L.point(0, 0), scale)); + + // console.time('transform'); + + // all shifts are in-place + if (path._point) { // L.Circle + path._latlng = projection.unproject( + projection.project(path._latlng)._add(diff)); + path._point._add(px); + } else if (path._originalPoints) { // everything else + for (i = 0, len = path._originalPoints.length; i < len; i++) { + latlng = path._latlngs[i]; + path._latlngs[i] = projection + .unproject(projection.project(latlng)._add(diff)); + path._originalPoints[i]._add(px); + } + } + + // holes operations + if (path._holes) { + for (i = 0, len = path._holes.length; i < len; i++) { + for (var j = 0, len2 = path._holes[i].length; j < len2; j++) { + latlng = path._holes[i][j]; + path._holes[i][j] = projection + .unproject(projection.project(latlng)._add(diff)); + path._holePoints[i][j]._add(px); + } + } + } + + // console.timeEnd('transform'); + + path._updatePath(); + } + +}); + +L.Path.prototype.__initEvents = L.Path.prototype._initEvents; +L.Path.prototype._initEvents = function() { + this.__initEvents(); + + if (this.options.draggable) { + if (this.dragging) { + this.dragging.enable(); + } else { + this.dragging = new L.Handler.PathDrag(this); + this.dragging.enable(); + } + } else if (this.dragging) { + this.dragging.disable(); + } +}; +(function() { + + // listen and propagate dragstart on sub-layers + L.FeatureGroup.EVENTS += ' dragstart'; + + function wrapMethod(klasses, methodName, method) { + for (var i = 0, len = klasses.length; i < len; i++) { + var klass = klasses[i]; + klass.prototype['_' + methodName] = klass.prototype[methodName]; + klass.prototype[methodName] = method; + } + } + + /** + * @param {L.Polygon|L.Polyline} layer + * @return {L.MultiPolygon|L.MultiPolyline} + */ + function addLayer(layer) { + if (this.hasLayer(layer)) { + return this; + } + layer + .on('drag', this._onDrag, this) + .on('dragend', this._onDragEnd, this); + return this._addLayer.call(this, layer); + } + + /** + * @param {L.Polygon|L.Polyline} layer + * @return {L.MultiPolygon|L.MultiPolyline} + */ + function removeLayer(layer) { + if (!this.hasLayer(layer)) { + return this; + } + layer + .off('drag', this._onDrag, this) + .off('dragend', this._onDragEnd, this); + return this._removeLayer.call(this, layer); + } + + // duck-type methods to listen to the drag events + wrapMethod([L.MultiPolygon, L.MultiPolyline], 'addLayer', addLayer); + wrapMethod([L.MultiPolygon, L.MultiPolyline], 'removeLayer', removeLayer); + + var dragMethods = { + _onDrag: function(evt) { + var layer = evt.target; + this.eachLayer(function(otherLayer) { + if (otherLayer !== layer) { + otherLayer._applyTransform(layer.dragging._matrix); + } + }); + + this._propagateEvent(evt); + }, + + _onDragEnd: function(evt) { + var layer = evt.target; + + this.eachLayer(function(otherLayer) { + if (otherLayer !== layer) { + otherLayer._resetTransform(); + otherLayer.dragging._transformPoints(layer.dragging._matrix); + } + }); + + this._propagateEvent(evt); + } + }; + + L.MultiPolygon.include(dragMethods); + L.MultiPolyline.include(dragMethods); + +})(); +// TODO: dismiss that on Leaflet 0.8.x release + +L.Polygon.include( /** @lends L.Polygon.prototype */ { + + /** + * @return {L.LatLng} + */ + getCenter: function() { + var i, j, len, p1, p2, f, area, x, y, + points = this._parts[0]; + + // polygon centroid algorithm; only uses the first ring if there are multiple + + area = x = y = 0; + + for (i = 0, len = points.length, j = len - 1; i < len; j = i++) { + p1 = points[i]; + p2 = points[j]; + + f = p1.y * p2.x - p2.y * p1.x; + x += (p1.x + p2.x) * f; + y += (p1.y + p2.y) * f; + area += f * 3; + } + + return this._map.layerPointToLatLng([x / area, y / area]); + } + +}); +"use strict"; + +/** + * Static flag for move markers + * @type {Boolean} + */ +L.EditToolbar.Edit.MOVE_MARKERS = false; + +L.EditToolbar.Edit.include( /** @lends L.EditToolbar.Edit.prototype */ { + + /** + * @override + */ + initialize: function(map, options) { + L.EditToolbar.Edit.MOVE_MARKERS = !!options.selectedPathOptions.moveMarkers; + this._initialize(map, options); + }, + + /** + * @param {L.Map} map + * @param {Object} options + */ + _initialize: L.EditToolbar.Edit.prototype.initialize + +}); +/** + * Mainly central marker routines + */ + +L.Edit.SimpleShape.include( /** @lends L.Edit.SimpleShape.prototype */ { + + /** + * Put move marker into center + */ + _updateMoveMarker: function() { + if (this._moveMarker) { + this._moveMarker.setLatLng(this._getShapeCenter()); + } + }, + + /** + * Shape centroid + * @return {L.LatLng} + */ + _getShapeCenter: function() { + return this._shape.getBounds().getCenter(); + }, + + /** + * @override + */ + _createMoveMarker: function() { + if (L.EditToolbar.Edit.MOVE_MARKERS) { + this._moveMarker = this._createMarker(this._getShapeCenter(), + this.options.moveIcon); + } + } + +}); + +/** + * Override this if you don't want the central marker + * @type {Boolean} + */ +L.Edit.SimpleShape.mergeOptions({ + moveMarker: false +}); +/** + * Dragging routines for circle + */ + +L.Edit.Circle.include( /** @lends L.Edit.Circle.prototype */ { + + /** + * @override + */ + addHooks: function() { + if (this._shape._map) { + this._map = this._shape._map; + if (!this._markerGroup) { + this._enableDragging(); + this._initMarkers(); + } + this._shape._map.addLayer(this._markerGroup); + } + }, + + /** + * @override + */ + removeHooks: function() { + if (this._shape._map) { + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._unbindMarker(this._resizeMarkers[i]); + } + + this._disableDragging(); + this._resizeMarkers = null; + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + } + + this._map = null; + }, + + /** + * @override + */ + _createMoveMarker: L.Edit.SimpleShape.prototype._createMoveMarker, + + /** + * Change + * @param {L.LatLng} latlng + */ + _resize: function(latlng) { + var center = this._shape.getLatLng(); + var radius = center.distanceTo(latlng); + + this._shape.setRadius(radius); + + this._updateMoveMarker(); + }, + + /** + * Adds drag start listeners + */ + _enableDragging: function() { + if (!this._shape.dragging) { + this._shape.dragging = new L.Handler.PathDrag(this._shape); + } + this._shape.dragging.enable(); + this._shape + .on('dragstart', this._onStartDragFeature, this) + .on('dragend', this._onStopDragFeature, this); + }, + + /** + * Removes drag start listeners + */ + _disableDragging: function() { + this._shape.dragging.disable(); + this._shape + .off('dragstart', this._onStartDragFeature, this) + .off('dragend', this._onStopDragFeature, this); + }, + + /** + * Start drag + * @param {L.MouseEvent} evt + */ + _onStartDragFeature: function() { + this._shape._map.removeLayer(this._markerGroup); + this._shape.fire('editstart'); + }, + + /** + * Dragging stopped, apply + * @param {L.MouseEvent} evt + */ + _onStopDragFeature: function() { + var center = this._shape.getLatLng(); + + //this._moveMarker.setLatLng(center); + this._resizeMarkers[0].setLatLng(this._getResizeMarkerPoint(center)); + + // show resize marker + this._shape._map.addLayer(this._markerGroup); + this._updateMoveMarker(); + this._fireEdit(); + } +}); +/** + * Dragging routines for poly handler + */ + +L.Edit.Rectangle.include( /** @lends L.Edit.Rectangle.prototype */ { + + /** + * @override + */ + addHooks: function() { + if (this._shape._map) { + if (!this._markerGroup) { + this._enableDragging(); + this._initMarkers(); + } + this._shape._map.addLayer(this._markerGroup); + } + }, + + /** + * @override + */ + removeHooks: function() { + if (this._shape._map) { + this._shape._map.removeLayer(this._markerGroup); + this._disableDragging(); + delete this._markerGroup; + delete this._markers; + } + }, + + /** + * @override + */ + _resize: function(latlng) { + // Update the shape based on the current position of + // this corner and the opposite point + this._shape.setBounds(L.latLngBounds(latlng, this._oppositeCorner)); + this._updateMoveMarker(); + }, + + /** + * @override + */ + _onMarkerDragEnd: function(e) { + this._toggleCornerMarkers(1); + this._repositionCornerMarkers(); + + L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this, e); + }, + + /** + * Adds drag start listeners + */ + _enableDragging: function() { + if (!this._shape.dragging) { + this._shape.dragging = new L.Handler.PathDrag(this._shape); + } + this._shape.dragging.enable(); + this._shape + .on('dragstart', this._onStartDragFeature, this) + .on('dragend', this._onStopDragFeature, this); + }, + + /** + * Removes drag start listeners + */ + _disableDragging: function() { + this._shape.dragging.disable(); + this._shape + .off('dragstart', this._onStartDragFeature, this) + .off('dragend', this._onStopDragFeature, this); + }, + + /** + * Start drag + * @param {L.MouseEvent} evt + */ + _onStartDragFeature: function() { + this._shape._map.removeLayer(this._markerGroup); + this._shape.fire('editstart'); + }, + + /** + * Dragging stopped, apply + * @param {L.MouseEvent} evt + */ + _onStopDragFeature: function() { + var polygon = this._shape; + for (var i = 0, len = polygon._latlngs.length; i < len; i++) { + // update marker + var marker = this._resizeMarkers[i]; + marker.setLatLng(polygon._latlngs[i]); + + // this one's needed to update the path + marker._origLatLng = polygon._latlngs[i]; + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + } + // this._moveMarker.setLatLng(polygon.getBounds().getCenter()); + + // show vertices + this._shape._map.addLayer(this._markerGroup); + this._updateMoveMarker(); + + this._repositionCornerMarkers(); + this._fireEdit(); + } +}); +/** + * Dragging routines for poly handler + */ + +L.Edit.PolyVerticesEdit.include( /** @lends L.Edit.PolyVerticesEdit.prototype */ { + + // store methods to call them in overrides + __createMarker: L.Edit.PolyVerticesEdit.prototype._createMarker, + __removeMarker: L.Edit.PolyVerticesEdit.prototype._removeMarker, + + /** + * @override + */ + addHooks: function() { + if (this._poly._map) { + if (!this._markerGroup) { + this._enableDragging(); + this._initMarkers(); + // Create center marker + this._createMoveMarker(); + } + this._poly._map.addLayer(this._markerGroup); + } + }, + + /** + * @override + */ + _createMoveMarker: function() { + if (L.EditToolbar.Edit.MOVE_MARKERS && (this._poly instanceof L.Polygon)) { + this._moveMarker = new L.Marker(this._getShapeCenter(), { + icon: this.options.moveIcon + }); + this._moveMarker.on('mousedown', this._delegateToShape, this); + this._markerGroup.addLayer(this._moveMarker); + } + }, + + /** + * Start dragging through the marker + * @param {L.MouseEvent} evt + */ + _delegateToShape: function(evt) { + var poly = this._shape || this._poly; + var marker = evt.target; + poly.fire('mousedown', L.Util.extend(evt, { + containerPoint: L.DomUtil.getPosition(marker._icon) + .add(poly._map._getMapPanePos()) + })); + }, + + /** + * Polygon centroid + * @return {L.LatLng} + */ + _getShapeCenter: function() { + return this._poly.getCenter(); + }, + + /** + * @override + */ + removeHooks: function() { + if (this._poly._map) { + this._poly._map.removeLayer(this._markerGroup); + this._disableDragging(); + delete this._markerGroup; + delete this._markers; + } + }, + + /** + * Adds drag start listeners + */ + _enableDragging: function() { + if (!this._poly.dragging) { + this._poly.dragging = new L.Handler.PathDrag(this._poly); + } + this._poly.dragging.enable(); + this._poly + .on('dragstart', this._onStartDragFeature, this) + .on('dragend', this._onStopDragFeature, this); + }, + + /** + * Removes drag start listeners + */ + _disableDragging: function() { + this._poly.dragging.disable(); + this._poly + .off('dragstart', this._onStartDragFeature, this) + .off('dragend', this._onStopDragFeature, this); + }, + + /** + * Start drag + * @param {L.MouseEvent} evt + */ + _onStartDragFeature: function(evt) { + this._poly._map.removeLayer(this._markerGroup); + this._poly.fire('editstart'); + }, + + /** + * Dragging stopped, apply + * @param {L.MouseEvent} evt + */ + _onStopDragFeature: function(evt) { + // var polygon = this._poly; + for (var i = 0, len = this._latlngs.length; i < len; i++) { + // update marker + var marker = this._markers[i]; + marker.setLatLng(this._latlngs[i]); + + // this one's needed to update the path + marker._origLatLng = this._latlngs[i]; + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + } + + // show vertices + this._poly._map.addLayer(this._markerGroup); + L.Edit.SimpleShape.prototype._updateMoveMarker.call(this); + this._fireEdit(); + }, + + /** + * Copy from simple shape + */ + _updateMoveMarker: L.Edit.SimpleShape.prototype._updateMoveMarker, + + /** + * @override + */ + _createMarker: function(latlng, index) { + var marker = this.__createMarker(latlng, index); + marker + .on('dragstart', this._hideMoveMarker, this) + .on('dragend', this._showUpdateMoveMarker, this); + return marker; + }, + + /** + * @override + */ + _removeMarker: function(marker) { + this.__removeMarker(marker); + marker + .off('dragstart', this._hideMoveMarker, this) + .off('dragend', this._showUpdateMoveMarker, this); + }, + + /** + * Hide move marker while dragging a vertex + */ + _hideMoveMarker: function() { + if (this._moveMarker) { + this._markerGroup.removeLayer(this._moveMarker); + } + }, + + /** + * Show and update move marker + */ + _showUpdateMoveMarker: function() { + if (this._moveMarker) { + this._markerGroup.addLayer(this._moveMarker); + this._updateMoveMarker(); + } + } + +}); + +/** + * @type {L.DivIcon} + */ +L.Edit.PolyVerticesEdit.prototype.options.moveIcon = new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move' +}); + +/** + * Override this if you don't want the central marker + * @type {Boolean} + */ +L.Edit.PolyVerticesEdit.mergeOptions({ + moveMarker: false +}); diff --git a/public/libs/images/layers-2x.png b/public/libs/images/layers-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..200c333dca9652ac4cba004d609e5af4eee168c1 Binary files /dev/null and b/public/libs/images/layers-2x.png differ diff --git a/public/libs/images/layers.png b/public/libs/images/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..1a72e5784b2b456eac5d7670738db80697af3377 Binary files /dev/null and b/public/libs/images/layers.png differ diff --git a/public/libs/images/marker-icon-2x.png b/public/libs/images/marker-icon-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..e4abba3b511d14752426e8cbadae03c1e5fe15fb Binary files /dev/null and b/public/libs/images/marker-icon-2x.png differ diff --git a/public/libs/images/marker-icon.png b/public/libs/images/marker-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..950edf24677ded147df13b26f91baa2b0fa70513 Binary files /dev/null and b/public/libs/images/marker-icon.png differ diff --git a/public/libs/images/marker-shadow.png b/public/libs/images/marker-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd2979532a19a15b824ce763c76e04a8dafadfb Binary files /dev/null and b/public/libs/images/marker-shadow.png differ diff --git a/public/libs/leaflet-src.js b/public/libs/leaflet-src.js new file mode 100644 index 0000000000000000000000000000000000000000..63f6fb790cac8c3a9674ea57f9b47edcf5611e5a --- /dev/null +++ b/public/libs/leaflet-src.js @@ -0,0 +1,13802 @@ +/* @preserve + * Leaflet 1.3.1, a JS library for interactive maps. http://leafletjs.com + * (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade + */ + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : + typeof define === 'function' && define.amd ? define(['exports'], factory) : + (factory((global.L = {}))); +}(this, (function (exports) { 'use strict'; + +var version = "1.3.1"; + +/* + * @namespace Util + * + * Various utility functions, used by Leaflet internally. + */ + +var freeze = Object.freeze; +Object.freeze = function (obj) { return obj; }; + +// @function extend(dest: Object, src?: Object): Object +// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut. +function extend(dest) { + var i, j, len, src; + + for (j = 1, len = arguments.length; j < len; j++) { + src = arguments[j]; + for (i in src) { + dest[i] = src[i]; + } + } + return dest; +} + +// @function create(proto: Object, properties?: Object): Object +// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create) +var create = Object.create || (function () { + function F() {} + return function (proto) { + F.prototype = proto; + return new F(); + }; +})(); + +// @function bind(fn: Function, …): Function +// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind). +// Has a `L.bind()` shortcut. +function bind(fn, obj) { + var slice = Array.prototype.slice; + + if (fn.bind) { + return fn.bind.apply(fn, slice.call(arguments, 1)); + } + + var args = slice.call(arguments, 2); + + return function () { + return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments); + }; +} + +// @property lastId: Number +// Last unique ID used by [`stamp()`](#util-stamp) +var lastId = 0; + +// @function stamp(obj: Object): Number +// Returns the unique ID of an object, assigning it one if it doesn't have it. +function stamp(obj) { + /*eslint-disable */ + obj._leaflet_id = obj._leaflet_id || ++lastId; + return obj._leaflet_id; + /* eslint-enable */ +} + +// @function throttle(fn: Function, time: Number, context: Object): Function +// Returns a function which executes function `fn` with the given scope `context` +// (so that the `this` keyword refers to `context` inside `fn`'s code). The function +// `fn` will be called no more than one time per given amount of `time`. The arguments +// received by the bound function will be any arguments passed when binding the +// function, followed by any arguments passed when invoking the bound function. +// Has an `L.throttle` shortcut. +function throttle(fn, time, context) { + var lock, args, wrapperFn, later; + + later = function () { + // reset lock and call if queued + lock = false; + if (args) { + wrapperFn.apply(context, args); + args = false; + } + }; + + wrapperFn = function () { + if (lock) { + // called too soon, queue to call later + args = arguments; + + } else { + // call and lock until later + fn.apply(context, arguments); + setTimeout(later, time); + lock = true; + } + }; + + return wrapperFn; +} + +// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number +// Returns the number `num` modulo `range` in such a way so it lies within +// `range[0]` and `range[1]`. The returned value will be always smaller than +// `range[1]` unless `includeMax` is set to `true`. +function wrapNum(x, range, includeMax) { + var max = range[1], + min = range[0], + d = max - min; + return x === max && includeMax ? x : ((x - min) % d + d) % d + min; +} + +// @function falseFn(): Function +// Returns a function which always returns `false`. +function falseFn() { return false; } + +// @function formatNum(num: Number, digits?: Number): Number +// Returns the number `num` rounded to `digits` decimals, or to 6 decimals by default. +function formatNum(num, digits) { + var pow = Math.pow(10, (digits === undefined ? 6 : digits)); + return Math.round(num * pow) / pow; +} + +// @function trim(str: String): String +// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) +function trim(str) { + return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, ''); +} + +// @function splitWords(str: String): String[] +// Trims and splits the string on whitespace and returns the array of parts. +function splitWords(str) { + return trim(str).split(/\s+/); +} + +// @function setOptions(obj: Object, options: Object): Object +// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut. +function setOptions(obj, options) { + if (!obj.hasOwnProperty('options')) { + obj.options = obj.options ? create(obj.options) : {}; + } + for (var i in options) { + obj.options[i] = options[i]; + } + return obj.options; +} + +// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String +// Converts an object into a parameter URL string, e.g. `{a: "foo", b: "bar"}` +// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will +// be appended at the end. If `uppercase` is `true`, the parameter names will +// be uppercased (e.g. `'?A=foo&B=bar'`) +function getParamString(obj, existingUrl, uppercase) { + var params = []; + for (var i in obj) { + params.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i])); + } + return ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&'); +} + +var templateRe = /\{ *([\w_-]+) *\}/g; + +// @function template(str: String, data: Object): String +// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'` +// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string +// `('Hello foo, bar')`. You can also specify functions instead of strings for +// data values — they will be evaluated passing `data` as an argument. +function template(str, data) { + return str.replace(templateRe, function (str, key) { + var value = data[key]; + + if (value === undefined) { + throw new Error('No value provided for variable ' + str); + + } else if (typeof value === 'function') { + value = value(data); + } + return value; + }); +} + +// @function isArray(obj): Boolean +// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) +var isArray = Array.isArray || function (obj) { + return (Object.prototype.toString.call(obj) === '[object Array]'); +}; + +// @function indexOf(array: Array, el: Object): Number +// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) +function indexOf(array, el) { + for (var i = 0; i < array.length; i++) { + if (array[i] === el) { return i; } + } + return -1; +} + +// @property emptyImageUrl: String +// Data URI string containing a base64-encoded empty GIF image. +// Used as a hack to free memory from unused images on WebKit-powered +// mobile devices (by setting image `src` to this string). +var emptyImageUrl = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='; + +// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + +function getPrefixed(name) { + return window['webkit' + name] || window['moz' + name] || window['ms' + name]; +} + +var lastTime = 0; + +// fallback for IE 7-8 +function timeoutDefer(fn) { + var time = +new Date(), + timeToCall = Math.max(0, 16 - (time - lastTime)); + + lastTime = time + timeToCall; + return window.setTimeout(fn, timeToCall); +} + +var requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer; +var cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') || + getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); }; + +// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number +// Schedules `fn` to be executed when the browser repaints. `fn` is bound to +// `context` if given. When `immediate` is set, `fn` is called immediately if +// the browser doesn't have native support for +// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame), +// otherwise it's delayed. Returns a request ID that can be used to cancel the request. +function requestAnimFrame(fn, context, immediate) { + if (immediate && requestFn === timeoutDefer) { + fn.call(context); + } else { + return requestFn.call(window, bind(fn, context)); + } +} + +// @function cancelAnimFrame(id: Number): undefined +// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame). +function cancelAnimFrame(id) { + if (id) { + cancelFn.call(window, id); + } +} + + +var Util = (Object.freeze || Object)({ + freeze: freeze, + extend: extend, + create: create, + bind: bind, + lastId: lastId, + stamp: stamp, + throttle: throttle, + wrapNum: wrapNum, + falseFn: falseFn, + formatNum: formatNum, + trim: trim, + splitWords: splitWords, + setOptions: setOptions, + getParamString: getParamString, + template: template, + isArray: isArray, + indexOf: indexOf, + emptyImageUrl: emptyImageUrl, + requestFn: requestFn, + cancelFn: cancelFn, + requestAnimFrame: requestAnimFrame, + cancelAnimFrame: cancelAnimFrame +}); + +// @class Class +// @aka L.Class + +// @section +// @uninheritable + +// Thanks to John Resig and Dean Edwards for inspiration! + +function Class() {} + +Class.extend = function (props) { + + // @function extend(props: Object): Function + // [Extends the current class](#class-inheritance) given the properties to be included. + // Returns a Javascript function that is a class constructor (to be called with `new`). + var NewClass = function () { + + // call the constructor + if (this.initialize) { + this.initialize.apply(this, arguments); + } + + // call all constructor hooks + this.callInitHooks(); + }; + + var parentProto = NewClass.__super__ = this.prototype; + + var proto = create(parentProto); + proto.constructor = NewClass; + + NewClass.prototype = proto; + + // inherit parent's statics + for (var i in this) { + if (this.hasOwnProperty(i) && i !== 'prototype' && i !== '__super__') { + NewClass[i] = this[i]; + } + } + + // mix static properties into the class + if (props.statics) { + extend(NewClass, props.statics); + delete props.statics; + } + + // mix includes into the prototype + if (props.includes) { + checkDeprecatedMixinEvents(props.includes); + extend.apply(null, [proto].concat(props.includes)); + delete props.includes; + } + + // merge options + if (proto.options) { + props.options = extend(create(proto.options), props.options); + } + + // mix given properties into the prototype + extend(proto, props); + + proto._initHooks = []; + + // add method for calling all hooks + proto.callInitHooks = function () { + + if (this._initHooksCalled) { return; } + + if (parentProto.callInitHooks) { + parentProto.callInitHooks.call(this); + } + + this._initHooksCalled = true; + + for (var i = 0, len = proto._initHooks.length; i < len; i++) { + proto._initHooks[i].call(this); + } + }; + + return NewClass; +}; + + +// @function include(properties: Object): this +// [Includes a mixin](#class-includes) into the current class. +Class.include = function (props) { + extend(this.prototype, props); + return this; +}; + +// @function mergeOptions(options: Object): this +// [Merges `options`](#class-options) into the defaults of the class. +Class.mergeOptions = function (options) { + extend(this.prototype.options, options); + return this; +}; + +// @function addInitHook(fn: Function): this +// Adds a [constructor hook](#class-constructor-hooks) to the class. +Class.addInitHook = function (fn) { // (Function) || (String, args...) + var args = Array.prototype.slice.call(arguments, 1); + + var init = typeof fn === 'function' ? fn : function () { + this[fn].apply(this, args); + }; + + this.prototype._initHooks = this.prototype._initHooks || []; + this.prototype._initHooks.push(init); + return this; +}; + +function checkDeprecatedMixinEvents(includes) { + if (typeof L === 'undefined' || !L || !L.Mixin) { return; } + + includes = isArray(includes) ? includes : [includes]; + + for (var i = 0; i < includes.length; i++) { + if (includes[i] === L.Mixin.Events) { + console.warn('Deprecated include of L.Mixin.Events: ' + + 'this property will be removed in future releases, ' + + 'please inherit from L.Evented instead.', new Error().stack); + } + } +} + +/* + * @class Evented + * @aka L.Evented + * @inherits Class + * + * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event). + * + * @example + * + * ```js + * map.on('click', function(e) { + * alert(e.latlng); + * } ); + * ``` + * + * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function: + * + * ```js + * function onClick(e) { ... } + * + * map.on('click', onClick); + * map.off('click', onClick); + * ``` + */ + +var Events = { + /* @method on(type: String, fn: Function, context?: Object): this + * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`). + * + * @alternative + * @method on(eventMap: Object): this + * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` + */ + on: function (types, fn, context) { + + // types can be a map of types/handlers + if (typeof types === 'object') { + for (var type in types) { + // we don't process space-separated events here for performance; + // it's a hot path since Layer uses the on(obj) syntax + this._on(type, types[type], fn); + } + + } else { + // types can be a string of space-separated words + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + this._on(types[i], fn, context); + } + } + + return this; + }, + + /* @method off(type: String, fn?: Function, context?: Object): this + * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener. + * + * @alternative + * @method off(eventMap: Object): this + * Removes a set of type/listener pairs. + * + * @alternative + * @method off: this + * Removes all listeners to all events on the object. + */ + off: function (types, fn, context) { + + if (!types) { + // clear all listeners if called without arguments + delete this._events; + + } else if (typeof types === 'object') { + for (var type in types) { + this._off(type, types[type], fn); + } + + } else { + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + this._off(types[i], fn, context); + } + } + + return this; + }, + + // attach listener (without syntactic sugar now) + _on: function (type, fn, context) { + this._events = this._events || {}; + + /* get/init listeners for type */ + var typeListeners = this._events[type]; + if (!typeListeners) { + typeListeners = []; + this._events[type] = typeListeners; + } + + if (context === this) { + // Less memory footprint. + context = undefined; + } + var newListener = {fn: fn, ctx: context}, + listeners = typeListeners; + + // check if fn already there + for (var i = 0, len = listeners.length; i < len; i++) { + if (listeners[i].fn === fn && listeners[i].ctx === context) { + return; + } + } + + listeners.push(newListener); + }, + + _off: function (type, fn, context) { + var listeners, + i, + len; + + if (!this._events) { return; } + + listeners = this._events[type]; + + if (!listeners) { + return; + } + + if (!fn) { + // Set all removed listeners to noop so they are not called if remove happens in fire + for (i = 0, len = listeners.length; i < len; i++) { + listeners[i].fn = falseFn; + } + // clear all listeners for a type if function isn't specified + delete this._events[type]; + return; + } + + if (context === this) { + context = undefined; + } + + if (listeners) { + + // find fn and remove it + for (i = 0, len = listeners.length; i < len; i++) { + var l = listeners[i]; + if (l.ctx !== context) { continue; } + if (l.fn === fn) { + + // set the removed listener to noop so that's not called if remove happens in fire + l.fn = falseFn; + + if (this._firingCount) { + /* copy array in case events are being fired */ + this._events[type] = listeners = listeners.slice(); + } + listeners.splice(i, 1); + + return; + } + } + } + }, + + // @method fire(type: String, data?: Object, propagate?: Boolean): this + // Fires an event of the specified type. You can optionally provide an data + // object — the first argument of the listener function will contain its + // properties. The event can optionally be propagated to event parents. + fire: function (type, data, propagate) { + if (!this.listens(type, propagate)) { return this; } + + var event = extend({}, data, { + type: type, + target: this, + sourceTarget: data && data.sourceTarget || this + }); + + if (this._events) { + var listeners = this._events[type]; + + if (listeners) { + this._firingCount = (this._firingCount + 1) || 1; + for (var i = 0, len = listeners.length; i < len; i++) { + var l = listeners[i]; + l.fn.call(l.ctx || this, event); + } + + this._firingCount--; + } + } + + if (propagate) { + // propagate the event to parents (set with addEventParent) + this._propagateEvent(event); + } + + return this; + }, + + // @method listens(type: String): Boolean + // Returns `true` if a particular event type has any listeners attached to it. + listens: function (type, propagate) { + var listeners = this._events && this._events[type]; + if (listeners && listeners.length) { return true; } + + if (propagate) { + // also check parents for listeners if event propagates + for (var id in this._eventParents) { + if (this._eventParents[id].listens(type, propagate)) { return true; } + } + } + return false; + }, + + // @method once(…): this + // Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed. + once: function (types, fn, context) { + + if (typeof types === 'object') { + for (var type in types) { + this.once(type, types[type], fn); + } + return this; + } + + var handler = bind(function () { + this + .off(types, fn, context) + .off(types, handler, context); + }, this); + + // add a listener that's executed once and removed after that + return this + .on(types, fn, context) + .on(types, handler, context); + }, + + // @method addEventParent(obj: Evented): this + // Adds an event parent - an `Evented` that will receive propagated events + addEventParent: function (obj) { + this._eventParents = this._eventParents || {}; + this._eventParents[stamp(obj)] = obj; + return this; + }, + + // @method removeEventParent(obj: Evented): this + // Removes an event parent, so it will stop receiving propagated events + removeEventParent: function (obj) { + if (this._eventParents) { + delete this._eventParents[stamp(obj)]; + } + return this; + }, + + _propagateEvent: function (e) { + for (var id in this._eventParents) { + this._eventParents[id].fire(e.type, extend({ + layer: e.target, + propagatedFrom: e.target + }, e), true); + } + } +}; + +// aliases; we should ditch those eventually + +// @method addEventListener(…): this +// Alias to [`on(…)`](#evented-on) +Events.addEventListener = Events.on; + +// @method removeEventListener(…): this +// Alias to [`off(…)`](#evented-off) + +// @method clearAllEventListeners(…): this +// Alias to [`off()`](#evented-off) +Events.removeEventListener = Events.clearAllEventListeners = Events.off; + +// @method addOneTimeEventListener(…): this +// Alias to [`once(…)`](#evented-once) +Events.addOneTimeEventListener = Events.once; + +// @method fireEvent(…): this +// Alias to [`fire(…)`](#evented-fire) +Events.fireEvent = Events.fire; + +// @method hasEventListeners(…): Boolean +// Alias to [`listens(…)`](#evented-listens) +Events.hasEventListeners = Events.listens; + +var Evented = Class.extend(Events); + +/* + * @class Point + * @aka L.Point + * + * Represents a point with `x` and `y` coordinates in pixels. + * + * @example + * + * ```js + * var point = L.point(200, 300); + * ``` + * + * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent: + * + * ```js + * map.panBy([200, 300]); + * map.panBy(L.point(200, 300)); + * ``` + * + * Note that `Point` does not inherit from Leafet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + +function Point(x, y, round) { + // @property x: Number; The `x` coordinate of the point + this.x = (round ? Math.round(x) : x); + // @property y: Number; The `y` coordinate of the point + this.y = (round ? Math.round(y) : y); +} + +var trunc = Math.trunc || function (v) { + return v > 0 ? Math.floor(v) : Math.ceil(v); +}; + +Point.prototype = { + + // @method clone(): Point + // Returns a copy of the current point. + clone: function () { + return new Point(this.x, this.y); + }, + + // @method add(otherPoint: Point): Point + // Returns the result of addition of the current and the given points. + add: function (point) { + // non-destructive, returns a new point + return this.clone()._add(toPoint(point)); + }, + + _add: function (point) { + // destructive, used directly for performance in situations where it's safe to modify existing point + this.x += point.x; + this.y += point.y; + return this; + }, + + // @method subtract(otherPoint: Point): Point + // Returns the result of subtraction of the given point from the current. + subtract: function (point) { + return this.clone()._subtract(toPoint(point)); + }, + + _subtract: function (point) { + this.x -= point.x; + this.y -= point.y; + return this; + }, + + // @method divideBy(num: Number): Point + // Returns the result of division of the current point by the given number. + divideBy: function (num) { + return this.clone()._divideBy(num); + }, + + _divideBy: function (num) { + this.x /= num; + this.y /= num; + return this; + }, + + // @method multiplyBy(num: Number): Point + // Returns the result of multiplication of the current point by the given number. + multiplyBy: function (num) { + return this.clone()._multiplyBy(num); + }, + + _multiplyBy: function (num) { + this.x *= num; + this.y *= num; + return this; + }, + + // @method scaleBy(scale: Point): Point + // Multiply each coordinate of the current point by each coordinate of + // `scale`. In linear algebra terms, multiply the point by the + // [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation) + // defined by `scale`. + scaleBy: function (point) { + return new Point(this.x * point.x, this.y * point.y); + }, + + // @method unscaleBy(scale: Point): Point + // Inverse of `scaleBy`. Divide each coordinate of the current point by + // each coordinate of `scale`. + unscaleBy: function (point) { + return new Point(this.x / point.x, this.y / point.y); + }, + + // @method round(): Point + // Returns a copy of the current point with rounded coordinates. + round: function () { + return this.clone()._round(); + }, + + _round: function () { + this.x = Math.round(this.x); + this.y = Math.round(this.y); + return this; + }, + + // @method floor(): Point + // Returns a copy of the current point with floored coordinates (rounded down). + floor: function () { + return this.clone()._floor(); + }, + + _floor: function () { + this.x = Math.floor(this.x); + this.y = Math.floor(this.y); + return this; + }, + + // @method ceil(): Point + // Returns a copy of the current point with ceiled coordinates (rounded up). + ceil: function () { + return this.clone()._ceil(); + }, + + _ceil: function () { + this.x = Math.ceil(this.x); + this.y = Math.ceil(this.y); + return this; + }, + + // @method trunc(): Point + // Returns a copy of the current point with truncated coordinates (rounded towards zero). + trunc: function () { + return this.clone()._trunc(); + }, + + _trunc: function () { + this.x = trunc(this.x); + this.y = trunc(this.y); + return this; + }, + + // @method distanceTo(otherPoint: Point): Number + // Returns the cartesian distance between the current and the given points. + distanceTo: function (point) { + point = toPoint(point); + + var x = point.x - this.x, + y = point.y - this.y; + + return Math.sqrt(x * x + y * y); + }, + + // @method equals(otherPoint: Point): Boolean + // Returns `true` if the given point has the same coordinates. + equals: function (point) { + point = toPoint(point); + + return point.x === this.x && + point.y === this.y; + }, + + // @method contains(otherPoint: Point): Boolean + // Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values). + contains: function (point) { + point = toPoint(point); + + return Math.abs(point.x) <= Math.abs(this.x) && + Math.abs(point.y) <= Math.abs(this.y); + }, + + // @method toString(): String + // Returns a string representation of the point for debugging purposes. + toString: function () { + return 'Point(' + + formatNum(this.x) + ', ' + + formatNum(this.y) + ')'; + } +}; + +// @factory L.point(x: Number, y: Number, round?: Boolean) +// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values. + +// @alternative +// @factory L.point(coords: Number[]) +// Expects an array of the form `[x, y]` instead. + +// @alternative +// @factory L.point(coords: Object) +// Expects a plain object of the form `{x: Number, y: Number}` instead. +function toPoint(x, y, round) { + if (x instanceof Point) { + return x; + } + if (isArray(x)) { + return new Point(x[0], x[1]); + } + if (x === undefined || x === null) { + return x; + } + if (typeof x === 'object' && 'x' in x && 'y' in x) { + return new Point(x.x, x.y); + } + return new Point(x, y, round); +} + +/* + * @class Bounds + * @aka L.Bounds + * + * Represents a rectangular area in pixel coordinates. + * + * @example + * + * ```js + * var p1 = L.point(10, 10), + * p2 = L.point(40, 60), + * bounds = L.bounds(p1, p2); + * ``` + * + * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: + * + * ```js + * otherBounds.intersects([[10, 10], [40, 60]]); + * ``` + * + * Note that `Bounds` does not inherit from Leafet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + +function Bounds(a, b) { + if (!a) { return; } + + var points = b ? [a, b] : a; + + for (var i = 0, len = points.length; i < len; i++) { + this.extend(points[i]); + } +} + +Bounds.prototype = { + // @method extend(point: Point): this + // Extends the bounds to contain the given point. + extend: function (point) { // (Point) + point = toPoint(point); + + // @property min: Point + // The top left corner of the rectangle. + // @property max: Point + // The bottom right corner of the rectangle. + if (!this.min && !this.max) { + this.min = point.clone(); + this.max = point.clone(); + } else { + this.min.x = Math.min(point.x, this.min.x); + this.max.x = Math.max(point.x, this.max.x); + this.min.y = Math.min(point.y, this.min.y); + this.max.y = Math.max(point.y, this.max.y); + } + return this; + }, + + // @method getCenter(round?: Boolean): Point + // Returns the center point of the bounds. + getCenter: function (round) { + return new Point( + (this.min.x + this.max.x) / 2, + (this.min.y + this.max.y) / 2, round); + }, + + // @method getBottomLeft(): Point + // Returns the bottom-left point of the bounds. + getBottomLeft: function () { + return new Point(this.min.x, this.max.y); + }, + + // @method getTopRight(): Point + // Returns the top-right point of the bounds. + getTopRight: function () { // -> Point + return new Point(this.max.x, this.min.y); + }, + + // @method getTopLeft(): Point + // Returns the top-left point of the bounds (i.e. [`this.min`](#bounds-min)). + getTopLeft: function () { + return this.min; // left, top + }, + + // @method getBottomRight(): Point + // Returns the bottom-right point of the bounds (i.e. [`this.max`](#bounds-max)). + getBottomRight: function () { + return this.max; // right, bottom + }, + + // @method getSize(): Point + // Returns the size of the given bounds + getSize: function () { + return this.max.subtract(this.min); + }, + + // @method contains(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle contains the given one. + // @alternative + // @method contains(point: Point): Boolean + // Returns `true` if the rectangle contains the given point. + contains: function (obj) { + var min, max; + + if (typeof obj[0] === 'number' || obj instanceof Point) { + obj = toPoint(obj); + } else { + obj = toBounds(obj); + } + + if (obj instanceof Bounds) { + min = obj.min; + max = obj.max; + } else { + min = max = obj; + } + + return (min.x >= this.min.x) && + (max.x <= this.max.x) && + (min.y >= this.min.y) && + (max.y <= this.max.y); + }, + + // @method intersects(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle intersects the given bounds. Two bounds + // intersect if they have at least one point in common. + intersects: function (bounds) { // (Bounds) -> Boolean + bounds = toBounds(bounds); + + var min = this.min, + max = this.max, + min2 = bounds.min, + max2 = bounds.max, + xIntersects = (max2.x >= min.x) && (min2.x <= max.x), + yIntersects = (max2.y >= min.y) && (min2.y <= max.y); + + return xIntersects && yIntersects; + }, + + // @method overlaps(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle overlaps the given bounds. Two bounds + // overlap if their intersection is an area. + overlaps: function (bounds) { // (Bounds) -> Boolean + bounds = toBounds(bounds); + + var min = this.min, + max = this.max, + min2 = bounds.min, + max2 = bounds.max, + xOverlaps = (max2.x > min.x) && (min2.x < max.x), + yOverlaps = (max2.y > min.y) && (min2.y < max.y); + + return xOverlaps && yOverlaps; + }, + + isValid: function () { + return !!(this.min && this.max); + } +}; + + +// @factory L.bounds(corner1: Point, corner2: Point) +// Creates a Bounds object from two corners coordinate pairs. +// @alternative +// @factory L.bounds(points: Point[]) +// Creates a Bounds object from the given array of points. +function toBounds(a, b) { + if (!a || a instanceof Bounds) { + return a; + } + return new Bounds(a, b); +} + +/* + * @class LatLngBounds + * @aka L.LatLngBounds + * + * Represents a rectangular geographical area on a map. + * + * @example + * + * ```js + * var corner1 = L.latLng(40.712, -74.227), + * corner2 = L.latLng(40.774, -74.125), + * bounds = L.latLngBounds(corner1, corner2); + * ``` + * + * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this: + * + * ```js + * map.fitBounds([ + * [40.712, -74.227], + * [40.774, -74.125] + * ]); + * ``` + * + * Caution: if the area crosses the antimeridian (often confused with the International Date Line), you must specify corners _outside_ the [-180, 180] degrees longitude range. + * + * Note that `LatLngBounds` does not inherit from Leafet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + +function LatLngBounds(corner1, corner2) { // (LatLng, LatLng) or (LatLng[]) + if (!corner1) { return; } + + var latlngs = corner2 ? [corner1, corner2] : corner1; + + for (var i = 0, len = latlngs.length; i < len; i++) { + this.extend(latlngs[i]); + } +} + +LatLngBounds.prototype = { + + // @method extend(latlng: LatLng): this + // Extend the bounds to contain the given point + + // @alternative + // @method extend(otherBounds: LatLngBounds): this + // Extend the bounds to contain the given bounds + extend: function (obj) { + var sw = this._southWest, + ne = this._northEast, + sw2, ne2; + + if (obj instanceof LatLng) { + sw2 = obj; + ne2 = obj; + + } else if (obj instanceof LatLngBounds) { + sw2 = obj._southWest; + ne2 = obj._northEast; + + if (!sw2 || !ne2) { return this; } + + } else { + return obj ? this.extend(toLatLng(obj) || toLatLngBounds(obj)) : this; + } + + if (!sw && !ne) { + this._southWest = new LatLng(sw2.lat, sw2.lng); + this._northEast = new LatLng(ne2.lat, ne2.lng); + } else { + sw.lat = Math.min(sw2.lat, sw.lat); + sw.lng = Math.min(sw2.lng, sw.lng); + ne.lat = Math.max(ne2.lat, ne.lat); + ne.lng = Math.max(ne2.lng, ne.lng); + } + + return this; + }, + + // @method pad(bufferRatio: Number): LatLngBounds + // Returns bounds created by extending or retracting the current bounds by a given ratio in each direction. + // For example, a ratio of 0.5 extends the bounds by 50% in each direction. + // Negative values will retract the bounds. + pad: function (bufferRatio) { + var sw = this._southWest, + ne = this._northEast, + heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio, + widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio; + + return new LatLngBounds( + new LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer), + new LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer)); + }, + + // @method getCenter(): LatLng + // Returns the center point of the bounds. + getCenter: function () { + return new LatLng( + (this._southWest.lat + this._northEast.lat) / 2, + (this._southWest.lng + this._northEast.lng) / 2); + }, + + // @method getSouthWest(): LatLng + // Returns the south-west point of the bounds. + getSouthWest: function () { + return this._southWest; + }, + + // @method getNorthEast(): LatLng + // Returns the north-east point of the bounds. + getNorthEast: function () { + return this._northEast; + }, + + // @method getNorthWest(): LatLng + // Returns the north-west point of the bounds. + getNorthWest: function () { + return new LatLng(this.getNorth(), this.getWest()); + }, + + // @method getSouthEast(): LatLng + // Returns the south-east point of the bounds. + getSouthEast: function () { + return new LatLng(this.getSouth(), this.getEast()); + }, + + // @method getWest(): Number + // Returns the west longitude of the bounds + getWest: function () { + return this._southWest.lng; + }, + + // @method getSouth(): Number + // Returns the south latitude of the bounds + getSouth: function () { + return this._southWest.lat; + }, + + // @method getEast(): Number + // Returns the east longitude of the bounds + getEast: function () { + return this._northEast.lng; + }, + + // @method getNorth(): Number + // Returns the north latitude of the bounds + getNorth: function () { + return this._northEast.lat; + }, + + // @method contains(otherBounds: LatLngBounds): Boolean + // Returns `true` if the rectangle contains the given one. + + // @alternative + // @method contains (latlng: LatLng): Boolean + // Returns `true` if the rectangle contains the given point. + contains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean + if (typeof obj[0] === 'number' || obj instanceof LatLng || 'lat' in obj) { + obj = toLatLng(obj); + } else { + obj = toLatLngBounds(obj); + } + + var sw = this._southWest, + ne = this._northEast, + sw2, ne2; + + if (obj instanceof LatLngBounds) { + sw2 = obj.getSouthWest(); + ne2 = obj.getNorthEast(); + } else { + sw2 = ne2 = obj; + } + + return (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) && + (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng); + }, + + // @method intersects(otherBounds: LatLngBounds): Boolean + // Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common. + intersects: function (bounds) { + bounds = toLatLngBounds(bounds); + + var sw = this._southWest, + ne = this._northEast, + sw2 = bounds.getSouthWest(), + ne2 = bounds.getNorthEast(), + + latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat), + lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng); + + return latIntersects && lngIntersects; + }, + + // @method overlaps(otherBounds: Bounds): Boolean + // Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area. + overlaps: function (bounds) { + bounds = toLatLngBounds(bounds); + + var sw = this._southWest, + ne = this._northEast, + sw2 = bounds.getSouthWest(), + ne2 = bounds.getNorthEast(), + + latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat), + lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng); + + return latOverlaps && lngOverlaps; + }, + + // @method toBBoxString(): String + // Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data. + toBBoxString: function () { + return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(','); + }, + + // @method equals(otherBounds: LatLngBounds, maxMargin?: Number): Boolean + // Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds. The margin of error can be overridden by setting `maxMargin` to a small number. + equals: function (bounds, maxMargin) { + if (!bounds) { return false; } + + bounds = toLatLngBounds(bounds); + + return this._southWest.equals(bounds.getSouthWest(), maxMargin) && + this._northEast.equals(bounds.getNorthEast(), maxMargin); + }, + + // @method isValid(): Boolean + // Returns `true` if the bounds are properly initialized. + isValid: function () { + return !!(this._southWest && this._northEast); + } +}; + +// TODO International date line? + +// @factory L.latLngBounds(corner1: LatLng, corner2: LatLng) +// Creates a `LatLngBounds` object by defining two diagonally opposite corners of the rectangle. + +// @alternative +// @factory L.latLngBounds(latlngs: LatLng[]) +// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds). +function toLatLngBounds(a, b) { + if (a instanceof LatLngBounds) { + return a; + } + return new LatLngBounds(a, b); +} + +/* @class LatLng + * @aka L.LatLng + * + * Represents a geographical point with a certain latitude and longitude. + * + * @example + * + * ``` + * var latlng = L.latLng(50.5, 30.5); + * ``` + * + * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent: + * + * ``` + * map.panTo([50, 30]); + * map.panTo({lon: 30, lat: 50}); + * map.panTo({lat: 50, lng: 30}); + * map.panTo(L.latLng(50, 30)); + * ``` + * + * Note that `LatLng` does not inherit from Leafet's `Class` object, + * which means new classes can't inherit from it, and new methods + * can't be added to it with the `include` function. + */ + +function LatLng(lat, lng, alt) { + if (isNaN(lat) || isNaN(lng)) { + throw new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')'); + } + + // @property lat: Number + // Latitude in degrees + this.lat = +lat; + + // @property lng: Number + // Longitude in degrees + this.lng = +lng; + + // @property alt: Number + // Altitude in meters (optional) + if (alt !== undefined) { + this.alt = +alt; + } +} + +LatLng.prototype = { + // @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean + // Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overridden by setting `maxMargin` to a small number. + equals: function (obj, maxMargin) { + if (!obj) { return false; } + + obj = toLatLng(obj); + + var margin = Math.max( + Math.abs(this.lat - obj.lat), + Math.abs(this.lng - obj.lng)); + + return margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin); + }, + + // @method toString(): String + // Returns a string representation of the point (for debugging purposes). + toString: function (precision) { + return 'LatLng(' + + formatNum(this.lat, precision) + ', ' + + formatNum(this.lng, precision) + ')'; + }, + + // @method distanceTo(otherLatLng: LatLng): Number + // Returns the distance (in meters) to the given `LatLng` calculated using the [Spherical Law of Cosines](https://en.wikipedia.org/wiki/Spherical_law_of_cosines). + distanceTo: function (other) { + return Earth.distance(this, toLatLng(other)); + }, + + // @method wrap(): LatLng + // Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees. + wrap: function () { + return Earth.wrapLatLng(this); + }, + + // @method toBounds(sizeInMeters: Number): LatLngBounds + // Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters/2` meters apart from the `LatLng`. + toBounds: function (sizeInMeters) { + var latAccuracy = 180 * sizeInMeters / 40075017, + lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat); + + return toLatLngBounds( + [this.lat - latAccuracy, this.lng - lngAccuracy], + [this.lat + latAccuracy, this.lng + lngAccuracy]); + }, + + clone: function () { + return new LatLng(this.lat, this.lng, this.alt); + } +}; + + + +// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng +// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude). + +// @alternative +// @factory L.latLng(coords: Array): LatLng +// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead. + +// @alternative +// @factory L.latLng(coords: Object): LatLng +// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead. + +function toLatLng(a, b, c) { + if (a instanceof LatLng) { + return a; + } + if (isArray(a) && typeof a[0] !== 'object') { + if (a.length === 3) { + return new LatLng(a[0], a[1], a[2]); + } + if (a.length === 2) { + return new LatLng(a[0], a[1]); + } + return null; + } + if (a === undefined || a === null) { + return a; + } + if (typeof a === 'object' && 'lat' in a) { + return new LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt); + } + if (b === undefined) { + return null; + } + return new LatLng(a, b, c); +} + +/* + * @namespace CRS + * @crs L.CRS.Base + * Object that defines coordinate reference systems for projecting + * geographical points into pixel (screen) coordinates and back (and to + * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See + * [spatial reference system](http://en.wikipedia.org/wiki/Coordinate_reference_system). + * + * Leaflet defines the most usual CRSs by default. If you want to use a + * CRS not defined by default, take a look at the + * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin. + * + * Note that the CRS instances do not inherit from Leafet's `Class` object, + * and can't be instantiated. Also, new classes can't inherit from them, + * and methods can't be added to them with the `include` function. + */ + +var CRS = { + // @method latLngToPoint(latlng: LatLng, zoom: Number): Point + // Projects geographical coordinates into pixel coordinates for a given zoom. + latLngToPoint: function (latlng, zoom) { + var projectedPoint = this.projection.project(latlng), + scale = this.scale(zoom); + + return this.transformation._transform(projectedPoint, scale); + }, + + // @method pointToLatLng(point: Point, zoom: Number): LatLng + // The inverse of `latLngToPoint`. Projects pixel coordinates on a given + // zoom into geographical coordinates. + pointToLatLng: function (point, zoom) { + var scale = this.scale(zoom), + untransformedPoint = this.transformation.untransform(point, scale); + + return this.projection.unproject(untransformedPoint); + }, + + // @method project(latlng: LatLng): Point + // Projects geographical coordinates into coordinates in units accepted for + // this CRS (e.g. meters for EPSG:3857, for passing it to WMS services). + project: function (latlng) { + return this.projection.project(latlng); + }, + + // @method unproject(point: Point): LatLng + // Given a projected coordinate returns the corresponding LatLng. + // The inverse of `project`. + unproject: function (point) { + return this.projection.unproject(point); + }, + + // @method scale(zoom: Number): Number + // Returns the scale used when transforming projected coordinates into + // pixel coordinates for a particular zoom. For example, it returns + // `256 * 2^zoom` for Mercator-based CRS. + scale: function (zoom) { + return 256 * Math.pow(2, zoom); + }, + + // @method zoom(scale: Number): Number + // Inverse of `scale()`, returns the zoom level corresponding to a scale + // factor of `scale`. + zoom: function (scale) { + return Math.log(scale / 256) / Math.LN2; + }, + + // @method getProjectedBounds(zoom: Number): Bounds + // Returns the projection's bounds scaled and transformed for the provided `zoom`. + getProjectedBounds: function (zoom) { + if (this.infinite) { return null; } + + var b = this.projection.bounds, + s = this.scale(zoom), + min = this.transformation.transform(b.min, s), + max = this.transformation.transform(b.max, s); + + return new Bounds(min, max); + }, + + // @method distance(latlng1: LatLng, latlng2: LatLng): Number + // Returns the distance between two geographical coordinates. + + // @property code: String + // Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`) + // + // @property wrapLng: Number[] + // An array of two numbers defining whether the longitude (horizontal) coordinate + // axis wraps around a given range and how. Defaults to `[-180, 180]` in most + // geographical CRSs. If `undefined`, the longitude axis does not wrap around. + // + // @property wrapLat: Number[] + // Like `wrapLng`, but for the latitude (vertical) axis. + + // wrapLng: [min, max], + // wrapLat: [min, max], + + // @property infinite: Boolean + // If true, the coordinate space will be unbounded (infinite in both axes) + infinite: false, + + // @method wrapLatLng(latlng: LatLng): LatLng + // Returns a `LatLng` where lat and lng has been wrapped according to the + // CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds. + wrapLatLng: function (latlng) { + var lng = this.wrapLng ? wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng, + lat = this.wrapLat ? wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat, + alt = latlng.alt; + + return new LatLng(lat, lng, alt); + }, + + // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds + // Returns a `LatLngBounds` with the same size as the given one, ensuring + // that its center is within the CRS's bounds. + // Only accepts actual `L.LatLngBounds` instances, not arrays. + wrapLatLngBounds: function (bounds) { + var center = bounds.getCenter(), + newCenter = this.wrapLatLng(center), + latShift = center.lat - newCenter.lat, + lngShift = center.lng - newCenter.lng; + + if (latShift === 0 && lngShift === 0) { + return bounds; + } + + var sw = bounds.getSouthWest(), + ne = bounds.getNorthEast(), + newSw = new LatLng(sw.lat - latShift, sw.lng - lngShift), + newNe = new LatLng(ne.lat - latShift, ne.lng - lngShift); + + return new LatLngBounds(newSw, newNe); + } +}; + +/* + * @namespace CRS + * @crs L.CRS.Earth + * + * Serves as the base for CRS that are global such that they cover the earth. + * Can only be used as the base for other CRS and cannot be used directly, + * since it does not have a `code`, `projection` or `transformation`. `distance()` returns + * meters. + */ + +var Earth = extend({}, CRS, { + wrapLng: [-180, 180], + + // Mean Earth Radius, as recommended for use by + // the International Union of Geodesy and Geophysics, + // see http://rosettacode.org/wiki/Haversine_formula + R: 6371000, + + // distance between two geographical points using spherical law of cosines approximation + distance: function (latlng1, latlng2) { + var rad = Math.PI / 180, + lat1 = latlng1.lat * rad, + lat2 = latlng2.lat * rad, + sinDLat = Math.sin((latlng2.lat - latlng1.lat) * rad / 2), + sinDLon = Math.sin((latlng2.lng - latlng1.lng) * rad / 2), + a = sinDLat * sinDLat + Math.cos(lat1) * Math.cos(lat2) * sinDLon * sinDLon, + c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); + return this.R * c; + } +}); + +/* + * @namespace Projection + * @projection L.Projection.SphericalMercator + * + * Spherical Mercator projection — the most common projection for online maps, + * used by almost all free and commercial tile providers. Assumes that Earth is + * a sphere. Used by the `EPSG:3857` CRS. + */ + +var SphericalMercator = { + + R: 6378137, + MAX_LATITUDE: 85.0511287798, + + project: function (latlng) { + var d = Math.PI / 180, + max = this.MAX_LATITUDE, + lat = Math.max(Math.min(max, latlng.lat), -max), + sin = Math.sin(lat * d); + + return new Point( + this.R * latlng.lng * d, + this.R * Math.log((1 + sin) / (1 - sin)) / 2); + }, + + unproject: function (point) { + var d = 180 / Math.PI; + + return new LatLng( + (2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d, + point.x * d / this.R); + }, + + bounds: (function () { + var d = 6378137 * Math.PI; + return new Bounds([-d, -d], [d, d]); + })() +}; + +/* + * @class Transformation + * @aka L.Transformation + * + * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d` + * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing + * the reverse. Used by Leaflet in its projections code. + * + * @example + * + * ```js + * var transformation = L.transformation(2, 5, -1, 10), + * p = L.point(1, 2), + * p2 = transformation.transform(p), // L.point(7, 8) + * p3 = transformation.untransform(p2); // L.point(1, 2) + * ``` + */ + + +// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number) +// Creates a `Transformation` object with the given coefficients. +function Transformation(a, b, c, d) { + if (isArray(a)) { + // use array properties + this._a = a[0]; + this._b = a[1]; + this._c = a[2]; + this._d = a[3]; + return; + } + this._a = a; + this._b = b; + this._c = c; + this._d = d; +} + +Transformation.prototype = { + // @method transform(point: Point, scale?: Number): Point + // Returns a transformed point, optionally multiplied by the given scale. + // Only accepts actual `L.Point` instances, not arrays. + transform: function (point, scale) { // (Point, Number) -> Point + return this._transform(point.clone(), scale); + }, + + // destructive transform (faster) + _transform: function (point, scale) { + scale = scale || 1; + point.x = scale * (this._a * point.x + this._b); + point.y = scale * (this._c * point.y + this._d); + return point; + }, + + // @method untransform(point: Point, scale?: Number): Point + // Returns the reverse transformation of the given point, optionally divided + // by the given scale. Only accepts actual `L.Point` instances, not arrays. + untransform: function (point, scale) { + scale = scale || 1; + return new Point( + (point.x / scale - this._b) / this._a, + (point.y / scale - this._d) / this._c); + } +}; + +// factory L.transformation(a: Number, b: Number, c: Number, d: Number) + +// @factory L.transformation(a: Number, b: Number, c: Number, d: Number) +// Instantiates a Transformation object with the given coefficients. + +// @alternative +// @factory L.transformation(coefficients: Array): Transformation +// Expects an coefficients array of the form +// `[a: Number, b: Number, c: Number, d: Number]`. + +function toTransformation(a, b, c, d) { + return new Transformation(a, b, c, d); +} + +/* + * @namespace CRS + * @crs L.CRS.EPSG3857 + * + * The most common CRS for online maps, used by almost all free and commercial + * tile providers. Uses Spherical Mercator projection. Set in by default in + * Map's `crs` option. + */ + +var EPSG3857 = extend({}, Earth, { + code: 'EPSG:3857', + projection: SphericalMercator, + + transformation: (function () { + var scale = 0.5 / (Math.PI * SphericalMercator.R); + return toTransformation(scale, 0.5, -scale, 0.5); + }()) +}); + +var EPSG900913 = extend({}, EPSG3857, { + code: 'EPSG:900913' +}); + +// @namespace SVG; @section +// There are several static functions which can be called without instantiating L.SVG: + +// @function create(name: String): SVGElement +// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement), +// corresponding to the class name passed. For example, using 'line' will return +// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement). +function svgCreate(name) { + return document.createElementNS('http://www.w3.org/2000/svg', name); +} + +// @function pointsToPath(rings: Point[], closed: Boolean): String +// Generates a SVG path string for multiple rings, with each ring turning +// into "M..L..L.." instructions +function pointsToPath(rings, closed) { + var str = '', + i, j, len, len2, points, p; + + for (i = 0, len = rings.length; i < len; i++) { + points = rings[i]; + + for (j = 0, len2 = points.length; j < len2; j++) { + p = points[j]; + str += (j ? 'L' : 'M') + p.x + ' ' + p.y; + } + + // closes the ring for polygons; "x" is VML syntax + str += closed ? (svg ? 'z' : 'x') : ''; + } + + // SVG complains about empty path strings + return str || 'M0 0'; +} + +/* + * @namespace Browser + * @aka L.Browser + * + * A namespace with static properties for browser/feature detection used by Leaflet internally. + * + * @example + * + * ```js + * if (L.Browser.ielt9) { + * alert('Upgrade your browser, dude!'); + * } + * ``` + */ + +var style$1 = document.documentElement.style; + +// @property ie: Boolean; `true` for all Internet Explorer versions (not Edge). +var ie = 'ActiveXObject' in window; + +// @property ielt9: Boolean; `true` for Internet Explorer versions less than 9. +var ielt9 = ie && !document.addEventListener; + +// @property edge: Boolean; `true` for the Edge web browser. +var edge = 'msLaunchUri' in navigator && !('documentMode' in document); + +// @property webkit: Boolean; +// `true` for webkit-based browsers like Chrome and Safari (including mobile versions). +var webkit = userAgentContains('webkit'); + +// @property android: Boolean +// `true` for any browser running on an Android platform. +var android = userAgentContains('android'); + +// @property android23: Boolean; `true` for browsers running on Android 2 or Android 3. +var android23 = userAgentContains('android 2') || userAgentContains('android 3'); + +/* See https://stackoverflow.com/a/17961266 for details on detecting stock Android */ +var webkitVer = parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1], 10); // also matches AppleWebKit +// @property androidStock: Boolean; `true` for the Android stock browser (i.e. not Chrome) +var androidStock = android && userAgentContains('Google') && webkitVer < 537 && !('AudioNode' in window); + +// @property opera: Boolean; `true` for the Opera browser +var opera = !!window.opera; + +// @property chrome: Boolean; `true` for the Chrome browser. +var chrome = userAgentContains('chrome'); + +// @property gecko: Boolean; `true` for gecko-based browsers like Firefox. +var gecko = userAgentContains('gecko') && !webkit && !opera && !ie; + +// @property safari: Boolean; `true` for the Safari browser. +var safari = !chrome && userAgentContains('safari'); + +var phantom = userAgentContains('phantom'); + +// @property opera12: Boolean +// `true` for the Opera browser supporting CSS transforms (version 12 or later). +var opera12 = 'OTransition' in style$1; + +// @property win: Boolean; `true` when the browser is running in a Windows platform +var win = navigator.platform.indexOf('Win') === 0; + +// @property ie3d: Boolean; `true` for all Internet Explorer versions supporting CSS transforms. +var ie3d = ie && ('transition' in style$1); + +// @property webkit3d: Boolean; `true` for webkit-based browsers supporting CSS transforms. +var webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23; + +// @property gecko3d: Boolean; `true` for gecko-based browsers supporting CSS transforms. +var gecko3d = 'MozPerspective' in style$1; + +// @property any3d: Boolean +// `true` for all browsers supporting CSS transforms. +var any3d = !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantom; + +// @property mobile: Boolean; `true` for all browsers running in a mobile device. +var mobile = typeof orientation !== 'undefined' || userAgentContains('mobile'); + +// @property mobileWebkit: Boolean; `true` for all webkit-based browsers in a mobile device. +var mobileWebkit = mobile && webkit; + +// @property mobileWebkit3d: Boolean +// `true` for all webkit-based browsers in a mobile device supporting CSS transforms. +var mobileWebkit3d = mobile && webkit3d; + +// @property msPointer: Boolean +// `true` for browsers implementing the Microsoft touch events model (notably IE10). +var msPointer = !window.PointerEvent && window.MSPointerEvent; + +// @property pointer: Boolean +// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx). +var pointer = !!(window.PointerEvent || msPointer); + +// @property touch: Boolean +// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events). +// This does not necessarily mean that the browser is running in a computer with +// a touchscreen, it only means that the browser is capable of understanding +// touch events. +var touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window || + (window.DocumentTouch && document instanceof window.DocumentTouch)); + +// @property mobileOpera: Boolean; `true` for the Opera browser in a mobile device. +var mobileOpera = mobile && opera; + +// @property mobileGecko: Boolean +// `true` for gecko-based browsers running in a mobile device. +var mobileGecko = mobile && gecko; + +// @property retina: Boolean +// `true` for browsers on a high-resolution "retina" screen. +var retina = (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1; + + +// @property canvas: Boolean +// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API). +var canvas = (function () { + return !!document.createElement('canvas').getContext; +}()); + +// @property svg: Boolean +// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG). +var svg = !!(document.createElementNS && svgCreate('svg').createSVGRect); + +// @property vml: Boolean +// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language). +var vml = !svg && (function () { + try { + var div = document.createElement('div'); + div.innerHTML = '<v:shape adj="1"/>'; + + var shape = div.firstChild; + shape.style.behavior = 'url(#default#VML)'; + + return shape && (typeof shape.adj === 'object'); + + } catch (e) { + return false; + } +}()); + + +function userAgentContains(str) { + return navigator.userAgent.toLowerCase().indexOf(str) >= 0; +} + + +var Browser = (Object.freeze || Object)({ + ie: ie, + ielt9: ielt9, + edge: edge, + webkit: webkit, + android: android, + android23: android23, + androidStock: androidStock, + opera: opera, + chrome: chrome, + gecko: gecko, + safari: safari, + phantom: phantom, + opera12: opera12, + win: win, + ie3d: ie3d, + webkit3d: webkit3d, + gecko3d: gecko3d, + any3d: any3d, + mobile: mobile, + mobileWebkit: mobileWebkit, + mobileWebkit3d: mobileWebkit3d, + msPointer: msPointer, + pointer: pointer, + touch: touch, + mobileOpera: mobileOpera, + mobileGecko: mobileGecko, + retina: retina, + canvas: canvas, + svg: svg, + vml: vml +}); + +/* + * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices. + */ + + +var POINTER_DOWN = msPointer ? 'MSPointerDown' : 'pointerdown'; +var POINTER_MOVE = msPointer ? 'MSPointerMove' : 'pointermove'; +var POINTER_UP = msPointer ? 'MSPointerUp' : 'pointerup'; +var POINTER_CANCEL = msPointer ? 'MSPointerCancel' : 'pointercancel'; +var TAG_WHITE_LIST = ['INPUT', 'SELECT', 'OPTION']; + +var _pointers = {}; +var _pointerDocListener = false; + +// DomEvent.DoubleTap needs to know about this +var _pointersCount = 0; + +// Provides a touch events wrapper for (ms)pointer events. +// ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890 + +function addPointerListener(obj, type, handler, id) { + if (type === 'touchstart') { + _addPointerStart(obj, handler, id); + + } else if (type === 'touchmove') { + _addPointerMove(obj, handler, id); + + } else if (type === 'touchend') { + _addPointerEnd(obj, handler, id); + } + + return this; +} + +function removePointerListener(obj, type, id) { + var handler = obj['_leaflet_' + type + id]; + + if (type === 'touchstart') { + obj.removeEventListener(POINTER_DOWN, handler, false); + + } else if (type === 'touchmove') { + obj.removeEventListener(POINTER_MOVE, handler, false); + + } else if (type === 'touchend') { + obj.removeEventListener(POINTER_UP, handler, false); + obj.removeEventListener(POINTER_CANCEL, handler, false); + } + + return this; +} + +function _addPointerStart(obj, handler, id) { + var onDown = bind(function (e) { + if (e.pointerType !== 'mouse' && e.MSPOINTER_TYPE_MOUSE && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) { + // In IE11, some touch events needs to fire for form controls, or + // the controls will stop working. We keep a whitelist of tag names that + // need these events. For other target tags, we prevent default on the event. + if (TAG_WHITE_LIST.indexOf(e.target.tagName) < 0) { + preventDefault(e); + } else { + return; + } + } + + _handlePointer(e, handler); + }); + + obj['_leaflet_touchstart' + id] = onDown; + obj.addEventListener(POINTER_DOWN, onDown, false); + + // need to keep track of what pointers and how many are active to provide e.touches emulation + if (!_pointerDocListener) { + // we listen documentElement as any drags that end by moving the touch off the screen get fired there + document.documentElement.addEventListener(POINTER_DOWN, _globalPointerDown, true); + document.documentElement.addEventListener(POINTER_MOVE, _globalPointerMove, true); + document.documentElement.addEventListener(POINTER_UP, _globalPointerUp, true); + document.documentElement.addEventListener(POINTER_CANCEL, _globalPointerUp, true); + + _pointerDocListener = true; + } +} + +function _globalPointerDown(e) { + _pointers[e.pointerId] = e; + _pointersCount++; +} + +function _globalPointerMove(e) { + if (_pointers[e.pointerId]) { + _pointers[e.pointerId] = e; + } +} + +function _globalPointerUp(e) { + delete _pointers[e.pointerId]; + _pointersCount--; +} + +function _handlePointer(e, handler) { + e.touches = []; + for (var i in _pointers) { + e.touches.push(_pointers[i]); + } + e.changedTouches = [e]; + + handler(e); +} + +function _addPointerMove(obj, handler, id) { + var onMove = function (e) { + // don't fire touch moves when mouse isn't down + if ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; } + + _handlePointer(e, handler); + }; + + obj['_leaflet_touchmove' + id] = onMove; + obj.addEventListener(POINTER_MOVE, onMove, false); +} + +function _addPointerEnd(obj, handler, id) { + var onUp = function (e) { + _handlePointer(e, handler); + }; + + obj['_leaflet_touchend' + id] = onUp; + obj.addEventListener(POINTER_UP, onUp, false); + obj.addEventListener(POINTER_CANCEL, onUp, false); +} + +/* + * Extends the event handling code with double tap support for mobile browsers. + */ + +var _touchstart = msPointer ? 'MSPointerDown' : pointer ? 'pointerdown' : 'touchstart'; +var _touchend = msPointer ? 'MSPointerUp' : pointer ? 'pointerup' : 'touchend'; +var _pre = '_leaflet_'; + +// inspired by Zepto touch code by Thomas Fuchs +function addDoubleTapListener(obj, handler, id) { + var last, touch$$1, + doubleTap = false, + delay = 250; + + function onTouchStart(e) { + var count; + + if (pointer) { + if ((!edge) || e.pointerType === 'mouse') { return; } + count = _pointersCount; + } else { + count = e.touches.length; + } + + if (count > 1) { return; } + + var now = Date.now(), + delta = now - (last || now); + + touch$$1 = e.touches ? e.touches[0] : e; + doubleTap = (delta > 0 && delta <= delay); + last = now; + } + + function onTouchEnd(e) { + if (doubleTap && !touch$$1.cancelBubble) { + if (pointer) { + if ((!edge) || e.pointerType === 'mouse') { return; } + // work around .type being readonly with MSPointer* events + var newTouch = {}, + prop, i; + + for (i in touch$$1) { + prop = touch$$1[i]; + newTouch[i] = prop && prop.bind ? prop.bind(touch$$1) : prop; + } + touch$$1 = newTouch; + } + touch$$1.type = 'dblclick'; + handler(touch$$1); + last = null; + } + } + + obj[_pre + _touchstart + id] = onTouchStart; + obj[_pre + _touchend + id] = onTouchEnd; + obj[_pre + 'dblclick' + id] = handler; + + obj.addEventListener(_touchstart, onTouchStart, false); + obj.addEventListener(_touchend, onTouchEnd, false); + + // On some platforms (notably, chrome<55 on win10 + touchscreen + mouse), + // the browser doesn't fire touchend/pointerup events but does fire + // native dblclicks. See #4127. + // Edge 14 also fires native dblclicks, but only for pointerType mouse, see #5180. + obj.addEventListener('dblclick', handler, false); + + return this; +} + +function removeDoubleTapListener(obj, id) { + var touchstart = obj[_pre + _touchstart + id], + touchend = obj[_pre + _touchend + id], + dblclick = obj[_pre + 'dblclick' + id]; + + obj.removeEventListener(_touchstart, touchstart, false); + obj.removeEventListener(_touchend, touchend, false); + if (!edge) { + obj.removeEventListener('dblclick', dblclick, false); + } + + return this; +} + +/* + * @namespace DomEvent + * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally. + */ + +// Inspired by John Resig, Dean Edwards and YUI addEvent implementations. + +// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this +// Adds a listener function (`fn`) to a particular DOM event type of the +// element `el`. You can optionally specify the context of the listener +// (object the `this` keyword will point to). You can also pass several +// space-separated types (e.g. `'click dblclick'`). + +// @alternative +// @function on(el: HTMLElement, eventMap: Object, context?: Object): this +// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` +function on(obj, types, fn, context) { + + if (typeof types === 'object') { + for (var type in types) { + addOne(obj, type, types[type], fn); + } + } else { + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + addOne(obj, types[i], fn, context); + } + } + + return this; +} + +var eventsKey = '_leaflet_events'; + +// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this +// Removes a previously added listener function. +// Note that if you passed a custom context to on, you must pass the same +// context to `off` in order to remove the listener. + +// @alternative +// @function off(el: HTMLElement, eventMap: Object, context?: Object): this +// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}` +function off(obj, types, fn, context) { + + if (typeof types === 'object') { + for (var type in types) { + removeOne(obj, type, types[type], fn); + } + } else if (types) { + types = splitWords(types); + + for (var i = 0, len = types.length; i < len; i++) { + removeOne(obj, types[i], fn, context); + } + } else { + for (var j in obj[eventsKey]) { + removeOne(obj, j, obj[eventsKey][j]); + } + delete obj[eventsKey]; + } + + return this; +} + +function addOne(obj, type, fn, context) { + var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''); + + if (obj[eventsKey] && obj[eventsKey][id]) { return this; } + + var handler = function (e) { + return fn.call(context || obj, e || window.event); + }; + + var originalHandler = handler; + + if (pointer && type.indexOf('touch') === 0) { + // Needs DomEvent.Pointer.js + addPointerListener(obj, type, handler, id); + + } else if (touch && (type === 'dblclick') && addDoubleTapListener && + !(pointer && chrome)) { + // Chrome >55 does not need the synthetic dblclicks from addDoubleTapListener + // See #5180 + addDoubleTapListener(obj, handler, id); + + } else if ('addEventListener' in obj) { + + if (type === 'mousewheel') { + obj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false); + + } else if ((type === 'mouseenter') || (type === 'mouseleave')) { + handler = function (e) { + e = e || window.event; + if (isExternalTarget(obj, e)) { + originalHandler(e); + } + }; + obj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false); + + } else { + if (type === 'click' && android) { + handler = function (e) { + filterClick(e, originalHandler); + }; + } + obj.addEventListener(type, handler, false); + } + + } else if ('attachEvent' in obj) { + obj.attachEvent('on' + type, handler); + } + + obj[eventsKey] = obj[eventsKey] || {}; + obj[eventsKey][id] = handler; +} + +function removeOne(obj, type, fn, context) { + + var id = type + stamp(fn) + (context ? '_' + stamp(context) : ''), + handler = obj[eventsKey] && obj[eventsKey][id]; + + if (!handler) { return this; } + + if (pointer && type.indexOf('touch') === 0) { + removePointerListener(obj, type, id); + + } else if (touch && (type === 'dblclick') && removeDoubleTapListener && + !(pointer && chrome)) { + removeDoubleTapListener(obj, id); + + } else if ('removeEventListener' in obj) { + + if (type === 'mousewheel') { + obj.removeEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false); + + } else { + obj.removeEventListener( + type === 'mouseenter' ? 'mouseover' : + type === 'mouseleave' ? 'mouseout' : type, handler, false); + } + + } else if ('detachEvent' in obj) { + obj.detachEvent('on' + type, handler); + } + + obj[eventsKey][id] = null; +} + +// @function stopPropagation(ev: DOMEvent): this +// Stop the given event from propagation to parent elements. Used inside the listener functions: +// ```js +// L.DomEvent.on(div, 'click', function (ev) { +// L.DomEvent.stopPropagation(ev); +// }); +// ``` +function stopPropagation(e) { + + if (e.stopPropagation) { + e.stopPropagation(); + } else if (e.originalEvent) { // In case of Leaflet event. + e.originalEvent._stopped = true; + } else { + e.cancelBubble = true; + } + skipped(e); + + return this; +} + +// @function disableScrollPropagation(el: HTMLElement): this +// Adds `stopPropagation` to the element's `'mousewheel'` events (plus browser variants). +function disableScrollPropagation(el) { + addOne(el, 'mousewheel', stopPropagation); + return this; +} + +// @function disableClickPropagation(el: HTMLElement): this +// Adds `stopPropagation` to the element's `'click'`, `'doubleclick'`, +// `'mousedown'` and `'touchstart'` events (plus browser variants). +function disableClickPropagation(el) { + on(el, 'mousedown touchstart dblclick', stopPropagation); + addOne(el, 'click', fakeStop); + return this; +} + +// @function preventDefault(ev: DOMEvent): this +// Prevents the default action of the DOM Event `ev` from happening (such as +// following a link in the href of the a element, or doing a POST request +// with page reload when a `<form>` is submitted). +// Use it inside listener functions. +function preventDefault(e) { + if (e.preventDefault) { + e.preventDefault(); + } else { + e.returnValue = false; + } + return this; +} + +// @function stop(ev: DOMEvent): this +// Does `stopPropagation` and `preventDefault` at the same time. +function stop(e) { + preventDefault(e); + stopPropagation(e); + return this; +} + +// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point +// Gets normalized mouse position from a DOM event relative to the +// `container` or to the whole page if not specified. +function getMousePosition(e, container) { + if (!container) { + return new Point(e.clientX, e.clientY); + } + + var rect = container.getBoundingClientRect(); + + var scaleX = rect.width / container.offsetWidth || 1; + var scaleY = rect.height / container.offsetHeight || 1; + return new Point( + e.clientX / scaleX - rect.left - container.clientLeft, + e.clientY / scaleY - rect.top - container.clientTop); +} + +// Chrome on Win scrolls double the pixels as in other platforms (see #4538), +// and Firefox scrolls device pixels, not CSS pixels +var wheelPxFactor = + (win && chrome) ? 2 * window.devicePixelRatio : + gecko ? window.devicePixelRatio : 1; + +// @function getWheelDelta(ev: DOMEvent): Number +// Gets normalized wheel delta from a mousewheel DOM event, in vertical +// pixels scrolled (negative if scrolling down). +// Events from pointing devices without precise scrolling are mapped to +// a best guess of 60 pixels. +function getWheelDelta(e) { + return (edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta + (e.deltaY && e.deltaMode === 0) ? -e.deltaY / wheelPxFactor : // Pixels + (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines + (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages + (e.deltaX || e.deltaZ) ? 0 : // Skip horizontal/depth wheel events + e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels + (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines + e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages + 0; +} + +var skipEvents = {}; + +function fakeStop(e) { + // fakes stopPropagation by setting a special event flag, checked/reset with skipped(e) + skipEvents[e.type] = true; +} + +function skipped(e) { + var events = skipEvents[e.type]; + // reset when checking, as it's only used in map container and propagates outside of the map + skipEvents[e.type] = false; + return events; +} + +// check if element really left/entered the event target (for mouseenter/mouseleave) +function isExternalTarget(el, e) { + + var related = e.relatedTarget; + + if (!related) { return true; } + + try { + while (related && (related !== el)) { + related = related.parentNode; + } + } catch (err) { + return false; + } + return (related !== el); +} + +var lastClick; + +// this is a horrible workaround for a bug in Android where a single touch triggers two click events +function filterClick(e, handler) { + var timeStamp = (e.timeStamp || (e.originalEvent && e.originalEvent.timeStamp)), + elapsed = lastClick && (timeStamp - lastClick); + + // are they closer together than 500ms yet more than 100ms? + // Android typically triggers them ~300ms apart while multiple listeners + // on the same event should be triggered far faster; + // or check if click is simulated on the element, and if it is, reject any non-simulated events + + if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) { + stop(e); + return; + } + lastClick = timeStamp; + + handler(e); +} + + + + +var DomEvent = (Object.freeze || Object)({ + on: on, + off: off, + stopPropagation: stopPropagation, + disableScrollPropagation: disableScrollPropagation, + disableClickPropagation: disableClickPropagation, + preventDefault: preventDefault, + stop: stop, + getMousePosition: getMousePosition, + getWheelDelta: getWheelDelta, + fakeStop: fakeStop, + skipped: skipped, + isExternalTarget: isExternalTarget, + addListener: on, + removeListener: off +}); + +/* + * @namespace DomUtil + * + * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model) + * tree, used by Leaflet internally. + * + * Most functions expecting or returning a `HTMLElement` also work for + * SVG elements. The only difference is that classes refer to CSS classes + * in HTML and SVG classes in SVG. + */ + + +// @property TRANSFORM: String +// Vendor-prefixed transform style name (e.g. `'webkitTransform'` for WebKit). +var TRANSFORM = testProp( + ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']); + +// webkitTransition comes first because some browser versions that drop vendor prefix don't do +// the same for the transitionend event, in particular the Android 4.1 stock browser + +// @property TRANSITION: String +// Vendor-prefixed transition style name. +var TRANSITION = testProp( + ['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']); + +// @property TRANSITION_END: String +// Vendor-prefixed transitionend event name. +var TRANSITION_END = + TRANSITION === 'webkitTransition' || TRANSITION === 'OTransition' ? TRANSITION + 'End' : 'transitionend'; + + +// @function get(id: String|HTMLElement): HTMLElement +// Returns an element given its DOM id, or returns the element itself +// if it was passed directly. +function get(id) { + return typeof id === 'string' ? document.getElementById(id) : id; +} + +// @function getStyle(el: HTMLElement, styleAttrib: String): String +// Returns the value for a certain style attribute on an element, +// including computed values or values set through CSS. +function getStyle(el, style) { + var value = el.style[style] || (el.currentStyle && el.currentStyle[style]); + + if ((!value || value === 'auto') && document.defaultView) { + var css = document.defaultView.getComputedStyle(el, null); + value = css ? css[style] : null; + } + return value === 'auto' ? null : value; +} + +// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement +// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element. +function create$1(tagName, className, container) { + var el = document.createElement(tagName); + el.className = className || ''; + + if (container) { + container.appendChild(el); + } + return el; +} + +// @function remove(el: HTMLElement) +// Removes `el` from its parent element +function remove(el) { + var parent = el.parentNode; + if (parent) { + parent.removeChild(el); + } +} + +// @function empty(el: HTMLElement) +// Removes all of `el`'s children elements from `el` +function empty(el) { + while (el.firstChild) { + el.removeChild(el.firstChild); + } +} + +// @function toFront(el: HTMLElement) +// Makes `el` the last child of its parent, so it renders in front of the other children. +function toFront(el) { + var parent = el.parentNode; + if (parent.lastChild !== el) { + parent.appendChild(el); + } +} + +// @function toBack(el: HTMLElement) +// Makes `el` the first child of its parent, so it renders behind the other children. +function toBack(el) { + var parent = el.parentNode; + if (parent.firstChild !== el) { + parent.insertBefore(el, parent.firstChild); + } +} + +// @function hasClass(el: HTMLElement, name: String): Boolean +// Returns `true` if the element's class attribute contains `name`. +function hasClass(el, name) { + if (el.classList !== undefined) { + return el.classList.contains(name); + } + var className = getClass(el); + return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className); +} + +// @function addClass(el: HTMLElement, name: String) +// Adds `name` to the element's class attribute. +function addClass(el, name) { + if (el.classList !== undefined) { + var classes = splitWords(name); + for (var i = 0, len = classes.length; i < len; i++) { + el.classList.add(classes[i]); + } + } else if (!hasClass(el, name)) { + var className = getClass(el); + setClass(el, (className ? className + ' ' : '') + name); + } +} + +// @function removeClass(el: HTMLElement, name: String) +// Removes `name` from the element's class attribute. +function removeClass(el, name) { + if (el.classList !== undefined) { + el.classList.remove(name); + } else { + setClass(el, trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' '))); + } +} + +// @function setClass(el: HTMLElement, name: String) +// Sets the element's class. +function setClass(el, name) { + if (el.className.baseVal === undefined) { + el.className = name; + } else { + // in case of SVG element + el.className.baseVal = name; + } +} + +// @function getClass(el: HTMLElement): String +// Returns the element's class. +function getClass(el) { + return el.className.baseVal === undefined ? el.className : el.className.baseVal; +} + +// @function setOpacity(el: HTMLElement, opacity: Number) +// Set the opacity of an element (including old IE support). +// `opacity` must be a number from `0` to `1`. +function setOpacity(el, value) { + if ('opacity' in el.style) { + el.style.opacity = value; + } else if ('filter' in el.style) { + _setOpacityIE(el, value); + } +} + +function _setOpacityIE(el, value) { + var filter = false, + filterName = 'DXImageTransform.Microsoft.Alpha'; + + // filters collection throws an error if we try to retrieve a filter that doesn't exist + try { + filter = el.filters.item(filterName); + } catch (e) { + // don't set opacity to 1 if we haven't already set an opacity, + // it isn't needed and breaks transparent pngs. + if (value === 1) { return; } + } + + value = Math.round(value * 100); + + if (filter) { + filter.Enabled = (value !== 100); + filter.Opacity = value; + } else { + el.style.filter += ' progid:' + filterName + '(opacity=' + value + ')'; + } +} + +// @function testProp(props: String[]): String|false +// Goes through the array of style names and returns the first name +// that is a valid style name for an element. If no such name is found, +// it returns false. Useful for vendor-prefixed styles like `transform`. +function testProp(props) { + var style = document.documentElement.style; + + for (var i = 0; i < props.length; i++) { + if (props[i] in style) { + return props[i]; + } + } + return false; +} + +// @function setTransform(el: HTMLElement, offset: Point, scale?: Number) +// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels +// and optionally scaled by `scale`. Does not have an effect if the +// browser doesn't support 3D CSS transforms. +function setTransform(el, offset, scale) { + var pos = offset || new Point(0, 0); + + el.style[TRANSFORM] = + (ie3d ? + 'translate(' + pos.x + 'px,' + pos.y + 'px)' : + 'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') + + (scale ? ' scale(' + scale + ')' : ''); +} + +// @function setPosition(el: HTMLElement, position: Point) +// Sets the position of `el` to coordinates specified by `position`, +// using CSS translate or top/left positioning depending on the browser +// (used by Leaflet internally to position its layers). +function setPosition(el, point) { + + /*eslint-disable */ + el._leaflet_pos = point; + /* eslint-enable */ + + if (any3d) { + setTransform(el, point); + } else { + el.style.left = point.x + 'px'; + el.style.top = point.y + 'px'; + } +} + +// @function getPosition(el: HTMLElement): Point +// Returns the coordinates of an element previously positioned with setPosition. +function getPosition(el) { + // this method is only used for elements previously positioned using setPosition, + // so it's safe to cache the position for performance + + return el._leaflet_pos || new Point(0, 0); +} + +// @function disableTextSelection() +// Prevents the user from generating `selectstart` DOM events, usually generated +// when the user drags the mouse through a page with text. Used internally +// by Leaflet to override the behaviour of any click-and-drag interaction on +// the map. Affects drag interactions on the whole document. + +// @function enableTextSelection() +// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection). +var disableTextSelection; +var enableTextSelection; +var _userSelect; +if ('onselectstart' in document) { + disableTextSelection = function () { + on(window, 'selectstart', preventDefault); + }; + enableTextSelection = function () { + off(window, 'selectstart', preventDefault); + }; +} else { + var userSelectProperty = testProp( + ['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']); + + disableTextSelection = function () { + if (userSelectProperty) { + var style = document.documentElement.style; + _userSelect = style[userSelectProperty]; + style[userSelectProperty] = 'none'; + } + }; + enableTextSelection = function () { + if (userSelectProperty) { + document.documentElement.style[userSelectProperty] = _userSelect; + _userSelect = undefined; + } + }; +} + +// @function disableImageDrag() +// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but +// for `dragstart` DOM events, usually generated when the user drags an image. +function disableImageDrag() { + on(window, 'dragstart', preventDefault); +} + +// @function enableImageDrag() +// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection). +function enableImageDrag() { + off(window, 'dragstart', preventDefault); +} + +var _outlineElement; +var _outlineStyle; +// @function preventOutline(el: HTMLElement) +// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline) +// of the element `el` invisible. Used internally by Leaflet to prevent +// focusable elements from displaying an outline when the user performs a +// drag interaction on them. +function preventOutline(element) { + while (element.tabIndex === -1) { + element = element.parentNode; + } + if (!element.style) { return; } + restoreOutline(); + _outlineElement = element; + _outlineStyle = element.style.outline; + element.style.outline = 'none'; + on(window, 'keydown', restoreOutline); +} + +// @function restoreOutline() +// Cancels the effects of a previous [`L.DomUtil.preventOutline`](). +function restoreOutline() { + if (!_outlineElement) { return; } + _outlineElement.style.outline = _outlineStyle; + _outlineElement = undefined; + _outlineStyle = undefined; + off(window, 'keydown', restoreOutline); +} + + +var DomUtil = (Object.freeze || Object)({ + TRANSFORM: TRANSFORM, + TRANSITION: TRANSITION, + TRANSITION_END: TRANSITION_END, + get: get, + getStyle: getStyle, + create: create$1, + remove: remove, + empty: empty, + toFront: toFront, + toBack: toBack, + hasClass: hasClass, + addClass: addClass, + removeClass: removeClass, + setClass: setClass, + getClass: getClass, + setOpacity: setOpacity, + testProp: testProp, + setTransform: setTransform, + setPosition: setPosition, + getPosition: getPosition, + disableTextSelection: disableTextSelection, + enableTextSelection: enableTextSelection, + disableImageDrag: disableImageDrag, + enableImageDrag: enableImageDrag, + preventOutline: preventOutline, + restoreOutline: restoreOutline +}); + +/* + * @class PosAnimation + * @aka L.PosAnimation + * @inherits Evented + * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9. + * + * @example + * ```js + * var fx = new L.PosAnimation(); + * fx.run(el, [300, 500], 0.5); + * ``` + * + * @constructor L.PosAnimation() + * Creates a `PosAnimation` object. + * + */ + +var PosAnimation = Evented.extend({ + + // @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number) + // Run an animation of a given element to a new position, optionally setting + // duration in seconds (`0.25` by default) and easing linearity factor (3rd + // argument of the [cubic bezier curve](http://cubic-bezier.com/#0,0,.5,1), + // `0.5` by default). + run: function (el, newPos, duration, easeLinearity) { + this.stop(); + + this._el = el; + this._inProgress = true; + this._duration = duration || 0.25; + this._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2); + + this._startPos = getPosition(el); + this._offset = newPos.subtract(this._startPos); + this._startTime = +new Date(); + + // @event start: Event + // Fired when the animation starts + this.fire('start'); + + this._animate(); + }, + + // @method stop() + // Stops the animation (if currently running). + stop: function () { + if (!this._inProgress) { return; } + + this._step(true); + this._complete(); + }, + + _animate: function () { + // animation loop + this._animId = requestAnimFrame(this._animate, this); + this._step(); + }, + + _step: function (round) { + var elapsed = (+new Date()) - this._startTime, + duration = this._duration * 1000; + + if (elapsed < duration) { + this._runFrame(this._easeOut(elapsed / duration), round); + } else { + this._runFrame(1); + this._complete(); + } + }, + + _runFrame: function (progress, round) { + var pos = this._startPos.add(this._offset.multiplyBy(progress)); + if (round) { + pos._round(); + } + setPosition(this._el, pos); + + // @event step: Event + // Fired continuously during the animation. + this.fire('step'); + }, + + _complete: function () { + cancelAnimFrame(this._animId); + + this._inProgress = false; + // @event end: Event + // Fired when the animation ends. + this.fire('end'); + }, + + _easeOut: function (t) { + return 1 - Math.pow(1 - t, this._easeOutPower); + } +}); + +/* + * @class Map + * @aka L.Map + * @inherits Evented + * + * The central class of the API — it is used to create a map on a page and manipulate it. + * + * @example + * + * ```js + * // initialize the map on the "map" div with a given center and zoom + * var map = L.map('map', { + * center: [51.505, -0.09], + * zoom: 13 + * }); + * ``` + * + */ + +var Map = Evented.extend({ + + options: { + // @section Map State Options + // @option crs: CRS = L.CRS.EPSG3857 + // The [Coordinate Reference System](#crs) to use. Don't change this if you're not + // sure what it means. + crs: EPSG3857, + + // @option center: LatLng = undefined + // Initial geographic center of the map + center: undefined, + + // @option zoom: Number = undefined + // Initial map zoom level + zoom: undefined, + + // @option minZoom: Number = * + // Minimum zoom level of the map. + // If not specified and at least one `GridLayer` or `TileLayer` is in the map, + // the lowest of their `minZoom` options will be used instead. + minZoom: undefined, + + // @option maxZoom: Number = * + // Maximum zoom level of the map. + // If not specified and at least one `GridLayer` or `TileLayer` is in the map, + // the highest of their `maxZoom` options will be used instead. + maxZoom: undefined, + + // @option layers: Layer[] = [] + // Array of layers that will be added to the map initially + layers: [], + + // @option maxBounds: LatLngBounds = null + // When this option is set, the map restricts the view to the given + // geographical bounds, bouncing the user back if the user tries to pan + // outside the view. To set the restriction dynamically, use + // [`setMaxBounds`](#map-setmaxbounds) method. + maxBounds: undefined, + + // @option renderer: Renderer = * + // The default method for drawing vector layers on the map. `L.SVG` + // or `L.Canvas` by default depending on browser support. + renderer: undefined, + + + // @section Animation Options + // @option zoomAnimation: Boolean = true + // Whether the map zoom animation is enabled. By default it's enabled + // in all browsers that support CSS3 Transitions except Android. + zoomAnimation: true, + + // @option zoomAnimationThreshold: Number = 4 + // Won't animate zoom if the zoom difference exceeds this value. + zoomAnimationThreshold: 4, + + // @option fadeAnimation: Boolean = true + // Whether the tile fade animation is enabled. By default it's enabled + // in all browsers that support CSS3 Transitions except Android. + fadeAnimation: true, + + // @option markerZoomAnimation: Boolean = true + // Whether markers animate their zoom with the zoom animation, if disabled + // they will disappear for the length of the animation. By default it's + // enabled in all browsers that support CSS3 Transitions except Android. + markerZoomAnimation: true, + + // @option transform3DLimit: Number = 2^23 + // Defines the maximum size of a CSS translation transform. The default + // value should not be changed unless a web browser positions layers in + // the wrong place after doing a large `panBy`. + transform3DLimit: 8388608, // Precision limit of a 32-bit float + + // @section Interaction Options + // @option zoomSnap: Number = 1 + // Forces the map's zoom level to always be a multiple of this, particularly + // right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom. + // By default, the zoom level snaps to the nearest integer; lower values + // (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0` + // means the zoom level will not be snapped after `fitBounds` or a pinch-zoom. + zoomSnap: 1, + + // @option zoomDelta: Number = 1 + // Controls how much the map's zoom level will change after a + // [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+` + // or `-` on the keyboard, or using the [zoom controls](#control-zoom). + // Values smaller than `1` (e.g. `0.5`) allow for greater granularity. + zoomDelta: 1, + + // @option trackResize: Boolean = true + // Whether the map automatically handles browser window resize to update itself. + trackResize: true + }, + + initialize: function (id, options) { // (HTMLElement or String, Object) + options = setOptions(this, options); + + this._initContainer(id); + this._initLayout(); + + // hack for https://github.com/Leaflet/Leaflet/issues/1980 + this._onResize = bind(this._onResize, this); + + this._initEvents(); + + if (options.maxBounds) { + this.setMaxBounds(options.maxBounds); + } + + if (options.zoom !== undefined) { + this._zoom = this._limitZoom(options.zoom); + } + + if (options.center && options.zoom !== undefined) { + this.setView(toLatLng(options.center), options.zoom, {reset: true}); + } + + this._handlers = []; + this._layers = {}; + this._zoomBoundLayers = {}; + this._sizeChanged = true; + + this.callInitHooks(); + + // don't animate on browsers without hardware-accelerated transitions or old Android/Opera + this._zoomAnimated = TRANSITION && any3d && !mobileOpera && + this.options.zoomAnimation; + + // zoom transitions run with the same duration for all layers, so if one of transitionend events + // happens after starting zoom animation (propagating to the map pane), we know that it ended globally + if (this._zoomAnimated) { + this._createAnimProxy(); + on(this._proxy, TRANSITION_END, this._catchTransitionEnd, this); + } + + this._addLayers(this.options.layers); + }, + + + // @section Methods for modifying map state + + // @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this + // Sets the view of the map (geographical center and zoom) with the given + // animation options. + setView: function (center, zoom, options) { + + zoom = zoom === undefined ? this._zoom : this._limitZoom(zoom); + center = this._limitCenter(toLatLng(center), zoom, this.options.maxBounds); + options = options || {}; + + this._stop(); + + if (this._loaded && !options.reset && options !== true) { + + if (options.animate !== undefined) { + options.zoom = extend({animate: options.animate}, options.zoom); + options.pan = extend({animate: options.animate, duration: options.duration}, options.pan); + } + + // try animating pan or zoom + var moved = (this._zoom !== zoom) ? + this._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) : + this._tryAnimatedPan(center, options.pan); + + if (moved) { + // prevent resize handler call, the view will refresh after animation anyway + clearTimeout(this._sizeTimer); + return this; + } + } + + // animation didn't start, just reset the map view + this._resetView(center, zoom); + + return this; + }, + + // @method setZoom(zoom: Number, options?: Zoom/pan options): this + // Sets the zoom of the map. + setZoom: function (zoom, options) { + if (!this._loaded) { + this._zoom = zoom; + return this; + } + return this.setView(this.getCenter(), zoom, {zoom: options}); + }, + + // @method zoomIn(delta?: Number, options?: Zoom options): this + // Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). + zoomIn: function (delta, options) { + delta = delta || (any3d ? this.options.zoomDelta : 1); + return this.setZoom(this._zoom + delta, options); + }, + + // @method zoomOut(delta?: Number, options?: Zoom options): this + // Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default). + zoomOut: function (delta, options) { + delta = delta || (any3d ? this.options.zoomDelta : 1); + return this.setZoom(this._zoom - delta, options); + }, + + // @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this + // Zooms the map while keeping a specified geographical point on the map + // stationary (e.g. used internally for scroll zoom and double-click zoom). + // @alternative + // @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this + // Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary. + setZoomAround: function (latlng, zoom, options) { + var scale = this.getZoomScale(zoom), + viewHalf = this.getSize().divideBy(2), + containerPoint = latlng instanceof Point ? latlng : this.latLngToContainerPoint(latlng), + + centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale), + newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset)); + + return this.setView(newCenter, zoom, {zoom: options}); + }, + + _getBoundsCenterZoom: function (bounds, options) { + + options = options || {}; + bounds = bounds.getBounds ? bounds.getBounds() : toLatLngBounds(bounds); + + var paddingTL = toPoint(options.paddingTopLeft || options.padding || [0, 0]), + paddingBR = toPoint(options.paddingBottomRight || options.padding || [0, 0]), + + zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR)); + + zoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom; + + if (zoom === Infinity) { + return { + center: bounds.getCenter(), + zoom: zoom + }; + } + + var paddingOffset = paddingBR.subtract(paddingTL).divideBy(2), + + swPoint = this.project(bounds.getSouthWest(), zoom), + nePoint = this.project(bounds.getNorthEast(), zoom), + center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom); + + return { + center: center, + zoom: zoom + }; + }, + + // @method fitBounds(bounds: LatLngBounds, options?: fitBounds options): this + // Sets a map view that contains the given geographical bounds with the + // maximum zoom level possible. + fitBounds: function (bounds, options) { + + bounds = toLatLngBounds(bounds); + + if (!bounds.isValid()) { + throw new Error('Bounds are not valid.'); + } + + var target = this._getBoundsCenterZoom(bounds, options); + return this.setView(target.center, target.zoom, options); + }, + + // @method fitWorld(options?: fitBounds options): this + // Sets a map view that mostly contains the whole world with the maximum + // zoom level possible. + fitWorld: function (options) { + return this.fitBounds([[-90, -180], [90, 180]], options); + }, + + // @method panTo(latlng: LatLng, options?: Pan options): this + // Pans the map to a given center. + panTo: function (center, options) { // (LatLng) + return this.setView(center, this._zoom, {pan: options}); + }, + + // @method panBy(offset: Point, options?: Pan options): this + // Pans the map by a given number of pixels (animated). + panBy: function (offset, options) { + offset = toPoint(offset).round(); + options = options || {}; + + if (!offset.x && !offset.y) { + return this.fire('moveend'); + } + // If we pan too far, Chrome gets issues with tiles + // and makes them disappear or appear in the wrong place (slightly offset) #2602 + if (options.animate !== true && !this.getSize().contains(offset)) { + this._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom()); + return this; + } + + if (!this._panAnim) { + this._panAnim = new PosAnimation(); + + this._panAnim.on({ + 'step': this._onPanTransitionStep, + 'end': this._onPanTransitionEnd + }, this); + } + + // don't fire movestart if animating inertia + if (!options.noMoveStart) { + this.fire('movestart'); + } + + // animate pan unless animate: false specified + if (options.animate !== false) { + addClass(this._mapPane, 'leaflet-pan-anim'); + + var newPos = this._getMapPanePos().subtract(offset).round(); + this._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity); + } else { + this._rawPanBy(offset); + this.fire('move').fire('moveend'); + } + + return this; + }, + + // @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this + // Sets the view of the map (geographical center and zoom) performing a smooth + // pan-zoom animation. + flyTo: function (targetCenter, targetZoom, options) { + + options = options || {}; + if (options.animate === false || !any3d) { + return this.setView(targetCenter, targetZoom, options); + } + + this._stop(); + + var from = this.project(this.getCenter()), + to = this.project(targetCenter), + size = this.getSize(), + startZoom = this._zoom; + + targetCenter = toLatLng(targetCenter); + targetZoom = targetZoom === undefined ? startZoom : targetZoom; + + var w0 = Math.max(size.x, size.y), + w1 = w0 * this.getZoomScale(startZoom, targetZoom), + u1 = (to.distanceTo(from)) || 1, + rho = 1.42, + rho2 = rho * rho; + + function r(i) { + var s1 = i ? -1 : 1, + s2 = i ? w1 : w0, + t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1, + b1 = 2 * s2 * rho2 * u1, + b = t1 / b1, + sq = Math.sqrt(b * b + 1) - b; + + // workaround for floating point precision bug when sq = 0, log = -Infinite, + // thus triggering an infinite loop in flyTo + var log = sq < 0.000000001 ? -18 : Math.log(sq); + + return log; + } + + function sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; } + function cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; } + function tanh(n) { return sinh(n) / cosh(n); } + + var r0 = r(0); + + function w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); } + function u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; } + + function easeOut(t) { return 1 - Math.pow(1 - t, 1.5); } + + var start = Date.now(), + S = (r(1) - r0) / rho, + duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8; + + function frame() { + var t = (Date.now() - start) / duration, + s = easeOut(t) * S; + + if (t <= 1) { + this._flyToFrame = requestAnimFrame(frame, this); + + this._move( + this.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom), + this.getScaleZoom(w0 / w(s), startZoom), + {flyTo: true}); + + } else { + this + ._move(targetCenter, targetZoom) + ._moveEnd(true); + } + } + + this._moveStart(true, options.noMoveStart); + + frame.call(this); + return this; + }, + + // @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this + // Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto), + // but takes a bounds parameter like [`fitBounds`](#map-fitbounds). + flyToBounds: function (bounds, options) { + var target = this._getBoundsCenterZoom(bounds, options); + return this.flyTo(target.center, target.zoom, options); + }, + + // @method setMaxBounds(bounds: Bounds): this + // Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option). + setMaxBounds: function (bounds) { + bounds = toLatLngBounds(bounds); + + if (!bounds.isValid()) { + this.options.maxBounds = null; + return this.off('moveend', this._panInsideMaxBounds); + } else if (this.options.maxBounds) { + this.off('moveend', this._panInsideMaxBounds); + } + + this.options.maxBounds = bounds; + + if (this._loaded) { + this._panInsideMaxBounds(); + } + + return this.on('moveend', this._panInsideMaxBounds); + }, + + // @method setMinZoom(zoom: Number): this + // Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option). + setMinZoom: function (zoom) { + var oldZoom = this.options.minZoom; + this.options.minZoom = zoom; + + if (this._loaded && oldZoom !== zoom) { + this.fire('zoomlevelschange'); + + if (this.getZoom() < this.options.minZoom) { + return this.setZoom(zoom); + } + } + + return this; + }, + + // @method setMaxZoom(zoom: Number): this + // Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option). + setMaxZoom: function (zoom) { + var oldZoom = this.options.maxZoom; + this.options.maxZoom = zoom; + + if (this._loaded && oldZoom !== zoom) { + this.fire('zoomlevelschange'); + + if (this.getZoom() > this.options.maxZoom) { + return this.setZoom(zoom); + } + } + + return this; + }, + + // @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this + // Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any. + panInsideBounds: function (bounds, options) { + this._enforcingBounds = true; + var center = this.getCenter(), + newCenter = this._limitCenter(center, this._zoom, toLatLngBounds(bounds)); + + if (!center.equals(newCenter)) { + this.panTo(newCenter, options); + } + + this._enforcingBounds = false; + return this; + }, + + // @method invalidateSize(options: Zoom/pan options): this + // Checks if the map container size changed and updates the map if so — + // call it after you've changed the map size dynamically, also animating + // pan by default. If `options.pan` is `false`, panning will not occur. + // If `options.debounceMoveend` is `true`, it will delay `moveend` event so + // that it doesn't happen often even if the method is called many + // times in a row. + + // @alternative + // @method invalidateSize(animate: Boolean): this + // Checks if the map container size changed and updates the map if so — + // call it after you've changed the map size dynamically, also animating + // pan by default. + invalidateSize: function (options) { + if (!this._loaded) { return this; } + + options = extend({ + animate: false, + pan: true + }, options === true ? {animate: true} : options); + + var oldSize = this.getSize(); + this._sizeChanged = true; + this._lastCenter = null; + + var newSize = this.getSize(), + oldCenter = oldSize.divideBy(2).round(), + newCenter = newSize.divideBy(2).round(), + offset = oldCenter.subtract(newCenter); + + if (!offset.x && !offset.y) { return this; } + + if (options.animate && options.pan) { + this.panBy(offset); + + } else { + if (options.pan) { + this._rawPanBy(offset); + } + + this.fire('move'); + + if (options.debounceMoveend) { + clearTimeout(this._sizeTimer); + this._sizeTimer = setTimeout(bind(this.fire, this, 'moveend'), 200); + } else { + this.fire('moveend'); + } + } + + // @section Map state change events + // @event resize: ResizeEvent + // Fired when the map is resized. + return this.fire('resize', { + oldSize: oldSize, + newSize: newSize + }); + }, + + // @section Methods for modifying map state + // @method stop(): this + // Stops the currently running `panTo` or `flyTo` animation, if any. + stop: function () { + this.setZoom(this._limitZoom(this._zoom)); + if (!this.options.zoomSnap) { + this.fire('viewreset'); + } + return this._stop(); + }, + + // @section Geolocation methods + // @method locate(options?: Locate options): this + // Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound) + // event with location data on success or a [`locationerror`](#map-locationerror) event on failure, + // and optionally sets the map view to the user's location with respect to + // detection accuracy (or to the world view if geolocation failed). + // Note that, if your page doesn't use HTTPS, this method will fail in + // modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins)) + // See `Locate options` for more details. + locate: function (options) { + + options = this._locateOptions = extend({ + timeout: 10000, + watch: false + // setView: false + // maxZoom: <Number> + // maximumAge: 0 + // enableHighAccuracy: false + }, options); + + if (!('geolocation' in navigator)) { + this._handleGeolocationError({ + code: 0, + message: 'Geolocation not supported.' + }); + return this; + } + + var onResponse = bind(this._handleGeolocationResponse, this), + onError = bind(this._handleGeolocationError, this); + + if (options.watch) { + this._locationWatchId = + navigator.geolocation.watchPosition(onResponse, onError, options); + } else { + navigator.geolocation.getCurrentPosition(onResponse, onError, options); + } + return this; + }, + + // @method stopLocate(): this + // Stops watching location previously initiated by `map.locate({watch: true})` + // and aborts resetting the map view if map.locate was called with + // `{setView: true}`. + stopLocate: function () { + if (navigator.geolocation && navigator.geolocation.clearWatch) { + navigator.geolocation.clearWatch(this._locationWatchId); + } + if (this._locateOptions) { + this._locateOptions.setView = false; + } + return this; + }, + + _handleGeolocationError: function (error) { + var c = error.code, + message = error.message || + (c === 1 ? 'permission denied' : + (c === 2 ? 'position unavailable' : 'timeout')); + + if (this._locateOptions.setView && !this._loaded) { + this.fitWorld(); + } + + // @section Location events + // @event locationerror: ErrorEvent + // Fired when geolocation (using the [`locate`](#map-locate) method) failed. + this.fire('locationerror', { + code: c, + message: 'Geolocation error: ' + message + '.' + }); + }, + + _handleGeolocationResponse: function (pos) { + var lat = pos.coords.latitude, + lng = pos.coords.longitude, + latlng = new LatLng(lat, lng), + bounds = latlng.toBounds(pos.coords.accuracy), + options = this._locateOptions; + + if (options.setView) { + var zoom = this.getBoundsZoom(bounds); + this.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom); + } + + var data = { + latlng: latlng, + bounds: bounds, + timestamp: pos.timestamp + }; + + for (var i in pos.coords) { + if (typeof pos.coords[i] === 'number') { + data[i] = pos.coords[i]; + } + } + + // @event locationfound: LocationEvent + // Fired when geolocation (using the [`locate`](#map-locate) method) + // went successfully. + this.fire('locationfound', data); + }, + + // TODO Appropriate docs section? + // @section Other Methods + // @method addHandler(name: String, HandlerClass: Function): this + // Adds a new `Handler` to the map, given its name and constructor function. + addHandler: function (name, HandlerClass) { + if (!HandlerClass) { return this; } + + var handler = this[name] = new HandlerClass(this); + + this._handlers.push(handler); + + if (this.options[name]) { + handler.enable(); + } + + return this; + }, + + // @method remove(): this + // Destroys the map and clears all related event listeners. + remove: function () { + + this._initEvents(true); + + if (this._containerId !== this._container._leaflet_id) { + throw new Error('Map container is being reused by another instance'); + } + + try { + // throws error in IE6-8 + delete this._container._leaflet_id; + delete this._containerId; + } catch (e) { + /*eslint-disable */ + this._container._leaflet_id = undefined; + /* eslint-enable */ + this._containerId = undefined; + } + + if (this._locationWatchId !== undefined) { + this.stopLocate(); + } + + this._stop(); + + remove(this._mapPane); + + if (this._clearControlPos) { + this._clearControlPos(); + } + + this._clearHandlers(); + + if (this._loaded) { + // @section Map state change events + // @event unload: Event + // Fired when the map is destroyed with [remove](#map-remove) method. + this.fire('unload'); + } + + var i; + for (i in this._layers) { + this._layers[i].remove(); + } + for (i in this._panes) { + remove(this._panes[i]); + } + + this._layers = []; + this._panes = []; + delete this._mapPane; + delete this._renderer; + + return this; + }, + + // @section Other Methods + // @method createPane(name: String, container?: HTMLElement): HTMLElement + // Creates a new [map pane](#map-pane) with the given name if it doesn't exist already, + // then returns it. The pane is created as a child of `container`, or + // as a child of the main map pane if not set. + createPane: function (name, container) { + var className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''), + pane = create$1('div', className, container || this._mapPane); + + if (name) { + this._panes[name] = pane; + } + return pane; + }, + + // @section Methods for Getting Map State + + // @method getCenter(): LatLng + // Returns the geographical center of the map view + getCenter: function () { + this._checkIfLoaded(); + + if (this._lastCenter && !this._moved()) { + return this._lastCenter; + } + return this.layerPointToLatLng(this._getCenterLayerPoint()); + }, + + // @method getZoom(): Number + // Returns the current zoom level of the map view + getZoom: function () { + return this._zoom; + }, + + // @method getBounds(): LatLngBounds + // Returns the geographical bounds visible in the current map view + getBounds: function () { + var bounds = this.getPixelBounds(), + sw = this.unproject(bounds.getBottomLeft()), + ne = this.unproject(bounds.getTopRight()); + + return new LatLngBounds(sw, ne); + }, + + // @method getMinZoom(): Number + // Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default. + getMinZoom: function () { + return this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom; + }, + + // @method getMaxZoom(): Number + // Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers). + getMaxZoom: function () { + return this.options.maxZoom === undefined ? + (this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) : + this.options.maxZoom; + }, + + // @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean): Number + // Returns the maximum zoom level on which the given bounds fit to the map + // view in its entirety. If `inside` (optional) is set to `true`, the method + // instead returns the minimum zoom level on which the map view fits into + // the given bounds in its entirety. + getBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number + bounds = toLatLngBounds(bounds); + padding = toPoint(padding || [0, 0]); + + var zoom = this.getZoom() || 0, + min = this.getMinZoom(), + max = this.getMaxZoom(), + nw = bounds.getNorthWest(), + se = bounds.getSouthEast(), + size = this.getSize().subtract(padding), + boundsSize = toBounds(this.project(se, zoom), this.project(nw, zoom)).getSize(), + snap = any3d ? this.options.zoomSnap : 1, + scalex = size.x / boundsSize.x, + scaley = size.y / boundsSize.y, + scale = inside ? Math.max(scalex, scaley) : Math.min(scalex, scaley); + + zoom = this.getScaleZoom(scale, zoom); + + if (snap) { + zoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level + zoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap; + } + + return Math.max(min, Math.min(max, zoom)); + }, + + // @method getSize(): Point + // Returns the current size of the map container (in pixels). + getSize: function () { + if (!this._size || this._sizeChanged) { + this._size = new Point( + this._container.clientWidth || 0, + this._container.clientHeight || 0); + + this._sizeChanged = false; + } + return this._size.clone(); + }, + + // @method getPixelBounds(): Bounds + // Returns the bounds of the current map view in projected pixel + // coordinates (sometimes useful in layer and overlay implementations). + getPixelBounds: function (center, zoom) { + var topLeftPoint = this._getTopLeftPoint(center, zoom); + return new Bounds(topLeftPoint, topLeftPoint.add(this.getSize())); + }, + + // TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to + // the map pane? "left point of the map layer" can be confusing, specially + // since there can be negative offsets. + // @method getPixelOrigin(): Point + // Returns the projected pixel coordinates of the top left point of + // the map layer (useful in custom layer and overlay implementations). + getPixelOrigin: function () { + this._checkIfLoaded(); + return this._pixelOrigin; + }, + + // @method getPixelWorldBounds(zoom?: Number): Bounds + // Returns the world's bounds in pixel coordinates for zoom level `zoom`. + // If `zoom` is omitted, the map's current zoom level is used. + getPixelWorldBounds: function (zoom) { + return this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom); + }, + + // @section Other Methods + + // @method getPane(pane: String|HTMLElement): HTMLElement + // Returns a [map pane](#map-pane), given its name or its HTML element (its identity). + getPane: function (pane) { + return typeof pane === 'string' ? this._panes[pane] : pane; + }, + + // @method getPanes(): Object + // Returns a plain object containing the names of all [panes](#map-pane) as keys and + // the panes as values. + getPanes: function () { + return this._panes; + }, + + // @method getContainer: HTMLElement + // Returns the HTML element that contains the map. + getContainer: function () { + return this._container; + }, + + + // @section Conversion Methods + + // @method getZoomScale(toZoom: Number, fromZoom: Number): Number + // Returns the scale factor to be applied to a map transition from zoom level + // `fromZoom` to `toZoom`. Used internally to help with zoom animations. + getZoomScale: function (toZoom, fromZoom) { + // TODO replace with universal implementation after refactoring projections + var crs = this.options.crs; + fromZoom = fromZoom === undefined ? this._zoom : fromZoom; + return crs.scale(toZoom) / crs.scale(fromZoom); + }, + + // @method getScaleZoom(scale: Number, fromZoom: Number): Number + // Returns the zoom level that the map would end up at, if it is at `fromZoom` + // level and everything is scaled by a factor of `scale`. Inverse of + // [`getZoomScale`](#map-getZoomScale). + getScaleZoom: function (scale, fromZoom) { + var crs = this.options.crs; + fromZoom = fromZoom === undefined ? this._zoom : fromZoom; + var zoom = crs.zoom(scale * crs.scale(fromZoom)); + return isNaN(zoom) ? Infinity : zoom; + }, + + // @method project(latlng: LatLng, zoom: Number): Point + // Projects a geographical coordinate `LatLng` according to the projection + // of the map's CRS, then scales it according to `zoom` and the CRS's + // `Transformation`. The result is pixel coordinate relative to + // the CRS origin. + project: function (latlng, zoom) { + zoom = zoom === undefined ? this._zoom : zoom; + return this.options.crs.latLngToPoint(toLatLng(latlng), zoom); + }, + + // @method unproject(point: Point, zoom: Number): LatLng + // Inverse of [`project`](#map-project). + unproject: function (point, zoom) { + zoom = zoom === undefined ? this._zoom : zoom; + return this.options.crs.pointToLatLng(toPoint(point), zoom); + }, + + // @method layerPointToLatLng(point: Point): LatLng + // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), + // returns the corresponding geographical coordinate (for the current zoom level). + layerPointToLatLng: function (point) { + var projectedPoint = toPoint(point).add(this.getPixelOrigin()); + return this.unproject(projectedPoint); + }, + + // @method latLngToLayerPoint(latlng: LatLng): Point + // Given a geographical coordinate, returns the corresponding pixel coordinate + // relative to the [origin pixel](#map-getpixelorigin). + latLngToLayerPoint: function (latlng) { + var projectedPoint = this.project(toLatLng(latlng))._round(); + return projectedPoint._subtract(this.getPixelOrigin()); + }, + + // @method wrapLatLng(latlng: LatLng): LatLng + // Returns a `LatLng` where `lat` and `lng` has been wrapped according to the + // map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the + // CRS's bounds. + // By default this means longitude is wrapped around the dateline so its + // value is between -180 and +180 degrees. + wrapLatLng: function (latlng) { + return this.options.crs.wrapLatLng(toLatLng(latlng)); + }, + + // @method wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds + // Returns a `LatLngBounds` with the same size as the given one, ensuring that + // its center is within the CRS's bounds. + // By default this means the center longitude is wrapped around the dateline so its + // value is between -180 and +180 degrees, and the majority of the bounds + // overlaps the CRS's bounds. + wrapLatLngBounds: function (latlng) { + return this.options.crs.wrapLatLngBounds(toLatLngBounds(latlng)); + }, + + // @method distance(latlng1: LatLng, latlng2: LatLng): Number + // Returns the distance between two geographical coordinates according to + // the map's CRS. By default this measures distance in meters. + distance: function (latlng1, latlng2) { + return this.options.crs.distance(toLatLng(latlng1), toLatLng(latlng2)); + }, + + // @method containerPointToLayerPoint(point: Point): Point + // Given a pixel coordinate relative to the map container, returns the corresponding + // pixel coordinate relative to the [origin pixel](#map-getpixelorigin). + containerPointToLayerPoint: function (point) { // (Point) + return toPoint(point).subtract(this._getMapPanePos()); + }, + + // @method layerPointToContainerPoint(point: Point): Point + // Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin), + // returns the corresponding pixel coordinate relative to the map container. + layerPointToContainerPoint: function (point) { // (Point) + return toPoint(point).add(this._getMapPanePos()); + }, + + // @method containerPointToLatLng(point: Point): LatLng + // Given a pixel coordinate relative to the map container, returns + // the corresponding geographical coordinate (for the current zoom level). + containerPointToLatLng: function (point) { + var layerPoint = this.containerPointToLayerPoint(toPoint(point)); + return this.layerPointToLatLng(layerPoint); + }, + + // @method latLngToContainerPoint(latlng: LatLng): Point + // Given a geographical coordinate, returns the corresponding pixel coordinate + // relative to the map container. + latLngToContainerPoint: function (latlng) { + return this.layerPointToContainerPoint(this.latLngToLayerPoint(toLatLng(latlng))); + }, + + // @method mouseEventToContainerPoint(ev: MouseEvent): Point + // Given a MouseEvent object, returns the pixel coordinate relative to the + // map container where the event took place. + mouseEventToContainerPoint: function (e) { + return getMousePosition(e, this._container); + }, + + // @method mouseEventToLayerPoint(ev: MouseEvent): Point + // Given a MouseEvent object, returns the pixel coordinate relative to + // the [origin pixel](#map-getpixelorigin) where the event took place. + mouseEventToLayerPoint: function (e) { + return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e)); + }, + + // @method mouseEventToLatLng(ev: MouseEvent): LatLng + // Given a MouseEvent object, returns geographical coordinate where the + // event took place. + mouseEventToLatLng: function (e) { // (MouseEvent) + return this.layerPointToLatLng(this.mouseEventToLayerPoint(e)); + }, + + + // map initialization methods + + _initContainer: function (id) { + var container = this._container = get(id); + + if (!container) { + throw new Error('Map container not found.'); + } else if (container._leaflet_id) { + throw new Error('Map container is already initialized.'); + } + + on(container, 'scroll', this._onScroll, this); + this._containerId = stamp(container); + }, + + _initLayout: function () { + var container = this._container; + + this._fadeAnimated = this.options.fadeAnimation && any3d; + + addClass(container, 'leaflet-container' + + (touch ? ' leaflet-touch' : '') + + (retina ? ' leaflet-retina' : '') + + (ielt9 ? ' leaflet-oldie' : '') + + (safari ? ' leaflet-safari' : '') + + (this._fadeAnimated ? ' leaflet-fade-anim' : '')); + + var position = getStyle(container, 'position'); + + if (position !== 'absolute' && position !== 'relative' && position !== 'fixed') { + container.style.position = 'relative'; + } + + this._initPanes(); + + if (this._initControlPos) { + this._initControlPos(); + } + }, + + _initPanes: function () { + var panes = this._panes = {}; + this._paneRenderers = {}; + + // @section + // + // Panes are DOM elements used to control the ordering of layers on the map. You + // can access panes with [`map.getPane`](#map-getpane) or + // [`map.getPanes`](#map-getpanes) methods. New panes can be created with the + // [`map.createPane`](#map-createpane) method. + // + // Every map has the following default panes that differ only in zIndex. + // + // @pane mapPane: HTMLElement = 'auto' + // Pane that contains all other map panes + + this._mapPane = this.createPane('mapPane', this._container); + setPosition(this._mapPane, new Point(0, 0)); + + // @pane tilePane: HTMLElement = 200 + // Pane for `GridLayer`s and `TileLayer`s + this.createPane('tilePane'); + // @pane overlayPane: HTMLElement = 400 + // Pane for vectors (`Path`s, like `Polyline`s and `Polygon`s), `ImageOverlay`s and `VideoOverlay`s + this.createPane('shadowPane'); + // @pane shadowPane: HTMLElement = 500 + // Pane for overlay shadows (e.g. `Marker` shadows) + this.createPane('overlayPane'); + // @pane markerPane: HTMLElement = 600 + // Pane for `Icon`s of `Marker`s + this.createPane('markerPane'); + // @pane tooltipPane: HTMLElement = 650 + // Pane for `Tooltip`s. + this.createPane('tooltipPane'); + // @pane popupPane: HTMLElement = 700 + // Pane for `Popup`s. + this.createPane('popupPane'); + + if (!this.options.markerZoomAnimation) { + addClass(panes.markerPane, 'leaflet-zoom-hide'); + addClass(panes.shadowPane, 'leaflet-zoom-hide'); + } + }, + + + // private methods that modify map state + + // @section Map state change events + _resetView: function (center, zoom) { + setPosition(this._mapPane, new Point(0, 0)); + + var loading = !this._loaded; + this._loaded = true; + zoom = this._limitZoom(zoom); + + this.fire('viewprereset'); + + var zoomChanged = this._zoom !== zoom; + this + ._moveStart(zoomChanged, false) + ._move(center, zoom) + ._moveEnd(zoomChanged); + + // @event viewreset: Event + // Fired when the map needs to redraw its content (this usually happens + // on map zoom or load). Very useful for creating custom overlays. + this.fire('viewreset'); + + // @event load: Event + // Fired when the map is initialized (when its center and zoom are set + // for the first time). + if (loading) { + this.fire('load'); + } + }, + + _moveStart: function (zoomChanged, noMoveStart) { + // @event zoomstart: Event + // Fired when the map zoom is about to change (e.g. before zoom animation). + // @event movestart: Event + // Fired when the view of the map starts changing (e.g. user starts dragging the map). + if (zoomChanged) { + this.fire('zoomstart'); + } + if (!noMoveStart) { + this.fire('movestart'); + } + return this; + }, + + _move: function (center, zoom, data) { + if (zoom === undefined) { + zoom = this._zoom; + } + var zoomChanged = this._zoom !== zoom; + + this._zoom = zoom; + this._lastCenter = center; + this._pixelOrigin = this._getNewPixelOrigin(center); + + // @event zoom: Event + // Fired repeatedly during any change in zoom level, including zoom + // and fly animations. + if (zoomChanged || (data && data.pinch)) { // Always fire 'zoom' if pinching because #3530 + this.fire('zoom', data); + } + + // @event move: Event + // Fired repeatedly during any movement of the map, including pan and + // fly animations. + return this.fire('move', data); + }, + + _moveEnd: function (zoomChanged) { + // @event zoomend: Event + // Fired when the map has changed, after any animations. + if (zoomChanged) { + this.fire('zoomend'); + } + + // @event moveend: Event + // Fired when the center of the map stops changing (e.g. user stopped + // dragging the map). + return this.fire('moveend'); + }, + + _stop: function () { + cancelAnimFrame(this._flyToFrame); + if (this._panAnim) { + this._panAnim.stop(); + } + return this; + }, + + _rawPanBy: function (offset) { + setPosition(this._mapPane, this._getMapPanePos().subtract(offset)); + }, + + _getZoomSpan: function () { + return this.getMaxZoom() - this.getMinZoom(); + }, + + _panInsideMaxBounds: function () { + if (!this._enforcingBounds) { + this.panInsideBounds(this.options.maxBounds); + } + }, + + _checkIfLoaded: function () { + if (!this._loaded) { + throw new Error('Set map center and zoom first.'); + } + }, + + // DOM event handling + + // @section Interaction events + _initEvents: function (remove$$1) { + this._targets = {}; + this._targets[stamp(this._container)] = this; + + var onOff = remove$$1 ? off : on; + + // @event click: MouseEvent + // Fired when the user clicks (or taps) the map. + // @event dblclick: MouseEvent + // Fired when the user double-clicks (or double-taps) the map. + // @event mousedown: MouseEvent + // Fired when the user pushes the mouse button on the map. + // @event mouseup: MouseEvent + // Fired when the user releases the mouse button on the map. + // @event mouseover: MouseEvent + // Fired when the mouse enters the map. + // @event mouseout: MouseEvent + // Fired when the mouse leaves the map. + // @event mousemove: MouseEvent + // Fired while the mouse moves over the map. + // @event contextmenu: MouseEvent + // Fired when the user pushes the right mouse button on the map, prevents + // default browser context menu from showing if there are listeners on + // this event. Also fired on mobile when the user holds a single touch + // for a second (also called long press). + // @event keypress: KeyboardEvent + // Fired when the user presses a key from the keyboard while the map is focused. + onOff(this._container, 'click dblclick mousedown mouseup ' + + 'mouseover mouseout mousemove contextmenu keypress', this._handleDOMEvent, this); + + if (this.options.trackResize) { + onOff(window, 'resize', this._onResize, this); + } + + if (any3d && this.options.transform3DLimit) { + (remove$$1 ? this.off : this.on).call(this, 'moveend', this._onMoveEnd); + } + }, + + _onResize: function () { + cancelAnimFrame(this._resizeRequest); + this._resizeRequest = requestAnimFrame( + function () { this.invalidateSize({debounceMoveend: true}); }, this); + }, + + _onScroll: function () { + this._container.scrollTop = 0; + this._container.scrollLeft = 0; + }, + + _onMoveEnd: function () { + var pos = this._getMapPanePos(); + if (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) { + // https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have + // a pixel offset on very high values, see: http://jsfiddle.net/dg6r5hhb/ + this._resetView(this.getCenter(), this.getZoom()); + } + }, + + _findEventTargets: function (e, type) { + var targets = [], + target, + isHover = type === 'mouseout' || type === 'mouseover', + src = e.target || e.srcElement, + dragging = false; + + while (src) { + target = this._targets[stamp(src)]; + if (target && (type === 'click' || type === 'preclick') && !e._simulated && this._draggableMoved(target)) { + // Prevent firing click after you just dragged an object. + dragging = true; + break; + } + if (target && target.listens(type, true)) { + if (isHover && !isExternalTarget(src, e)) { break; } + targets.push(target); + if (isHover) { break; } + } + if (src === this._container) { break; } + src = src.parentNode; + } + if (!targets.length && !dragging && !isHover && isExternalTarget(src, e)) { + targets = [this]; + } + return targets; + }, + + _handleDOMEvent: function (e) { + if (!this._loaded || skipped(e)) { return; } + + var type = e.type; + + if (type === 'mousedown' || type === 'keypress') { + // prevents outline when clicking on keyboard-focusable element + preventOutline(e.target || e.srcElement); + } + + this._fireDOMEvent(e, type); + }, + + _mouseEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu'], + + _fireDOMEvent: function (e, type, targets) { + + if (e.type === 'click') { + // Fire a synthetic 'preclick' event which propagates up (mainly for closing popups). + // @event preclick: MouseEvent + // Fired before mouse click on the map (sometimes useful when you + // want something to happen on click before any existing click + // handlers start running). + var synth = extend({}, e); + synth.type = 'preclick'; + this._fireDOMEvent(synth, synth.type, targets); + } + + if (e._stopped) { return; } + + // Find the layer the event is propagating from and its parents. + targets = (targets || []).concat(this._findEventTargets(e, type)); + + if (!targets.length) { return; } + + var target = targets[0]; + if (type === 'contextmenu' && target.listens(type, true)) { + preventDefault(e); + } + + var data = { + originalEvent: e + }; + + if (e.type !== 'keypress') { + var isMarker = target.getLatLng && (!target._radius || target._radius <= 10); + data.containerPoint = isMarker ? + this.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e); + data.layerPoint = this.containerPointToLayerPoint(data.containerPoint); + data.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint); + } + + for (var i = 0; i < targets.length; i++) { + targets[i].fire(type, data, true); + if (data.originalEvent._stopped || + (targets[i].options.bubblingMouseEvents === false && indexOf(this._mouseEvents, type) !== -1)) { return; } + } + }, + + _draggableMoved: function (obj) { + obj = obj.dragging && obj.dragging.enabled() ? obj : this; + return (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved()); + }, + + _clearHandlers: function () { + for (var i = 0, len = this._handlers.length; i < len; i++) { + this._handlers[i].disable(); + } + }, + + // @section Other Methods + + // @method whenReady(fn: Function, context?: Object): this + // Runs the given function `fn` when the map gets initialized with + // a view (center and zoom) and at least one layer, or immediately + // if it's already initialized, optionally passing a function context. + whenReady: function (callback, context) { + if (this._loaded) { + callback.call(context || this, {target: this}); + } else { + this.on('load', callback, context); + } + return this; + }, + + + // private methods for getting map state + + _getMapPanePos: function () { + return getPosition(this._mapPane) || new Point(0, 0); + }, + + _moved: function () { + var pos = this._getMapPanePos(); + return pos && !pos.equals([0, 0]); + }, + + _getTopLeftPoint: function (center, zoom) { + var pixelOrigin = center && zoom !== undefined ? + this._getNewPixelOrigin(center, zoom) : + this.getPixelOrigin(); + return pixelOrigin.subtract(this._getMapPanePos()); + }, + + _getNewPixelOrigin: function (center, zoom) { + var viewHalf = this.getSize()._divideBy(2); + return this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round(); + }, + + _latLngToNewLayerPoint: function (latlng, zoom, center) { + var topLeft = this._getNewPixelOrigin(center, zoom); + return this.project(latlng, zoom)._subtract(topLeft); + }, + + _latLngBoundsToNewLayerBounds: function (latLngBounds, zoom, center) { + var topLeft = this._getNewPixelOrigin(center, zoom); + return toBounds([ + this.project(latLngBounds.getSouthWest(), zoom)._subtract(topLeft), + this.project(latLngBounds.getNorthWest(), zoom)._subtract(topLeft), + this.project(latLngBounds.getSouthEast(), zoom)._subtract(topLeft), + this.project(latLngBounds.getNorthEast(), zoom)._subtract(topLeft) + ]); + }, + + // layer point of the current center + _getCenterLayerPoint: function () { + return this.containerPointToLayerPoint(this.getSize()._divideBy(2)); + }, + + // offset of the specified place to the current center in pixels + _getCenterOffset: function (latlng) { + return this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint()); + }, + + // adjust center for view to get inside bounds + _limitCenter: function (center, zoom, bounds) { + + if (!bounds) { return center; } + + var centerPoint = this.project(center, zoom), + viewHalf = this.getSize().divideBy(2), + viewBounds = new Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)), + offset = this._getBoundsOffset(viewBounds, bounds, zoom); + + // If offset is less than a pixel, ignore. + // This prevents unstable projections from getting into + // an infinite loop of tiny offsets. + if (offset.round().equals([0, 0])) { + return center; + } + + return this.unproject(centerPoint.add(offset), zoom); + }, + + // adjust offset for view to get inside bounds + _limitOffset: function (offset, bounds) { + if (!bounds) { return offset; } + + var viewBounds = this.getPixelBounds(), + newBounds = new Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset)); + + return offset.add(this._getBoundsOffset(newBounds, bounds)); + }, + + // returns offset needed for pxBounds to get inside maxBounds at a specified zoom + _getBoundsOffset: function (pxBounds, maxBounds, zoom) { + var projectedMaxBounds = toBounds( + this.project(maxBounds.getNorthEast(), zoom), + this.project(maxBounds.getSouthWest(), zoom) + ), + minOffset = projectedMaxBounds.min.subtract(pxBounds.min), + maxOffset = projectedMaxBounds.max.subtract(pxBounds.max), + + dx = this._rebound(minOffset.x, -maxOffset.x), + dy = this._rebound(minOffset.y, -maxOffset.y); + + return new Point(dx, dy); + }, + + _rebound: function (left, right) { + return left + right > 0 ? + Math.round(left - right) / 2 : + Math.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right)); + }, + + _limitZoom: function (zoom) { + var min = this.getMinZoom(), + max = this.getMaxZoom(), + snap = any3d ? this.options.zoomSnap : 1; + if (snap) { + zoom = Math.round(zoom / snap) * snap; + } + return Math.max(min, Math.min(max, zoom)); + }, + + _onPanTransitionStep: function () { + this.fire('move'); + }, + + _onPanTransitionEnd: function () { + removeClass(this._mapPane, 'leaflet-pan-anim'); + this.fire('moveend'); + }, + + _tryAnimatedPan: function (center, options) { + // difference between the new and current centers in pixels + var offset = this._getCenterOffset(center)._trunc(); + + // don't animate too far unless animate: true specified in options + if ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; } + + this.panBy(offset, options); + + return true; + }, + + _createAnimProxy: function () { + + var proxy = this._proxy = create$1('div', 'leaflet-proxy leaflet-zoom-animated'); + this._panes.mapPane.appendChild(proxy); + + this.on('zoomanim', function (e) { + var prop = TRANSFORM, + transform = this._proxy.style[prop]; + + setTransform(this._proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1)); + + // workaround for case when transform is the same and so transitionend event is not fired + if (transform === this._proxy.style[prop] && this._animatingZoom) { + this._onZoomTransitionEnd(); + } + }, this); + + this.on('load moveend', function () { + var c = this.getCenter(), + z = this.getZoom(); + setTransform(this._proxy, this.project(c, z), this.getZoomScale(z, 1)); + }, this); + + this._on('unload', this._destroyAnimProxy, this); + }, + + _destroyAnimProxy: function () { + remove(this._proxy); + delete this._proxy; + }, + + _catchTransitionEnd: function (e) { + if (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) { + this._onZoomTransitionEnd(); + } + }, + + _nothingToAnimate: function () { + return !this._container.getElementsByClassName('leaflet-zoom-animated').length; + }, + + _tryAnimatedZoom: function (center, zoom, options) { + + if (this._animatingZoom) { return true; } + + options = options || {}; + + // don't animate if disabled, not supported or zoom difference is too large + if (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() || + Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; } + + // offset is the pixel coords of the zoom origin relative to the current center + var scale = this.getZoomScale(zoom), + offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale); + + // don't animate if the zoom origin isn't within one screen from the current center, unless forced + if (options.animate !== true && !this.getSize().contains(offset)) { return false; } + + requestAnimFrame(function () { + this + ._moveStart(true, false) + ._animateZoom(center, zoom, true); + }, this); + + return true; + }, + + _animateZoom: function (center, zoom, startAnim, noUpdate) { + if (!this._mapPane) { return; } + + if (startAnim) { + this._animatingZoom = true; + + // remember what center/zoom to set after animation + this._animateToCenter = center; + this._animateToZoom = zoom; + + addClass(this._mapPane, 'leaflet-zoom-anim'); + } + + // @event zoomanim: ZoomAnimEvent + // Fired on every frame of a zoom animation + this.fire('zoomanim', { + center: center, + zoom: zoom, + noUpdate: noUpdate + }); + + // Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693 + setTimeout(bind(this._onZoomTransitionEnd, this), 250); + }, + + _onZoomTransitionEnd: function () { + if (!this._animatingZoom) { return; } + + if (this._mapPane) { + removeClass(this._mapPane, 'leaflet-zoom-anim'); + } + + this._animatingZoom = false; + + this._move(this._animateToCenter, this._animateToZoom); + + // This anim frame should prevent an obscure iOS webkit tile loading race condition. + requestAnimFrame(function () { + this._moveEnd(true); + }, this); + } +}); + +// @section + +// @factory L.map(id: String, options?: Map options) +// Instantiates a map object given the DOM ID of a `<div>` element +// and optionally an object literal with `Map options`. +// +// @alternative +// @factory L.map(el: HTMLElement, options?: Map options) +// Instantiates a map object given an instance of a `<div>` HTML element +// and optionally an object literal with `Map options`. +function createMap(id, options) { + return new Map(id, options); +} + +/* + * @class Control + * @aka L.Control + * @inherits Class + * + * L.Control is a base class for implementing map controls. Handles positioning. + * All other controls extend from this class. + */ + +var Control = Class.extend({ + // @section + // @aka Control options + options: { + // @option position: String = 'topright' + // The position of the control (one of the map corners). Possible values are `'topleft'`, + // `'topright'`, `'bottomleft'` or `'bottomright'` + position: 'topright' + }, + + initialize: function (options) { + setOptions(this, options); + }, + + /* @section + * Classes extending L.Control will inherit the following methods: + * + * @method getPosition: string + * Returns the position of the control. + */ + getPosition: function () { + return this.options.position; + }, + + // @method setPosition(position: string): this + // Sets the position of the control. + setPosition: function (position) { + var map = this._map; + + if (map) { + map.removeControl(this); + } + + this.options.position = position; + + if (map) { + map.addControl(this); + } + + return this; + }, + + // @method getContainer: HTMLElement + // Returns the HTMLElement that contains the control. + getContainer: function () { + return this._container; + }, + + // @method addTo(map: Map): this + // Adds the control to the given map. + addTo: function (map) { + this.remove(); + this._map = map; + + var container = this._container = this.onAdd(map), + pos = this.getPosition(), + corner = map._controlCorners[pos]; + + addClass(container, 'leaflet-control'); + + if (pos.indexOf('bottom') !== -1) { + corner.insertBefore(container, corner.firstChild); + } else { + corner.appendChild(container); + } + + return this; + }, + + // @method remove: this + // Removes the control from the map it is currently active on. + remove: function () { + if (!this._map) { + return this; + } + + remove(this._container); + + if (this.onRemove) { + this.onRemove(this._map); + } + + this._map = null; + + return this; + }, + + _refocusOnMap: function (e) { + // if map exists and event is not a keyboard event + if (this._map && e && e.screenX > 0 && e.screenY > 0) { + this._map.getContainer().focus(); + } + } +}); + +var control = function (options) { + return new Control(options); +}; + +/* @section Extension methods + * @uninheritable + * + * Every control should extend from `L.Control` and (re-)implement the following methods. + * + * @method onAdd(map: Map): HTMLElement + * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo). + * + * @method onRemove(map: Map) + * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove). + */ + +/* @namespace Map + * @section Methods for Layers and Controls + */ +Map.include({ + // @method addControl(control: Control): this + // Adds the given control to the map + addControl: function (control) { + control.addTo(this); + return this; + }, + + // @method removeControl(control: Control): this + // Removes the given control from the map + removeControl: function (control) { + control.remove(); + return this; + }, + + _initControlPos: function () { + var corners = this._controlCorners = {}, + l = 'leaflet-', + container = this._controlContainer = + create$1('div', l + 'control-container', this._container); + + function createCorner(vSide, hSide) { + var className = l + vSide + ' ' + l + hSide; + + corners[vSide + hSide] = create$1('div', className, container); + } + + createCorner('top', 'left'); + createCorner('top', 'right'); + createCorner('bottom', 'left'); + createCorner('bottom', 'right'); + }, + + _clearControlPos: function () { + for (var i in this._controlCorners) { + remove(this._controlCorners[i]); + } + remove(this._controlContainer); + delete this._controlCorners; + delete this._controlContainer; + } +}); + +/* + * @class Control.Layers + * @aka L.Control.Layers + * @inherits Control + * + * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](http://leafletjs.com/examples/layers-control/)). Extends `Control`. + * + * @example + * + * ```js + * var baseLayers = { + * "Mapbox": mapbox, + * "OpenStreetMap": osm + * }; + * + * var overlays = { + * "Marker": marker, + * "Roads": roadsLayer + * }; + * + * L.control.layers(baseLayers, overlays).addTo(map); + * ``` + * + * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values: + * + * ```js + * { + * "<someName1>": layer1, + * "<someName2>": layer2 + * } + * ``` + * + * The layer names can contain HTML, which allows you to add additional styling to the items: + * + * ```js + * {"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>": myLayer} + * ``` + */ + +var Layers = Control.extend({ + // @section + // @aka Control.Layers options + options: { + // @option collapsed: Boolean = true + // If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch. + collapsed: true, + position: 'topright', + + // @option autoZIndex: Boolean = true + // If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off. + autoZIndex: true, + + // @option hideSingleBase: Boolean = false + // If `true`, the base layers in the control will be hidden when there is only one. + hideSingleBase: false, + + // @option sortLayers: Boolean = false + // Whether to sort the layers. When `false`, layers will keep the order + // in which they were added to the control. + sortLayers: false, + + // @option sortFunction: Function = * + // A [compare function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) + // that will be used for sorting the layers, when `sortLayers` is `true`. + // The function receives both the `L.Layer` instances and their names, as in + // `sortFunction(layerA, layerB, nameA, nameB)`. + // By default, it sorts layers alphabetically by their name. + sortFunction: function (layerA, layerB, nameA, nameB) { + return nameA < nameB ? -1 : (nameB < nameA ? 1 : 0); + } + }, + + initialize: function (baseLayers, overlays, options) { + setOptions(this, options); + + this._layerControlInputs = []; + this._layers = []; + this._lastZIndex = 0; + this._handlingClick = false; + + for (var i in baseLayers) { + this._addLayer(baseLayers[i], i); + } + + for (i in overlays) { + this._addLayer(overlays[i], i, true); + } + }, + + onAdd: function (map) { + this._initLayout(); + this._update(); + + this._map = map; + map.on('zoomend', this._checkDisabledLayers, this); + + for (var i = 0; i < this._layers.length; i++) { + this._layers[i].layer.on('add remove', this._onLayerChange, this); + } + + return this._container; + }, + + addTo: function (map) { + Control.prototype.addTo.call(this, map); + // Trigger expand after Layers Control has been inserted into DOM so that is now has an actual height. + return this._expandIfNotCollapsed(); + }, + + onRemove: function () { + this._map.off('zoomend', this._checkDisabledLayers, this); + + for (var i = 0; i < this._layers.length; i++) { + this._layers[i].layer.off('add remove', this._onLayerChange, this); + } + }, + + // @method addBaseLayer(layer: Layer, name: String): this + // Adds a base layer (radio button entry) with the given name to the control. + addBaseLayer: function (layer, name) { + this._addLayer(layer, name); + return (this._map) ? this._update() : this; + }, + + // @method addOverlay(layer: Layer, name: String): this + // Adds an overlay (checkbox entry) with the given name to the control. + addOverlay: function (layer, name) { + this._addLayer(layer, name, true); + return (this._map) ? this._update() : this; + }, + + // @method removeLayer(layer: Layer): this + // Remove the given layer from the control. + removeLayer: function (layer) { + layer.off('add remove', this._onLayerChange, this); + + var obj = this._getLayer(stamp(layer)); + if (obj) { + this._layers.splice(this._layers.indexOf(obj), 1); + } + return (this._map) ? this._update() : this; + }, + + // @method expand(): this + // Expand the control container if collapsed. + expand: function () { + addClass(this._container, 'leaflet-control-layers-expanded'); + this._form.style.height = null; + var acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50); + if (acceptableHeight < this._form.clientHeight) { + addClass(this._form, 'leaflet-control-layers-scrollbar'); + this._form.style.height = acceptableHeight + 'px'; + } else { + removeClass(this._form, 'leaflet-control-layers-scrollbar'); + } + this._checkDisabledLayers(); + return this; + }, + + // @method collapse(): this + // Collapse the control container if expanded. + collapse: function () { + removeClass(this._container, 'leaflet-control-layers-expanded'); + return this; + }, + + _initLayout: function () { + var className = 'leaflet-control-layers', + container = this._container = create$1('div', className), + collapsed = this.options.collapsed; + + // makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released + container.setAttribute('aria-haspopup', true); + + disableClickPropagation(container); + disableScrollPropagation(container); + + var form = this._form = create$1('form', className + '-list'); + + if (collapsed) { + this._map.on('click', this.collapse, this); + + if (!android) { + on(container, { + mouseenter: this.expand, + mouseleave: this.collapse + }, this); + } + } + + var link = this._layersLink = create$1('a', className + '-toggle', container); + link.href = '#'; + link.title = 'Layers'; + + if (touch) { + on(link, 'click', stop); + on(link, 'click', this.expand, this); + } else { + on(link, 'focus', this.expand, this); + } + + if (!collapsed) { + this.expand(); + } + + this._baseLayersList = create$1('div', className + '-base', form); + this._separator = create$1('div', className + '-separator', form); + this._overlaysList = create$1('div', className + '-overlays', form); + + container.appendChild(form); + }, + + _getLayer: function (id) { + for (var i = 0; i < this._layers.length; i++) { + + if (this._layers[i] && stamp(this._layers[i].layer) === id) { + return this._layers[i]; + } + } + }, + + _addLayer: function (layer, name, overlay) { + if (this._map) { + layer.on('add remove', this._onLayerChange, this); + } + + this._layers.push({ + layer: layer, + name: name, + overlay: overlay + }); + + if (this.options.sortLayers) { + this._layers.sort(bind(function (a, b) { + return this.options.sortFunction(a.layer, b.layer, a.name, b.name); + }, this)); + } + + if (this.options.autoZIndex && layer.setZIndex) { + this._lastZIndex++; + layer.setZIndex(this._lastZIndex); + } + + this._expandIfNotCollapsed(); + }, + + _update: function () { + if (!this._container) { return this; } + + empty(this._baseLayersList); + empty(this._overlaysList); + + this._layerControlInputs = []; + var baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0; + + for (i = 0; i < this._layers.length; i++) { + obj = this._layers[i]; + this._addItem(obj); + overlaysPresent = overlaysPresent || obj.overlay; + baseLayersPresent = baseLayersPresent || !obj.overlay; + baseLayersCount += !obj.overlay ? 1 : 0; + } + + // Hide base layers section if there's only one layer. + if (this.options.hideSingleBase) { + baseLayersPresent = baseLayersPresent && baseLayersCount > 1; + this._baseLayersList.style.display = baseLayersPresent ? '' : 'none'; + } + + this._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none'; + + return this; + }, + + _onLayerChange: function (e) { + if (!this._handlingClick) { + this._update(); + } + + var obj = this._getLayer(stamp(e.target)); + + // @namespace Map + // @section Layer events + // @event baselayerchange: LayersControlEvent + // Fired when the base layer is changed through the [layer control](#control-layers). + // @event overlayadd: LayersControlEvent + // Fired when an overlay is selected through the [layer control](#control-layers). + // @event overlayremove: LayersControlEvent + // Fired when an overlay is deselected through the [layer control](#control-layers). + // @namespace Control.Layers + var type = obj.overlay ? + (e.type === 'add' ? 'overlayadd' : 'overlayremove') : + (e.type === 'add' ? 'baselayerchange' : null); + + if (type) { + this._map.fire(type, obj); + } + }, + + // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe) + _createRadioElement: function (name, checked) { + + var radioHtml = '<input type="radio" class="leaflet-control-layers-selector" name="' + + name + '"' + (checked ? ' checked="checked"' : '') + '/>'; + + var radioFragment = document.createElement('div'); + radioFragment.innerHTML = radioHtml; + + return radioFragment.firstChild; + }, + + _addItem: function (obj) { + var label = document.createElement('label'), + checked = this._map.hasLayer(obj.layer), + input; + + if (obj.overlay) { + input = document.createElement('input'); + input.type = 'checkbox'; + input.className = 'leaflet-control-layers-selector'; + input.defaultChecked = checked; + } else { + input = this._createRadioElement('leaflet-base-layers', checked); + } + + this._layerControlInputs.push(input); + input.layerId = stamp(obj.layer); + + on(input, 'click', this._onInputClick, this); + + var name = document.createElement('span'); + name.innerHTML = ' ' + obj.name; + + // Helps from preventing layer control flicker when checkboxes are disabled + // https://github.com/Leaflet/Leaflet/issues/2771 + var holder = document.createElement('div'); + + label.appendChild(holder); + holder.appendChild(input); + holder.appendChild(name); + + var container = obj.overlay ? this._overlaysList : this._baseLayersList; + container.appendChild(label); + + this._checkDisabledLayers(); + return label; + }, + + _onInputClick: function () { + var inputs = this._layerControlInputs, + input, layer; + var addedLayers = [], + removedLayers = []; + + this._handlingClick = true; + + for (var i = inputs.length - 1; i >= 0; i--) { + input = inputs[i]; + layer = this._getLayer(input.layerId).layer; + + if (input.checked) { + addedLayers.push(layer); + } else if (!input.checked) { + removedLayers.push(layer); + } + } + + // Bugfix issue 2318: Should remove all old layers before readding new ones + for (i = 0; i < removedLayers.length; i++) { + if (this._map.hasLayer(removedLayers[i])) { + this._map.removeLayer(removedLayers[i]); + } + } + for (i = 0; i < addedLayers.length; i++) { + if (!this._map.hasLayer(addedLayers[i])) { + this._map.addLayer(addedLayers[i]); + } + } + + this._handlingClick = false; + + this._refocusOnMap(); + }, + + _checkDisabledLayers: function () { + var inputs = this._layerControlInputs, + input, + layer, + zoom = this._map.getZoom(); + + for (var i = inputs.length - 1; i >= 0; i--) { + input = inputs[i]; + layer = this._getLayer(input.layerId).layer; + input.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) || + (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom); + + } + }, + + _expandIfNotCollapsed: function () { + if (this._map && !this.options.collapsed) { + this.expand(); + } + return this; + }, + + _expand: function () { + // Backward compatibility, remove me in 1.1. + return this.expand(); + }, + + _collapse: function () { + // Backward compatibility, remove me in 1.1. + return this.collapse(); + } + +}); + + +// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options) +// Creates an attribution control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation. +var layers = function (baseLayers, overlays, options) { + return new Layers(baseLayers, overlays, options); +}; + +/* + * @class Control.Zoom + * @aka L.Control.Zoom + * @inherits Control + * + * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`. + */ + +var Zoom = Control.extend({ + // @section + // @aka Control.Zoom options + options: { + position: 'topleft', + + // @option zoomInText: String = '+' + // The text set on the 'zoom in' button. + zoomInText: '+', + + // @option zoomInTitle: String = 'Zoom in' + // The title set on the 'zoom in' button. + zoomInTitle: 'Zoom in', + + // @option zoomOutText: String = '−' + // The text set on the 'zoom out' button. + zoomOutText: '−', + + // @option zoomOutTitle: String = 'Zoom out' + // The title set on the 'zoom out' button. + zoomOutTitle: 'Zoom out' + }, + + onAdd: function (map) { + var zoomName = 'leaflet-control-zoom', + container = create$1('div', zoomName + ' leaflet-bar'), + options = this.options; + + this._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle, + zoomName + '-in', container, this._zoomIn); + this._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle, + zoomName + '-out', container, this._zoomOut); + + this._updateDisabled(); + map.on('zoomend zoomlevelschange', this._updateDisabled, this); + + return container; + }, + + onRemove: function (map) { + map.off('zoomend zoomlevelschange', this._updateDisabled, this); + }, + + disable: function () { + this._disabled = true; + this._updateDisabled(); + return this; + }, + + enable: function () { + this._disabled = false; + this._updateDisabled(); + return this; + }, + + _zoomIn: function (e) { + if (!this._disabled && this._map._zoom < this._map.getMaxZoom()) { + this._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); + } + }, + + _zoomOut: function (e) { + if (!this._disabled && this._map._zoom > this._map.getMinZoom()) { + this._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1)); + } + }, + + _createButton: function (html, title, className, container, fn) { + var link = create$1('a', className, container); + link.innerHTML = html; + link.href = '#'; + link.title = title; + + /* + * Will force screen readers like VoiceOver to read this as "Zoom in - button" + */ + link.setAttribute('role', 'button'); + link.setAttribute('aria-label', title); + + disableClickPropagation(link); + on(link, 'click', stop); + on(link, 'click', fn, this); + on(link, 'click', this._refocusOnMap, this); + + return link; + }, + + _updateDisabled: function () { + var map = this._map, + className = 'leaflet-disabled'; + + removeClass(this._zoomInButton, className); + removeClass(this._zoomOutButton, className); + + if (this._disabled || map._zoom === map.getMinZoom()) { + addClass(this._zoomOutButton, className); + } + if (this._disabled || map._zoom === map.getMaxZoom()) { + addClass(this._zoomInButton, className); + } + } +}); + +// @namespace Map +// @section Control options +// @option zoomControl: Boolean = true +// Whether a [zoom control](#control-zoom) is added to the map by default. +Map.mergeOptions({ + zoomControl: true +}); + +Map.addInitHook(function () { + if (this.options.zoomControl) { + this.zoomControl = new Zoom(); + this.addControl(this.zoomControl); + } +}); + +// @namespace Control.Zoom +// @factory L.control.zoom(options: Control.Zoom options) +// Creates a zoom control +var zoom = function (options) { + return new Zoom(options); +}; + +/* + * @class Control.Scale + * @aka L.Control.Scale + * @inherits Control + * + * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`. + * + * @example + * + * ```js + * L.control.scale().addTo(map); + * ``` + */ + +var Scale = Control.extend({ + // @section + // @aka Control.Scale options + options: { + position: 'bottomleft', + + // @option maxWidth: Number = 100 + // Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500). + maxWidth: 100, + + // @option metric: Boolean = True + // Whether to show the metric scale line (m/km). + metric: true, + + // @option imperial: Boolean = True + // Whether to show the imperial scale line (mi/ft). + imperial: true + + // @option updateWhenIdle: Boolean = false + // If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)). + }, + + onAdd: function (map) { + var className = 'leaflet-control-scale', + container = create$1('div', className), + options = this.options; + + this._addScales(options, className + '-line', container); + + map.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this); + map.whenReady(this._update, this); + + return container; + }, + + onRemove: function (map) { + map.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this); + }, + + _addScales: function (options, className, container) { + if (options.metric) { + this._mScale = create$1('div', className, container); + } + if (options.imperial) { + this._iScale = create$1('div', className, container); + } + }, + + _update: function () { + var map = this._map, + y = map.getSize().y / 2; + + var maxMeters = map.distance( + map.containerPointToLatLng([0, y]), + map.containerPointToLatLng([this.options.maxWidth, y])); + + this._updateScales(maxMeters); + }, + + _updateScales: function (maxMeters) { + if (this.options.metric && maxMeters) { + this._updateMetric(maxMeters); + } + if (this.options.imperial && maxMeters) { + this._updateImperial(maxMeters); + } + }, + + _updateMetric: function (maxMeters) { + var meters = this._getRoundNum(maxMeters), + label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km'; + + this._updateScale(this._mScale, label, meters / maxMeters); + }, + + _updateImperial: function (maxMeters) { + var maxFeet = maxMeters * 3.2808399, + maxMiles, miles, feet; + + if (maxFeet > 5280) { + maxMiles = maxFeet / 5280; + miles = this._getRoundNum(maxMiles); + this._updateScale(this._iScale, miles + ' mi', miles / maxMiles); + + } else { + feet = this._getRoundNum(maxFeet); + this._updateScale(this._iScale, feet + ' ft', feet / maxFeet); + } + }, + + _updateScale: function (scale, text, ratio) { + scale.style.width = Math.round(this.options.maxWidth * ratio) + 'px'; + scale.innerHTML = text; + }, + + _getRoundNum: function (num) { + var pow10 = Math.pow(10, (Math.floor(num) + '').length - 1), + d = num / pow10; + + d = d >= 10 ? 10 : + d >= 5 ? 5 : + d >= 3 ? 3 : + d >= 2 ? 2 : 1; + + return pow10 * d; + } +}); + + +// @factory L.control.scale(options?: Control.Scale options) +// Creates an scale control with the given options. +var scale = function (options) { + return new Scale(options); +}; + +/* + * @class Control.Attribution + * @aka L.Control.Attribution + * @inherits Control + * + * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control. + */ + +var Attribution = Control.extend({ + // @section + // @aka Control.Attribution options + options: { + position: 'bottomright', + + // @option prefix: String = 'Leaflet' + // The HTML text shown before the attributions. Pass `false` to disable. + prefix: '<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>' + }, + + initialize: function (options) { + setOptions(this, options); + + this._attributions = {}; + }, + + onAdd: function (map) { + map.attributionControl = this; + this._container = create$1('div', 'leaflet-control-attribution'); + disableClickPropagation(this._container); + + // TODO ugly, refactor + for (var i in map._layers) { + if (map._layers[i].getAttribution) { + this.addAttribution(map._layers[i].getAttribution()); + } + } + + this._update(); + + return this._container; + }, + + // @method setPrefix(prefix: String): this + // Sets the text before the attributions. + setPrefix: function (prefix) { + this.options.prefix = prefix; + this._update(); + return this; + }, + + // @method addAttribution(text: String): this + // Adds an attribution text (e.g. `'Vector data © Mapbox'`). + addAttribution: function (text) { + if (!text) { return this; } + + if (!this._attributions[text]) { + this._attributions[text] = 0; + } + this._attributions[text]++; + + this._update(); + + return this; + }, + + // @method removeAttribution(text: String): this + // Removes an attribution text. + removeAttribution: function (text) { + if (!text) { return this; } + + if (this._attributions[text]) { + this._attributions[text]--; + this._update(); + } + + return this; + }, + + _update: function () { + if (!this._map) { return; } + + var attribs = []; + + for (var i in this._attributions) { + if (this._attributions[i]) { + attribs.push(i); + } + } + + var prefixAndAttribs = []; + + if (this.options.prefix) { + prefixAndAttribs.push(this.options.prefix); + } + if (attribs.length) { + prefixAndAttribs.push(attribs.join(', ')); + } + + this._container.innerHTML = prefixAndAttribs.join(' | '); + } +}); + +// @namespace Map +// @section Control options +// @option attributionControl: Boolean = true +// Whether a [attribution control](#control-attribution) is added to the map by default. +Map.mergeOptions({ + attributionControl: true +}); + +Map.addInitHook(function () { + if (this.options.attributionControl) { + new Attribution().addTo(this); + } +}); + +// @namespace Control.Attribution +// @factory L.control.attribution(options: Control.Attribution options) +// Creates an attribution control. +var attribution = function (options) { + return new Attribution(options); +}; + +Control.Layers = Layers; +Control.Zoom = Zoom; +Control.Scale = Scale; +Control.Attribution = Attribution; + +control.layers = layers; +control.zoom = zoom; +control.scale = scale; +control.attribution = attribution; + +/* + L.Handler is a base class for handler classes that are used internally to inject + interaction features like dragging to classes like Map and Marker. +*/ + +// @class Handler +// @aka L.Handler +// Abstract class for map interaction handlers + +var Handler = Class.extend({ + initialize: function (map) { + this._map = map; + }, + + // @method enable(): this + // Enables the handler + enable: function () { + if (this._enabled) { return this; } + + this._enabled = true; + this.addHooks(); + return this; + }, + + // @method disable(): this + // Disables the handler + disable: function () { + if (!this._enabled) { return this; } + + this._enabled = false; + this.removeHooks(); + return this; + }, + + // @method enabled(): Boolean + // Returns `true` if the handler is enabled + enabled: function () { + return !!this._enabled; + } + + // @section Extension methods + // Classes inheriting from `Handler` must implement the two following methods: + // @method addHooks() + // Called when the handler is enabled, should add event hooks. + // @method removeHooks() + // Called when the handler is disabled, should remove the event hooks added previously. +}); + +// @section There is static function which can be called without instantiating L.Handler: +// @function addTo(map: Map, name: String): this +// Adds a new Handler to the given map with the given name. +Handler.addTo = function (map, name) { + map.addHandler(name, this); + return this; +}; + +var Mixin = {Events: Events}; + +/* + * @class Draggable + * @aka L.Draggable + * @inherits Evented + * + * A class for making DOM elements draggable (including touch support). + * Used internally for map and marker dragging. Only works for elements + * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition). + * + * @example + * ```js + * var draggable = new L.Draggable(elementToDrag); + * draggable.enable(); + * ``` + */ + +var START = touch ? 'touchstart mousedown' : 'mousedown'; +var END = { + mousedown: 'mouseup', + touchstart: 'touchend', + pointerdown: 'touchend', + MSPointerDown: 'touchend' +}; +var MOVE = { + mousedown: 'mousemove', + touchstart: 'touchmove', + pointerdown: 'touchmove', + MSPointerDown: 'touchmove' +}; + + +var Draggable = Evented.extend({ + + options: { + // @section + // @aka Draggable options + // @option clickTolerance: Number = 3 + // The max number of pixels a user can shift the mouse pointer during a click + // for it to be considered a valid click (as opposed to a mouse drag). + clickTolerance: 3 + }, + + // @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline?: Boolean, options?: Draggable options) + // Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default). + initialize: function (element, dragStartTarget, preventOutline$$1, options) { + setOptions(this, options); + + this._element = element; + this._dragStartTarget = dragStartTarget || element; + this._preventOutline = preventOutline$$1; + }, + + // @method enable() + // Enables the dragging ability + enable: function () { + if (this._enabled) { return; } + + on(this._dragStartTarget, START, this._onDown, this); + + this._enabled = true; + }, + + // @method disable() + // Disables the dragging ability + disable: function () { + if (!this._enabled) { return; } + + // If we're currently dragging this draggable, + // disabling it counts as first ending the drag. + if (Draggable._dragging === this) { + this.finishDrag(); + } + + off(this._dragStartTarget, START, this._onDown, this); + + this._enabled = false; + this._moved = false; + }, + + _onDown: function (e) { + // Ignore simulated events, since we handle both touch and + // mouse explicitly; otherwise we risk getting duplicates of + // touch events, see #4315. + // Also ignore the event if disabled; this happens in IE11 + // under some circumstances, see #3666. + if (e._simulated || !this._enabled) { return; } + + this._moved = false; + + if (hasClass(this._element, 'leaflet-zoom-anim')) { return; } + + if (Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches)) { return; } + Draggable._dragging = this; // Prevent dragging multiple objects at once. + + if (this._preventOutline) { + preventOutline(this._element); + } + + disableImageDrag(); + disableTextSelection(); + + if (this._moving) { return; } + + // @event down: Event + // Fired when a drag is about to start. + this.fire('down'); + + var first = e.touches ? e.touches[0] : e; + + this._startPoint = new Point(first.clientX, first.clientY); + + on(document, MOVE[e.type], this._onMove, this); + on(document, END[e.type], this._onUp, this); + }, + + _onMove: function (e) { + // Ignore simulated events, since we handle both touch and + // mouse explicitly; otherwise we risk getting duplicates of + // touch events, see #4315. + // Also ignore the event if disabled; this happens in IE11 + // under some circumstances, see #3666. + if (e._simulated || !this._enabled) { return; } + + if (e.touches && e.touches.length > 1) { + this._moved = true; + return; + } + + var first = (e.touches && e.touches.length === 1 ? e.touches[0] : e), + newPoint = new Point(first.clientX, first.clientY), + offset = newPoint.subtract(this._startPoint); + + if (!offset.x && !offset.y) { return; } + if (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; } + + preventDefault(e); + + if (!this._moved) { + // @event dragstart: Event + // Fired when a drag starts + this.fire('dragstart'); + + this._moved = true; + this._startPos = getPosition(this._element).subtract(offset); + + addClass(document.body, 'leaflet-dragging'); + + this._lastTarget = e.target || e.srcElement; + // IE and Edge do not give the <use> element, so fetch it + // if necessary + if ((window.SVGElementInstance) && (this._lastTarget instanceof SVGElementInstance)) { + this._lastTarget = this._lastTarget.correspondingUseElement; + } + addClass(this._lastTarget, 'leaflet-drag-target'); + } + + this._newPos = this._startPos.add(offset); + this._moving = true; + + cancelAnimFrame(this._animRequest); + this._lastEvent = e; + this._animRequest = requestAnimFrame(this._updatePosition, this, true); + }, + + _updatePosition: function () { + var e = {originalEvent: this._lastEvent}; + + // @event predrag: Event + // Fired continuously during dragging *before* each corresponding + // update of the element's position. + this.fire('predrag', e); + setPosition(this._element, this._newPos); + + // @event drag: Event + // Fired continuously during dragging. + this.fire('drag', e); + }, + + _onUp: function (e) { + // Ignore simulated events, since we handle both touch and + // mouse explicitly; otherwise we risk getting duplicates of + // touch events, see #4315. + // Also ignore the event if disabled; this happens in IE11 + // under some circumstances, see #3666. + if (e._simulated || !this._enabled) { return; } + this.finishDrag(); + }, + + finishDrag: function () { + removeClass(document.body, 'leaflet-dragging'); + + if (this._lastTarget) { + removeClass(this._lastTarget, 'leaflet-drag-target'); + this._lastTarget = null; + } + + for (var i in MOVE) { + off(document, MOVE[i], this._onMove, this); + off(document, END[i], this._onUp, this); + } + + enableImageDrag(); + enableTextSelection(); + + if (this._moved && this._moving) { + // ensure drag is not fired after dragend + cancelAnimFrame(this._animRequest); + + // @event dragend: DragEndEvent + // Fired when the drag ends. + this.fire('dragend', { + distance: this._newPos.distanceTo(this._startPos) + }); + } + + this._moving = false; + Draggable._dragging = false; + } + +}); + +/* + * @namespace LineUtil + * + * Various utility functions for polyline points processing, used by Leaflet internally to make polylines lightning-fast. + */ + +// Simplify polyline with vertex reduction and Douglas-Peucker simplification. +// Improves rendering performance dramatically by lessening the number of points to draw. + +// @function simplify(points: Point[], tolerance: Number): Point[] +// Dramatically reduces the number of points in a polyline while retaining +// its shape and returns a new array of simplified points, using the +// [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm). +// Used for a huge performance boost when processing/displaying Leaflet polylines for +// each zoom level and also reducing visual noise. tolerance affects the amount of +// simplification (lesser value means higher quality but slower and with more points). +// Also released as a separated micro-library [Simplify.js](http://mourner.github.com/simplify-js/). +function simplify(points, tolerance) { + if (!tolerance || !points.length) { + return points.slice(); + } + + var sqTolerance = tolerance * tolerance; + + // stage 1: vertex reduction + points = _reducePoints(points, sqTolerance); + + // stage 2: Douglas-Peucker simplification + points = _simplifyDP(points, sqTolerance); + + return points; +} + +// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number +// Returns the distance between point `p` and segment `p1` to `p2`. +function pointToSegmentDistance(p, p1, p2) { + return Math.sqrt(_sqClosestPointOnSegment(p, p1, p2, true)); +} + +// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number +// Returns the closest point from a point `p` on a segment `p1` to `p2`. +function closestPointOnSegment(p, p1, p2) { + return _sqClosestPointOnSegment(p, p1, p2); +} + +// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm +function _simplifyDP(points, sqTolerance) { + + var len = points.length, + ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array, + markers = new ArrayConstructor(len); + + markers[0] = markers[len - 1] = 1; + + _simplifyDPStep(points, markers, sqTolerance, 0, len - 1); + + var i, + newPoints = []; + + for (i = 0; i < len; i++) { + if (markers[i]) { + newPoints.push(points[i]); + } + } + + return newPoints; +} + +function _simplifyDPStep(points, markers, sqTolerance, first, last) { + + var maxSqDist = 0, + index, i, sqDist; + + for (i = first + 1; i <= last - 1; i++) { + sqDist = _sqClosestPointOnSegment(points[i], points[first], points[last], true); + + if (sqDist > maxSqDist) { + index = i; + maxSqDist = sqDist; + } + } + + if (maxSqDist > sqTolerance) { + markers[index] = 1; + + _simplifyDPStep(points, markers, sqTolerance, first, index); + _simplifyDPStep(points, markers, sqTolerance, index, last); + } +} + +// reduce points that are too close to each other to a single point +function _reducePoints(points, sqTolerance) { + var reducedPoints = [points[0]]; + + for (var i = 1, prev = 0, len = points.length; i < len; i++) { + if (_sqDist(points[i], points[prev]) > sqTolerance) { + reducedPoints.push(points[i]); + prev = i; + } + } + if (prev < len - 1) { + reducedPoints.push(points[len - 1]); + } + return reducedPoints; +} + +var _lastCode; + +// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean +// Clips the segment a to b by rectangular bounds with the +// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm) +// (modifying the segment points directly!). Used by Leaflet to only show polyline +// points that are on the screen or near, increasing performance. +function clipSegment(a, b, bounds, useLastCode, round) { + var codeA = useLastCode ? _lastCode : _getBitCode(a, bounds), + codeB = _getBitCode(b, bounds), + + codeOut, p, newCode; + + // save 2nd code to avoid calculating it on the next segment + _lastCode = codeB; + + while (true) { + // if a,b is inside the clip window (trivial accept) + if (!(codeA | codeB)) { + return [a, b]; + } + + // if a,b is outside the clip window (trivial reject) + if (codeA & codeB) { + return false; + } + + // other cases + codeOut = codeA || codeB; + p = _getEdgeIntersection(a, b, codeOut, bounds, round); + newCode = _getBitCode(p, bounds); + + if (codeOut === codeA) { + a = p; + codeA = newCode; + } else { + b = p; + codeB = newCode; + } + } +} + +function _getEdgeIntersection(a, b, code, bounds, round) { + var dx = b.x - a.x, + dy = b.y - a.y, + min = bounds.min, + max = bounds.max, + x, y; + + if (code & 8) { // top + x = a.x + dx * (max.y - a.y) / dy; + y = max.y; + + } else if (code & 4) { // bottom + x = a.x + dx * (min.y - a.y) / dy; + y = min.y; + + } else if (code & 2) { // right + x = max.x; + y = a.y + dy * (max.x - a.x) / dx; + + } else if (code & 1) { // left + x = min.x; + y = a.y + dy * (min.x - a.x) / dx; + } + + return new Point(x, y, round); +} + +function _getBitCode(p, bounds) { + var code = 0; + + if (p.x < bounds.min.x) { // left + code |= 1; + } else if (p.x > bounds.max.x) { // right + code |= 2; + } + + if (p.y < bounds.min.y) { // bottom + code |= 4; + } else if (p.y > bounds.max.y) { // top + code |= 8; + } + + return code; +} + +// square distance (to avoid unnecessary Math.sqrt calls) +function _sqDist(p1, p2) { + var dx = p2.x - p1.x, + dy = p2.y - p1.y; + return dx * dx + dy * dy; +} + +// return closest point on segment or distance to that point +function _sqClosestPointOnSegment(p, p1, p2, sqDist) { + var x = p1.x, + y = p1.y, + dx = p2.x - x, + dy = p2.y - y, + dot = dx * dx + dy * dy, + t; + + if (dot > 0) { + t = ((p.x - x) * dx + (p.y - y) * dy) / dot; + + if (t > 1) { + x = p2.x; + y = p2.y; + } else if (t > 0) { + x += dx * t; + y += dy * t; + } + } + + dx = p.x - x; + dy = p.y - y; + + return sqDist ? dx * dx + dy * dy : new Point(x, y); +} + + +// @function isFlat(latlngs: LatLng[]): Boolean +// Returns true if `latlngs` is a flat array, false is nested. +function isFlat(latlngs) { + return !isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined'); +} + +function _flat(latlngs) { + console.warn('Deprecated use of _flat, please use L.LineUtil.isFlat instead.'); + return isFlat(latlngs); +} + + +var LineUtil = (Object.freeze || Object)({ + simplify: simplify, + pointToSegmentDistance: pointToSegmentDistance, + closestPointOnSegment: closestPointOnSegment, + clipSegment: clipSegment, + _getEdgeIntersection: _getEdgeIntersection, + _getBitCode: _getBitCode, + _sqClosestPointOnSegment: _sqClosestPointOnSegment, + isFlat: isFlat, + _flat: _flat +}); + +/* + * @namespace PolyUtil + * Various utility functions for polygon geometries. + */ + +/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[] + * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)). + * Used by Leaflet to only show polygon points that are on the screen or near, increasing + * performance. Note that polygon points needs different algorithm for clipping + * than polyline, so there's a separate method for it. + */ +function clipPolygon(points, bounds, round) { + var clippedPoints, + edges = [1, 4, 2, 8], + i, j, k, + a, b, + len, edge, p; + + for (i = 0, len = points.length; i < len; i++) { + points[i]._code = _getBitCode(points[i], bounds); + } + + // for each edge (left, bottom, right, top) + for (k = 0; k < 4; k++) { + edge = edges[k]; + clippedPoints = []; + + for (i = 0, len = points.length, j = len - 1; i < len; j = i++) { + a = points[i]; + b = points[j]; + + // if a is inside the clip window + if (!(a._code & edge)) { + // if b is outside the clip window (a->b goes out of screen) + if (b._code & edge) { + p = _getEdgeIntersection(b, a, edge, bounds, round); + p._code = _getBitCode(p, bounds); + clippedPoints.push(p); + } + clippedPoints.push(a); + + // else if b is inside the clip window (a->b enters the screen) + } else if (!(b._code & edge)) { + p = _getEdgeIntersection(b, a, edge, bounds, round); + p._code = _getBitCode(p, bounds); + clippedPoints.push(p); + } + } + points = clippedPoints; + } + + return points; +} + + +var PolyUtil = (Object.freeze || Object)({ + clipPolygon: clipPolygon +}); + +/* + * @namespace Projection + * @section + * Leaflet comes with a set of already defined Projections out of the box: + * + * @projection L.Projection.LonLat + * + * Equirectangular, or Plate Carree projection — the most simple projection, + * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as + * latitude. Also suitable for flat worlds, e.g. game maps. Used by the + * `EPSG:4326` and `Simple` CRS. + */ + +var LonLat = { + project: function (latlng) { + return new Point(latlng.lng, latlng.lat); + }, + + unproject: function (point) { + return new LatLng(point.y, point.x); + }, + + bounds: new Bounds([-180, -90], [180, 90]) +}; + +/* + * @namespace Projection + * @projection L.Projection.Mercator + * + * Elliptical Mercator projection — more complex than Spherical Mercator. Takes into account that Earth is a geoid, not a perfect sphere. Used by the EPSG:3395 CRS. + */ + +var Mercator = { + R: 6378137, + R_MINOR: 6356752.314245179, + + bounds: new Bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]), + + project: function (latlng) { + var d = Math.PI / 180, + r = this.R, + y = latlng.lat * d, + tmp = this.R_MINOR / r, + e = Math.sqrt(1 - tmp * tmp), + con = e * Math.sin(y); + + var ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2); + y = -r * Math.log(Math.max(ts, 1E-10)); + + return new Point(latlng.lng * d * r, y); + }, + + unproject: function (point) { + var d = 180 / Math.PI, + r = this.R, + tmp = this.R_MINOR / r, + e = Math.sqrt(1 - tmp * tmp), + ts = Math.exp(-point.y / r), + phi = Math.PI / 2 - 2 * Math.atan(ts); + + for (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) { + con = e * Math.sin(phi); + con = Math.pow((1 - con) / (1 + con), e / 2); + dphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi; + phi += dphi; + } + + return new LatLng(phi * d, point.x * d / r); + } +}; + +/* + * @class Projection + + * An object with methods for projecting geographical coordinates of the world onto + * a flat surface (and back). See [Map projection](http://en.wikipedia.org/wiki/Map_projection). + + * @property bounds: Bounds + * The bounds (specified in CRS units) where the projection is valid + + * @method project(latlng: LatLng): Point + * Projects geographical coordinates into a 2D point. + * Only accepts actual `L.LatLng` instances, not arrays. + + * @method unproject(point: Point): LatLng + * The inverse of `project`. Projects a 2D point into a geographical location. + * Only accepts actual `L.Point` instances, not arrays. + + * Note that the projection instances do not inherit from Leafet's `Class` object, + * and can't be instantiated. Also, new classes can't inherit from them, + * and methods can't be added to them with the `include` function. + + */ + + + + +var index = (Object.freeze || Object)({ + LonLat: LonLat, + Mercator: Mercator, + SphericalMercator: SphericalMercator +}); + +/* + * @namespace CRS + * @crs L.CRS.EPSG3395 + * + * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection. + */ +var EPSG3395 = extend({}, Earth, { + code: 'EPSG:3395', + projection: Mercator, + + transformation: (function () { + var scale = 0.5 / (Math.PI * Mercator.R); + return toTransformation(scale, 0.5, -scale, 0.5); + }()) +}); + +/* + * @namespace CRS + * @crs L.CRS.EPSG4326 + * + * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection. + * + * Leaflet 1.0.x complies with the [TMS coordinate scheme for EPSG:4326](https://wiki.osgeo.org/wiki/Tile_Map_Service_Specification#global-geodetic), + * which is a breaking change from 0.7.x behaviour. If you are using a `TileLayer` + * with this CRS, ensure that there are two 256x256 pixel tiles covering the + * whole earth at zoom level zero, and that the tile coordinate origin is (-180,+90), + * or (-180,-90) for `TileLayer`s with [the `tms` option](#tilelayer-tms) set. + */ + +var EPSG4326 = extend({}, Earth, { + code: 'EPSG:4326', + projection: LonLat, + transformation: toTransformation(1 / 180, 1, -1 / 180, 0.5) +}); + +/* + * @namespace CRS + * @crs L.CRS.Simple + * + * A simple CRS that maps longitude and latitude into `x` and `y` directly. + * May be used for maps of flat surfaces (e.g. game maps). Note that the `y` + * axis should still be inverted (going from bottom to top). `distance()` returns + * simple euclidean distance. + */ + +var Simple = extend({}, CRS, { + projection: LonLat, + transformation: toTransformation(1, 0, -1, 0), + + scale: function (zoom) { + return Math.pow(2, zoom); + }, + + zoom: function (scale) { + return Math.log(scale) / Math.LN2; + }, + + distance: function (latlng1, latlng2) { + var dx = latlng2.lng - latlng1.lng, + dy = latlng2.lat - latlng1.lat; + + return Math.sqrt(dx * dx + dy * dy); + }, + + infinite: true +}); + +CRS.Earth = Earth; +CRS.EPSG3395 = EPSG3395; +CRS.EPSG3857 = EPSG3857; +CRS.EPSG900913 = EPSG900913; +CRS.EPSG4326 = EPSG4326; +CRS.Simple = Simple; + +/* + * @class Layer + * @inherits Evented + * @aka L.Layer + * @aka ILayer + * + * A set of methods from the Layer base class that all Leaflet layers use. + * Inherits all methods, options and events from `L.Evented`. + * + * @example + * + * ```js + * var layer = L.Marker(latlng).addTo(map); + * layer.addTo(map); + * layer.remove(); + * ``` + * + * @event add: Event + * Fired after the layer is added to a map + * + * @event remove: Event + * Fired after the layer is removed from a map + */ + + +var Layer = Evented.extend({ + + // Classes extending `L.Layer` will inherit the following options: + options: { + // @option pane: String = 'overlayPane' + // By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default. + pane: 'overlayPane', + + // @option attribution: String = null + // String to be shown in the attribution control, describes the layer data, e.g. "© Mapbox". + attribution: null, + + bubblingMouseEvents: true + }, + + /* @section + * Classes extending `L.Layer` will inherit the following methods: + * + * @method addTo(map: Map|LayerGroup): this + * Adds the layer to the given map or layer group. + */ + addTo: function (map) { + map.addLayer(this); + return this; + }, + + // @method remove: this + // Removes the layer from the map it is currently active on. + remove: function () { + return this.removeFrom(this._map || this._mapToAdd); + }, + + // @method removeFrom(map: Map): this + // Removes the layer from the given map + removeFrom: function (obj) { + if (obj) { + obj.removeLayer(this); + } + return this; + }, + + // @method getPane(name? : String): HTMLElement + // Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer. + getPane: function (name) { + return this._map.getPane(name ? (this.options[name] || name) : this.options.pane); + }, + + addInteractiveTarget: function (targetEl) { + this._map._targets[stamp(targetEl)] = this; + return this; + }, + + removeInteractiveTarget: function (targetEl) { + delete this._map._targets[stamp(targetEl)]; + return this; + }, + + // @method getAttribution: String + // Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution). + getAttribution: function () { + return this.options.attribution; + }, + + _layerAdd: function (e) { + var map = e.target; + + // check in case layer gets added and then removed before the map is ready + if (!map.hasLayer(this)) { return; } + + this._map = map; + this._zoomAnimated = map._zoomAnimated; + + if (this.getEvents) { + var events = this.getEvents(); + map.on(events, this); + this.once('remove', function () { + map.off(events, this); + }, this); + } + + this.onAdd(map); + + if (this.getAttribution && map.attributionControl) { + map.attributionControl.addAttribution(this.getAttribution()); + } + + this.fire('add'); + map.fire('layeradd', {layer: this}); + } +}); + +/* @section Extension methods + * @uninheritable + * + * Every layer should extend from `L.Layer` and (re-)implement the following methods. + * + * @method onAdd(map: Map): this + * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer). + * + * @method onRemove(map: Map): this + * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer). + * + * @method getEvents(): Object + * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer. + * + * @method getAttribution(): String + * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible. + * + * @method beforeAdd(map: Map): this + * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only. + */ + + +/* @namespace Map + * @section Layer events + * + * @event layeradd: LayerEvent + * Fired when a new layer is added to the map. + * + * @event layerremove: LayerEvent + * Fired when some layer is removed from the map + * + * @section Methods for Layers and Controls + */ +Map.include({ + // @method addLayer(layer: Layer): this + // Adds the given layer to the map + addLayer: function (layer) { + if (!layer._layerAdd) { + throw new Error('The provided object is not a Layer.'); + } + + var id = stamp(layer); + if (this._layers[id]) { return this; } + this._layers[id] = layer; + + layer._mapToAdd = this; + + if (layer.beforeAdd) { + layer.beforeAdd(this); + } + + this.whenReady(layer._layerAdd, layer); + + return this; + }, + + // @method removeLayer(layer: Layer): this + // Removes the given layer from the map. + removeLayer: function (layer) { + var id = stamp(layer); + + if (!this._layers[id]) { return this; } + + if (this._loaded) { + layer.onRemove(this); + } + + if (layer.getAttribution && this.attributionControl) { + this.attributionControl.removeAttribution(layer.getAttribution()); + } + + delete this._layers[id]; + + if (this._loaded) { + this.fire('layerremove', {layer: layer}); + layer.fire('remove'); + } + + layer._map = layer._mapToAdd = null; + + return this; + }, + + // @method hasLayer(layer: Layer): Boolean + // Returns `true` if the given layer is currently added to the map + hasLayer: function (layer) { + return !!layer && (stamp(layer) in this._layers); + }, + + /* @method eachLayer(fn: Function, context?: Object): this + * Iterates over the layers of the map, optionally specifying context of the iterator function. + * ``` + * map.eachLayer(function(layer){ + * layer.bindPopup('Hello'); + * }); + * ``` + */ + eachLayer: function (method, context) { + for (var i in this._layers) { + method.call(context, this._layers[i]); + } + return this; + }, + + _addLayers: function (layers) { + layers = layers ? (isArray(layers) ? layers : [layers]) : []; + + for (var i = 0, len = layers.length; i < len; i++) { + this.addLayer(layers[i]); + } + }, + + _addZoomLimit: function (layer) { + if (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) { + this._zoomBoundLayers[stamp(layer)] = layer; + this._updateZoomLevels(); + } + }, + + _removeZoomLimit: function (layer) { + var id = stamp(layer); + + if (this._zoomBoundLayers[id]) { + delete this._zoomBoundLayers[id]; + this._updateZoomLevels(); + } + }, + + _updateZoomLevels: function () { + var minZoom = Infinity, + maxZoom = -Infinity, + oldZoomSpan = this._getZoomSpan(); + + for (var i in this._zoomBoundLayers) { + var options = this._zoomBoundLayers[i].options; + + minZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom); + maxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom); + } + + this._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom; + this._layersMinZoom = minZoom === Infinity ? undefined : minZoom; + + // @section Map state change events + // @event zoomlevelschange: Event + // Fired when the number of zoomlevels on the map is changed due + // to adding or removing a layer. + if (oldZoomSpan !== this._getZoomSpan()) { + this.fire('zoomlevelschange'); + } + + if (this.options.maxZoom === undefined && this._layersMaxZoom && this.getZoom() > this._layersMaxZoom) { + this.setZoom(this._layersMaxZoom); + } + if (this.options.minZoom === undefined && this._layersMinZoom && this.getZoom() < this._layersMinZoom) { + this.setZoom(this._layersMinZoom); + } + } +}); + +/* + * @class LayerGroup + * @aka L.LayerGroup + * @inherits Layer + * + * Used to group several layers and handle them as one. If you add it to the map, + * any layers added or removed from the group will be added/removed on the map as + * well. Extends `Layer`. + * + * @example + * + * ```js + * L.layerGroup([marker1, marker2]) + * .addLayer(polyline) + * .addTo(map); + * ``` + */ + +var LayerGroup = Layer.extend({ + + initialize: function (layers, options) { + setOptions(this, options); + + this._layers = {}; + + var i, len; + + if (layers) { + for (i = 0, len = layers.length; i < len; i++) { + this.addLayer(layers[i]); + } + } + }, + + // @method addLayer(layer: Layer): this + // Adds the given layer to the group. + addLayer: function (layer) { + var id = this.getLayerId(layer); + + this._layers[id] = layer; + + if (this._map) { + this._map.addLayer(layer); + } + + return this; + }, + + // @method removeLayer(layer: Layer): this + // Removes the given layer from the group. + // @alternative + // @method removeLayer(id: Number): this + // Removes the layer with the given internal ID from the group. + removeLayer: function (layer) { + var id = layer in this._layers ? layer : this.getLayerId(layer); + + if (this._map && this._layers[id]) { + this._map.removeLayer(this._layers[id]); + } + + delete this._layers[id]; + + return this; + }, + + // @method hasLayer(layer: Layer): Boolean + // Returns `true` if the given layer is currently added to the group. + // @alternative + // @method hasLayer(id: Number): Boolean + // Returns `true` if the given internal ID is currently added to the group. + hasLayer: function (layer) { + return !!layer && (layer in this._layers || this.getLayerId(layer) in this._layers); + }, + + // @method clearLayers(): this + // Removes all the layers from the group. + clearLayers: function () { + return this.eachLayer(this.removeLayer, this); + }, + + // @method invoke(methodName: String, …): this + // Calls `methodName` on every layer contained in this group, passing any + // additional parameters. Has no effect if the layers contained do not + // implement `methodName`. + invoke: function (methodName) { + var args = Array.prototype.slice.call(arguments, 1), + i, layer; + + for (i in this._layers) { + layer = this._layers[i]; + + if (layer[methodName]) { + layer[methodName].apply(layer, args); + } + } + + return this; + }, + + onAdd: function (map) { + this.eachLayer(map.addLayer, map); + }, + + onRemove: function (map) { + this.eachLayer(map.removeLayer, map); + }, + + // @method eachLayer(fn: Function, context?: Object): this + // Iterates over the layers of the group, optionally specifying context of the iterator function. + // ```js + // group.eachLayer(function (layer) { + // layer.bindPopup('Hello'); + // }); + // ``` + eachLayer: function (method, context) { + for (var i in this._layers) { + method.call(context, this._layers[i]); + } + return this; + }, + + // @method getLayer(id: Number): Layer + // Returns the layer with the given internal ID. + getLayer: function (id) { + return this._layers[id]; + }, + + // @method getLayers(): Layer[] + // Returns an array of all the layers added to the group. + getLayers: function () { + var layers = []; + this.eachLayer(layers.push, layers); + return layers; + }, + + // @method setZIndex(zIndex: Number): this + // Calls `setZIndex` on every layer contained in this group, passing the z-index. + setZIndex: function (zIndex) { + return this.invoke('setZIndex', zIndex); + }, + + // @method getLayerId(layer: Layer): Number + // Returns the internal ID for a layer + getLayerId: function (layer) { + return stamp(layer); + } +}); + + +// @factory L.layerGroup(layers?: Layer[], options?: Object) +// Create a layer group, optionally given an initial set of layers and an `options` object. +var layerGroup = function (layers, options) { + return new LayerGroup(layers, options); +}; + +/* + * @class FeatureGroup + * @aka L.FeatureGroup + * @inherits LayerGroup + * + * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers: + * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip)) + * * Events are propagated to the `FeatureGroup`, so if the group has an event + * handler, it will handle events from any of the layers. This includes mouse events + * and custom events. + * * Has `layeradd` and `layerremove` events + * + * @example + * + * ```js + * L.featureGroup([marker1, marker2, polyline]) + * .bindPopup('Hello world!') + * .on('click', function() { alert('Clicked on a member of the group!'); }) + * .addTo(map); + * ``` + */ + +var FeatureGroup = LayerGroup.extend({ + + addLayer: function (layer) { + if (this.hasLayer(layer)) { + return this; + } + + layer.addEventParent(this); + + LayerGroup.prototype.addLayer.call(this, layer); + + // @event layeradd: LayerEvent + // Fired when a layer is added to this `FeatureGroup` + return this.fire('layeradd', {layer: layer}); + }, + + removeLayer: function (layer) { + if (!this.hasLayer(layer)) { + return this; + } + if (layer in this._layers) { + layer = this._layers[layer]; + } + + layer.removeEventParent(this); + + LayerGroup.prototype.removeLayer.call(this, layer); + + // @event layerremove: LayerEvent + // Fired when a layer is removed from this `FeatureGroup` + return this.fire('layerremove', {layer: layer}); + }, + + // @method setStyle(style: Path options): this + // Sets the given path options to each layer of the group that has a `setStyle` method. + setStyle: function (style) { + return this.invoke('setStyle', style); + }, + + // @method bringToFront(): this + // Brings the layer group to the top of all other layers + bringToFront: function () { + return this.invoke('bringToFront'); + }, + + // @method bringToBack(): this + // Brings the layer group to the back of all other layers + bringToBack: function () { + return this.invoke('bringToBack'); + }, + + // @method getBounds(): LatLngBounds + // Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children). + getBounds: function () { + var bounds = new LatLngBounds(); + + for (var id in this._layers) { + var layer = this._layers[id]; + bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng()); + } + return bounds; + } +}); + +// @factory L.featureGroup(layers: Layer[]) +// Create a feature group, optionally given an initial set of layers. +var featureGroup = function (layers) { + return new FeatureGroup(layers); +}; + +/* + * @class Icon + * @aka L.Icon + * + * Represents an icon to provide when creating a marker. + * + * @example + * + * ```js + * var myIcon = L.icon({ + * iconUrl: 'my-icon.png', + * iconRetinaUrl: 'my-icon@2x.png', + * iconSize: [38, 95], + * iconAnchor: [22, 94], + * popupAnchor: [-3, -76], + * shadowUrl: 'my-icon-shadow.png', + * shadowRetinaUrl: 'my-icon-shadow@2x.png', + * shadowSize: [68, 95], + * shadowAnchor: [22, 94] + * }); + * + * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); + * ``` + * + * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default. + * + */ + +var Icon = Class.extend({ + + /* @section + * @aka Icon options + * + * @option iconUrl: String = null + * **(required)** The URL to the icon image (absolute or relative to your script path). + * + * @option iconRetinaUrl: String = null + * The URL to a retina sized version of the icon image (absolute or relative to your + * script path). Used for Retina screen devices. + * + * @option iconSize: Point = null + * Size of the icon image in pixels. + * + * @option iconAnchor: Point = null + * The coordinates of the "tip" of the icon (relative to its top left corner). The icon + * will be aligned so that this point is at the marker's geographical location. Centered + * by default if size is specified, also can be set in CSS with negative margins. + * + * @option popupAnchor: Point = [0, 0] + * The coordinates of the point from which popups will "open", relative to the icon anchor. + * + * @option tooltipAnchor: Point = [0, 0] + * The coordinates of the point from which tooltips will "open", relative to the icon anchor. + * + * @option shadowUrl: String = null + * The URL to the icon shadow image. If not specified, no shadow image will be created. + * + * @option shadowRetinaUrl: String = null + * + * @option shadowSize: Point = null + * Size of the shadow image in pixels. + * + * @option shadowAnchor: Point = null + * The coordinates of the "tip" of the shadow (relative to its top left corner) (the same + * as iconAnchor if not specified). + * + * @option className: String = '' + * A custom class name to assign to both icon and shadow images. Empty by default. + */ + + options: { + popupAnchor: [0, 0], + tooltipAnchor: [0, 0], + }, + + initialize: function (options) { + setOptions(this, options); + }, + + // @method createIcon(oldIcon?: HTMLElement): HTMLElement + // Called internally when the icon has to be shown, returns a `<img>` HTML element + // styled according to the options. + createIcon: function (oldIcon) { + return this._createIcon('icon', oldIcon); + }, + + // @method createShadow(oldIcon?: HTMLElement): HTMLElement + // As `createIcon`, but for the shadow beneath it. + createShadow: function (oldIcon) { + return this._createIcon('shadow', oldIcon); + }, + + _createIcon: function (name, oldIcon) { + var src = this._getIconUrl(name); + + if (!src) { + if (name === 'icon') { + throw new Error('iconUrl not set in Icon options (see the docs).'); + } + return null; + } + + var img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null); + this._setIconStyles(img, name); + + return img; + }, + + _setIconStyles: function (img, name) { + var options = this.options; + var sizeOption = options[name + 'Size']; + + if (typeof sizeOption === 'number') { + sizeOption = [sizeOption, sizeOption]; + } + + var size = toPoint(sizeOption), + anchor = toPoint(name === 'shadow' && options.shadowAnchor || options.iconAnchor || + size && size.divideBy(2, true)); + + img.className = 'leaflet-marker-' + name + ' ' + (options.className || ''); + + if (anchor) { + img.style.marginLeft = (-anchor.x) + 'px'; + img.style.marginTop = (-anchor.y) + 'px'; + } + + if (size) { + img.style.width = size.x + 'px'; + img.style.height = size.y + 'px'; + } + }, + + _createImg: function (src, el) { + el = el || document.createElement('img'); + el.src = src; + return el; + }, + + _getIconUrl: function (name) { + return retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url']; + } +}); + + +// @factory L.icon(options: Icon options) +// Creates an icon instance with the given options. +function icon(options) { + return new Icon(options); +} + +/* + * @miniclass Icon.Default (Icon) + * @aka L.Icon.Default + * @section + * + * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when + * no icon is specified. Points to the blue marker image distributed with Leaflet + * releases. + * + * In order to customize the default icon, just change the properties of `L.Icon.Default.prototype.options` + * (which is a set of `Icon options`). + * + * If you want to _completely_ replace the default icon, override the + * `L.Marker.prototype.options.icon` with your own icon instead. + */ + +var IconDefault = Icon.extend({ + + options: { + iconUrl: 'marker-icon.png', + iconRetinaUrl: 'marker-icon-2x.png', + shadowUrl: 'marker-shadow.png', + iconSize: [25, 41], + iconAnchor: [12, 41], + popupAnchor: [1, -34], + tooltipAnchor: [16, -28], + shadowSize: [41, 41] + }, + + _getIconUrl: function (name) { + if (!IconDefault.imagePath) { // Deprecated, backwards-compatibility only + IconDefault.imagePath = this._detectIconPath(); + } + + // @option imagePath: String + // `Icon.Default` will try to auto-detect the location of the + // blue icon images. If you are placing these images in a non-standard + // way, set this option to point to the right path. + return (this.options.imagePath || IconDefault.imagePath) + Icon.prototype._getIconUrl.call(this, name); + }, + + _detectIconPath: function () { + var el = create$1('div', 'leaflet-default-icon-path', document.body); + var path = getStyle(el, 'background-image') || + getStyle(el, 'backgroundImage'); // IE8 + + document.body.removeChild(el); + + if (path === null || path.indexOf('url') !== 0) { + path = ''; + } else { + path = path.replace(/^url\(["']?/, '').replace(/marker-icon\.png["']?\)$/, ''); + } + + return path; + } +}); + +/* + * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable. + */ + + +/* @namespace Marker + * @section Interaction handlers + * + * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example: + * + * ```js + * marker.dragging.disable(); + * ``` + * + * @property dragging: Handler + * Marker dragging handler (by both mouse and touch). Only valid when the marker is on the map (Otherwise set [`marker.options.draggable`](#marker-draggable)). + */ + +var MarkerDrag = Handler.extend({ + initialize: function (marker) { + this._marker = marker; + }, + + addHooks: function () { + var icon = this._marker._icon; + + if (!this._draggable) { + this._draggable = new Draggable(icon, icon, true); + } + + this._draggable.on({ + dragstart: this._onDragStart, + predrag: this._onPreDrag, + drag: this._onDrag, + dragend: this._onDragEnd + }, this).enable(); + + addClass(icon, 'leaflet-marker-draggable'); + }, + + removeHooks: function () { + this._draggable.off({ + dragstart: this._onDragStart, + predrag: this._onPreDrag, + drag: this._onDrag, + dragend: this._onDragEnd + }, this).disable(); + + if (this._marker._icon) { + removeClass(this._marker._icon, 'leaflet-marker-draggable'); + } + }, + + moved: function () { + return this._draggable && this._draggable._moved; + }, + + _adjustPan: function (e) { + var marker = this._marker, + map = marker._map, + speed = this._marker.options.autoPanSpeed, + padding = this._marker.options.autoPanPadding, + iconPos = L.DomUtil.getPosition(marker._icon), + bounds = map.getPixelBounds(), + origin = map.getPixelOrigin(); + + var panBounds = toBounds( + bounds.min._subtract(origin).add(padding), + bounds.max._subtract(origin).subtract(padding) + ); + + if (!panBounds.contains(iconPos)) { + // Compute incremental movement + var movement = toPoint( + (Math.max(panBounds.max.x, iconPos.x) - panBounds.max.x) / (bounds.max.x - panBounds.max.x) - + (Math.min(panBounds.min.x, iconPos.x) - panBounds.min.x) / (bounds.min.x - panBounds.min.x), + + (Math.max(panBounds.max.y, iconPos.y) - panBounds.max.y) / (bounds.max.y - panBounds.max.y) - + (Math.min(panBounds.min.y, iconPos.y) - panBounds.min.y) / (bounds.min.y - panBounds.min.y) + ).multiplyBy(speed); + + map.panBy(movement, {animate: false}); + + this._draggable._newPos._add(movement); + this._draggable._startPos._add(movement); + + L.DomUtil.setPosition(marker._icon, this._draggable._newPos); + this._onDrag(e); + + this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); + } + }, + + _onDragStart: function () { + // @section Dragging events + // @event dragstart: Event + // Fired when the user starts dragging the marker. + + // @event movestart: Event + // Fired when the marker starts moving (because of dragging). + + this._oldLatLng = this._marker.getLatLng(); + this._marker + .closePopup() + .fire('movestart') + .fire('dragstart'); + }, + + _onPreDrag: function (e) { + if (this._marker.options.autoPan) { + cancelAnimFrame(this._panRequest); + this._panRequest = requestAnimFrame(this._adjustPan.bind(this, e)); + } + }, + + _onDrag: function (e) { + var marker = this._marker, + shadow = marker._shadow, + iconPos = getPosition(marker._icon), + latlng = marker._map.layerPointToLatLng(iconPos); + + // update shadow position + if (shadow) { + setPosition(shadow, iconPos); + } + + marker._latlng = latlng; + e.latlng = latlng; + e.oldLatLng = this._oldLatLng; + + // @event drag: Event + // Fired repeatedly while the user drags the marker. + marker + .fire('move', e) + .fire('drag', e); + }, + + _onDragEnd: function (e) { + // @event dragend: DragEndEvent + // Fired when the user stops dragging the marker. + + cancelAnimFrame(this._panRequest); + + // @event moveend: Event + // Fired when the marker stops moving (because of dragging). + delete this._oldLatLng; + this._marker + .fire('moveend') + .fire('dragend', e); + } +}); + +/* + * @class Marker + * @inherits Interactive layer + * @aka L.Marker + * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`. + * + * @example + * + * ```js + * L.marker([50.5, 30.5]).addTo(map); + * ``` + */ + +var Marker = Layer.extend({ + + // @section + // @aka Marker options + options: { + // @option icon: Icon = * + // Icon instance to use for rendering the marker. + // See [Icon documentation](#L.Icon) for details on how to customize the marker icon. + // If not specified, a common instance of `L.Icon.Default` is used. + icon: new IconDefault(), + + // Option inherited from "Interactive layer" abstract class + interactive: true, + + // @option draggable: Boolean = false + // Whether the marker is draggable with mouse/touch or not. + draggable: false, + + // @option autoPan: Boolean = false + // Set it to `true` if you want the map to do panning animation when marker hits the edges. + autoPan: false, + + // @option autoPanPadding: Point = Point(50, 50) + // Equivalent of setting both top left and bottom right autopan padding to the same value. + autoPanPadding: [50, 50], + + // @option autoPanSpeed: Number = 10 + // Number of pixels the map should move by. + autoPanSpeed: 10, + + // @option keyboard: Boolean = true + // Whether the marker can be tabbed to with a keyboard and clicked by pressing enter. + keyboard: true, + + // @option title: String = '' + // Text for the browser tooltip that appear on marker hover (no tooltip by default). + title: '', + + // @option alt: String = '' + // Text for the `alt` attribute of the icon image (useful for accessibility). + alt: '', + + // @option zIndexOffset: Number = 0 + // By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively). + zIndexOffset: 0, + + // @option opacity: Number = 1.0 + // The opacity of the marker. + opacity: 1, + + // @option riseOnHover: Boolean = false + // If `true`, the marker will get on top of others when you hover the mouse over it. + riseOnHover: false, + + // @option riseOffset: Number = 250 + // The z-index offset used for the `riseOnHover` feature. + riseOffset: 250, + + // @option pane: String = 'markerPane' + // `Map pane` where the markers icon will be added. + pane: 'markerPane', + + // @option bubblingMouseEvents: Boolean = false + // When `true`, a mouse event on this marker will trigger the same event on the map + // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). + bubblingMouseEvents: false + }, + + /* @section + * + * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods: + */ + + initialize: function (latlng, options) { + setOptions(this, options); + this._latlng = toLatLng(latlng); + }, + + onAdd: function (map) { + this._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation; + + if (this._zoomAnimated) { + map.on('zoomanim', this._animateZoom, this); + } + + this._initIcon(); + this.update(); + }, + + onRemove: function (map) { + if (this.dragging && this.dragging.enabled()) { + this.options.draggable = true; + this.dragging.removeHooks(); + } + delete this.dragging; + + if (this._zoomAnimated) { + map.off('zoomanim', this._animateZoom, this); + } + + this._removeIcon(); + this._removeShadow(); + }, + + getEvents: function () { + return { + zoom: this.update, + viewreset: this.update + }; + }, + + // @method getLatLng: LatLng + // Returns the current geographical position of the marker. + getLatLng: function () { + return this._latlng; + }, + + // @method setLatLng(latlng: LatLng): this + // Changes the marker position to the given point. + setLatLng: function (latlng) { + var oldLatLng = this._latlng; + this._latlng = toLatLng(latlng); + this.update(); + + // @event move: Event + // Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`. + return this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng}); + }, + + // @method setZIndexOffset(offset: Number): this + // Changes the [zIndex offset](#marker-zindexoffset) of the marker. + setZIndexOffset: function (offset) { + this.options.zIndexOffset = offset; + return this.update(); + }, + + // @method setIcon(icon: Icon): this + // Changes the marker icon. + setIcon: function (icon) { + + this.options.icon = icon; + + if (this._map) { + this._initIcon(); + this.update(); + } + + if (this._popup) { + this.bindPopup(this._popup, this._popup.options); + } + + return this; + }, + + getElement: function () { + return this._icon; + }, + + update: function () { + + if (this._icon && this._map) { + var pos = this._map.latLngToLayerPoint(this._latlng).round(); + this._setPos(pos); + } + + return this; + }, + + _initIcon: function () { + var options = this.options, + classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'); + + var icon = options.icon.createIcon(this._icon), + addIcon = false; + + // if we're not reusing the icon, remove the old one and init new one + if (icon !== this._icon) { + if (this._icon) { + this._removeIcon(); + } + addIcon = true; + + if (options.title) { + icon.title = options.title; + } + + if (icon.tagName === 'IMG') { + icon.alt = options.alt || ''; + } + } + + addClass(icon, classToAdd); + + if (options.keyboard) { + icon.tabIndex = '0'; + } + + this._icon = icon; + + if (options.riseOnHover) { + this.on({ + mouseover: this._bringToFront, + mouseout: this._resetZIndex + }); + } + + var newShadow = options.icon.createShadow(this._shadow), + addShadow = false; + + if (newShadow !== this._shadow) { + this._removeShadow(); + addShadow = true; + } + + if (newShadow) { + addClass(newShadow, classToAdd); + newShadow.alt = ''; + } + this._shadow = newShadow; + + + if (options.opacity < 1) { + this._updateOpacity(); + } + + + if (addIcon) { + this.getPane().appendChild(this._icon); + } + this._initInteraction(); + if (newShadow && addShadow) { + this.getPane('shadowPane').appendChild(this._shadow); + } + }, + + _removeIcon: function () { + if (this.options.riseOnHover) { + this.off({ + mouseover: this._bringToFront, + mouseout: this._resetZIndex + }); + } + + remove(this._icon); + this.removeInteractiveTarget(this._icon); + + this._icon = null; + }, + + _removeShadow: function () { + if (this._shadow) { + remove(this._shadow); + } + this._shadow = null; + }, + + _setPos: function (pos) { + setPosition(this._icon, pos); + + if (this._shadow) { + setPosition(this._shadow, pos); + } + + this._zIndex = pos.y + this.options.zIndexOffset; + + this._resetZIndex(); + }, + + _updateZIndex: function (offset) { + this._icon.style.zIndex = this._zIndex + offset; + }, + + _animateZoom: function (opt) { + var pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round(); + + this._setPos(pos); + }, + + _initInteraction: function () { + + if (!this.options.interactive) { return; } + + addClass(this._icon, 'leaflet-interactive'); + + this.addInteractiveTarget(this._icon); + + if (MarkerDrag) { + var draggable = this.options.draggable; + if (this.dragging) { + draggable = this.dragging.enabled(); + this.dragging.disable(); + } + + this.dragging = new MarkerDrag(this); + + if (draggable) { + this.dragging.enable(); + } + } + }, + + // @method setOpacity(opacity: Number): this + // Changes the opacity of the marker. + setOpacity: function (opacity) { + this.options.opacity = opacity; + if (this._map) { + this._updateOpacity(); + } + + return this; + }, + + _updateOpacity: function () { + var opacity = this.options.opacity; + + setOpacity(this._icon, opacity); + + if (this._shadow) { + setOpacity(this._shadow, opacity); + } + }, + + _bringToFront: function () { + this._updateZIndex(this.options.riseOffset); + }, + + _resetZIndex: function () { + this._updateZIndex(0); + }, + + _getPopupAnchor: function () { + return this.options.icon.options.popupAnchor; + }, + + _getTooltipAnchor: function () { + return this.options.icon.options.tooltipAnchor; + } +}); + + +// factory L.marker(latlng: LatLng, options? : Marker options) + +// @factory L.marker(latlng: LatLng, options? : Marker options) +// Instantiates a Marker object given a geographical point and optionally an options object. +function marker(latlng, options) { + return new Marker(latlng, options); +} + +/* + * @class Path + * @aka L.Path + * @inherits Interactive layer + * + * An abstract class that contains options and constants shared between vector + * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`. + */ + +var Path = Layer.extend({ + + // @section + // @aka Path options + options: { + // @option stroke: Boolean = true + // Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles. + stroke: true, + + // @option color: String = '#3388ff' + // Stroke color + color: '#3388ff', + + // @option weight: Number = 3 + // Stroke width in pixels + weight: 3, + + // @option opacity: Number = 1.0 + // Stroke opacity + opacity: 1, + + // @option lineCap: String= 'round' + // A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke. + lineCap: 'round', + + // @option lineJoin: String = 'round' + // A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke. + lineJoin: 'round', + + // @option dashArray: String = null + // A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). + dashArray: null, + + // @option dashOffset: String = null + // A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility). + dashOffset: null, + + // @option fill: Boolean = depends + // Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles. + fill: false, + + // @option fillColor: String = * + // Fill color. Defaults to the value of the [`color`](#path-color) option + fillColor: null, + + // @option fillOpacity: Number = 0.2 + // Fill opacity. + fillOpacity: 0.2, + + // @option fillRule: String = 'evenodd' + // A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined. + fillRule: 'evenodd', + + // className: '', + + // Option inherited from "Interactive layer" abstract class + interactive: true, + + // @option bubblingMouseEvents: Boolean = true + // When `true`, a mouse event on this path will trigger the same event on the map + // (unless [`L.DomEvent.stopPropagation`](#domevent-stoppropagation) is used). + bubblingMouseEvents: true + }, + + beforeAdd: function (map) { + // Renderer is set here because we need to call renderer.getEvents + // before this.getEvents. + this._renderer = map.getRenderer(this); + }, + + onAdd: function () { + this._renderer._initPath(this); + this._reset(); + this._renderer._addPath(this); + }, + + onRemove: function () { + this._renderer._removePath(this); + }, + + // @method redraw(): this + // Redraws the layer. Sometimes useful after you changed the coordinates that the path uses. + redraw: function () { + if (this._map) { + this._renderer._updatePath(this); + } + return this; + }, + + // @method setStyle(style: Path options): this + // Changes the appearance of a Path based on the options in the `Path options` object. + setStyle: function (style) { + setOptions(this, style); + if (this._renderer) { + this._renderer._updateStyle(this); + } + return this; + }, + + // @method bringToFront(): this + // Brings the layer to the top of all path layers. + bringToFront: function () { + if (this._renderer) { + this._renderer._bringToFront(this); + } + return this; + }, + + // @method bringToBack(): this + // Brings the layer to the bottom of all path layers. + bringToBack: function () { + if (this._renderer) { + this._renderer._bringToBack(this); + } + return this; + }, + + getElement: function () { + return this._path; + }, + + _reset: function () { + // defined in child classes + this._project(); + this._update(); + }, + + _clickTolerance: function () { + // used when doing hit detection for Canvas layers + return (this.options.stroke ? this.options.weight / 2 : 0) + this._renderer.options.tolerance; + } +}); + +/* + * @class CircleMarker + * @aka L.CircleMarker + * @inherits Path + * + * A circle of a fixed size with radius specified in pixels. Extends `Path`. + */ + +var CircleMarker = Path.extend({ + + // @section + // @aka CircleMarker options + options: { + fill: true, + + // @option radius: Number = 10 + // Radius of the circle marker, in pixels + radius: 10 + }, + + initialize: function (latlng, options) { + setOptions(this, options); + this._latlng = toLatLng(latlng); + this._radius = this.options.radius; + }, + + // @method setLatLng(latLng: LatLng): this + // Sets the position of a circle marker to a new location. + setLatLng: function (latlng) { + this._latlng = toLatLng(latlng); + this.redraw(); + return this.fire('move', {latlng: this._latlng}); + }, + + // @method getLatLng(): LatLng + // Returns the current geographical position of the circle marker + getLatLng: function () { + return this._latlng; + }, + + // @method setRadius(radius: Number): this + // Sets the radius of a circle marker. Units are in pixels. + setRadius: function (radius) { + this.options.radius = this._radius = radius; + return this.redraw(); + }, + + // @method getRadius(): Number + // Returns the current radius of the circle + getRadius: function () { + return this._radius; + }, + + setStyle : function (options) { + var radius = options && options.radius || this._radius; + Path.prototype.setStyle.call(this, options); + this.setRadius(radius); + return this; + }, + + _project: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._updateBounds(); + }, + + _updateBounds: function () { + var r = this._radius, + r2 = this._radiusY || r, + w = this._clickTolerance(), + p = [r + w, r2 + w]; + this._pxBounds = new Bounds(this._point.subtract(p), this._point.add(p)); + }, + + _update: function () { + if (this._map) { + this._updatePath(); + } + }, + + _updatePath: function () { + this._renderer._updateCircle(this); + }, + + _empty: function () { + return this._radius && !this._renderer._bounds.intersects(this._pxBounds); + }, + + // Needed by the `Canvas` renderer for interactivity + _containsPoint: function (p) { + return p.distanceTo(this._point) <= this._radius + this._clickTolerance(); + } +}); + + +// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options) +// Instantiates a circle marker object given a geographical point, and an optional options object. +function circleMarker(latlng, options) { + return new CircleMarker(latlng, options); +} + +/* + * @class Circle + * @aka L.Circle + * @inherits CircleMarker + * + * A class for drawing circle overlays on a map. Extends `CircleMarker`. + * + * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion). + * + * @example + * + * ```js + * L.circle([50.5, 30.5], {radius: 200}).addTo(map); + * ``` + */ + +var Circle = CircleMarker.extend({ + + initialize: function (latlng, options, legacyOptions) { + if (typeof options === 'number') { + // Backwards compatibility with 0.7.x factory (latlng, radius, options?) + options = extend({}, legacyOptions, {radius: options}); + } + setOptions(this, options); + this._latlng = toLatLng(latlng); + + if (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); } + + // @section + // @aka Circle options + // @option radius: Number; Radius of the circle, in meters. + this._mRadius = this.options.radius; + }, + + // @method setRadius(radius: Number): this + // Sets the radius of a circle. Units are in meters. + setRadius: function (radius) { + this._mRadius = radius; + return this.redraw(); + }, + + // @method getRadius(): Number + // Returns the current radius of a circle. Units are in meters. + getRadius: function () { + return this._mRadius; + }, + + // @method getBounds(): LatLngBounds + // Returns the `LatLngBounds` of the path. + getBounds: function () { + var half = [this._radius, this._radiusY || this._radius]; + + return new LatLngBounds( + this._map.layerPointToLatLng(this._point.subtract(half)), + this._map.layerPointToLatLng(this._point.add(half))); + }, + + setStyle: Path.prototype.setStyle, + + _project: function () { + + var lng = this._latlng.lng, + lat = this._latlng.lat, + map = this._map, + crs = map.options.crs; + + if (crs.distance === Earth.distance) { + var d = Math.PI / 180, + latR = (this._mRadius / Earth.R) / d, + top = map.project([lat + latR, lng]), + bottom = map.project([lat - latR, lng]), + p = top.add(bottom).divideBy(2), + lat2 = map.unproject(p).lat, + lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) / + (Math.cos(lat * d) * Math.cos(lat2 * d))) / d; + + if (isNaN(lngR) || lngR === 0) { + lngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425 + } + + this._point = p.subtract(map.getPixelOrigin()); + this._radius = isNaN(lngR) ? 0 : p.x - map.project([lat2, lng - lngR]).x; + this._radiusY = p.y - top.y; + + } else { + var latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0])); + + this._point = map.latLngToLayerPoint(this._latlng); + this._radius = this._point.x - map.latLngToLayerPoint(latlng2).x; + } + + this._updateBounds(); + } +}); + +// @factory L.circle(latlng: LatLng, options?: Circle options) +// Instantiates a circle object given a geographical point, and an options object +// which contains the circle radius. +// @alternative +// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options) +// Obsolete way of instantiating a circle, for compatibility with 0.7.x code. +// Do not use in new applications or plugins. +function circle(latlng, options, legacyOptions) { + return new Circle(latlng, options, legacyOptions); +} + +/* + * @class Polyline + * @aka L.Polyline + * @inherits Path + * + * A class for drawing polyline overlays on a map. Extends `Path`. + * + * @example + * + * ```js + * // create a red polyline from an array of LatLng points + * var latlngs = [ + * [45.51, -122.68], + * [37.77, -122.43], + * [34.04, -118.2] + * ]; + * + * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map); + * + * // zoom the map to the polyline + * map.fitBounds(polyline.getBounds()); + * ``` + * + * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape: + * + * ```js + * // create a red polyline from an array of arrays of LatLng points + * var latlngs = [ + * [[45.51, -122.68], + * [37.77, -122.43], + * [34.04, -118.2]], + * [[40.78, -73.91], + * [41.83, -87.62], + * [32.76, -96.72]] + * ]; + * ``` + */ + + +var Polyline = Path.extend({ + + // @section + // @aka Polyline options + options: { + // @option smoothFactor: Number = 1.0 + // How much to simplify the polyline on each zoom level. More means + // better performance and smoother look, and less means more accurate representation. + smoothFactor: 1.0, + + // @option noClip: Boolean = false + // Disable polyline clipping. + noClip: false + }, + + initialize: function (latlngs, options) { + setOptions(this, options); + this._setLatLngs(latlngs); + }, + + // @method getLatLngs(): LatLng[] + // Returns an array of the points in the path, or nested arrays of points in case of multi-polyline. + getLatLngs: function () { + return this._latlngs; + }, + + // @method setLatLngs(latlngs: LatLng[]): this + // Replaces all the points in the polyline with the given array of geographical points. + setLatLngs: function (latlngs) { + this._setLatLngs(latlngs); + return this.redraw(); + }, + + // @method isEmpty(): Boolean + // Returns `true` if the Polyline has no LatLngs. + isEmpty: function () { + return !this._latlngs.length; + }, + + // @method closestLayerPoint: Point + // Returns the point closest to `p` on the Polyline. + closestLayerPoint: function (p) { + var minDistance = Infinity, + minPoint = null, + closest = _sqClosestPointOnSegment, + p1, p2; + + for (var j = 0, jLen = this._parts.length; j < jLen; j++) { + var points = this._parts[j]; + + for (var i = 1, len = points.length; i < len; i++) { + p1 = points[i - 1]; + p2 = points[i]; + + var sqDist = closest(p, p1, p2, true); + + if (sqDist < minDistance) { + minDistance = sqDist; + minPoint = closest(p, p1, p2); + } + } + } + if (minPoint) { + minPoint.distance = Math.sqrt(minDistance); + } + return minPoint; + }, + + // @method getCenter(): LatLng + // Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the polyline. + getCenter: function () { + // throws error when not yet added to map as this center calculation requires projected coordinates + if (!this._map) { + throw new Error('Must add layer to map before using getCenter()'); + } + + var i, halfDist, segDist, dist, p1, p2, ratio, + points = this._rings[0], + len = points.length; + + if (!len) { return null; } + + // polyline centroid algorithm; only uses the first ring if there are multiple + + for (i = 0, halfDist = 0; i < len - 1; i++) { + halfDist += points[i].distanceTo(points[i + 1]) / 2; + } + + // The line is so small in the current view that all points are on the same pixel. + if (halfDist === 0) { + return this._map.layerPointToLatLng(points[0]); + } + + for (i = 0, dist = 0; i < len - 1; i++) { + p1 = points[i]; + p2 = points[i + 1]; + segDist = p1.distanceTo(p2); + dist += segDist; + + if (dist > halfDist) { + ratio = (dist - halfDist) / segDist; + return this._map.layerPointToLatLng([ + p2.x - ratio * (p2.x - p1.x), + p2.y - ratio * (p2.y - p1.y) + ]); + } + } + }, + + // @method getBounds(): LatLngBounds + // Returns the `LatLngBounds` of the path. + getBounds: function () { + return this._bounds; + }, + + // @method addLatLng(latlng: LatLng, latlngs? LatLng[]): this + // Adds a given point to the polyline. By default, adds to the first ring of + // the polyline in case of a multi-polyline, but can be overridden by passing + // a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)). + addLatLng: function (latlng, latlngs) { + latlngs = latlngs || this._defaultShape(); + latlng = toLatLng(latlng); + latlngs.push(latlng); + this._bounds.extend(latlng); + return this.redraw(); + }, + + _setLatLngs: function (latlngs) { + this._bounds = new LatLngBounds(); + this._latlngs = this._convertLatLngs(latlngs); + }, + + _defaultShape: function () { + return isFlat(this._latlngs) ? this._latlngs : this._latlngs[0]; + }, + + // recursively convert latlngs input into actual LatLng instances; calculate bounds along the way + _convertLatLngs: function (latlngs) { + var result = [], + flat = isFlat(latlngs); + + for (var i = 0, len = latlngs.length; i < len; i++) { + if (flat) { + result[i] = toLatLng(latlngs[i]); + this._bounds.extend(result[i]); + } else { + result[i] = this._convertLatLngs(latlngs[i]); + } + } + + return result; + }, + + _project: function () { + var pxBounds = new Bounds(); + this._rings = []; + this._projectLatlngs(this._latlngs, this._rings, pxBounds); + + var w = this._clickTolerance(), + p = new Point(w, w); + + if (this._bounds.isValid() && pxBounds.isValid()) { + pxBounds.min._subtract(p); + pxBounds.max._add(p); + this._pxBounds = pxBounds; + } + }, + + // recursively turns latlngs into a set of rings with projected coordinates + _projectLatlngs: function (latlngs, result, projectedBounds) { + var flat = latlngs[0] instanceof LatLng, + len = latlngs.length, + i, ring; + + if (flat) { + ring = []; + for (i = 0; i < len; i++) { + ring[i] = this._map.latLngToLayerPoint(latlngs[i]); + projectedBounds.extend(ring[i]); + } + result.push(ring); + } else { + for (i = 0; i < len; i++) { + this._projectLatlngs(latlngs[i], result, projectedBounds); + } + } + }, + + // clip polyline by renderer bounds so that we have less to render for performance + _clipPoints: function () { + var bounds = this._renderer._bounds; + + this._parts = []; + if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { + return; + } + + if (this.options.noClip) { + this._parts = this._rings; + return; + } + + var parts = this._parts, + i, j, k, len, len2, segment, points; + + for (i = 0, k = 0, len = this._rings.length; i < len; i++) { + points = this._rings[i]; + + for (j = 0, len2 = points.length; j < len2 - 1; j++) { + segment = clipSegment(points[j], points[j + 1], bounds, j, true); + + if (!segment) { continue; } + + parts[k] = parts[k] || []; + parts[k].push(segment[0]); + + // if segment goes out of screen, or it's the last one, it's the end of the line part + if ((segment[1] !== points[j + 1]) || (j === len2 - 2)) { + parts[k].push(segment[1]); + k++; + } + } + } + }, + + // simplify each clipped part of the polyline for performance + _simplifyPoints: function () { + var parts = this._parts, + tolerance = this.options.smoothFactor; + + for (var i = 0, len = parts.length; i < len; i++) { + parts[i] = simplify(parts[i], tolerance); + } + }, + + _update: function () { + if (!this._map) { return; } + + this._clipPoints(); + this._simplifyPoints(); + this._updatePath(); + }, + + _updatePath: function () { + this._renderer._updatePoly(this); + }, + + // Needed by the `Canvas` renderer for interactivity + _containsPoint: function (p, closed) { + var i, j, k, len, len2, part, + w = this._clickTolerance(); + + if (!this._pxBounds || !this._pxBounds.contains(p)) { return false; } + + // hit detection for polylines + for (i = 0, len = this._parts.length; i < len; i++) { + part = this._parts[i]; + + for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { + if (!closed && (j === 0)) { continue; } + + if (pointToSegmentDistance(p, part[k], part[j]) <= w) { + return true; + } + } + } + return false; + } +}); + +// @factory L.polyline(latlngs: LatLng[], options?: Polyline options) +// Instantiates a polyline object given an array of geographical points and +// optionally an options object. You can create a `Polyline` object with +// multiple separate lines (`MultiPolyline`) by passing an array of arrays +// of geographic points. +function polyline(latlngs, options) { + return new Polyline(latlngs, options); +} + +// Retrocompat. Allow plugins to support Leaflet versions before and after 1.1. +Polyline._flat = _flat; + +/* + * @class Polygon + * @aka L.Polygon + * @inherits Polyline + * + * A class for drawing polygon overlays on a map. Extends `Polyline`. + * + * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points. + * + * + * @example + * + * ```js + * // create a red polygon from an array of LatLng points + * var latlngs = [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]]; + * + * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map); + * + * // zoom the map to the polygon + * map.fitBounds(polygon.getBounds()); + * ``` + * + * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape: + * + * ```js + * var latlngs = [ + * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring + * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole + * ]; + * ``` + * + * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape. + * + * ```js + * var latlngs = [ + * [ // first polygon + * [[37, -109.05],[41, -109.03],[41, -102.05],[37, -102.04]], // outer ring + * [[37.29, -108.58],[40.71, -108.58],[40.71, -102.50],[37.29, -102.50]] // hole + * ], + * [ // second polygon + * [[41, -111.03],[45, -111.04],[45, -104.05],[41, -104.05]] + * ] + * ]; + * ``` + */ + +var Polygon = Polyline.extend({ + + options: { + fill: true + }, + + isEmpty: function () { + return !this._latlngs.length || !this._latlngs[0].length; + }, + + getCenter: function () { + // throws error when not yet added to map as this center calculation requires projected coordinates + if (!this._map) { + throw new Error('Must add layer to map before using getCenter()'); + } + + var i, j, p1, p2, f, area, x, y, center, + points = this._rings[0], + len = points.length; + + if (!len) { return null; } + + // polygon centroid algorithm; only uses the first ring if there are multiple + + area = x = y = 0; + + for (i = 0, j = len - 1; i < len; j = i++) { + p1 = points[i]; + p2 = points[j]; + + f = p1.y * p2.x - p2.y * p1.x; + x += (p1.x + p2.x) * f; + y += (p1.y + p2.y) * f; + area += f * 3; + } + + if (area === 0) { + // Polygon is so small that all points are on same pixel. + center = points[0]; + } else { + center = [x / area, y / area]; + } + return this._map.layerPointToLatLng(center); + }, + + _convertLatLngs: function (latlngs) { + var result = Polyline.prototype._convertLatLngs.call(this, latlngs), + len = result.length; + + // remove last point if it equals first one + if (len >= 2 && result[0] instanceof LatLng && result[0].equals(result[len - 1])) { + result.pop(); + } + return result; + }, + + _setLatLngs: function (latlngs) { + Polyline.prototype._setLatLngs.call(this, latlngs); + if (isFlat(this._latlngs)) { + this._latlngs = [this._latlngs]; + } + }, + + _defaultShape: function () { + return isFlat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0]; + }, + + _clipPoints: function () { + // polygons need a different clipping algorithm so we redefine that + + var bounds = this._renderer._bounds, + w = this.options.weight, + p = new Point(w, w); + + // increase clip padding by stroke width to avoid stroke on clip edges + bounds = new Bounds(bounds.min.subtract(p), bounds.max.add(p)); + + this._parts = []; + if (!this._pxBounds || !this._pxBounds.intersects(bounds)) { + return; + } + + if (this.options.noClip) { + this._parts = this._rings; + return; + } + + for (var i = 0, len = this._rings.length, clipped; i < len; i++) { + clipped = clipPolygon(this._rings[i], bounds, true); + if (clipped.length) { + this._parts.push(clipped); + } + } + }, + + _updatePath: function () { + this._renderer._updatePoly(this, true); + }, + + // Needed by the `Canvas` renderer for interactivity + _containsPoint: function (p) { + var inside = false, + part, p1, p2, i, j, k, len, len2; + + if (!this._pxBounds.contains(p)) { return false; } + + // ray casting algorithm for detecting if point is in polygon + for (i = 0, len = this._parts.length; i < len; i++) { + part = this._parts[i]; + + for (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) { + p1 = part[j]; + p2 = part[k]; + + if (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) { + inside = !inside; + } + } + } + + // also check if it's on polygon stroke + return inside || Polyline.prototype._containsPoint.call(this, p, true); + } + +}); + + +// @factory L.polygon(latlngs: LatLng[], options?: Polyline options) +function polygon(latlngs, options) { + return new Polygon(latlngs, options); +} + +/* + * @class GeoJSON + * @aka L.GeoJSON + * @inherits FeatureGroup + * + * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse + * GeoJSON data and display it on the map. Extends `FeatureGroup`. + * + * @example + * + * ```js + * L.geoJSON(data, { + * style: function (feature) { + * return {color: feature.properties.color}; + * } + * }).bindPopup(function (layer) { + * return layer.feature.properties.description; + * }).addTo(map); + * ``` + */ + +var GeoJSON = FeatureGroup.extend({ + + /* @section + * @aka GeoJSON options + * + * @option pointToLayer: Function = * + * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally + * called when data is added, passing the GeoJSON point feature and its `LatLng`. + * The default is to spawn a default `Marker`: + * ```js + * function(geoJsonPoint, latlng) { + * return L.marker(latlng); + * } + * ``` + * + * @option style: Function = * + * A `Function` defining the `Path options` for styling GeoJSON lines and polygons, + * called internally when data is added. + * The default value is to not override any defaults: + * ```js + * function (geoJsonFeature) { + * return {} + * } + * ``` + * + * @option onEachFeature: Function = * + * A `Function` that will be called once for each created `Feature`, after it has + * been created and styled. Useful for attaching events and popups to features. + * The default is to do nothing with the newly created layers: + * ```js + * function (feature, layer) {} + * ``` + * + * @option filter: Function = * + * A `Function` that will be used to decide whether to include a feature or not. + * The default is to include all features: + * ```js + * function (geoJsonFeature) { + * return true; + * } + * ``` + * Note: dynamically changing the `filter` option will have effect only on newly + * added data. It will _not_ re-evaluate already included features. + * + * @option coordsToLatLng: Function = * + * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s. + * The default is the `coordsToLatLng` static method. + */ + + initialize: function (geojson, options) { + setOptions(this, options); + + this._layers = {}; + + if (geojson) { + this.addData(geojson); + } + }, + + // @method addData( <GeoJSON> data ): this + // Adds a GeoJSON object to the layer. + addData: function (geojson) { + var features = isArray(geojson) ? geojson : geojson.features, + i, len, feature; + + if (features) { + for (i = 0, len = features.length; i < len; i++) { + // only add this if geometry or geometries are set and not null + feature = features[i]; + if (feature.geometries || feature.geometry || feature.features || feature.coordinates) { + this.addData(feature); + } + } + return this; + } + + var options = this.options; + + if (options.filter && !options.filter(geojson)) { return this; } + + var layer = geometryToLayer(geojson, options); + if (!layer) { + return this; + } + layer.feature = asFeature(geojson); + + layer.defaultOptions = layer.options; + this.resetStyle(layer); + + if (options.onEachFeature) { + options.onEachFeature(geojson, layer); + } + + return this.addLayer(layer); + }, + + // @method resetStyle( <Path> layer ): this + // Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events. + resetStyle: function (layer) { + // reset any custom styles + layer.options = extend({}, layer.defaultOptions); + this._setLayerStyle(layer, this.options.style); + return this; + }, + + // @method setStyle( <Function> style ): this + // Changes styles of GeoJSON vector layers with the given style function. + setStyle: function (style) { + return this.eachLayer(function (layer) { + this._setLayerStyle(layer, style); + }, this); + }, + + _setLayerStyle: function (layer, style) { + if (typeof style === 'function') { + style = style(layer.feature); + } + if (layer.setStyle) { + layer.setStyle(style); + } + } +}); + +// @section +// There are several static functions which can be called without instantiating L.GeoJSON: + +// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer +// Creates a `Layer` from a given GeoJSON feature. Can use a custom +// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng) +// functions if provided as options. +function geometryToLayer(geojson, options) { + + var geometry = geojson.type === 'Feature' ? geojson.geometry : geojson, + coords = geometry ? geometry.coordinates : null, + layers = [], + pointToLayer = options && options.pointToLayer, + _coordsToLatLng = options && options.coordsToLatLng || coordsToLatLng, + latlng, latlngs, i, len; + + if (!coords && !geometry) { + return null; + } + + switch (geometry.type) { + case 'Point': + latlng = _coordsToLatLng(coords); + return pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng); + + case 'MultiPoint': + for (i = 0, len = coords.length; i < len; i++) { + latlng = _coordsToLatLng(coords[i]); + layers.push(pointToLayer ? pointToLayer(geojson, latlng) : new Marker(latlng)); + } + return new FeatureGroup(layers); + + case 'LineString': + case 'MultiLineString': + latlngs = coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, _coordsToLatLng); + return new Polyline(latlngs, options); + + case 'Polygon': + case 'MultiPolygon': + latlngs = coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, _coordsToLatLng); + return new Polygon(latlngs, options); + + case 'GeometryCollection': + for (i = 0, len = geometry.geometries.length; i < len; i++) { + var layer = geometryToLayer({ + geometry: geometry.geometries[i], + type: 'Feature', + properties: geojson.properties + }, options); + + if (layer) { + layers.push(layer); + } + } + return new FeatureGroup(layers); + + default: + throw new Error('Invalid GeoJSON object.'); + } +} + +// @function coordsToLatLng(coords: Array): LatLng +// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude) +// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points. +function coordsToLatLng(coords) { + return new LatLng(coords[1], coords[0], coords[2]); +} + +// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array +// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array. +// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default). +// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function. +function coordsToLatLngs(coords, levelsDeep, _coordsToLatLng) { + var latlngs = []; + + for (var i = 0, len = coords.length, latlng; i < len; i++) { + latlng = levelsDeep ? + coordsToLatLngs(coords[i], levelsDeep - 1, _coordsToLatLng) : + (_coordsToLatLng || coordsToLatLng)(coords[i]); + + latlngs.push(latlng); + } + + return latlngs; +} + +// @function latLngToCoords(latlng: LatLng, precision?: Number): Array +// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng) +function latLngToCoords(latlng, precision) { + precision = typeof precision === 'number' ? precision : 6; + return latlng.alt !== undefined ? + [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision), formatNum(latlng.alt, precision)] : + [formatNum(latlng.lng, precision), formatNum(latlng.lat, precision)]; +} + +// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array +// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs) +// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default. +function latLngsToCoords(latlngs, levelsDeep, closed, precision) { + var coords = []; + + for (var i = 0, len = latlngs.length; i < len; i++) { + coords.push(levelsDeep ? + latLngsToCoords(latlngs[i], levelsDeep - 1, closed, precision) : + latLngToCoords(latlngs[i], precision)); + } + + if (!levelsDeep && closed) { + coords.push(coords[0]); + } + + return coords; +} + +function getFeature(layer, newGeometry) { + return layer.feature ? + extend({}, layer.feature, {geometry: newGeometry}) : + asFeature(newGeometry); +} + +// @function asFeature(geojson: Object): Object +// Normalize GeoJSON geometries/features into GeoJSON features. +function asFeature(geojson) { + if (geojson.type === 'Feature' || geojson.type === 'FeatureCollection') { + return geojson; + } + + return { + type: 'Feature', + properties: {}, + geometry: geojson + }; +} + +var PointToGeoJSON = { + toGeoJSON: function (precision) { + return getFeature(this, { + type: 'Point', + coordinates: latLngToCoords(this.getLatLng(), precision) + }); + } +}; + +// @namespace Marker +// @method toGeoJSON(): Object +// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the marker (as a GeoJSON `Point` Feature). +Marker.include(PointToGeoJSON); + +// @namespace CircleMarker +// @method toGeoJSON(): Object +// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature). +Circle.include(PointToGeoJSON); +CircleMarker.include(PointToGeoJSON); + + +// @namespace Polyline +// @method toGeoJSON(): Object +// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature). +Polyline.include({ + toGeoJSON: function (precision) { + var multi = !isFlat(this._latlngs); + + var coords = latLngsToCoords(this._latlngs, multi ? 1 : 0, false, precision); + + return getFeature(this, { + type: (multi ? 'Multi' : '') + 'LineString', + coordinates: coords + }); + } +}); + +// @namespace Polygon +// @method toGeoJSON(): Object +// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature). +Polygon.include({ + toGeoJSON: function (precision) { + var holes = !isFlat(this._latlngs), + multi = holes && !isFlat(this._latlngs[0]); + + var coords = latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true, precision); + + if (!holes) { + coords = [coords]; + } + + return getFeature(this, { + type: (multi ? 'Multi' : '') + 'Polygon', + coordinates: coords + }); + } +}); + + +// @namespace LayerGroup +LayerGroup.include({ + toMultiPoint: function (precision) { + var coords = []; + + this.eachLayer(function (layer) { + coords.push(layer.toGeoJSON(precision).geometry.coordinates); + }); + + return getFeature(this, { + type: 'MultiPoint', + coordinates: coords + }); + }, + + // @method toGeoJSON(): Object + // Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `FeatureCollection`, `GeometryCollection`, or `MultiPoint`). + toGeoJSON: function (precision) { + + var type = this.feature && this.feature.geometry && this.feature.geometry.type; + + if (type === 'MultiPoint') { + return this.toMultiPoint(precision); + } + + var isGeometryCollection = type === 'GeometryCollection', + jsons = []; + + this.eachLayer(function (layer) { + if (layer.toGeoJSON) { + var json = layer.toGeoJSON(precision); + if (isGeometryCollection) { + jsons.push(json.geometry); + } else { + var feature = asFeature(json); + // Squash nested feature collections + if (feature.type === 'FeatureCollection') { + jsons.push.apply(jsons, feature.features); + } else { + jsons.push(feature); + } + } + } + }); + + if (isGeometryCollection) { + return getFeature(this, { + geometries: jsons, + type: 'GeometryCollection' + }); + } + + return { + type: 'FeatureCollection', + features: jsons + }; + } +}); + +// @namespace GeoJSON +// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options) +// Creates a GeoJSON layer. Optionally accepts an object in +// [GeoJSON format](http://geojson.org/geojson-spec.html) to display on the map +// (you can alternatively add it later with `addData` method) and an `options` object. +function geoJSON(geojson, options) { + return new GeoJSON(geojson, options); +} + +// Backward compatibility. +var geoJson = geoJSON; + +/* + * @class ImageOverlay + * @aka L.ImageOverlay + * @inherits Interactive layer + * + * Used to load and display a single image over specific bounds of the map. Extends `Layer`. + * + * @example + * + * ```js + * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg', + * imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]]; + * L.imageOverlay(imageUrl, imageBounds).addTo(map); + * ``` + */ + +var ImageOverlay = Layer.extend({ + + // @section + // @aka ImageOverlay options + options: { + // @option opacity: Number = 1.0 + // The opacity of the image overlay. + opacity: 1, + + // @option alt: String = '' + // Text for the `alt` attribute of the image (useful for accessibility). + alt: '', + + // @option interactive: Boolean = false + // If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered. + interactive: false, + + // @option crossOrigin: Boolean = false + // If true, the image will have its crossOrigin attribute set to ''. This is needed if you want to access image pixel data. + crossOrigin: false, + + // @option errorOverlayUrl: String = '' + // URL to the overlay image to show in place of the overlay that failed to load. + errorOverlayUrl: '', + + // @option zIndex: Number = 1 + // The explicit [zIndex](https://developer.mozilla.org/docs/Web/CSS/CSS_Positioning/Understanding_z_index) of the tile layer. + zIndex: 1, + + // @option className: String = '' + // A custom class name to assign to the image. Empty by default. + className: '', + }, + + initialize: function (url, bounds, options) { // (String, LatLngBounds, Object) + this._url = url; + this._bounds = toLatLngBounds(bounds); + + setOptions(this, options); + }, + + onAdd: function () { + if (!this._image) { + this._initImage(); + + if (this.options.opacity < 1) { + this._updateOpacity(); + } + } + + if (this.options.interactive) { + addClass(this._image, 'leaflet-interactive'); + this.addInteractiveTarget(this._image); + } + + this.getPane().appendChild(this._image); + this._reset(); + }, + + onRemove: function () { + remove(this._image); + if (this.options.interactive) { + this.removeInteractiveTarget(this._image); + } + }, + + // @method setOpacity(opacity: Number): this + // Sets the opacity of the overlay. + setOpacity: function (opacity) { + this.options.opacity = opacity; + + if (this._image) { + this._updateOpacity(); + } + return this; + }, + + setStyle: function (styleOpts) { + if (styleOpts.opacity) { + this.setOpacity(styleOpts.opacity); + } + return this; + }, + + // @method bringToFront(): this + // Brings the layer to the top of all overlays. + bringToFront: function () { + if (this._map) { + toFront(this._image); + } + return this; + }, + + // @method bringToBack(): this + // Brings the layer to the bottom of all overlays. + bringToBack: function () { + if (this._map) { + toBack(this._image); + } + return this; + }, + + // @method setUrl(url: String): this + // Changes the URL of the image. + setUrl: function (url) { + this._url = url; + + if (this._image) { + this._image.src = url; + } + return this; + }, + + // @method setBounds(bounds: LatLngBounds): this + // Update the bounds that this ImageOverlay covers + setBounds: function (bounds) { + this._bounds = toLatLngBounds(bounds); + + if (this._map) { + this._reset(); + } + return this; + }, + + getEvents: function () { + var events = { + zoom: this._reset, + viewreset: this._reset + }; + + if (this._zoomAnimated) { + events.zoomanim = this._animateZoom; + } + + return events; + }, + + // @method: setZIndex(value: Number) : this + // Changes the [zIndex](#imageoverlay-zindex) of the image overlay. + setZIndex: function (value) { + this.options.zIndex = value; + this._updateZIndex(); + return this; + }, + + // @method getBounds(): LatLngBounds + // Get the bounds that this ImageOverlay covers + getBounds: function () { + return this._bounds; + }, + + // @method getElement(): HTMLElement + // Returns the instance of [`HTMLImageElement`](https://developer.mozilla.org/docs/Web/API/HTMLImageElement) + // used by this overlay. + getElement: function () { + return this._image; + }, + + _initImage: function () { + var wasElementSupplied = this._url.tagName === 'IMG'; + var img = this._image = wasElementSupplied ? this._url : create$1('img'); + + addClass(img, 'leaflet-image-layer'); + if (this._zoomAnimated) { addClass(img, 'leaflet-zoom-animated'); } + if (this.options.className) { addClass(img, this.options.className); } + + img.onselectstart = falseFn; + img.onmousemove = falseFn; + + // @event load: Event + // Fired when the ImageOverlay layer has loaded its image + img.onload = bind(this.fire, this, 'load'); + img.onerror = bind(this._overlayOnError, this, 'error'); + + if (this.options.crossOrigin) { + img.crossOrigin = ''; + } + + if (this.options.zIndex) { + this._updateZIndex(); + } + + if (wasElementSupplied) { + this._url = img.src; + return; + } + + img.src = this._url; + img.alt = this.options.alt; + }, + + _animateZoom: function (e) { + var scale = this._map.getZoomScale(e.zoom), + offset = this._map._latLngBoundsToNewLayerBounds(this._bounds, e.zoom, e.center).min; + + setTransform(this._image, offset, scale); + }, + + _reset: function () { + var image = this._image, + bounds = new Bounds( + this._map.latLngToLayerPoint(this._bounds.getNorthWest()), + this._map.latLngToLayerPoint(this._bounds.getSouthEast())), + size = bounds.getSize(); + + setPosition(image, bounds.min); + + image.style.width = size.x + 'px'; + image.style.height = size.y + 'px'; + }, + + _updateOpacity: function () { + setOpacity(this._image, this.options.opacity); + }, + + _updateZIndex: function () { + if (this._image && this.options.zIndex !== undefined && this.options.zIndex !== null) { + this._image.style.zIndex = this.options.zIndex; + } + }, + + _overlayOnError: function () { + // @event error: Event + // Fired when the ImageOverlay layer has loaded its image + this.fire('error'); + + var errorUrl = this.options.errorOverlayUrl; + if (errorUrl && this._url !== errorUrl) { + this._url = errorUrl; + this._image.src = errorUrl; + } + } +}); + +// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options) +// Instantiates an image overlay object given the URL of the image and the +// geographical bounds it is tied to. +var imageOverlay = function (url, bounds, options) { + return new ImageOverlay(url, bounds, options); +}; + +/* + * @class VideoOverlay + * @aka L.VideoOverlay + * @inherits ImageOverlay + * + * Used to load and display a video player over specific bounds of the map. Extends `ImageOverlay`. + * + * A video overlay uses the [`<video>`](https://developer.mozilla.org/docs/Web/HTML/Element/video) + * HTML5 element. + * + * @example + * + * ```js + * var videoUrl = 'https://www.mapbox.com/bites/00188/patricia_nasa.webm', + * videoBounds = [[ 32, -130], [ 13, -100]]; + * L.VideoOverlay(videoUrl, videoBounds ).addTo(map); + * ``` + */ + +var VideoOverlay = ImageOverlay.extend({ + + // @section + // @aka VideoOverlay options + options: { + // @option autoplay: Boolean = true + // Whether the video starts playing automatically when loaded. + autoplay: true, + + // @option loop: Boolean = true + // Whether the video will loop back to the beginning when played. + loop: true + }, + + _initImage: function () { + var wasElementSupplied = this._url.tagName === 'VIDEO'; + var vid = this._image = wasElementSupplied ? this._url : create$1('video'); + + addClass(vid, 'leaflet-image-layer'); + if (this._zoomAnimated) { addClass(vid, 'leaflet-zoom-animated'); } + + vid.onselectstart = falseFn; + vid.onmousemove = falseFn; + + // @event load: Event + // Fired when the video has finished loading the first frame + vid.onloadeddata = bind(this.fire, this, 'load'); + + if (wasElementSupplied) { + var sourceElements = vid.getElementsByTagName('source'); + var sources = []; + for (var j = 0; j < sourceElements.length; j++) { + sources.push(sourceElements[j].src); + } + + this._url = (sourceElements.length > 0) ? sources : [vid.src]; + return; + } + + if (!isArray(this._url)) { this._url = [this._url]; } + + vid.autoplay = !!this.options.autoplay; + vid.loop = !!this.options.loop; + for (var i = 0; i < this._url.length; i++) { + var source = create$1('source'); + source.src = this._url[i]; + vid.appendChild(source); + } + } + + // @method getElement(): HTMLVideoElement + // Returns the instance of [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement) + // used by this overlay. +}); + + +// @factory L.videoOverlay(video: String|Array|HTMLVideoElement, bounds: LatLngBounds, options?: VideoOverlay options) +// Instantiates an image overlay object given the URL of the video (or array of URLs, or even a video element) and the +// geographical bounds it is tied to. + +function videoOverlay(video, bounds, options) { + return new VideoOverlay(video, bounds, options); +} + +/* + * @class DivOverlay + * @inherits Layer + * @aka L.DivOverlay + * Base model for L.Popup and L.Tooltip. Inherit from it for custom popup like plugins. + */ + +// @namespace DivOverlay +var DivOverlay = Layer.extend({ + + // @section + // @aka DivOverlay options + options: { + // @option offset: Point = Point(0, 7) + // The offset of the popup position. Useful to control the anchor + // of the popup when opening it on some overlays. + offset: [0, 7], + + // @option className: String = '' + // A custom CSS class name to assign to the popup. + className: '', + + // @option pane: String = 'popupPane' + // `Map pane` where the popup will be added. + pane: 'popupPane' + }, + + initialize: function (options, source) { + setOptions(this, options); + + this._source = source; + }, + + onAdd: function (map) { + this._zoomAnimated = map._zoomAnimated; + + if (!this._container) { + this._initLayout(); + } + + if (map._fadeAnimated) { + setOpacity(this._container, 0); + } + + clearTimeout(this._removeTimeout); + this.getPane().appendChild(this._container); + this.update(); + + if (map._fadeAnimated) { + setOpacity(this._container, 1); + } + + this.bringToFront(); + }, + + onRemove: function (map) { + if (map._fadeAnimated) { + setOpacity(this._container, 0); + this._removeTimeout = setTimeout(bind(remove, undefined, this._container), 200); + } else { + remove(this._container); + } + }, + + // @namespace Popup + // @method getLatLng: LatLng + // Returns the geographical point of popup. + getLatLng: function () { + return this._latlng; + }, + + // @method setLatLng(latlng: LatLng): this + // Sets the geographical point where the popup will open. + setLatLng: function (latlng) { + this._latlng = toLatLng(latlng); + if (this._map) { + this._updatePosition(); + this._adjustPan(); + } + return this; + }, + + // @method getContent: String|HTMLElement + // Returns the content of the popup. + getContent: function () { + return this._content; + }, + + // @method setContent(htmlContent: String|HTMLElement|Function): this + // Sets the HTML content of the popup. If a function is passed the source layer will be passed to the function. The function should return a `String` or `HTMLElement` to be used in the popup. + setContent: function (content) { + this._content = content; + this.update(); + return this; + }, + + // @method getElement: String|HTMLElement + // Alias for [getContent()](#popup-getcontent) + getElement: function () { + return this._container; + }, + + // @method update: null + // Updates the popup content, layout and position. Useful for updating the popup after something inside changed, e.g. image loaded. + update: function () { + if (!this._map) { return; } + + this._container.style.visibility = 'hidden'; + + this._updateContent(); + this._updateLayout(); + this._updatePosition(); + + this._container.style.visibility = ''; + + this._adjustPan(); + }, + + getEvents: function () { + var events = { + zoom: this._updatePosition, + viewreset: this._updatePosition + }; + + if (this._zoomAnimated) { + events.zoomanim = this._animateZoom; + } + return events; + }, + + // @method isOpen: Boolean + // Returns `true` when the popup is visible on the map. + isOpen: function () { + return !!this._map && this._map.hasLayer(this); + }, + + // @method bringToFront: this + // Brings this popup in front of other popups (in the same map pane). + bringToFront: function () { + if (this._map) { + toFront(this._container); + } + return this; + }, + + // @method bringToBack: this + // Brings this popup to the back of other popups (in the same map pane). + bringToBack: function () { + if (this._map) { + toBack(this._container); + } + return this; + }, + + _updateContent: function () { + if (!this._content) { return; } + + var node = this._contentNode; + var content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content; + + if (typeof content === 'string') { + node.innerHTML = content; + } else { + while (node.hasChildNodes()) { + node.removeChild(node.firstChild); + } + node.appendChild(content); + } + this.fire('contentupdate'); + }, + + _updatePosition: function () { + if (!this._map) { return; } + + var pos = this._map.latLngToLayerPoint(this._latlng), + offset = toPoint(this.options.offset), + anchor = this._getAnchor(); + + if (this._zoomAnimated) { + setPosition(this._container, pos.add(anchor)); + } else { + offset = offset.add(pos).add(anchor); + } + + var bottom = this._containerBottom = -offset.y, + left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x; + + // bottom position the popup in case the height of the popup changes (images loading etc) + this._container.style.bottom = bottom + 'px'; + this._container.style.left = left + 'px'; + }, + + _getAnchor: function () { + return [0, 0]; + } + +}); + +/* + * @class Popup + * @inherits DivOverlay + * @aka L.Popup + * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to + * open popups while making sure that only one popup is open at one time + * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want. + * + * @example + * + * If you want to just bind a popup to marker click and then open it, it's really easy: + * + * ```js + * marker.bindPopup(popupContent).openPopup(); + * ``` + * Path overlays like polylines also have a `bindPopup` method. + * Here's a more complicated way to open a popup on a map: + * + * ```js + * var popup = L.popup() + * .setLatLng(latlng) + * .setContent('<p>Hello world!<br />This is a nice popup.</p>') + * .openOn(map); + * ``` + */ + + +// @namespace Popup +var Popup = DivOverlay.extend({ + + // @section + // @aka Popup options + options: { + // @option maxWidth: Number = 300 + // Max width of the popup, in pixels. + maxWidth: 300, + + // @option minWidth: Number = 50 + // Min width of the popup, in pixels. + minWidth: 50, + + // @option maxHeight: Number = null + // If set, creates a scrollable container of the given height + // inside a popup if its content exceeds it. + maxHeight: null, + + // @option autoPan: Boolean = true + // Set it to `false` if you don't want the map to do panning animation + // to fit the opened popup. + autoPan: true, + + // @option autoPanPaddingTopLeft: Point = null + // The margin between the popup and the top left corner of the map + // view after autopanning was performed. + autoPanPaddingTopLeft: null, + + // @option autoPanPaddingBottomRight: Point = null + // The margin between the popup and the bottom right corner of the map + // view after autopanning was performed. + autoPanPaddingBottomRight: null, + + // @option autoPanPadding: Point = Point(5, 5) + // Equivalent of setting both top left and bottom right autopan padding to the same value. + autoPanPadding: [5, 5], + + // @option keepInView: Boolean = false + // Set it to `true` if you want to prevent users from panning the popup + // off of the screen while it is open. + keepInView: false, + + // @option closeButton: Boolean = true + // Controls the presence of a close button in the popup. + closeButton: true, + + // @option autoClose: Boolean = true + // Set it to `false` if you want to override the default behavior of + // the popup closing when another popup is opened. + autoClose: true, + + // @option closeOnEscapeKey: Boolean = true + // Set it to `false` if you want to override the default behavior of + // the ESC key for closing of the popup. + closeOnEscapeKey: true, + + // @option closeOnClick: Boolean = * + // Set it if you want to override the default behavior of the popup closing when user clicks + // on the map. Defaults to the map's [`closePopupOnClick`](#map-closepopuponclick) option. + + // @option className: String = '' + // A custom CSS class name to assign to the popup. + className: '' + }, + + // @namespace Popup + // @method openOn(map: Map): this + // Adds the popup to the map and closes the previous one. The same as `map.openPopup(popup)`. + openOn: function (map) { + map.openPopup(this); + return this; + }, + + onAdd: function (map) { + DivOverlay.prototype.onAdd.call(this, map); + + // @namespace Map + // @section Popup events + // @event popupopen: PopupEvent + // Fired when a popup is opened in the map + map.fire('popupopen', {popup: this}); + + if (this._source) { + // @namespace Layer + // @section Popup events + // @event popupopen: PopupEvent + // Fired when a popup bound to this layer is opened + this._source.fire('popupopen', {popup: this}, true); + // For non-path layers, we toggle the popup when clicking + // again the layer, so prevent the map to reopen it. + if (!(this._source instanceof Path)) { + this._source.on('preclick', stopPropagation); + } + } + }, + + onRemove: function (map) { + DivOverlay.prototype.onRemove.call(this, map); + + // @namespace Map + // @section Popup events + // @event popupclose: PopupEvent + // Fired when a popup in the map is closed + map.fire('popupclose', {popup: this}); + + if (this._source) { + // @namespace Layer + // @section Popup events + // @event popupclose: PopupEvent + // Fired when a popup bound to this layer is closed + this._source.fire('popupclose', {popup: this}, true); + if (!(this._source instanceof Path)) { + this._source.off('preclick', stopPropagation); + } + } + }, + + getEvents: function () { + var events = DivOverlay.prototype.getEvents.call(this); + + if (this.options.closeOnClick !== undefined ? this.options.closeOnClick : this._map.options.closePopupOnClick) { + events.preclick = this._close; + } + + if (this.options.keepInView) { + events.moveend = this._adjustPan; + } + + return events; + }, + + _close: function () { + if (this._map) { + this._map.closePopup(this); + } + }, + + _initLayout: function () { + var prefix = 'leaflet-popup', + container = this._container = create$1('div', + prefix + ' ' + (this.options.className || '') + + ' leaflet-zoom-animated'); + + var wrapper = this._wrapper = create$1('div', prefix + '-content-wrapper', container); + this._contentNode = create$1('div', prefix + '-content', wrapper); + + disableClickPropagation(wrapper); + disableScrollPropagation(this._contentNode); + on(wrapper, 'contextmenu', stopPropagation); + + this._tipContainer = create$1('div', prefix + '-tip-container', container); + this._tip = create$1('div', prefix + '-tip', this._tipContainer); + + if (this.options.closeButton) { + var closeButton = this._closeButton = create$1('a', prefix + '-close-button', container); + closeButton.href = '#close'; + closeButton.innerHTML = '×'; + + on(closeButton, 'click', this._onCloseButtonClick, this); + } + }, + + _updateLayout: function () { + var container = this._contentNode, + style = container.style; + + style.width = ''; + style.whiteSpace = 'nowrap'; + + var width = container.offsetWidth; + width = Math.min(width, this.options.maxWidth); + width = Math.max(width, this.options.minWidth); + + style.width = (width + 1) + 'px'; + style.whiteSpace = ''; + + style.height = ''; + + var height = container.offsetHeight, + maxHeight = this.options.maxHeight, + scrolledClass = 'leaflet-popup-scrolled'; + + if (maxHeight && height > maxHeight) { + style.height = maxHeight + 'px'; + addClass(container, scrolledClass); + } else { + removeClass(container, scrolledClass); + } + + this._containerWidth = this._container.offsetWidth; + }, + + _animateZoom: function (e) { + var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center), + anchor = this._getAnchor(); + setPosition(this._container, pos.add(anchor)); + }, + + _adjustPan: function () { + if (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; } + + var map = this._map, + marginBottom = parseInt(getStyle(this._container, 'marginBottom'), 10) || 0, + containerHeight = this._container.offsetHeight + marginBottom, + containerWidth = this._containerWidth, + layerPos = new Point(this._containerLeft, -containerHeight - this._containerBottom); + + layerPos._add(getPosition(this._container)); + + var containerPos = map.layerPointToContainerPoint(layerPos), + padding = toPoint(this.options.autoPanPadding), + paddingTL = toPoint(this.options.autoPanPaddingTopLeft || padding), + paddingBR = toPoint(this.options.autoPanPaddingBottomRight || padding), + size = map.getSize(), + dx = 0, + dy = 0; + + if (containerPos.x + containerWidth + paddingBR.x > size.x) { // right + dx = containerPos.x + containerWidth - size.x + paddingBR.x; + } + if (containerPos.x - dx - paddingTL.x < 0) { // left + dx = containerPos.x - paddingTL.x; + } + if (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom + dy = containerPos.y + containerHeight - size.y + paddingBR.y; + } + if (containerPos.y - dy - paddingTL.y < 0) { // top + dy = containerPos.y - paddingTL.y; + } + + // @namespace Map + // @section Popup events + // @event autopanstart: Event + // Fired when the map starts autopanning when opening a popup. + if (dx || dy) { + map + .fire('autopanstart') + .panBy([dx, dy]); + } + }, + + _onCloseButtonClick: function (e) { + this._close(); + stop(e); + }, + + _getAnchor: function () { + // Where should we anchor the popup on the source layer? + return toPoint(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]); + } + +}); + +// @namespace Popup +// @factory L.popup(options?: Popup options, source?: Layer) +// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers. +var popup = function (options, source) { + return new Popup(options, source); +}; + + +/* @namespace Map + * @section Interaction Options + * @option closePopupOnClick: Boolean = true + * Set it to `false` if you don't want popups to close when user clicks the map. + */ +Map.mergeOptions({ + closePopupOnClick: true +}); + + +// @namespace Map +// @section Methods for Layers and Controls +Map.include({ + // @method openPopup(popup: Popup): this + // Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability). + // @alternative + // @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this + // Creates a popup with the specified content and options and opens it in the given point on a map. + openPopup: function (popup, latlng, options) { + if (!(popup instanceof Popup)) { + popup = new Popup(options).setContent(popup); + } + + if (latlng) { + popup.setLatLng(latlng); + } + + if (this.hasLayer(popup)) { + return this; + } + + if (this._popup && this._popup.options.autoClose) { + this.closePopup(); + } + + this._popup = popup; + return this.addLayer(popup); + }, + + // @method closePopup(popup?: Popup): this + // Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one). + closePopup: function (popup) { + if (!popup || popup === this._popup) { + popup = this._popup; + this._popup = null; + } + if (popup) { + this.removeLayer(popup); + } + return this; + } +}); + +/* + * @namespace Layer + * @section Popup methods example + * + * All layers share a set of methods convenient for binding popups to it. + * + * ```js + * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map); + * layer.openPopup(); + * layer.closePopup(); + * ``` + * + * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened. + */ + +// @section Popup methods +Layer.include({ + + // @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this + // Binds a popup to the layer with the passed `content` and sets up the + // necessary event listeners. If a `Function` is passed it will receive + // the layer as the first argument and should return a `String` or `HTMLElement`. + bindPopup: function (content, options) { + + if (content instanceof Popup) { + setOptions(content, options); + this._popup = content; + content._source = this; + } else { + if (!this._popup || options) { + this._popup = new Popup(options, this); + } + this._popup.setContent(content); + } + + if (!this._popupHandlersAdded) { + this.on({ + click: this._openPopup, + keypress: this._onKeyPress, + remove: this.closePopup, + move: this._movePopup + }); + this._popupHandlersAdded = true; + } + + return this; + }, + + // @method unbindPopup(): this + // Removes the popup previously bound with `bindPopup`. + unbindPopup: function () { + if (this._popup) { + this.off({ + click: this._openPopup, + keypress: this._onKeyPress, + remove: this.closePopup, + move: this._movePopup + }); + this._popupHandlersAdded = false; + this._popup = null; + } + return this; + }, + + // @method openPopup(latlng?: LatLng): this + // Opens the bound popup at the specified `latlng` or at the default popup anchor if no `latlng` is passed. + openPopup: function (layer, latlng) { + if (!(layer instanceof Layer)) { + latlng = layer; + layer = this; + } + + if (layer instanceof FeatureGroup) { + for (var id in this._layers) { + layer = this._layers[id]; + break; + } + } + + if (!latlng) { + latlng = layer.getCenter ? layer.getCenter() : layer.getLatLng(); + } + + if (this._popup && this._map) { + // set popup source to this layer + this._popup._source = layer; + + // update the popup (content, layout, ect...) + this._popup.update(); + + // open the popup on the map + this._map.openPopup(this._popup, latlng); + } + + return this; + }, + + // @method closePopup(): this + // Closes the popup bound to this layer if it is open. + closePopup: function () { + if (this._popup) { + this._popup._close(); + } + return this; + }, + + // @method togglePopup(): this + // Opens or closes the popup bound to this layer depending on its current state. + togglePopup: function (target) { + if (this._popup) { + if (this._popup._map) { + this.closePopup(); + } else { + this.openPopup(target); + } + } + return this; + }, + + // @method isPopupOpen(): boolean + // Returns `true` if the popup bound to this layer is currently open. + isPopupOpen: function () { + return (this._popup ? this._popup.isOpen() : false); + }, + + // @method setPopupContent(content: String|HTMLElement|Popup): this + // Sets the content of the popup bound to this layer. + setPopupContent: function (content) { + if (this._popup) { + this._popup.setContent(content); + } + return this; + }, + + // @method getPopup(): Popup + // Returns the popup bound to this layer. + getPopup: function () { + return this._popup; + }, + + _openPopup: function (e) { + var layer = e.layer || e.target; + + if (!this._popup) { + return; + } + + if (!this._map) { + return; + } + + // prevent map click + stop(e); + + // if this inherits from Path its a vector and we can just + // open the popup at the new location + if (layer instanceof Path) { + this.openPopup(e.layer || e.target, e.latlng); + return; + } + + // otherwise treat it like a marker and figure out + // if we should toggle it open/closed + if (this._map.hasLayer(this._popup) && this._popup._source === layer) { + this.closePopup(); + } else { + this.openPopup(layer, e.latlng); + } + }, + + _movePopup: function (e) { + this._popup.setLatLng(e.latlng); + }, + + _onKeyPress: function (e) { + if (e.originalEvent.keyCode === 13) { + this._openPopup(e); + } + } +}); + +/* + * @class Tooltip + * @inherits DivOverlay + * @aka L.Tooltip + * Used to display small texts on top of map layers. + * + * @example + * + * ```js + * marker.bindTooltip("my tooltip text").openTooltip(); + * ``` + * Note about tooltip offset. Leaflet takes two options in consideration + * for computing tooltip offsetting: + * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip. + * Add a positive x offset to move the tooltip to the right, and a positive y offset to + * move it to the bottom. Negatives will move to the left and top. + * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You + * should adapt this value if you use a custom icon. + */ + + +// @namespace Tooltip +var Tooltip = DivOverlay.extend({ + + // @section + // @aka Tooltip options + options: { + // @option pane: String = 'tooltipPane' + // `Map pane` where the tooltip will be added. + pane: 'tooltipPane', + + // @option offset: Point = Point(0, 0) + // Optional offset of the tooltip position. + offset: [0, 0], + + // @option direction: String = 'auto' + // Direction where to open the tooltip. Possible values are: `right`, `left`, + // `top`, `bottom`, `center`, `auto`. + // `auto` will dynamically switch between `right` and `left` according to the tooltip + // position on the map. + direction: 'auto', + + // @option permanent: Boolean = false + // Whether to open the tooltip permanently or only on mouseover. + permanent: false, + + // @option sticky: Boolean = false + // If true, the tooltip will follow the mouse instead of being fixed at the feature center. + sticky: false, + + // @option interactive: Boolean = false + // If true, the tooltip will listen to the feature events. + interactive: false, + + // @option opacity: Number = 0.9 + // Tooltip container opacity. + opacity: 0.9 + }, + + onAdd: function (map) { + DivOverlay.prototype.onAdd.call(this, map); + this.setOpacity(this.options.opacity); + + // @namespace Map + // @section Tooltip events + // @event tooltipopen: TooltipEvent + // Fired when a tooltip is opened in the map. + map.fire('tooltipopen', {tooltip: this}); + + if (this._source) { + // @namespace Layer + // @section Tooltip events + // @event tooltipopen: TooltipEvent + // Fired when a tooltip bound to this layer is opened. + this._source.fire('tooltipopen', {tooltip: this}, true); + } + }, + + onRemove: function (map) { + DivOverlay.prototype.onRemove.call(this, map); + + // @namespace Map + // @section Tooltip events + // @event tooltipclose: TooltipEvent + // Fired when a tooltip in the map is closed. + map.fire('tooltipclose', {tooltip: this}); + + if (this._source) { + // @namespace Layer + // @section Tooltip events + // @event tooltipclose: TooltipEvent + // Fired when a tooltip bound to this layer is closed. + this._source.fire('tooltipclose', {tooltip: this}, true); + } + }, + + getEvents: function () { + var events = DivOverlay.prototype.getEvents.call(this); + + if (touch && !this.options.permanent) { + events.preclick = this._close; + } + + return events; + }, + + _close: function () { + if (this._map) { + this._map.closeTooltip(this); + } + }, + + _initLayout: function () { + var prefix = 'leaflet-tooltip', + className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide'); + + this._contentNode = this._container = create$1('div', className); + }, + + _updateLayout: function () {}, + + _adjustPan: function () {}, + + _setPosition: function (pos) { + var map = this._map, + container = this._container, + centerPoint = map.latLngToContainerPoint(map.getCenter()), + tooltipPoint = map.layerPointToContainerPoint(pos), + direction = this.options.direction, + tooltipWidth = container.offsetWidth, + tooltipHeight = container.offsetHeight, + offset = toPoint(this.options.offset), + anchor = this._getAnchor(); + + if (direction === 'top') { + pos = pos.add(toPoint(-tooltipWidth / 2 + offset.x, -tooltipHeight + offset.y + anchor.y, true)); + } else if (direction === 'bottom') { + pos = pos.subtract(toPoint(tooltipWidth / 2 - offset.x, -offset.y, true)); + } else if (direction === 'center') { + pos = pos.subtract(toPoint(tooltipWidth / 2 + offset.x, tooltipHeight / 2 - anchor.y + offset.y, true)); + } else if (direction === 'right' || direction === 'auto' && tooltipPoint.x < centerPoint.x) { + direction = 'right'; + pos = pos.add(toPoint(offset.x + anchor.x, anchor.y - tooltipHeight / 2 + offset.y, true)); + } else { + direction = 'left'; + pos = pos.subtract(toPoint(tooltipWidth + anchor.x - offset.x, tooltipHeight / 2 - anchor.y - offset.y, true)); + } + + removeClass(container, 'leaflet-tooltip-right'); + removeClass(container, 'leaflet-tooltip-left'); + removeClass(container, 'leaflet-tooltip-top'); + removeClass(container, 'leaflet-tooltip-bottom'); + addClass(container, 'leaflet-tooltip-' + direction); + setPosition(container, pos); + }, + + _updatePosition: function () { + var pos = this._map.latLngToLayerPoint(this._latlng); + this._setPosition(pos); + }, + + setOpacity: function (opacity) { + this.options.opacity = opacity; + + if (this._container) { + setOpacity(this._container, opacity); + } + }, + + _animateZoom: function (e) { + var pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center); + this._setPosition(pos); + }, + + _getAnchor: function () { + // Where should we anchor the tooltip on the source layer? + return toPoint(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]); + } + +}); + +// @namespace Tooltip +// @factory L.tooltip(options?: Tooltip options, source?: Layer) +// Instantiates a Tooltip object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers. +var tooltip = function (options, source) { + return new Tooltip(options, source); +}; + +// @namespace Map +// @section Methods for Layers and Controls +Map.include({ + + // @method openTooltip(tooltip: Tooltip): this + // Opens the specified tooltip. + // @alternative + // @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this + // Creates a tooltip with the specified content and options and open it. + openTooltip: function (tooltip, latlng, options) { + if (!(tooltip instanceof Tooltip)) { + tooltip = new Tooltip(options).setContent(tooltip); + } + + if (latlng) { + tooltip.setLatLng(latlng); + } + + if (this.hasLayer(tooltip)) { + return this; + } + + return this.addLayer(tooltip); + }, + + // @method closeTooltip(tooltip?: Tooltip): this + // Closes the tooltip given as parameter. + closeTooltip: function (tooltip) { + if (tooltip) { + this.removeLayer(tooltip); + } + return this; + } + +}); + +/* + * @namespace Layer + * @section Tooltip methods example + * + * All layers share a set of methods convenient for binding tooltips to it. + * + * ```js + * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map); + * layer.openTooltip(); + * layer.closeTooltip(); + * ``` + */ + +// @section Tooltip methods +Layer.include({ + + // @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this + // Binds a tooltip to the layer with the passed `content` and sets up the + // necessary event listeners. If a `Function` is passed it will receive + // the layer as the first argument and should return a `String` or `HTMLElement`. + bindTooltip: function (content, options) { + + if (content instanceof Tooltip) { + setOptions(content, options); + this._tooltip = content; + content._source = this; + } else { + if (!this._tooltip || options) { + this._tooltip = new Tooltip(options, this); + } + this._tooltip.setContent(content); + + } + + this._initTooltipInteractions(); + + if (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) { + this.openTooltip(); + } + + return this; + }, + + // @method unbindTooltip(): this + // Removes the tooltip previously bound with `bindTooltip`. + unbindTooltip: function () { + if (this._tooltip) { + this._initTooltipInteractions(true); + this.closeTooltip(); + this._tooltip = null; + } + return this; + }, + + _initTooltipInteractions: function (remove$$1) { + if (!remove$$1 && this._tooltipHandlersAdded) { return; } + var onOff = remove$$1 ? 'off' : 'on', + events = { + remove: this.closeTooltip, + move: this._moveTooltip + }; + if (!this._tooltip.options.permanent) { + events.mouseover = this._openTooltip; + events.mouseout = this.closeTooltip; + if (this._tooltip.options.sticky) { + events.mousemove = this._moveTooltip; + } + if (touch) { + events.click = this._openTooltip; + } + } else { + events.add = this._openTooltip; + } + this[onOff](events); + this._tooltipHandlersAdded = !remove$$1; + }, + + // @method openTooltip(latlng?: LatLng): this + // Opens the bound tooltip at the specified `latlng` or at the default tooltip anchor if no `latlng` is passed. + openTooltip: function (layer, latlng) { + if (!(layer instanceof Layer)) { + latlng = layer; + layer = this; + } + + if (layer instanceof FeatureGroup) { + for (var id in this._layers) { + layer = this._layers[id]; + break; + } + } + + if (!latlng) { + latlng = layer.getCenter ? layer.getCenter() : layer.getLatLng(); + } + + if (this._tooltip && this._map) { + + // set tooltip source to this layer + this._tooltip._source = layer; + + // update the tooltip (content, layout, ect...) + this._tooltip.update(); + + // open the tooltip on the map + this._map.openTooltip(this._tooltip, latlng); + + // Tooltip container may not be defined if not permanent and never + // opened. + if (this._tooltip.options.interactive && this._tooltip._container) { + addClass(this._tooltip._container, 'leaflet-clickable'); + this.addInteractiveTarget(this._tooltip._container); + } + } + + return this; + }, + + // @method closeTooltip(): this + // Closes the tooltip bound to this layer if it is open. + closeTooltip: function () { + if (this._tooltip) { + this._tooltip._close(); + if (this._tooltip.options.interactive && this._tooltip._container) { + removeClass(this._tooltip._container, 'leaflet-clickable'); + this.removeInteractiveTarget(this._tooltip._container); + } + } + return this; + }, + + // @method toggleTooltip(): this + // Opens or closes the tooltip bound to this layer depending on its current state. + toggleTooltip: function (target) { + if (this._tooltip) { + if (this._tooltip._map) { + this.closeTooltip(); + } else { + this.openTooltip(target); + } + } + return this; + }, + + // @method isTooltipOpen(): boolean + // Returns `true` if the tooltip bound to this layer is currently open. + isTooltipOpen: function () { + return this._tooltip.isOpen(); + }, + + // @method setTooltipContent(content: String|HTMLElement|Tooltip): this + // Sets the content of the tooltip bound to this layer. + setTooltipContent: function (content) { + if (this._tooltip) { + this._tooltip.setContent(content); + } + return this; + }, + + // @method getTooltip(): Tooltip + // Returns the tooltip bound to this layer. + getTooltip: function () { + return this._tooltip; + }, + + _openTooltip: function (e) { + var layer = e.layer || e.target; + + if (!this._tooltip || !this._map) { + return; + } + this.openTooltip(layer, this._tooltip.options.sticky ? e.latlng : undefined); + }, + + _moveTooltip: function (e) { + var latlng = e.latlng, containerPoint, layerPoint; + if (this._tooltip.options.sticky && e.originalEvent) { + containerPoint = this._map.mouseEventToContainerPoint(e.originalEvent); + layerPoint = this._map.containerPointToLayerPoint(containerPoint); + latlng = this._map.layerPointToLatLng(layerPoint); + } + this._tooltip.setLatLng(latlng); + } +}); + +/* + * @class DivIcon + * @aka L.DivIcon + * @inherits Icon + * + * Represents a lightweight icon for markers that uses a simple `<div>` + * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options. + * + * @example + * ```js + * var myIcon = L.divIcon({className: 'my-div-icon'}); + * // you can set .my-div-icon styles in CSS + * + * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map); + * ``` + * + * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow. + */ + +var DivIcon = Icon.extend({ + options: { + // @section + // @aka DivIcon options + iconSize: [12, 12], // also can be set through CSS + + // iconAnchor: (Point), + // popupAnchor: (Point), + + // @option html: String = '' + // Custom HTML code to put inside the div element, empty by default. + html: false, + + // @option bgPos: Point = [0, 0] + // Optional relative position of the background, in pixels + bgPos: null, + + className: 'leaflet-div-icon' + }, + + createIcon: function (oldIcon) { + var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'), + options = this.options; + + div.innerHTML = options.html !== false ? options.html : ''; + + if (options.bgPos) { + var bgPos = toPoint(options.bgPos); + div.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px'; + } + this._setIconStyles(div, 'icon'); + + return div; + }, + + createShadow: function () { + return null; + } +}); + +// @factory L.divIcon(options: DivIcon options) +// Creates a `DivIcon` instance with the given options. +function divIcon(options) { + return new DivIcon(options); +} + +Icon.Default = IconDefault; + +/* + * @class GridLayer + * @inherits Layer + * @aka L.GridLayer + * + * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`. + * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you. + * + * + * @section Synchronous usage + * @example + * + * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile. + * + * ```js + * var CanvasLayer = L.GridLayer.extend({ + * createTile: function(coords){ + * // create a <canvas> element for drawing + * var tile = L.DomUtil.create('canvas', 'leaflet-tile'); + * + * // setup tile width and height according to the options + * var size = this.getTileSize(); + * tile.width = size.x; + * tile.height = size.y; + * + * // get a canvas context and draw something on it using coords.x, coords.y and coords.z + * var ctx = tile.getContext('2d'); + * + * // return the tile so it can be rendered on screen + * return tile; + * } + * }); + * ``` + * + * @section Asynchronous usage + * @example + * + * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback. + * + * ```js + * var CanvasLayer = L.GridLayer.extend({ + * createTile: function(coords, done){ + * var error; + * + * // create a <canvas> element for drawing + * var tile = L.DomUtil.create('canvas', 'leaflet-tile'); + * + * // setup tile width and height according to the options + * var size = this.getTileSize(); + * tile.width = size.x; + * tile.height = size.y; + * + * // draw something asynchronously and pass the tile to the done() callback + * setTimeout(function() { + * done(error, tile); + * }, 1000); + * + * return tile; + * } + * }); + * ``` + * + * @section + */ + + +var GridLayer = Layer.extend({ + + // @section + // @aka GridLayer options + options: { + // @option tileSize: Number|Point = 256 + // Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise. + tileSize: 256, + + // @option opacity: Number = 1.0 + // Opacity of the tiles. Can be used in the `createTile()` function. + opacity: 1, + + // @option updateWhenIdle: Boolean = (depends) + // Load new tiles only when panning ends. + // `true` by default on mobile browsers, in order to avoid too many requests and keep smooth navigation. + // `false` otherwise in order to display new tiles _during_ panning, since it is easy to pan outside the + // [`keepBuffer`](#gridlayer-keepbuffer) option in desktop browsers. + updateWhenIdle: mobile, + + // @option updateWhenZooming: Boolean = true + // By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends. + updateWhenZooming: true, + + // @option updateInterval: Number = 200 + // Tiles will not update more than once every `updateInterval` milliseconds when panning. + updateInterval: 200, + + // @option zIndex: Number = 1 + // The explicit zIndex of the tile layer. + zIndex: 1, + + // @option bounds: LatLngBounds = undefined + // If set, tiles will only be loaded inside the set `LatLngBounds`. + bounds: null, + + // @option minZoom: Number = 0 + // The minimum zoom level down to which this layer will be displayed (inclusive). + minZoom: 0, + + // @option maxZoom: Number = undefined + // The maximum zoom level up to which this layer will be displayed (inclusive). + maxZoom: undefined, + + // @option maxNativeZoom: Number = undefined + // Maximum zoom number the tile source has available. If it is specified, + // the tiles on all zoom levels higher than `maxNativeZoom` will be loaded + // from `maxNativeZoom` level and auto-scaled. + maxNativeZoom: undefined, + + // @option minNativeZoom: Number = undefined + // Minimum zoom number the tile source has available. If it is specified, + // the tiles on all zoom levels lower than `minNativeZoom` will be loaded + // from `minNativeZoom` level and auto-scaled. + minNativeZoom: undefined, + + // @option noWrap: Boolean = false + // Whether the layer is wrapped around the antimeridian. If `true`, the + // GridLayer will only be displayed once at low zoom levels. Has no + // effect when the [map CRS](#map-crs) doesn't wrap around. Can be used + // in combination with [`bounds`](#gridlayer-bounds) to prevent requesting + // tiles outside the CRS limits. + noWrap: false, + + // @option pane: String = 'tilePane' + // `Map pane` where the grid layer will be added. + pane: 'tilePane', + + // @option className: String = '' + // A custom class name to assign to the tile layer. Empty by default. + className: '', + + // @option keepBuffer: Number = 2 + // When panning the map, keep this many rows and columns of tiles before unloading them. + keepBuffer: 2 + }, + + initialize: function (options) { + setOptions(this, options); + }, + + onAdd: function () { + this._initContainer(); + + this._levels = {}; + this._tiles = {}; + + this._resetView(); + this._update(); + }, + + beforeAdd: function (map) { + map._addZoomLimit(this); + }, + + onRemove: function (map) { + this._removeAllTiles(); + remove(this._container); + map._removeZoomLimit(this); + this._container = null; + this._tileZoom = undefined; + }, + + // @method bringToFront: this + // Brings the tile layer to the top of all tile layers. + bringToFront: function () { + if (this._map) { + toFront(this._container); + this._setAutoZIndex(Math.max); + } + return this; + }, + + // @method bringToBack: this + // Brings the tile layer to the bottom of all tile layers. + bringToBack: function () { + if (this._map) { + toBack(this._container); + this._setAutoZIndex(Math.min); + } + return this; + }, + + // @method getContainer: HTMLElement + // Returns the HTML element that contains the tiles for this layer. + getContainer: function () { + return this._container; + }, + + // @method setOpacity(opacity: Number): this + // Changes the [opacity](#gridlayer-opacity) of the grid layer. + setOpacity: function (opacity) { + this.options.opacity = opacity; + this._updateOpacity(); + return this; + }, + + // @method setZIndex(zIndex: Number): this + // Changes the [zIndex](#gridlayer-zindex) of the grid layer. + setZIndex: function (zIndex) { + this.options.zIndex = zIndex; + this._updateZIndex(); + + return this; + }, + + // @method isLoading: Boolean + // Returns `true` if any tile in the grid layer has not finished loading. + isLoading: function () { + return this._loading; + }, + + // @method redraw: this + // Causes the layer to clear all the tiles and request them again. + redraw: function () { + if (this._map) { + this._removeAllTiles(); + this._update(); + } + return this; + }, + + getEvents: function () { + var events = { + viewprereset: this._invalidateAll, + viewreset: this._resetView, + zoom: this._resetView, + moveend: this._onMoveEnd + }; + + if (!this.options.updateWhenIdle) { + // update tiles on move, but not more often than once per given interval + if (!this._onMove) { + this._onMove = throttle(this._onMoveEnd, this.options.updateInterval, this); + } + + events.move = this._onMove; + } + + if (this._zoomAnimated) { + events.zoomanim = this._animateZoom; + } + + return events; + }, + + // @section Extension methods + // Layers extending `GridLayer` shall reimplement the following method. + // @method createTile(coords: Object, done?: Function): HTMLElement + // Called only internally, must be overridden by classes extending `GridLayer`. + // Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback + // is specified, it must be called when the tile has finished loading and drawing. + createTile: function () { + return document.createElement('div'); + }, + + // @section + // @method getTileSize: Point + // Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method. + getTileSize: function () { + var s = this.options.tileSize; + return s instanceof Point ? s : new Point(s, s); + }, + + _updateZIndex: function () { + if (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) { + this._container.style.zIndex = this.options.zIndex; + } + }, + + _setAutoZIndex: function (compare) { + // go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back) + + var layers = this.getPane().children, + edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min + + for (var i = 0, len = layers.length, zIndex; i < len; i++) { + + zIndex = layers[i].style.zIndex; + + if (layers[i] !== this._container && zIndex) { + edgeZIndex = compare(edgeZIndex, +zIndex); + } + } + + if (isFinite(edgeZIndex)) { + this.options.zIndex = edgeZIndex + compare(-1, 1); + this._updateZIndex(); + } + }, + + _updateOpacity: function () { + if (!this._map) { return; } + + // IE doesn't inherit filter opacity properly, so we're forced to set it on tiles + if (ielt9) { return; } + + setOpacity(this._container, this.options.opacity); + + var now = +new Date(), + nextFrame = false, + willPrune = false; + + for (var key in this._tiles) { + var tile = this._tiles[key]; + if (!tile.current || !tile.loaded) { continue; } + + var fade = Math.min(1, (now - tile.loaded) / 200); + + setOpacity(tile.el, fade); + if (fade < 1) { + nextFrame = true; + } else { + if (tile.active) { + willPrune = true; + } else { + this._onOpaqueTile(tile); + } + tile.active = true; + } + } + + if (willPrune && !this._noPrune) { this._pruneTiles(); } + + if (nextFrame) { + cancelAnimFrame(this._fadeFrame); + this._fadeFrame = requestAnimFrame(this._updateOpacity, this); + } + }, + + _onOpaqueTile: falseFn, + + _initContainer: function () { + if (this._container) { return; } + + this._container = create$1('div', 'leaflet-layer ' + (this.options.className || '')); + this._updateZIndex(); + + if (this.options.opacity < 1) { + this._updateOpacity(); + } + + this.getPane().appendChild(this._container); + }, + + _updateLevels: function () { + + var zoom = this._tileZoom, + maxZoom = this.options.maxZoom; + + if (zoom === undefined) { return undefined; } + + for (var z in this._levels) { + if (this._levels[z].el.children.length || z === zoom) { + this._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z); + this._onUpdateLevel(z); + } else { + remove(this._levels[z].el); + this._removeTilesAtZoom(z); + this._onRemoveLevel(z); + delete this._levels[z]; + } + } + + var level = this._levels[zoom], + map = this._map; + + if (!level) { + level = this._levels[zoom] = {}; + + level.el = create$1('div', 'leaflet-tile-container leaflet-zoom-animated', this._container); + level.el.style.zIndex = maxZoom; + + level.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round(); + level.zoom = zoom; + + this._setZoomTransform(level, map.getCenter(), map.getZoom()); + + // force the browser to consider the newly added element for transition + falseFn(level.el.offsetWidth); + + this._onCreateLevel(level); + } + + this._level = level; + + return level; + }, + + _onUpdateLevel: falseFn, + + _onRemoveLevel: falseFn, + + _onCreateLevel: falseFn, + + _pruneTiles: function () { + if (!this._map) { + return; + } + + var key, tile; + + var zoom = this._map.getZoom(); + if (zoom > this.options.maxZoom || + zoom < this.options.minZoom) { + this._removeAllTiles(); + return; + } + + for (key in this._tiles) { + tile = this._tiles[key]; + tile.retain = tile.current; + } + + for (key in this._tiles) { + tile = this._tiles[key]; + if (tile.current && !tile.active) { + var coords = tile.coords; + if (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) { + this._retainChildren(coords.x, coords.y, coords.z, coords.z + 2); + } + } + } + + for (key in this._tiles) { + if (!this._tiles[key].retain) { + this._removeTile(key); + } + } + }, + + _removeTilesAtZoom: function (zoom) { + for (var key in this._tiles) { + if (this._tiles[key].coords.z !== zoom) { + continue; + } + this._removeTile(key); + } + }, + + _removeAllTiles: function () { + for (var key in this._tiles) { + this._removeTile(key); + } + }, + + _invalidateAll: function () { + for (var z in this._levels) { + remove(this._levels[z].el); + this._onRemoveLevel(z); + delete this._levels[z]; + } + this._removeAllTiles(); + + this._tileZoom = undefined; + }, + + _retainParent: function (x, y, z, minZoom) { + var x2 = Math.floor(x / 2), + y2 = Math.floor(y / 2), + z2 = z - 1, + coords2 = new Point(+x2, +y2); + coords2.z = +z2; + + var key = this._tileCoordsToKey(coords2), + tile = this._tiles[key]; + + if (tile && tile.active) { + tile.retain = true; + return true; + + } else if (tile && tile.loaded) { + tile.retain = true; + } + + if (z2 > minZoom) { + return this._retainParent(x2, y2, z2, minZoom); + } + + return false; + }, + + _retainChildren: function (x, y, z, maxZoom) { + + for (var i = 2 * x; i < 2 * x + 2; i++) { + for (var j = 2 * y; j < 2 * y + 2; j++) { + + var coords = new Point(i, j); + coords.z = z + 1; + + var key = this._tileCoordsToKey(coords), + tile = this._tiles[key]; + + if (tile && tile.active) { + tile.retain = true; + continue; + + } else if (tile && tile.loaded) { + tile.retain = true; + } + + if (z + 1 < maxZoom) { + this._retainChildren(i, j, z + 1, maxZoom); + } + } + } + }, + + _resetView: function (e) { + var animating = e && (e.pinch || e.flyTo); + this._setView(this._map.getCenter(), this._map.getZoom(), animating, animating); + }, + + _animateZoom: function (e) { + this._setView(e.center, e.zoom, true, e.noUpdate); + }, + + _clampZoom: function (zoom) { + var options = this.options; + + if (undefined !== options.minNativeZoom && zoom < options.minNativeZoom) { + return options.minNativeZoom; + } + + if (undefined !== options.maxNativeZoom && options.maxNativeZoom < zoom) { + return options.maxNativeZoom; + } + + return zoom; + }, + + _setView: function (center, zoom, noPrune, noUpdate) { + var tileZoom = this._clampZoom(Math.round(zoom)); + if ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) || + (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) { + tileZoom = undefined; + } + + var tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom); + + if (!noUpdate || tileZoomChanged) { + + this._tileZoom = tileZoom; + + if (this._abortLoading) { + this._abortLoading(); + } + + this._updateLevels(); + this._resetGrid(); + + if (tileZoom !== undefined) { + this._update(center); + } + + if (!noPrune) { + this._pruneTiles(); + } + + // Flag to prevent _updateOpacity from pruning tiles during + // a zoom anim or a pinch gesture + this._noPrune = !!noPrune; + } + + this._setZoomTransforms(center, zoom); + }, + + _setZoomTransforms: function (center, zoom) { + for (var i in this._levels) { + this._setZoomTransform(this._levels[i], center, zoom); + } + }, + + _setZoomTransform: function (level, center, zoom) { + var scale = this._map.getZoomScale(zoom, level.zoom), + translate = level.origin.multiplyBy(scale) + .subtract(this._map._getNewPixelOrigin(center, zoom)).round(); + + if (any3d) { + setTransform(level.el, translate, scale); + } else { + setPosition(level.el, translate); + } + }, + + _resetGrid: function () { + var map = this._map, + crs = map.options.crs, + tileSize = this._tileSize = this.getTileSize(), + tileZoom = this._tileZoom; + + var bounds = this._map.getPixelWorldBounds(this._tileZoom); + if (bounds) { + this._globalTileRange = this._pxBoundsToTileRange(bounds); + } + + this._wrapX = crs.wrapLng && !this.options.noWrap && [ + Math.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x), + Math.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y) + ]; + this._wrapY = crs.wrapLat && !this.options.noWrap && [ + Math.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x), + Math.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y) + ]; + }, + + _onMoveEnd: function () { + if (!this._map || this._map._animatingZoom) { return; } + + this._update(); + }, + + _getTiledPixelBounds: function (center) { + var map = this._map, + mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(), + scale = map.getZoomScale(mapZoom, this._tileZoom), + pixelCenter = map.project(center, this._tileZoom).floor(), + halfSize = map.getSize().divideBy(scale * 2); + + return new Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize)); + }, + + // Private method to load tiles in the grid's active zoom level according to map bounds + _update: function (center) { + var map = this._map; + if (!map) { return; } + var zoom = this._clampZoom(map.getZoom()); + + if (center === undefined) { center = map.getCenter(); } + if (this._tileZoom === undefined) { return; } // if out of minzoom/maxzoom + + var pixelBounds = this._getTiledPixelBounds(center), + tileRange = this._pxBoundsToTileRange(pixelBounds), + tileCenter = tileRange.getCenter(), + queue = [], + margin = this.options.keepBuffer, + noPruneRange = new Bounds(tileRange.getBottomLeft().subtract([margin, -margin]), + tileRange.getTopRight().add([margin, -margin])); + + // Sanity check: panic if the tile range contains Infinity somewhere. + if (!(isFinite(tileRange.min.x) && + isFinite(tileRange.min.y) && + isFinite(tileRange.max.x) && + isFinite(tileRange.max.y))) { throw new Error('Attempted to load an infinite number of tiles'); } + + for (var key in this._tiles) { + var c = this._tiles[key].coords; + if (c.z !== this._tileZoom || !noPruneRange.contains(new Point(c.x, c.y))) { + this._tiles[key].current = false; + } + } + + // _update just loads more tiles. If the tile zoom level differs too much + // from the map's, let _setView reset levels and prune old tiles. + if (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; } + + // create a queue of coordinates to load tiles from + for (var j = tileRange.min.y; j <= tileRange.max.y; j++) { + for (var i = tileRange.min.x; i <= tileRange.max.x; i++) { + var coords = new Point(i, j); + coords.z = this._tileZoom; + + if (!this._isValidTile(coords)) { continue; } + + var tile = this._tiles[this._tileCoordsToKey(coords)]; + if (tile) { + tile.current = true; + } else { + queue.push(coords); + } + } + } + + // sort tile queue to load tiles in order of their distance to center + queue.sort(function (a, b) { + return a.distanceTo(tileCenter) - b.distanceTo(tileCenter); + }); + + if (queue.length !== 0) { + // if it's the first batch of tiles to load + if (!this._loading) { + this._loading = true; + // @event loading: Event + // Fired when the grid layer starts loading tiles. + this.fire('loading'); + } + + // create DOM fragment to append tiles in one batch + var fragment = document.createDocumentFragment(); + + for (i = 0; i < queue.length; i++) { + this._addTile(queue[i], fragment); + } + + this._level.el.appendChild(fragment); + } + }, + + _isValidTile: function (coords) { + var crs = this._map.options.crs; + + if (!crs.infinite) { + // don't load tile if it's out of bounds and not wrapped + var bounds = this._globalTileRange; + if ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) || + (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; } + } + + if (!this.options.bounds) { return true; } + + // don't load tile if it doesn't intersect the bounds in options + var tileBounds = this._tileCoordsToBounds(coords); + return toLatLngBounds(this.options.bounds).overlaps(tileBounds); + }, + + _keyToBounds: function (key) { + return this._tileCoordsToBounds(this._keyToTileCoords(key)); + }, + + _tileCoordsToNwSe: function (coords) { + var map = this._map, + tileSize = this.getTileSize(), + nwPoint = coords.scaleBy(tileSize), + sePoint = nwPoint.add(tileSize), + nw = map.unproject(nwPoint, coords.z), + se = map.unproject(sePoint, coords.z); + return [nw, se]; + }, + + // converts tile coordinates to its geographical bounds + _tileCoordsToBounds: function (coords) { + var bp = this._tileCoordsToNwSe(coords), + bounds = new LatLngBounds(bp[0], bp[1]); + + if (!this.options.noWrap) { + bounds = this._map.wrapLatLngBounds(bounds); + } + return bounds; + }, + // converts tile coordinates to key for the tile cache + _tileCoordsToKey: function (coords) { + return coords.x + ':' + coords.y + ':' + coords.z; + }, + + // converts tile cache key to coordinates + _keyToTileCoords: function (key) { + var k = key.split(':'), + coords = new Point(+k[0], +k[1]); + coords.z = +k[2]; + return coords; + }, + + _removeTile: function (key) { + var tile = this._tiles[key]; + if (!tile) { return; } + + // Cancels any pending http requests associated with the tile + // unless we're on Android's stock browser, + // see https://github.com/Leaflet/Leaflet/issues/137 + if (!androidStock) { + tile.el.setAttribute('src', emptyImageUrl); + } + remove(tile.el); + + delete this._tiles[key]; + + // @event tileunload: TileEvent + // Fired when a tile is removed (e.g. when a tile goes off the screen). + this.fire('tileunload', { + tile: tile.el, + coords: this._keyToTileCoords(key) + }); + }, + + _initTile: function (tile) { + addClass(tile, 'leaflet-tile'); + + var tileSize = this.getTileSize(); + tile.style.width = tileSize.x + 'px'; + tile.style.height = tileSize.y + 'px'; + + tile.onselectstart = falseFn; + tile.onmousemove = falseFn; + + // update opacity on tiles in IE7-8 because of filter inheritance problems + if (ielt9 && this.options.opacity < 1) { + setOpacity(tile, this.options.opacity); + } + + // without this hack, tiles disappear after zoom on Chrome for Android + // https://github.com/Leaflet/Leaflet/issues/2078 + if (android && !android23) { + tile.style.WebkitBackfaceVisibility = 'hidden'; + } + }, + + _addTile: function (coords, container) { + var tilePos = this._getTilePos(coords), + key = this._tileCoordsToKey(coords); + + var tile = this.createTile(this._wrapCoords(coords), bind(this._tileReady, this, coords)); + + this._initTile(tile); + + // if createTile is defined with a second argument ("done" callback), + // we know that tile is async and will be ready later; otherwise + if (this.createTile.length < 2) { + // mark tile as ready, but delay one frame for opacity animation to happen + requestAnimFrame(bind(this._tileReady, this, coords, null, tile)); + } + + setPosition(tile, tilePos); + + // save tile in cache + this._tiles[key] = { + el: tile, + coords: coords, + current: true + }; + + container.appendChild(tile); + // @event tileloadstart: TileEvent + // Fired when a tile is requested and starts loading. + this.fire('tileloadstart', { + tile: tile, + coords: coords + }); + }, + + _tileReady: function (coords, err, tile) { + if (!this._map) { return; } + + if (err) { + // @event tileerror: TileErrorEvent + // Fired when there is an error loading a tile. + this.fire('tileerror', { + error: err, + tile: tile, + coords: coords + }); + } + + var key = this._tileCoordsToKey(coords); + + tile = this._tiles[key]; + if (!tile) { return; } + + tile.loaded = +new Date(); + if (this._map._fadeAnimated) { + setOpacity(tile.el, 0); + cancelAnimFrame(this._fadeFrame); + this._fadeFrame = requestAnimFrame(this._updateOpacity, this); + } else { + tile.active = true; + this._pruneTiles(); + } + + if (!err) { + addClass(tile.el, 'leaflet-tile-loaded'); + + // @event tileload: TileEvent + // Fired when a tile loads. + this.fire('tileload', { + tile: tile.el, + coords: coords + }); + } + + if (this._noTilesToLoad()) { + this._loading = false; + // @event load: Event + // Fired when the grid layer loaded all visible tiles. + this.fire('load'); + + if (ielt9 || !this._map._fadeAnimated) { + requestAnimFrame(this._pruneTiles, this); + } else { + // Wait a bit more than 0.2 secs (the duration of the tile fade-in) + // to trigger a pruning. + setTimeout(bind(this._pruneTiles, this), 250); + } + } + }, + + _getTilePos: function (coords) { + return coords.scaleBy(this.getTileSize()).subtract(this._level.origin); + }, + + _wrapCoords: function (coords) { + var newCoords = new Point( + this._wrapX ? wrapNum(coords.x, this._wrapX) : coords.x, + this._wrapY ? wrapNum(coords.y, this._wrapY) : coords.y); + newCoords.z = coords.z; + return newCoords; + }, + + _pxBoundsToTileRange: function (bounds) { + var tileSize = this.getTileSize(); + return new Bounds( + bounds.min.unscaleBy(tileSize).floor(), + bounds.max.unscaleBy(tileSize).ceil().subtract([1, 1])); + }, + + _noTilesToLoad: function () { + for (var key in this._tiles) { + if (!this._tiles[key].loaded) { return false; } + } + return true; + } +}); + +// @factory L.gridLayer(options?: GridLayer options) +// Creates a new instance of GridLayer with the supplied options. +function gridLayer(options) { + return new GridLayer(options); +} + +/* + * @class TileLayer + * @inherits GridLayer + * @aka L.TileLayer + * Used to load and display tile layers on the map. Extends `GridLayer`. + * + * @example + * + * ```js + * L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar'}).addTo(map); + * ``` + * + * @section URL template + * @example + * + * A string of the following form: + * + * ``` + * 'http://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png' + * ``` + * + * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add "@2x" to the URL to load retina tiles. + * + * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this: + * + * ``` + * L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'}); + * ``` + */ + + +var TileLayer = GridLayer.extend({ + + // @section + // @aka TileLayer options + options: { + // @option minZoom: Number = 0 + // The minimum zoom level down to which this layer will be displayed (inclusive). + minZoom: 0, + + // @option maxZoom: Number = 18 + // The maximum zoom level up to which this layer will be displayed (inclusive). + maxZoom: 18, + + // @option subdomains: String|String[] = 'abc' + // Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings. + subdomains: 'abc', + + // @option errorTileUrl: String = '' + // URL to the tile image to show in place of the tile that failed to load. + errorTileUrl: '', + + // @option zoomOffset: Number = 0 + // The zoom number used in tile URLs will be offset with this value. + zoomOffset: 0, + + // @option tms: Boolean = false + // If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services). + tms: false, + + // @option zoomReverse: Boolean = false + // If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`) + zoomReverse: false, + + // @option detectRetina: Boolean = false + // If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution. + detectRetina: false, + + // @option crossOrigin: Boolean = false + // If true, all tiles will have their crossOrigin attribute set to ''. This is needed if you want to access tile pixel data. + crossOrigin: false + }, + + initialize: function (url, options) { + + this._url = url; + + options = setOptions(this, options); + + // detecting retina displays, adjusting tileSize and zoom levels + if (options.detectRetina && retina && options.maxZoom > 0) { + + options.tileSize = Math.floor(options.tileSize / 2); + + if (!options.zoomReverse) { + options.zoomOffset++; + options.maxZoom--; + } else { + options.zoomOffset--; + options.minZoom++; + } + + options.minZoom = Math.max(0, options.minZoom); + } + + if (typeof options.subdomains === 'string') { + options.subdomains = options.subdomains.split(''); + } + + // for https://github.com/Leaflet/Leaflet/issues/137 + if (!android) { + this.on('tileunload', this._onTileRemove); + } + }, + + // @method setUrl(url: String, noRedraw?: Boolean): this + // Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`). + setUrl: function (url, noRedraw) { + this._url = url; + + if (!noRedraw) { + this.redraw(); + } + return this; + }, + + // @method createTile(coords: Object, done?: Function): HTMLElement + // Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile) + // to return an `<img>` HTML element with the appropriate image URL given `coords`. The `done` + // callback is called when the tile has been loaded. + createTile: function (coords, done) { + var tile = document.createElement('img'); + + on(tile, 'load', bind(this._tileOnLoad, this, done, tile)); + on(tile, 'error', bind(this._tileOnError, this, done, tile)); + + if (this.options.crossOrigin) { + tile.crossOrigin = ''; + } + + /* + Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons + http://www.w3.org/TR/WCAG20-TECHS/H67 + */ + tile.alt = ''; + + /* + Set role="presentation" to force screen readers to ignore this + https://www.w3.org/TR/wai-aria/roles#textalternativecomputation + */ + tile.setAttribute('role', 'presentation'); + + tile.src = this.getTileUrl(coords); + + return tile; + }, + + // @section Extension methods + // @uninheritable + // Layers extending `TileLayer` might reimplement the following method. + // @method getTileUrl(coords: Object): String + // Called only internally, returns the URL for a tile given its coordinates. + // Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes. + getTileUrl: function (coords) { + var data = { + r: retina ? '@2x' : '', + s: this._getSubdomain(coords), + x: coords.x, + y: coords.y, + z: this._getZoomForUrl() + }; + if (this._map && !this._map.options.crs.infinite) { + var invertedY = this._globalTileRange.max.y - coords.y; + if (this.options.tms) { + data['y'] = invertedY; + } + data['-y'] = invertedY; + } + + return template(this._url, extend(data, this.options)); + }, + + _tileOnLoad: function (done, tile) { + // For https://github.com/Leaflet/Leaflet/issues/3332 + if (ielt9) { + setTimeout(bind(done, this, null, tile), 0); + } else { + done(null, tile); + } + }, + + _tileOnError: function (done, tile, e) { + var errorUrl = this.options.errorTileUrl; + if (errorUrl && tile.getAttribute('src') !== errorUrl) { + tile.src = errorUrl; + } + done(e, tile); + }, + + _onTileRemove: function (e) { + e.tile.onload = null; + }, + + _getZoomForUrl: function () { + var zoom = this._tileZoom, + maxZoom = this.options.maxZoom, + zoomReverse = this.options.zoomReverse, + zoomOffset = this.options.zoomOffset; + + if (zoomReverse) { + zoom = maxZoom - zoom; + } + + return zoom + zoomOffset; + }, + + _getSubdomain: function (tilePoint) { + var index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length; + return this.options.subdomains[index]; + }, + + // stops loading all tiles in the background layer + _abortLoading: function () { + var i, tile; + for (i in this._tiles) { + if (this._tiles[i].coords.z !== this._tileZoom) { + tile = this._tiles[i].el; + + tile.onload = falseFn; + tile.onerror = falseFn; + + if (!tile.complete) { + tile.src = emptyImageUrl; + remove(tile); + delete this._tiles[i]; + } + } + } + } +}); + + +// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options) +// Instantiates a tile layer object given a `URL template` and optionally an options object. + +function tileLayer(url, options) { + return new TileLayer(url, options); +} + +/* + * @class TileLayer.WMS + * @inherits TileLayer + * @aka L.TileLayer.WMS + * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`. + * + * @example + * + * ```js + * var nexrad = L.tileLayer.wms("http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi", { + * layers: 'nexrad-n0r-900913', + * format: 'image/png', + * transparent: true, + * attribution: "Weather data © 2012 IEM Nexrad" + * }); + * ``` + */ + +var TileLayerWMS = TileLayer.extend({ + + // @section + // @aka TileLayer.WMS options + // If any custom options not documented here are used, they will be sent to the + // WMS server as extra parameters in each request URL. This can be useful for + // [non-standard vendor WMS parameters](http://docs.geoserver.org/stable/en/user/services/wms/vendor.html). + defaultWmsParams: { + service: 'WMS', + request: 'GetMap', + + // @option layers: String = '' + // **(required)** Comma-separated list of WMS layers to show. + layers: '', + + // @option styles: String = '' + // Comma-separated list of WMS styles. + styles: '', + + // @option format: String = 'image/jpeg' + // WMS image format (use `'image/png'` for layers with transparency). + format: 'image/jpeg', + + // @option transparent: Boolean = false + // If `true`, the WMS service will return images with transparency. + transparent: false, + + // @option version: String = '1.1.1' + // Version of the WMS service to use + version: '1.1.1' + }, + + options: { + // @option crs: CRS = null + // Coordinate Reference System to use for the WMS requests, defaults to + // map CRS. Don't change this if you're not sure what it means. + crs: null, + + // @option uppercase: Boolean = false + // If `true`, WMS request parameter keys will be uppercase. + uppercase: false + }, + + initialize: function (url, options) { + + this._url = url; + + var wmsParams = extend({}, this.defaultWmsParams); + + // all keys that are not TileLayer options go to WMS params + for (var i in options) { + if (!(i in this.options)) { + wmsParams[i] = options[i]; + } + } + + options = setOptions(this, options); + + var realRetina = options.detectRetina && retina ? 2 : 1; + var tileSize = this.getTileSize(); + wmsParams.width = tileSize.x * realRetina; + wmsParams.height = tileSize.y * realRetina; + + this.wmsParams = wmsParams; + }, + + onAdd: function (map) { + + this._crs = this.options.crs || map.options.crs; + this._wmsVersion = parseFloat(this.wmsParams.version); + + var projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs'; + this.wmsParams[projectionKey] = this._crs.code; + + TileLayer.prototype.onAdd.call(this, map); + }, + + getTileUrl: function (coords) { + + var tileBounds = this._tileCoordsToNwSe(coords), + crs = this._crs, + bounds = toBounds(crs.project(tileBounds[0]), crs.project(tileBounds[1])), + min = bounds.min, + max = bounds.max, + bbox = (this._wmsVersion >= 1.3 && this._crs === EPSG4326 ? + [min.y, min.x, max.y, max.x] : + [min.x, min.y, max.x, max.y]).join(','), + url = L.TileLayer.prototype.getTileUrl.call(this, coords); + return url + + getParamString(this.wmsParams, url, this.options.uppercase) + + (this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox; + }, + + // @method setParams(params: Object, noRedraw?: Boolean): this + // Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true). + setParams: function (params, noRedraw) { + + extend(this.wmsParams, params); + + if (!noRedraw) { + this.redraw(); + } + + return this; + } +}); + + +// @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options) +// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object. +function tileLayerWMS(url, options) { + return new TileLayerWMS(url, options); +} + +TileLayer.WMS = TileLayerWMS; +tileLayer.wms = tileLayerWMS; + +/* + * @class Renderer + * @inherits Layer + * @aka L.Renderer + * + * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the + * DOM container of the renderer, its bounds, and its zoom animation. + * + * A `Renderer` works as an implicit layer group for all `Path`s - the renderer + * itself can be added or removed to the map. All paths use a renderer, which can + * be implicit (the map will decide the type of renderer and use it automatically) + * or explicit (using the [`renderer`](#path-renderer) option of the path). + * + * Do not use this class directly, use `SVG` and `Canvas` instead. + * + * @event update: Event + * Fired when the renderer updates its bounds, center and zoom, for example when + * its map has moved + */ + +var Renderer = Layer.extend({ + + // @section + // @aka Renderer options + options: { + // @option padding: Number = 0.1 + // How much to extend the clip area around the map view (relative to its size) + // e.g. 0.1 would be 10% of map view in each direction + padding: 0.1, + + // @option tolerance: Number = 0 + // How much to extend click tolerance round a path/object on the map + tolerance : 0 + }, + + initialize: function (options) { + setOptions(this, options); + stamp(this); + this._layers = this._layers || {}; + }, + + onAdd: function () { + if (!this._container) { + this._initContainer(); // defined by renderer implementations + + if (this._zoomAnimated) { + addClass(this._container, 'leaflet-zoom-animated'); + } + } + + this.getPane().appendChild(this._container); + this._update(); + this.on('update', this._updatePaths, this); + }, + + onRemove: function () { + this.off('update', this._updatePaths, this); + this._destroyContainer(); + }, + + getEvents: function () { + var events = { + viewreset: this._reset, + zoom: this._onZoom, + moveend: this._update, + zoomend: this._onZoomEnd + }; + if (this._zoomAnimated) { + events.zoomanim = this._onAnimZoom; + } + return events; + }, + + _onAnimZoom: function (ev) { + this._updateTransform(ev.center, ev.zoom); + }, + + _onZoom: function () { + this._updateTransform(this._map.getCenter(), this._map.getZoom()); + }, + + _updateTransform: function (center, zoom) { + var scale = this._map.getZoomScale(zoom, this._zoom), + position = getPosition(this._container), + viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding), + currentCenterPoint = this._map.project(this._center, zoom), + destCenterPoint = this._map.project(center, zoom), + centerOffset = destCenterPoint.subtract(currentCenterPoint), + + topLeftOffset = viewHalf.multiplyBy(-scale).add(position).add(viewHalf).subtract(centerOffset); + + if (any3d) { + setTransform(this._container, topLeftOffset, scale); + } else { + setPosition(this._container, topLeftOffset); + } + }, + + _reset: function () { + this._update(); + this._updateTransform(this._center, this._zoom); + + for (var id in this._layers) { + this._layers[id]._reset(); + } + }, + + _onZoomEnd: function () { + for (var id in this._layers) { + this._layers[id]._project(); + } + }, + + _updatePaths: function () { + for (var id in this._layers) { + this._layers[id]._update(); + } + }, + + _update: function () { + // Update pixel bounds of renderer container (for positioning/sizing/clipping later) + // Subclasses are responsible of firing the 'update' event. + var p = this.options.padding, + size = this._map.getSize(), + min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round(); + + this._bounds = new Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round()); + + this._center = this._map.getCenter(); + this._zoom = this._map.getZoom(); + } +}); + +/* + * @class Canvas + * @inherits Renderer + * @aka L.Canvas + * + * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API). + * Inherits `Renderer`. + * + * Due to [technical limitations](http://caniuse.com/#search=canvas), Canvas is not + * available in all web browsers, notably IE8, and overlapping geometries might + * not display properly in some edge cases. + * + * @example + * + * Use Canvas by default for all paths in the map: + * + * ```js + * var map = L.map('map', { + * renderer: L.canvas() + * }); + * ``` + * + * Use a Canvas renderer with extra padding for specific vector geometries: + * + * ```js + * var map = L.map('map'); + * var myRenderer = L.canvas({ padding: 0.5 }); + * var line = L.polyline( coordinates, { renderer: myRenderer } ); + * var circle = L.circle( center, { renderer: myRenderer } ); + * ``` + */ + +var Canvas = Renderer.extend({ + getEvents: function () { + var events = Renderer.prototype.getEvents.call(this); + events.viewprereset = this._onViewPreReset; + return events; + }, + + _onViewPreReset: function () { + // Set a flag so that a viewprereset+moveend+viewreset only updates&redraws once + this._postponeUpdatePaths = true; + }, + + onAdd: function () { + Renderer.prototype.onAdd.call(this); + + // Redraw vectors since canvas is cleared upon removal, + // in case of removing the renderer itself from the map. + this._draw(); + }, + + _initContainer: function () { + var container = this._container = document.createElement('canvas'); + + on(container, 'mousemove', throttle(this._onMouseMove, 32, this), this); + on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this); + on(container, 'mouseout', this._handleMouseOut, this); + + this._ctx = container.getContext('2d'); + }, + + _destroyContainer: function () { + delete this._ctx; + remove(this._container); + off(this._container); + delete this._container; + }, + + _updatePaths: function () { + if (this._postponeUpdatePaths) { return; } + + var layer; + this._redrawBounds = null; + for (var id in this._layers) { + layer = this._layers[id]; + layer._update(); + } + this._redraw(); + }, + + _update: function () { + if (this._map._animatingZoom && this._bounds) { return; } + + this._drawnLayers = {}; + + Renderer.prototype._update.call(this); + + var b = this._bounds, + container = this._container, + size = b.getSize(), + m = retina ? 2 : 1; + + setPosition(container, b.min); + + // set canvas size (also clearing it); use double size on retina + container.width = m * size.x; + container.height = m * size.y; + container.style.width = size.x + 'px'; + container.style.height = size.y + 'px'; + + if (retina) { + this._ctx.scale(2, 2); + } + + // translate so we use the same path coordinates after canvas element moves + this._ctx.translate(-b.min.x, -b.min.y); + + // Tell paths to redraw themselves + this.fire('update'); + }, + + _reset: function () { + Renderer.prototype._reset.call(this); + + if (this._postponeUpdatePaths) { + this._postponeUpdatePaths = false; + this._updatePaths(); + } + }, + + _initPath: function (layer) { + this._updateDashArray(layer); + this._layers[stamp(layer)] = layer; + + var order = layer._order = { + layer: layer, + prev: this._drawLast, + next: null + }; + if (this._drawLast) { this._drawLast.next = order; } + this._drawLast = order; + this._drawFirst = this._drawFirst || this._drawLast; + }, + + _addPath: function (layer) { + this._requestRedraw(layer); + }, + + _removePath: function (layer) { + var order = layer._order; + var next = order.next; + var prev = order.prev; + + if (next) { + next.prev = prev; + } else { + this._drawLast = prev; + } + if (prev) { + prev.next = next; + } else { + this._drawFirst = next; + } + + delete layer._order; + + delete this._layers[L.stamp(layer)]; + + this._requestRedraw(layer); + }, + + _updatePath: function (layer) { + // Redraw the union of the layer's old pixel + // bounds and the new pixel bounds. + this._extendRedrawBounds(layer); + layer._project(); + layer._update(); + // The redraw will extend the redraw bounds + // with the new pixel bounds. + this._requestRedraw(layer); + }, + + _updateStyle: function (layer) { + this._updateDashArray(layer); + this._requestRedraw(layer); + }, + + _updateDashArray: function (layer) { + if (layer.options.dashArray) { + var parts = layer.options.dashArray.split(','), + dashArray = [], + i; + for (i = 0; i < parts.length; i++) { + dashArray.push(Number(parts[i])); + } + layer.options._dashArray = dashArray; + } + }, + + _requestRedraw: function (layer) { + if (!this._map) { return; } + + this._extendRedrawBounds(layer); + this._redrawRequest = this._redrawRequest || requestAnimFrame(this._redraw, this); + }, + + _extendRedrawBounds: function (layer) { + if (layer._pxBounds) { + var padding = (layer.options.weight || 0) + 1; + this._redrawBounds = this._redrawBounds || new Bounds(); + this._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding])); + this._redrawBounds.extend(layer._pxBounds.max.add([padding, padding])); + } + }, + + _redraw: function () { + this._redrawRequest = null; + + if (this._redrawBounds) { + this._redrawBounds.min._floor(); + this._redrawBounds.max._ceil(); + } + + this._clear(); // clear layers in redraw bounds + this._draw(); // draw layers + + this._redrawBounds = null; + }, + + _clear: function () { + var bounds = this._redrawBounds; + if (bounds) { + var size = bounds.getSize(); + this._ctx.clearRect(bounds.min.x, bounds.min.y, size.x, size.y); + } else { + this._ctx.clearRect(0, 0, this._container.width, this._container.height); + } + }, + + _draw: function () { + var layer, bounds = this._redrawBounds; + this._ctx.save(); + if (bounds) { + var size = bounds.getSize(); + this._ctx.beginPath(); + this._ctx.rect(bounds.min.x, bounds.min.y, size.x, size.y); + this._ctx.clip(); + } + + this._drawing = true; + + for (var order = this._drawFirst; order; order = order.next) { + layer = order.layer; + if (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) { + layer._updatePath(); + } + } + + this._drawing = false; + + this._ctx.restore(); // Restore state before clipping. + }, + + _updatePoly: function (layer, closed) { + if (!this._drawing) { return; } + + var i, j, len2, p, + parts = layer._parts, + len = parts.length, + ctx = this._ctx; + + if (!len) { return; } + + this._drawnLayers[layer._leaflet_id] = layer; + + ctx.beginPath(); + + for (i = 0; i < len; i++) { + for (j = 0, len2 = parts[i].length; j < len2; j++) { + p = parts[i][j]; + ctx[j ? 'lineTo' : 'moveTo'](p.x, p.y); + } + if (closed) { + ctx.closePath(); + } + } + + this._fillStroke(ctx, layer); + + // TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature + }, + + _updateCircle: function (layer) { + + if (!this._drawing || layer._empty()) { return; } + + var p = layer._point, + ctx = this._ctx, + r = Math.max(Math.round(layer._radius), 1), + s = (Math.max(Math.round(layer._radiusY), 1) || r) / r; + + this._drawnLayers[layer._leaflet_id] = layer; + + if (s !== 1) { + ctx.save(); + ctx.scale(1, s); + } + + ctx.beginPath(); + ctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false); + + if (s !== 1) { + ctx.restore(); + } + + this._fillStroke(ctx, layer); + }, + + _fillStroke: function (ctx, layer) { + var options = layer.options; + + if (options.fill) { + ctx.globalAlpha = options.fillOpacity; + ctx.fillStyle = options.fillColor || options.color; + ctx.fill(options.fillRule || 'evenodd'); + } + + if (options.stroke && options.weight !== 0) { + if (ctx.setLineDash) { + ctx.setLineDash(layer.options && layer.options._dashArray || []); + } + ctx.globalAlpha = options.opacity; + ctx.lineWidth = options.weight; + ctx.strokeStyle = options.color; + ctx.lineCap = options.lineCap; + ctx.lineJoin = options.lineJoin; + ctx.stroke(); + } + }, + + // Canvas obviously doesn't have mouse events for individual drawn objects, + // so we emulate that by calculating what's under the mouse on mousemove/click manually + + _onClick: function (e) { + var point = this._map.mouseEventToLayerPoint(e), layer, clickedLayer; + + for (var order = this._drawFirst; order; order = order.next) { + layer = order.layer; + if (layer.options.interactive && layer._containsPoint(point) && !this._map._draggableMoved(layer)) { + clickedLayer = layer; + } + } + if (clickedLayer) { + fakeStop(e); + this._fireEvent([clickedLayer], e); + } + }, + + _onMouseMove: function (e) { + if (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; } + + var point = this._map.mouseEventToLayerPoint(e); + this._handleMouseHover(e, point); + }, + + + _handleMouseOut: function (e) { + var layer = this._hoveredLayer; + if (layer) { + // if we're leaving the layer, fire mouseout + removeClass(this._container, 'leaflet-interactive'); + this._fireEvent([layer], e, 'mouseout'); + this._hoveredLayer = null; + } + }, + + _handleMouseHover: function (e, point) { + var layer, candidateHoveredLayer; + + for (var order = this._drawFirst; order; order = order.next) { + layer = order.layer; + if (layer.options.interactive && layer._containsPoint(point)) { + candidateHoveredLayer = layer; + } + } + + if (candidateHoveredLayer !== this._hoveredLayer) { + this._handleMouseOut(e); + + if (candidateHoveredLayer) { + addClass(this._container, 'leaflet-interactive'); // change cursor + this._fireEvent([candidateHoveredLayer], e, 'mouseover'); + this._hoveredLayer = candidateHoveredLayer; + } + } + + if (this._hoveredLayer) { + this._fireEvent([this._hoveredLayer], e); + } + }, + + _fireEvent: function (layers, e, type) { + this._map._fireDOMEvent(e, type || e.type, layers); + }, + + _bringToFront: function (layer) { + var order = layer._order; + var next = order.next; + var prev = order.prev; + + if (next) { + next.prev = prev; + } else { + // Already last + return; + } + if (prev) { + prev.next = next; + } else if (next) { + // Update first entry unless this is the + // single entry + this._drawFirst = next; + } + + order.prev = this._drawLast; + this._drawLast.next = order; + + order.next = null; + this._drawLast = order; + + this._requestRedraw(layer); + }, + + _bringToBack: function (layer) { + var order = layer._order; + var next = order.next; + var prev = order.prev; + + if (prev) { + prev.next = next; + } else { + // Already first + return; + } + if (next) { + next.prev = prev; + } else if (prev) { + // Update last entry unless this is the + // single entry + this._drawLast = prev; + } + + order.prev = null; + + order.next = this._drawFirst; + this._drawFirst.prev = order; + this._drawFirst = order; + + this._requestRedraw(layer); + } +}); + +// @factory L.canvas(options?: Renderer options) +// Creates a Canvas renderer with the given options. +function canvas$1(options) { + return canvas ? new Canvas(options) : null; +} + +/* + * Thanks to Dmitry Baranovsky and his Raphael library for inspiration! + */ + + +var vmlCreate = (function () { + try { + document.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml'); + return function (name) { + return document.createElement('<lvml:' + name + ' class="lvml">'); + }; + } catch (e) { + return function (name) { + return document.createElement('<' + name + ' xmlns="urn:schemas-microsoft.com:vml" class="lvml">'); + }; + } +})(); + + +/* + * @class SVG + * + * Although SVG is not available on IE7 and IE8, these browsers support [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language), and the SVG renderer will fall back to VML in this case. + * + * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility + * with old versions of Internet Explorer. + */ + +// mixin to redefine some SVG methods to handle VML syntax which is similar but with some differences +var vmlMixin = { + + _initContainer: function () { + this._container = create$1('div', 'leaflet-vml-container'); + }, + + _update: function () { + if (this._map._animatingZoom) { return; } + Renderer.prototype._update.call(this); + this.fire('update'); + }, + + _initPath: function (layer) { + var container = layer._container = vmlCreate('shape'); + + addClass(container, 'leaflet-vml-shape ' + (this.options.className || '')); + + container.coordsize = '1 1'; + + layer._path = vmlCreate('path'); + container.appendChild(layer._path); + + this._updateStyle(layer); + this._layers[stamp(layer)] = layer; + }, + + _addPath: function (layer) { + var container = layer._container; + this._container.appendChild(container); + + if (layer.options.interactive) { + layer.addInteractiveTarget(container); + } + }, + + _removePath: function (layer) { + var container = layer._container; + remove(container); + layer.removeInteractiveTarget(container); + delete this._layers[stamp(layer)]; + }, + + _updateStyle: function (layer) { + var stroke = layer._stroke, + fill = layer._fill, + options = layer.options, + container = layer._container; + + container.stroked = !!options.stroke; + container.filled = !!options.fill; + + if (options.stroke) { + if (!stroke) { + stroke = layer._stroke = vmlCreate('stroke'); + } + container.appendChild(stroke); + stroke.weight = options.weight + 'px'; + stroke.color = options.color; + stroke.opacity = options.opacity; + + if (options.dashArray) { + stroke.dashStyle = isArray(options.dashArray) ? + options.dashArray.join(' ') : + options.dashArray.replace(/( *, *)/g, ' '); + } else { + stroke.dashStyle = ''; + } + stroke.endcap = options.lineCap.replace('butt', 'flat'); + stroke.joinstyle = options.lineJoin; + + } else if (stroke) { + container.removeChild(stroke); + layer._stroke = null; + } + + if (options.fill) { + if (!fill) { + fill = layer._fill = vmlCreate('fill'); + } + container.appendChild(fill); + fill.color = options.fillColor || options.color; + fill.opacity = options.fillOpacity; + + } else if (fill) { + container.removeChild(fill); + layer._fill = null; + } + }, + + _updateCircle: function (layer) { + var p = layer._point.round(), + r = Math.round(layer._radius), + r2 = Math.round(layer._radiusY || r); + + this._setPath(layer, layer._empty() ? 'M0 0' : + 'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360)); + }, + + _setPath: function (layer, path) { + layer._path.v = path; + }, + + _bringToFront: function (layer) { + toFront(layer._container); + }, + + _bringToBack: function (layer) { + toBack(layer._container); + } +}; + +var create$2 = vml ? vmlCreate : svgCreate; + +/* + * @class SVG + * @inherits Renderer + * @aka L.SVG + * + * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG). + * Inherits `Renderer`. + * + * Due to [technical limitations](http://caniuse.com/#search=svg), SVG is not + * available in all web browsers, notably Android 2.x and 3.x. + * + * Although SVG is not available on IE7 and IE8, these browsers support + * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language) + * (a now deprecated technology), and the SVG renderer will fall back to VML in + * this case. + * + * @example + * + * Use SVG by default for all paths in the map: + * + * ```js + * var map = L.map('map', { + * renderer: L.svg() + * }); + * ``` + * + * Use a SVG renderer with extra padding for specific vector geometries: + * + * ```js + * var map = L.map('map'); + * var myRenderer = L.svg({ padding: 0.5 }); + * var line = L.polyline( coordinates, { renderer: myRenderer } ); + * var circle = L.circle( center, { renderer: myRenderer } ); + * ``` + */ + +var SVG = Renderer.extend({ + + getEvents: function () { + var events = Renderer.prototype.getEvents.call(this); + events.zoomstart = this._onZoomStart; + return events; + }, + + _initContainer: function () { + this._container = create$2('svg'); + + // makes it possible to click through svg root; we'll reset it back in individual paths + this._container.setAttribute('pointer-events', 'none'); + + this._rootGroup = create$2('g'); + this._container.appendChild(this._rootGroup); + }, + + _destroyContainer: function () { + remove(this._container); + off(this._container); + delete this._container; + delete this._rootGroup; + delete this._svgSize; + }, + + _onZoomStart: function () { + // Drag-then-pinch interactions might mess up the center and zoom. + // In this case, the easiest way to prevent this is re-do the renderer + // bounds and padding when the zooming starts. + this._update(); + }, + + _update: function () { + if (this._map._animatingZoom && this._bounds) { return; } + + Renderer.prototype._update.call(this); + + var b = this._bounds, + size = b.getSize(), + container = this._container; + + // set size of svg-container if changed + if (!this._svgSize || !this._svgSize.equals(size)) { + this._svgSize = size; + container.setAttribute('width', size.x); + container.setAttribute('height', size.y); + } + + // movement: update container viewBox so that we don't have to change coordinates of individual layers + setPosition(container, b.min); + container.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' ')); + + this.fire('update'); + }, + + // methods below are called by vector layers implementations + + _initPath: function (layer) { + var path = layer._path = create$2('path'); + + // @namespace Path + // @option className: String = null + // Custom class name set on an element. Only for SVG renderer. + if (layer.options.className) { + addClass(path, layer.options.className); + } + + if (layer.options.interactive) { + addClass(path, 'leaflet-interactive'); + } + + this._updateStyle(layer); + this._layers[stamp(layer)] = layer; + }, + + _addPath: function (layer) { + if (!this._rootGroup) { this._initContainer(); } + this._rootGroup.appendChild(layer._path); + layer.addInteractiveTarget(layer._path); + }, + + _removePath: function (layer) { + remove(layer._path); + layer.removeInteractiveTarget(layer._path); + delete this._layers[stamp(layer)]; + }, + + _updatePath: function (layer) { + layer._project(); + layer._update(); + }, + + _updateStyle: function (layer) { + var path = layer._path, + options = layer.options; + + if (!path) { return; } + + if (options.stroke) { + path.setAttribute('stroke', options.color); + path.setAttribute('stroke-opacity', options.opacity); + path.setAttribute('stroke-width', options.weight); + path.setAttribute('stroke-linecap', options.lineCap); + path.setAttribute('stroke-linejoin', options.lineJoin); + + if (options.dashArray) { + path.setAttribute('stroke-dasharray', options.dashArray); + } else { + path.removeAttribute('stroke-dasharray'); + } + + if (options.dashOffset) { + path.setAttribute('stroke-dashoffset', options.dashOffset); + } else { + path.removeAttribute('stroke-dashoffset'); + } + } else { + path.setAttribute('stroke', 'none'); + } + + if (options.fill) { + path.setAttribute('fill', options.fillColor || options.color); + path.setAttribute('fill-opacity', options.fillOpacity); + path.setAttribute('fill-rule', options.fillRule || 'evenodd'); + } else { + path.setAttribute('fill', 'none'); + } + }, + + _updatePoly: function (layer, closed) { + this._setPath(layer, pointsToPath(layer._parts, closed)); + }, + + _updateCircle: function (layer) { + var p = layer._point, + r = Math.max(Math.round(layer._radius), 1), + r2 = Math.max(Math.round(layer._radiusY), 1) || r, + arc = 'a' + r + ',' + r2 + ' 0 1,0 '; + + // drawing a circle with two half-arcs + var d = layer._empty() ? 'M0 0' : + 'M' + (p.x - r) + ',' + p.y + + arc + (r * 2) + ',0 ' + + arc + (-r * 2) + ',0 '; + + this._setPath(layer, d); + }, + + _setPath: function (layer, path) { + layer._path.setAttribute('d', path); + }, + + // SVG does not have the concept of zIndex so we resort to changing the DOM order of elements + _bringToFront: function (layer) { + toFront(layer._path); + }, + + _bringToBack: function (layer) { + toBack(layer._path); + } +}); + +if (vml) { + SVG.include(vmlMixin); +} + +// @namespace SVG +// @factory L.svg(options?: Renderer options) +// Creates a SVG renderer with the given options. +function svg$1(options) { + return svg || vml ? new SVG(options) : null; +} + +Map.include({ + // @namespace Map; @method getRenderer(layer: Path): Renderer + // Returns the instance of `Renderer` that should be used to render the given + // `Path`. It will ensure that the `renderer` options of the map and paths + // are respected, and that the renderers do exist on the map. + getRenderer: function (layer) { + // @namespace Path; @option renderer: Renderer + // Use this specific instance of `Renderer` for this path. Takes + // precedence over the map's [default renderer](#map-renderer). + var renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer; + + if (!renderer) { + // @namespace Map; @option preferCanvas: Boolean = false + // Whether `Path`s should be rendered on a `Canvas` renderer. + // By default, all `Path`s are rendered in a `SVG` renderer. + renderer = this._renderer = (this.options.preferCanvas && canvas$1()) || svg$1(); + } + + if (!this.hasLayer(renderer)) { + this.addLayer(renderer); + } + return renderer; + }, + + _getPaneRenderer: function (name) { + if (name === 'overlayPane' || name === undefined) { + return false; + } + + var renderer = this._paneRenderers[name]; + if (renderer === undefined) { + renderer = (SVG && svg$1({pane: name})) || (Canvas && canvas$1({pane: name})); + this._paneRenderers[name] = renderer; + } + return renderer; + } +}); + +/* + * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object. + */ + +/* + * @class Rectangle + * @aka L.Rectangle + * @inherits Polygon + * + * A class for drawing rectangle overlays on a map. Extends `Polygon`. + * + * @example + * + * ```js + * // define rectangle geographical bounds + * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]]; + * + * // create an orange rectangle + * L.rectangle(bounds, {color: "#ff7800", weight: 1}).addTo(map); + * + * // zoom the map to the rectangle bounds + * map.fitBounds(bounds); + * ``` + * + */ + + +var Rectangle = Polygon.extend({ + initialize: function (latLngBounds, options) { + Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options); + }, + + // @method setBounds(latLngBounds: LatLngBounds): this + // Redraws the rectangle with the passed bounds. + setBounds: function (latLngBounds) { + return this.setLatLngs(this._boundsToLatLngs(latLngBounds)); + }, + + _boundsToLatLngs: function (latLngBounds) { + latLngBounds = toLatLngBounds(latLngBounds); + return [ + latLngBounds.getSouthWest(), + latLngBounds.getNorthWest(), + latLngBounds.getNorthEast(), + latLngBounds.getSouthEast() + ]; + } +}); + + +// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options) +function rectangle(latLngBounds, options) { + return new Rectangle(latLngBounds, options); +} + +SVG.create = create$2; +SVG.pointsToPath = pointsToPath; + +GeoJSON.geometryToLayer = geometryToLayer; +GeoJSON.coordsToLatLng = coordsToLatLng; +GeoJSON.coordsToLatLngs = coordsToLatLngs; +GeoJSON.latLngToCoords = latLngToCoords; +GeoJSON.latLngsToCoords = latLngsToCoords; +GeoJSON.getFeature = getFeature; +GeoJSON.asFeature = asFeature; + +/* + * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map + * (zoom to a selected bounding box), enabled by default. + */ + +// @namespace Map +// @section Interaction Options +Map.mergeOptions({ + // @option boxZoom: Boolean = true + // Whether the map can be zoomed to a rectangular area specified by + // dragging the mouse while pressing the shift key. + boxZoom: true +}); + +var BoxZoom = Handler.extend({ + initialize: function (map) { + this._map = map; + this._container = map._container; + this._pane = map._panes.overlayPane; + this._resetStateTimeout = 0; + map.on('unload', this._destroy, this); + }, + + addHooks: function () { + on(this._container, 'mousedown', this._onMouseDown, this); + }, + + removeHooks: function () { + off(this._container, 'mousedown', this._onMouseDown, this); + }, + + moved: function () { + return this._moved; + }, + + _destroy: function () { + remove(this._pane); + delete this._pane; + }, + + _resetState: function () { + this._resetStateTimeout = 0; + this._moved = false; + }, + + _clearDeferredResetState: function () { + if (this._resetStateTimeout !== 0) { + clearTimeout(this._resetStateTimeout); + this._resetStateTimeout = 0; + } + }, + + _onMouseDown: function (e) { + if (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; } + + // Clear the deferred resetState if it hasn't executed yet, otherwise it + // will interrupt the interaction and orphan a box element in the container. + this._clearDeferredResetState(); + this._resetState(); + + disableTextSelection(); + disableImageDrag(); + + this._startPoint = this._map.mouseEventToContainerPoint(e); + + on(document, { + contextmenu: stop, + mousemove: this._onMouseMove, + mouseup: this._onMouseUp, + keydown: this._onKeyDown + }, this); + }, + + _onMouseMove: function (e) { + if (!this._moved) { + this._moved = true; + + this._box = create$1('div', 'leaflet-zoom-box', this._container); + addClass(this._container, 'leaflet-crosshair'); + + this._map.fire('boxzoomstart'); + } + + this._point = this._map.mouseEventToContainerPoint(e); + + var bounds = new Bounds(this._point, this._startPoint), + size = bounds.getSize(); + + setPosition(this._box, bounds.min); + + this._box.style.width = size.x + 'px'; + this._box.style.height = size.y + 'px'; + }, + + _finish: function () { + if (this._moved) { + remove(this._box); + removeClass(this._container, 'leaflet-crosshair'); + } + + enableTextSelection(); + enableImageDrag(); + + off(document, { + contextmenu: stop, + mousemove: this._onMouseMove, + mouseup: this._onMouseUp, + keydown: this._onKeyDown + }, this); + }, + + _onMouseUp: function (e) { + if ((e.which !== 1) && (e.button !== 1)) { return; } + + this._finish(); + + if (!this._moved) { return; } + // Postpone to next JS tick so internal click event handling + // still see it as "moved". + this._clearDeferredResetState(); + this._resetStateTimeout = setTimeout(bind(this._resetState, this), 0); + + var bounds = new LatLngBounds( + this._map.containerPointToLatLng(this._startPoint), + this._map.containerPointToLatLng(this._point)); + + this._map + .fitBounds(bounds) + .fire('boxzoomend', {boxZoomBounds: bounds}); + }, + + _onKeyDown: function (e) { + if (e.keyCode === 27) { + this._finish(); + } + } +}); + +// @section Handlers +// @property boxZoom: Handler +// Box (shift-drag with mouse) zoom handler. +Map.addInitHook('addHandler', 'boxZoom', BoxZoom); + +/* + * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default. + */ + +// @namespace Map +// @section Interaction Options + +Map.mergeOptions({ + // @option doubleClickZoom: Boolean|String = true + // Whether the map can be zoomed in by double clicking on it and + // zoomed out by double clicking while holding shift. If passed + // `'center'`, double-click zoom will zoom to the center of the + // view regardless of where the mouse was. + doubleClickZoom: true +}); + +var DoubleClickZoom = Handler.extend({ + addHooks: function () { + this._map.on('dblclick', this._onDoubleClick, this); + }, + + removeHooks: function () { + this._map.off('dblclick', this._onDoubleClick, this); + }, + + _onDoubleClick: function (e) { + var map = this._map, + oldZoom = map.getZoom(), + delta = map.options.zoomDelta, + zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta; + + if (map.options.doubleClickZoom === 'center') { + map.setZoom(zoom); + } else { + map.setZoomAround(e.containerPoint, zoom); + } + } +}); + +// @section Handlers +// +// Map properties include interaction handlers that allow you to control +// interaction behavior in runtime, enabling or disabling certain features such +// as dragging or touch zoom (see `Handler` methods). For example: +// +// ```js +// map.doubleClickZoom.disable(); +// ``` +// +// @property doubleClickZoom: Handler +// Double click zoom handler. +Map.addInitHook('addHandler', 'doubleClickZoom', DoubleClickZoom); + +/* + * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default. + */ + +// @namespace Map +// @section Interaction Options +Map.mergeOptions({ + // @option dragging: Boolean = true + // Whether the map be draggable with mouse/touch or not. + dragging: true, + + // @section Panning Inertia Options + // @option inertia: Boolean = * + // If enabled, panning of the map will have an inertia effect where + // the map builds momentum while dragging and continues moving in + // the same direction for some time. Feels especially nice on touch + // devices. Enabled by default unless running on old Android devices. + inertia: !android23, + + // @option inertiaDeceleration: Number = 3000 + // The rate with which the inertial movement slows down, in pixels/second². + inertiaDeceleration: 3400, // px/s^2 + + // @option inertiaMaxSpeed: Number = Infinity + // Max speed of the inertial movement, in pixels/second. + inertiaMaxSpeed: Infinity, // px/s + + // @option easeLinearity: Number = 0.2 + easeLinearity: 0.2, + + // TODO refactor, move to CRS + // @option worldCopyJump: Boolean = false + // With this option enabled, the map tracks when you pan to another "copy" + // of the world and seamlessly jumps to the original one so that all overlays + // like markers and vector layers are still visible. + worldCopyJump: false, + + // @option maxBoundsViscosity: Number = 0.0 + // If `maxBounds` is set, this option will control how solid the bounds + // are when dragging the map around. The default value of `0.0` allows the + // user to drag outside the bounds at normal speed, higher values will + // slow down map dragging outside bounds, and `1.0` makes the bounds fully + // solid, preventing the user from dragging outside the bounds. + maxBoundsViscosity: 0.0 +}); + +var Drag = Handler.extend({ + addHooks: function () { + if (!this._draggable) { + var map = this._map; + + this._draggable = new Draggable(map._mapPane, map._container); + + this._draggable.on({ + dragstart: this._onDragStart, + drag: this._onDrag, + dragend: this._onDragEnd + }, this); + + this._draggable.on('predrag', this._onPreDragLimit, this); + if (map.options.worldCopyJump) { + this._draggable.on('predrag', this._onPreDragWrap, this); + map.on('zoomend', this._onZoomEnd, this); + + map.whenReady(this._onZoomEnd, this); + } + } + addClass(this._map._container, 'leaflet-grab leaflet-touch-drag'); + this._draggable.enable(); + this._positions = []; + this._times = []; + }, + + removeHooks: function () { + removeClass(this._map._container, 'leaflet-grab'); + removeClass(this._map._container, 'leaflet-touch-drag'); + this._draggable.disable(); + }, + + moved: function () { + return this._draggable && this._draggable._moved; + }, + + moving: function () { + return this._draggable && this._draggable._moving; + }, + + _onDragStart: function () { + var map = this._map; + + map._stop(); + if (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) { + var bounds = toLatLngBounds(this._map.options.maxBounds); + + this._offsetLimit = toBounds( + this._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1), + this._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1) + .add(this._map.getSize())); + + this._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity)); + } else { + this._offsetLimit = null; + } + + map + .fire('movestart') + .fire('dragstart'); + + if (map.options.inertia) { + this._positions = []; + this._times = []; + } + }, + + _onDrag: function (e) { + if (this._map.options.inertia) { + var time = this._lastTime = +new Date(), + pos = this._lastPos = this._draggable._absPos || this._draggable._newPos; + + this._positions.push(pos); + this._times.push(time); + + this._prunePositions(time); + } + + this._map + .fire('move', e) + .fire('drag', e); + }, + + _prunePositions: function (time) { + while (this._positions.length > 1 && time - this._times[0] > 50) { + this._positions.shift(); + this._times.shift(); + } + }, + + _onZoomEnd: function () { + var pxCenter = this._map.getSize().divideBy(2), + pxWorldCenter = this._map.latLngToLayerPoint([0, 0]); + + this._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x; + this._worldWidth = this._map.getPixelWorldBounds().getSize().x; + }, + + _viscousLimit: function (value, threshold) { + return value - (value - threshold) * this._viscosity; + }, + + _onPreDragLimit: function () { + if (!this._viscosity || !this._offsetLimit) { return; } + + var offset = this._draggable._newPos.subtract(this._draggable._startPos); + + var limit = this._offsetLimit; + if (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); } + if (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); } + if (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); } + if (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); } + + this._draggable._newPos = this._draggable._startPos.add(offset); + }, + + _onPreDragWrap: function () { + // TODO refactor to be able to adjust map pane position after zoom + var worldWidth = this._worldWidth, + halfWidth = Math.round(worldWidth / 2), + dx = this._initialWorldOffset, + x = this._draggable._newPos.x, + newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx, + newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx, + newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2; + + this._draggable._absPos = this._draggable._newPos.clone(); + this._draggable._newPos.x = newX; + }, + + _onDragEnd: function (e) { + var map = this._map, + options = map.options, + + noInertia = !options.inertia || this._times.length < 2; + + map.fire('dragend', e); + + if (noInertia) { + map.fire('moveend'); + + } else { + this._prunePositions(+new Date()); + + var direction = this._lastPos.subtract(this._positions[0]), + duration = (this._lastTime - this._times[0]) / 1000, + ease = options.easeLinearity, + + speedVector = direction.multiplyBy(ease / duration), + speed = speedVector.distanceTo([0, 0]), + + limitedSpeed = Math.min(options.inertiaMaxSpeed, speed), + limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed), + + decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease), + offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round(); + + if (!offset.x && !offset.y) { + map.fire('moveend'); + + } else { + offset = map._limitOffset(offset, map.options.maxBounds); + + requestAnimFrame(function () { + map.panBy(offset, { + duration: decelerationDuration, + easeLinearity: ease, + noMoveStart: true, + animate: true + }); + }); + } + } + } +}); + +// @section Handlers +// @property dragging: Handler +// Map dragging handler (by both mouse and touch). +Map.addInitHook('addHandler', 'dragging', Drag); + +/* + * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default. + */ + +// @namespace Map +// @section Keyboard Navigation Options +Map.mergeOptions({ + // @option keyboard: Boolean = true + // Makes the map focusable and allows users to navigate the map with keyboard + // arrows and `+`/`-` keys. + keyboard: true, + + // @option keyboardPanDelta: Number = 80 + // Amount of pixels to pan when pressing an arrow key. + keyboardPanDelta: 80 +}); + +var Keyboard = Handler.extend({ + + keyCodes: { + left: [37], + right: [39], + down: [40], + up: [38], + zoomIn: [187, 107, 61, 171], + zoomOut: [189, 109, 54, 173] + }, + + initialize: function (map) { + this._map = map; + + this._setPanDelta(map.options.keyboardPanDelta); + this._setZoomDelta(map.options.zoomDelta); + }, + + addHooks: function () { + var container = this._map._container; + + // make the container focusable by tabbing + if (container.tabIndex <= 0) { + container.tabIndex = '0'; + } + + on(container, { + focus: this._onFocus, + blur: this._onBlur, + mousedown: this._onMouseDown + }, this); + + this._map.on({ + focus: this._addHooks, + blur: this._removeHooks + }, this); + }, + + removeHooks: function () { + this._removeHooks(); + + off(this._map._container, { + focus: this._onFocus, + blur: this._onBlur, + mousedown: this._onMouseDown + }, this); + + this._map.off({ + focus: this._addHooks, + blur: this._removeHooks + }, this); + }, + + _onMouseDown: function () { + if (this._focused) { return; } + + var body = document.body, + docEl = document.documentElement, + top = body.scrollTop || docEl.scrollTop, + left = body.scrollLeft || docEl.scrollLeft; + + this._map._container.focus(); + + window.scrollTo(left, top); + }, + + _onFocus: function () { + this._focused = true; + this._map.fire('focus'); + }, + + _onBlur: function () { + this._focused = false; + this._map.fire('blur'); + }, + + _setPanDelta: function (panDelta) { + var keys = this._panKeys = {}, + codes = this.keyCodes, + i, len; + + for (i = 0, len = codes.left.length; i < len; i++) { + keys[codes.left[i]] = [-1 * panDelta, 0]; + } + for (i = 0, len = codes.right.length; i < len; i++) { + keys[codes.right[i]] = [panDelta, 0]; + } + for (i = 0, len = codes.down.length; i < len; i++) { + keys[codes.down[i]] = [0, panDelta]; + } + for (i = 0, len = codes.up.length; i < len; i++) { + keys[codes.up[i]] = [0, -1 * panDelta]; + } + }, + + _setZoomDelta: function (zoomDelta) { + var keys = this._zoomKeys = {}, + codes = this.keyCodes, + i, len; + + for (i = 0, len = codes.zoomIn.length; i < len; i++) { + keys[codes.zoomIn[i]] = zoomDelta; + } + for (i = 0, len = codes.zoomOut.length; i < len; i++) { + keys[codes.zoomOut[i]] = -zoomDelta; + } + }, + + _addHooks: function () { + on(document, 'keydown', this._onKeyDown, this); + }, + + _removeHooks: function () { + off(document, 'keydown', this._onKeyDown, this); + }, + + _onKeyDown: function (e) { + if (e.altKey || e.ctrlKey || e.metaKey) { return; } + + var key = e.keyCode, + map = this._map, + offset; + + if (key in this._panKeys) { + + if (map._panAnim && map._panAnim._inProgress) { return; } + + offset = this._panKeys[key]; + if (e.shiftKey) { + offset = toPoint(offset).multiplyBy(3); + } + + map.panBy(offset); + + if (map.options.maxBounds) { + map.panInsideBounds(map.options.maxBounds); + } + + } else if (key in this._zoomKeys) { + map.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]); + + } else if (key === 27 && map._popup && map._popup.options.closeOnEscapeKey) { + map.closePopup(); + + } else { + return; + } + + stop(e); + } +}); + +// @section Handlers +// @section Handlers +// @property keyboard: Handler +// Keyboard navigation handler. +Map.addInitHook('addHandler', 'keyboard', Keyboard); + +/* + * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map. + */ + +// @namespace Map +// @section Interaction Options +Map.mergeOptions({ + // @section Mousewheel options + // @option scrollWheelZoom: Boolean|String = true + // Whether the map can be zoomed by using the mouse wheel. If passed `'center'`, + // it will zoom to the center of the view regardless of where the mouse was. + scrollWheelZoom: true, + + // @option wheelDebounceTime: Number = 40 + // Limits the rate at which a wheel can fire (in milliseconds). By default + // user can't zoom via wheel more often than once per 40 ms. + wheelDebounceTime: 40, + + // @option wheelPxPerZoomLevel: Number = 60 + // How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta)) + // mean a change of one full zoom level. Smaller values will make wheel-zooming + // faster (and vice versa). + wheelPxPerZoomLevel: 60 +}); + +var ScrollWheelZoom = Handler.extend({ + addHooks: function () { + on(this._map._container, 'mousewheel', this._onWheelScroll, this); + + this._delta = 0; + }, + + removeHooks: function () { + off(this._map._container, 'mousewheel', this._onWheelScroll, this); + }, + + _onWheelScroll: function (e) { + var delta = getWheelDelta(e); + + var debounce = this._map.options.wheelDebounceTime; + + this._delta += delta; + this._lastMousePos = this._map.mouseEventToContainerPoint(e); + + if (!this._startTime) { + this._startTime = +new Date(); + } + + var left = Math.max(debounce - (+new Date() - this._startTime), 0); + + clearTimeout(this._timer); + this._timer = setTimeout(bind(this._performZoom, this), left); + + stop(e); + }, + + _performZoom: function () { + var map = this._map, + zoom = map.getZoom(), + snap = this._map.options.zoomSnap || 0; + + map._stop(); // stop panning and fly animations if any + + // map the delta with a sigmoid function to -4..4 range leaning on -1..1 + var d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4), + d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2, + d4 = snap ? Math.ceil(d3 / snap) * snap : d3, + delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom; + + this._delta = 0; + this._startTime = null; + + if (!delta) { return; } + + if (map.options.scrollWheelZoom === 'center') { + map.setZoom(zoom + delta); + } else { + map.setZoomAround(this._lastMousePos, zoom + delta); + } + } +}); + +// @section Handlers +// @property scrollWheelZoom: Handler +// Scroll wheel zoom handler. +Map.addInitHook('addHandler', 'scrollWheelZoom', ScrollWheelZoom); + +/* + * L.Map.Tap is used to enable mobile hacks like quick taps and long hold. + */ + +// @namespace Map +// @section Interaction Options +Map.mergeOptions({ + // @section Touch interaction options + // @option tap: Boolean = true + // Enables mobile hacks for supporting instant taps (fixing 200ms click + // delay on iOS/Android) and touch holds (fired as `contextmenu` events). + tap: true, + + // @option tapTolerance: Number = 15 + // The max number of pixels a user can shift his finger during touch + // for it to be considered a valid tap. + tapTolerance: 15 +}); + +var Tap = Handler.extend({ + addHooks: function () { + on(this._map._container, 'touchstart', this._onDown, this); + }, + + removeHooks: function () { + off(this._map._container, 'touchstart', this._onDown, this); + }, + + _onDown: function (e) { + if (!e.touches) { return; } + + preventDefault(e); + + this._fireClick = true; + + // don't simulate click or track longpress if more than 1 touch + if (e.touches.length > 1) { + this._fireClick = false; + clearTimeout(this._holdTimeout); + return; + } + + var first = e.touches[0], + el = first.target; + + this._startPos = this._newPos = new Point(first.clientX, first.clientY); + + // if touching a link, highlight it + if (el.tagName && el.tagName.toLowerCase() === 'a') { + addClass(el, 'leaflet-active'); + } + + // simulate long hold but setting a timeout + this._holdTimeout = setTimeout(bind(function () { + if (this._isTapValid()) { + this._fireClick = false; + this._onUp(); + this._simulateEvent('contextmenu', first); + } + }, this), 1000); + + this._simulateEvent('mousedown', first); + + on(document, { + touchmove: this._onMove, + touchend: this._onUp + }, this); + }, + + _onUp: function (e) { + clearTimeout(this._holdTimeout); + + off(document, { + touchmove: this._onMove, + touchend: this._onUp + }, this); + + if (this._fireClick && e && e.changedTouches) { + + var first = e.changedTouches[0], + el = first.target; + + if (el && el.tagName && el.tagName.toLowerCase() === 'a') { + removeClass(el, 'leaflet-active'); + } + + this._simulateEvent('mouseup', first); + + // simulate click if the touch didn't move too much + if (this._isTapValid()) { + this._simulateEvent('click', first); + } + } + }, + + _isTapValid: function () { + return this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance; + }, + + _onMove: function (e) { + var first = e.touches[0]; + this._newPos = new Point(first.clientX, first.clientY); + this._simulateEvent('mousemove', first); + }, + + _simulateEvent: function (type, e) { + var simulatedEvent = document.createEvent('MouseEvents'); + + simulatedEvent._simulated = true; + e.target._simulatedClick = true; + + simulatedEvent.initMouseEvent( + type, true, true, window, 1, + e.screenX, e.screenY, + e.clientX, e.clientY, + false, false, false, false, 0, null); + + e.target.dispatchEvent(simulatedEvent); + } +}); + +// @section Handlers +// @property tap: Handler +// Mobile touch hacks (quick tap and touch hold) handler. +if (touch && !pointer) { + Map.addInitHook('addHandler', 'tap', Tap); +} + +/* + * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers. + */ + +// @namespace Map +// @section Interaction Options +Map.mergeOptions({ + // @section Touch interaction options + // @option touchZoom: Boolean|String = * + // Whether the map can be zoomed by touch-dragging with two fingers. If + // passed `'center'`, it will zoom to the center of the view regardless of + // where the touch events (fingers) were. Enabled for touch-capable web + // browsers except for old Androids. + touchZoom: touch && !android23, + + // @option bounceAtZoomLimits: Boolean = true + // Set it to false if you don't want the map to zoom beyond min/max zoom + // and then bounce back when pinch-zooming. + bounceAtZoomLimits: true +}); + +var TouchZoom = Handler.extend({ + addHooks: function () { + addClass(this._map._container, 'leaflet-touch-zoom'); + on(this._map._container, 'touchstart', this._onTouchStart, this); + }, + + removeHooks: function () { + removeClass(this._map._container, 'leaflet-touch-zoom'); + off(this._map._container, 'touchstart', this._onTouchStart, this); + }, + + _onTouchStart: function (e) { + var map = this._map; + if (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; } + + var p1 = map.mouseEventToContainerPoint(e.touches[0]), + p2 = map.mouseEventToContainerPoint(e.touches[1]); + + this._centerPoint = map.getSize()._divideBy(2); + this._startLatLng = map.containerPointToLatLng(this._centerPoint); + if (map.options.touchZoom !== 'center') { + this._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2)); + } + + this._startDist = p1.distanceTo(p2); + this._startZoom = map.getZoom(); + + this._moved = false; + this._zooming = true; + + map._stop(); + + on(document, 'touchmove', this._onTouchMove, this); + on(document, 'touchend', this._onTouchEnd, this); + + preventDefault(e); + }, + + _onTouchMove: function (e) { + if (!e.touches || e.touches.length !== 2 || !this._zooming) { return; } + + var map = this._map, + p1 = map.mouseEventToContainerPoint(e.touches[0]), + p2 = map.mouseEventToContainerPoint(e.touches[1]), + scale = p1.distanceTo(p2) / this._startDist; + + this._zoom = map.getScaleZoom(scale, this._startZoom); + + if (!map.options.bounceAtZoomLimits && ( + (this._zoom < map.getMinZoom() && scale < 1) || + (this._zoom > map.getMaxZoom() && scale > 1))) { + this._zoom = map._limitZoom(this._zoom); + } + + if (map.options.touchZoom === 'center') { + this._center = this._startLatLng; + if (scale === 1) { return; } + } else { + // Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng + var delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint); + if (scale === 1 && delta.x === 0 && delta.y === 0) { return; } + this._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom); + } + + if (!this._moved) { + map._moveStart(true, false); + this._moved = true; + } + + cancelAnimFrame(this._animRequest); + + var moveFn = bind(map._move, map, this._center, this._zoom, {pinch: true, round: false}); + this._animRequest = requestAnimFrame(moveFn, this, true); + + preventDefault(e); + }, + + _onTouchEnd: function () { + if (!this._moved || !this._zooming) { + this._zooming = false; + return; + } + + this._zooming = false; + cancelAnimFrame(this._animRequest); + + off(document, 'touchmove', this._onTouchMove); + off(document, 'touchend', this._onTouchEnd); + + // Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate. + if (this._map.options.zoomAnimation) { + this._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap); + } else { + this._map._resetView(this._center, this._map._limitZoom(this._zoom)); + } + } +}); + +// @section Handlers +// @property touchZoom: Handler +// Touch zoom handler. +Map.addInitHook('addHandler', 'touchZoom', TouchZoom); + +Map.BoxZoom = BoxZoom; +Map.DoubleClickZoom = DoubleClickZoom; +Map.Drag = Drag; +Map.Keyboard = Keyboard; +Map.ScrollWheelZoom = ScrollWheelZoom; +Map.Tap = Tap; +Map.TouchZoom = TouchZoom; + +// misc + +var oldL = window.L; +function noConflict() { + window.L = oldL; + return this; +} + +// Always export us to window global (see #2364) +window.L = exports; + +Object.freeze = freeze; + +exports.version = version; +exports.noConflict = noConflict; +exports.Control = Control; +exports.control = control; +exports.Browser = Browser; +exports.Evented = Evented; +exports.Mixin = Mixin; +exports.Util = Util; +exports.Class = Class; +exports.Handler = Handler; +exports.extend = extend; +exports.bind = bind; +exports.stamp = stamp; +exports.setOptions = setOptions; +exports.DomEvent = DomEvent; +exports.DomUtil = DomUtil; +exports.PosAnimation = PosAnimation; +exports.Draggable = Draggable; +exports.LineUtil = LineUtil; +exports.PolyUtil = PolyUtil; +exports.Point = Point; +exports.point = toPoint; +exports.Bounds = Bounds; +exports.bounds = toBounds; +exports.Transformation = Transformation; +exports.transformation = toTransformation; +exports.Projection = index; +exports.LatLng = LatLng; +exports.latLng = toLatLng; +exports.LatLngBounds = LatLngBounds; +exports.latLngBounds = toLatLngBounds; +exports.CRS = CRS; +exports.GeoJSON = GeoJSON; +exports.geoJSON = geoJSON; +exports.geoJson = geoJson; +exports.Layer = Layer; +exports.LayerGroup = LayerGroup; +exports.layerGroup = layerGroup; +exports.FeatureGroup = FeatureGroup; +exports.featureGroup = featureGroup; +exports.ImageOverlay = ImageOverlay; +exports.imageOverlay = imageOverlay; +exports.VideoOverlay = VideoOverlay; +exports.videoOverlay = videoOverlay; +exports.DivOverlay = DivOverlay; +exports.Popup = Popup; +exports.popup = popup; +exports.Tooltip = Tooltip; +exports.tooltip = tooltip; +exports.Icon = Icon; +exports.icon = icon; +exports.DivIcon = DivIcon; +exports.divIcon = divIcon; +exports.Marker = Marker; +exports.marker = marker; +exports.TileLayer = TileLayer; +exports.tileLayer = tileLayer; +exports.GridLayer = GridLayer; +exports.gridLayer = gridLayer; +exports.SVG = SVG; +exports.svg = svg$1; +exports.Renderer = Renderer; +exports.Canvas = Canvas; +exports.canvas = canvas$1; +exports.Path = Path; +exports.CircleMarker = CircleMarker; +exports.circleMarker = circleMarker; +exports.Circle = Circle; +exports.circle = circle; +exports.Polyline = Polyline; +exports.polyline = polyline; +exports.Polygon = Polygon; +exports.polygon = polygon; +exports.Rectangle = Rectangle; +exports.rectangle = rectangle; +exports.Map = Map; +exports.map = createMap; + +}))); +//# sourceMappingURL=leaflet-src.js.map diff --git a/public/libs/leaflet-src.map b/public/libs/leaflet-src.map new file mode 100644 index 0000000000000000000000000000000000000000..7499559fb35ce616201f1fd2eeba076fd2195211 --- /dev/null +++ b/public/libs/leaflet-src.map @@ -0,0 +1 @@ +{"version":3,"sources":["src/Leaflet.js","src/core/Util.js","src/core/Class.js","src/core/Events.js","src/core/Browser.js","src/geometry/Point.js","src/geometry/Bounds.js","src/geometry/Transformation.js","src/dom/DomUtil.js","src/geo/LatLng.js","src/geo/LatLngBounds.js","src/geo/projection/Projection.LonLat.js","src/geo/projection/Projection.SphericalMercator.js","src/geo/crs/CRS.js","src/geo/crs/CRS.Simple.js","src/geo/crs/CRS.Earth.js","src/geo/crs/CRS.EPSG3857.js","src/geo/crs/CRS.EPSG4326.js","src/map/Map.js","src/layer/Layer.js","src/geo/projection/Projection.Mercator.js","src/geo/crs/CRS.EPSG3395.js","src/layer/tile/GridLayer.js","src/layer/tile/TileLayer.js","src/layer/tile/TileLayer.WMS.js","src/layer/ImageOverlay.js","src/layer/marker/Icon.js","src/layer/marker/Icon.Default.js","src/layer/marker/Marker.js","src/layer/marker/DivIcon.js","src/layer/DivOverlay.js","src/layer/Popup.js","src/layer/Layer.Popup.js","src/layer/marker/Marker.Popup.js","src/layer/Tooltip.js","src/layer/Layer.Tooltip.js","src/layer/marker/Marker.Tooltip.js","src/layer/LayerGroup.js","src/layer/FeatureGroup.js","src/layer/vector/Renderer.js","src/layer/vector/Path.js","src/geometry/LineUtil.js","src/layer/vector/Polyline.js","src/geometry/PolyUtil.js","src/layer/vector/Polygon.js","src/layer/vector/Rectangle.js","src/layer/vector/CircleMarker.js","src/layer/vector/Circle.js","src/layer/vector/SVG.js","src/layer/vector/SVG.VML.js","src/layer/vector/Canvas.js","src/layer/GeoJSON.js","src/dom/DomEvent.js","src/dom/Draggable.js","src/core/Handler.js","src/map/handler/Map.Drag.js","src/map/handler/Map.DoubleClickZoom.js","src/map/handler/Map.ScrollWheelZoom.js","src/dom/DomEvent.DoubleTap.js","src/dom/DomEvent.Pointer.js","src/map/handler/Map.TouchZoom.js","src/map/handler/Map.Tap.js","src/map/handler/Map.BoxZoom.js","src/map/handler/Map.Keyboard.js","src/layer/marker/Marker.Drag.js","src/control/Control.js","src/control/Control.Zoom.js","src/control/Control.Attribution.js","src/control/Control.Scale.js","src/control/Control.Layers.js","src/dom/PosAnimation.js","src/map/anim/Map.PanAnimation.js","src/map/anim/Map.ZoomAnimation.js","src/map/anim/Map.FlyTo.js","src/map/ext/Map.Geolocation.js"],"names":[],"mappings":";;;;yCAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5qCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACx2BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACrMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9UA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3OA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC1JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACvXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACrYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACjNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AClOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC9KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC5HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AChYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AC7FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["\r\nvar L = {\r\n\tversion: \"1.0.1+ffcfcc1\"\r\n};\r\n\r\nfunction expose() {\r\n\tvar oldL = window.L;\r\n\r\n\tL.noConflict = function () {\r\n\t\twindow.L = oldL;\r\n\t\treturn this;\r\n\t};\r\n\r\n\twindow.L = L;\r\n}\r\n\r\n// define Leaflet for Node module pattern loaders, including Browserify\r\nif (typeof module === 'object' && typeof module.exports === 'object') {\r\n\tmodule.exports = L;\r\n\r\n// define Leaflet as an AMD module\r\n} else if (typeof define === 'function' && define.amd) {\r\n\tdefine(L);\r\n}\r\n\r\n// define Leaflet as a global L variable, saving the original L to restore later if needed\r\nif (typeof window !== 'undefined') {\r\n\texpose();\r\n}\r\n","/*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\r\n\r\nL.Util = {\r\n\r\n\t// @function extend(dest: Object, src?: Object): Object\r\n\t// Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\r\n\textend: function (dest) {\r\n\t\tvar i, j, len, src;\r\n\r\n\t\tfor (j = 1, len = arguments.length; j < len; j++) {\r\n\t\t\tsrc = arguments[j];\r\n\t\t\tfor (i in src) {\r\n\t\t\t\tdest[i] = src[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn dest;\r\n\t},\r\n\r\n\t// @function create(proto: Object, properties?: Object): Object\r\n\t// Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\r\n\tcreate: Object.create || (function () {\r\n\t\tfunction F() {}\r\n\t\treturn function (proto) {\r\n\t\t\tF.prototype = proto;\r\n\t\t\treturn new F();\r\n\t\t};\r\n\t})(),\r\n\r\n\t// @function bind(fn: Function, …): Function\r\n\t// Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\r\n\t// Has a `L.bind()` shortcut.\r\n\tbind: function (fn, obj) {\r\n\t\tvar slice = Array.prototype.slice;\r\n\r\n\t\tif (fn.bind) {\r\n\t\t\treturn fn.bind.apply(fn, slice.call(arguments, 1));\r\n\t\t}\r\n\r\n\t\tvar args = slice.call(arguments, 2);\r\n\r\n\t\treturn function () {\r\n\t\t\treturn fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\r\n\t\t};\r\n\t},\r\n\r\n\t// @function stamp(obj: Object): Number\r\n\t// Returns the unique ID of an object, assiging it one if it doesn't have it.\r\n\tstamp: function (obj) {\r\n\t\t/*eslint-disable */\r\n\t\tobj._leaflet_id = obj._leaflet_id || ++L.Util.lastId;\r\n\t\treturn obj._leaflet_id;\r\n\t\t/*eslint-enable */\r\n\t},\r\n\r\n\t// @property lastId: Number\r\n\t// Last unique ID used by [`stamp()`](#util-stamp)\r\n\tlastId: 0,\r\n\r\n\t// @function throttle(fn: Function, time: Number, context: Object): Function\r\n\t// Returns a function which executes function `fn` with the given scope `context`\r\n\t// (so that the `this` keyword refers to `context` inside `fn`'s code). The function\r\n\t// `fn` will be called no more than one time per given amount of `time`. The arguments\r\n\t// received by the bound function will be any arguments passed when binding the\r\n\t// function, followed by any arguments passed when invoking the bound function.\r\n\t// Has an `L.bind` shortcut.\r\n\tthrottle: function (fn, time, context) {\r\n\t\tvar lock, args, wrapperFn, later;\r\n\r\n\t\tlater = function () {\r\n\t\t\t// reset lock and call if queued\r\n\t\t\tlock = false;\r\n\t\t\tif (args) {\r\n\t\t\t\twrapperFn.apply(context, args);\r\n\t\t\t\targs = false;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\twrapperFn = function () {\r\n\t\t\tif (lock) {\r\n\t\t\t\t// called too soon, queue to call later\r\n\t\t\t\targs = arguments;\r\n\r\n\t\t\t} else {\r\n\t\t\t\t// call and lock until later\r\n\t\t\t\tfn.apply(context, arguments);\r\n\t\t\t\tsetTimeout(later, time);\r\n\t\t\t\tlock = true;\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\treturn wrapperFn;\r\n\t},\r\n\r\n\t// @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\r\n\t// Returns the number `num` modulo `range` in such a way so it lies within\r\n\t// `range[0]` and `range[1]`. The returned value will be always smaller than\r\n\t// `range[1]` unless `includeMax` is set to `true`.\r\n\twrapNum: function (x, range, includeMax) {\r\n\t\tvar max = range[1],\r\n\t\t min = range[0],\r\n\t\t d = max - min;\r\n\t\treturn x === max && includeMax ? x : ((x - min) % d + d) % d + min;\r\n\t},\r\n\r\n\t// @function falseFn(): Function\r\n\t// Returns a function which always returns `false`.\r\n\tfalseFn: function () { return false; },\r\n\r\n\t// @function formatNum(num: Number, digits?: Number): Number\r\n\t// Returns the number `num` rounded to `digits` decimals, or to 5 decimals by default.\r\n\tformatNum: function (num, digits) {\r\n\t\tvar pow = Math.pow(10, digits || 5);\r\n\t\treturn Math.round(num * pow) / pow;\r\n\t},\r\n\r\n\t// @function trim(str: String): String\r\n\t// Compatibility polyfill for [String.prototype.trim](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String/Trim)\r\n\ttrim: function (str) {\r\n\t\treturn str.trim ? str.trim() : str.replace(/^\\s+|\\s+$/g, '');\r\n\t},\r\n\r\n\t// @function splitWords(str: String): String[]\r\n\t// Trims and splits the string on whitespace and returns the array of parts.\r\n\tsplitWords: function (str) {\r\n\t\treturn L.Util.trim(str).split(/\\s+/);\r\n\t},\r\n\r\n\t// @function setOptions(obj: Object, options: Object): Object\r\n\t// Merges the given properties to the `options` of the `obj` object, returning the resulting options. See `Class options`. Has an `L.setOptions` shortcut.\r\n\tsetOptions: function (obj, options) {\r\n\t\tif (!obj.hasOwnProperty('options')) {\r\n\t\t\tobj.options = obj.options ? L.Util.create(obj.options) : {};\r\n\t\t}\r\n\t\tfor (var i in options) {\r\n\t\t\tobj.options[i] = options[i];\r\n\t\t}\r\n\t\treturn obj.options;\r\n\t},\r\n\r\n\t// @function getParamString(obj: Object, existingUrl?: String, uppercase?: Boolean): String\r\n\t// Converts an object into a parameter URL string, e.g. `{a: \"foo\", b: \"bar\"}`\r\n\t// translates to `'?a=foo&b=bar'`. If `existingUrl` is set, the parameters will\r\n\t// be appended at the end. If `uppercase` is `true`, the parameter names will\r\n\t// be uppercased (e.g. `'?A=foo&B=bar'`)\r\n\tgetParamString: function (obj, existingUrl, uppercase) {\r\n\t\tvar params = [];\r\n\t\tfor (var i in obj) {\r\n\t\t\tparams.push(encodeURIComponent(uppercase ? i.toUpperCase() : i) + '=' + encodeURIComponent(obj[i]));\r\n\t\t}\r\n\t\treturn ((!existingUrl || existingUrl.indexOf('?') === -1) ? '?' : '&') + params.join('&');\r\n\t},\r\n\r\n\t// @function template(str: String, data: Object): String\r\n\t// Simple templating facility, accepts a template string of the form `'Hello {a}, {b}'`\r\n\t// and a data object like `{a: 'foo', b: 'bar'}`, returns evaluated string\r\n\t// `('Hello foo, bar')`. You can also specify functions instead of strings for\r\n\t// data values — they will be evaluated passing `data` as an argument.\r\n\ttemplate: function (str, data) {\r\n\t\treturn str.replace(L.Util.templateRe, function (str, key) {\r\n\t\t\tvar value = data[key];\r\n\r\n\t\t\tif (value === undefined) {\r\n\t\t\t\tthrow new Error('No value provided for variable ' + str);\r\n\r\n\t\t\t} else if (typeof value === 'function') {\r\n\t\t\t\tvalue = value(data);\r\n\t\t\t}\r\n\t\t\treturn value;\r\n\t\t});\r\n\t},\r\n\r\n\ttemplateRe: /\\{ *([\\w_\\-]+) *\\}/g,\r\n\r\n\t// @function isArray(obj): Boolean\r\n\t// Compatibility polyfill for [Array.isArray](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray)\r\n\tisArray: Array.isArray || function (obj) {\r\n\t\treturn (Object.prototype.toString.call(obj) === '[object Array]');\r\n\t},\r\n\r\n\t// @function indexOf(array: Array, el: Object): Number\r\n\t// Compatibility polyfill for [Array.prototype.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf)\r\n\tindexOf: function (array, el) {\r\n\t\tfor (var i = 0; i < array.length; i++) {\r\n\t\t\tif (array[i] === el) { return i; }\r\n\t\t}\r\n\t\treturn -1;\r\n\t},\r\n\r\n\t// @property emptyImageUrl: String\r\n\t// Data URI string containing a base64-encoded empty GIF image.\r\n\t// Used as a hack to free memory from unused images on WebKit-powered\r\n\t// mobile devices (by setting image `src` to this string).\r\n\temptyImageUrl: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs='\r\n};\r\n\r\n(function () {\r\n\t// inspired by http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n\r\n\tfunction getPrefixed(name) {\r\n\t\treturn window['webkit' + name] || window['moz' + name] || window['ms' + name];\r\n\t}\r\n\r\n\tvar lastTime = 0;\r\n\r\n\t// fallback for IE 7-8\r\n\tfunction timeoutDefer(fn) {\r\n\t\tvar time = +new Date(),\r\n\t\t timeToCall = Math.max(0, 16 - (time - lastTime));\r\n\r\n\t\tlastTime = time + timeToCall;\r\n\t\treturn window.setTimeout(fn, timeToCall);\r\n\t}\r\n\r\n\tvar requestFn = window.requestAnimationFrame || getPrefixed('RequestAnimationFrame') || timeoutDefer,\r\n\t cancelFn = window.cancelAnimationFrame || getPrefixed('CancelAnimationFrame') ||\r\n\t getPrefixed('CancelRequestAnimationFrame') || function (id) { window.clearTimeout(id); };\r\n\r\n\r\n\t// @function requestAnimFrame(fn: Function, context?: Object, immediate?: Boolean): Number\r\n\t// Schedules `fn` to be executed when the browser repaints. `fn` is bound to\r\n\t// `context` if given. When `immediate` is set, `fn` is called immediately if\r\n\t// the browser doesn't have native support for\r\n\t// [`window.requestAnimationFrame`](https://developer.mozilla.org/docs/Web/API/window/requestAnimationFrame),\r\n\t// otherwise it's delayed. Returns a request ID that can be used to cancel the request.\r\n\tL.Util.requestAnimFrame = function (fn, context, immediate) {\r\n\t\tif (immediate && requestFn === timeoutDefer) {\r\n\t\t\tfn.call(context);\r\n\t\t} else {\r\n\t\t\treturn requestFn.call(window, L.bind(fn, context));\r\n\t\t}\r\n\t};\r\n\r\n\t// @function cancelAnimFrame(id: Number): undefined\r\n\t// Cancels a previous `requestAnimFrame`. See also [window.cancelAnimationFrame](https://developer.mozilla.org/docs/Web/API/window/cancelAnimationFrame).\r\n\tL.Util.cancelAnimFrame = function (id) {\r\n\t\tif (id) {\r\n\t\t\tcancelFn.call(window, id);\r\n\t\t}\r\n\t};\r\n})();\r\n\r\n// shortcuts for most used utility functions\r\nL.extend = L.Util.extend;\r\nL.bind = L.Util.bind;\r\nL.stamp = L.Util.stamp;\r\nL.setOptions = L.Util.setOptions;\r\n","\r\n// @class Class\r\n// @aka L.Class\r\n\r\n// @section\r\n// @uninheritable\r\n\r\n// Thanks to John Resig and Dean Edwards for inspiration!\r\n\r\nL.Class = function () {};\r\n\r\nL.Class.extend = function (props) {\r\n\r\n\t// @function extend(props: Object): Function\r\n\t// [Extends the current class](#class-inheritance) given the properties to be included.\r\n\t// Returns a Javascript function that is a class constructor (to be called with `new`).\r\n\tvar NewClass = function () {\r\n\r\n\t\t// call the constructor\r\n\t\tif (this.initialize) {\r\n\t\t\tthis.initialize.apply(this, arguments);\r\n\t\t}\r\n\r\n\t\t// call all constructor hooks\r\n\t\tthis.callInitHooks();\r\n\t};\r\n\r\n\tvar parentProto = NewClass.__super__ = this.prototype;\r\n\r\n\tvar proto = L.Util.create(parentProto);\r\n\tproto.constructor = NewClass;\r\n\r\n\tNewClass.prototype = proto;\r\n\r\n\t// inherit parent's statics\r\n\tfor (var i in this) {\r\n\t\tif (this.hasOwnProperty(i) && i !== 'prototype') {\r\n\t\t\tNewClass[i] = this[i];\r\n\t\t}\r\n\t}\r\n\r\n\t// mix static properties into the class\r\n\tif (props.statics) {\r\n\t\tL.extend(NewClass, props.statics);\r\n\t\tdelete props.statics;\r\n\t}\r\n\r\n\t// mix includes into the prototype\r\n\tif (props.includes) {\r\n\t\tL.Util.extend.apply(null, [proto].concat(props.includes));\r\n\t\tdelete props.includes;\r\n\t}\r\n\r\n\t// merge options\r\n\tif (proto.options) {\r\n\t\tprops.options = L.Util.extend(L.Util.create(proto.options), props.options);\r\n\t}\r\n\r\n\t// mix given properties into the prototype\r\n\tL.extend(proto, props);\r\n\r\n\tproto._initHooks = [];\r\n\r\n\t// add method for calling all hooks\r\n\tproto.callInitHooks = function () {\r\n\r\n\t\tif (this._initHooksCalled) { return; }\r\n\r\n\t\tif (parentProto.callInitHooks) {\r\n\t\t\tparentProto.callInitHooks.call(this);\r\n\t\t}\r\n\r\n\t\tthis._initHooksCalled = true;\r\n\r\n\t\tfor (var i = 0, len = proto._initHooks.length; i < len; i++) {\r\n\t\t\tproto._initHooks[i].call(this);\r\n\t\t}\r\n\t};\r\n\r\n\treturn NewClass;\r\n};\r\n\r\n\r\n// @function include(properties: Object): this\r\n// [Includes a mixin](#class-includes) into the current class.\r\nL.Class.include = function (props) {\r\n\tL.extend(this.prototype, props);\r\n\treturn this;\r\n};\r\n\r\n// @function mergeOptions(options: Object): this\r\n// [Merges `options`](#class-options) into the defaults of the class.\r\nL.Class.mergeOptions = function (options) {\r\n\tL.extend(this.prototype.options, options);\r\n\treturn this;\r\n};\r\n\r\n// @function addInitHook(fn: Function): this\r\n// Adds a [constructor hook](#class-constructor-hooks) to the class.\r\nL.Class.addInitHook = function (fn) { // (Function) || (String, args...)\r\n\tvar args = Array.prototype.slice.call(arguments, 1);\r\n\r\n\tvar init = typeof fn === 'function' ? fn : function () {\r\n\t\tthis[fn].apply(this, args);\r\n\t};\r\n\r\n\tthis.prototype._initHooks = this.prototype._initHooks || [];\r\n\tthis.prototype._initHooks.push(init);\r\n\treturn this;\r\n};\r\n","/*\r\n * @class Evented\r\n * @aka L.Evented\r\n * @inherits Class\r\n *\r\n * A set of methods shared between event-powered classes (like `Map` and `Marker`). Generally, events allow you to execute some function when something happens with an object (e.g. the user clicks on the map, causing the map to fire `'click'` event).\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * map.on('click', function(e) {\r\n * \talert(e.latlng);\r\n * } );\r\n * ```\r\n *\r\n * Leaflet deals with event listeners by reference, so if you want to add a listener and then remove it, define it as a function:\r\n *\r\n * ```js\r\n * function onClick(e) { ... }\r\n *\r\n * map.on('click', onClick);\r\n * map.off('click', onClick);\r\n * ```\r\n */\r\n\r\n\r\nL.Evented = L.Class.extend({\r\n\r\n\t/* @method on(type: String, fn: Function, context?: Object): this\r\n\t * Adds a listener function (`fn`) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. `'click dblclick'`).\r\n\t *\r\n\t * @alternative\r\n\t * @method on(eventMap: Object): this\r\n\t * Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\t */\r\n\ton: function (types, fn, context) {\r\n\r\n\t\t// types can be a map of types/handlers\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\t// we don't process space-separated events here for performance;\r\n\t\t\t\t// it's a hot path since Layer uses the on(obj) syntax\r\n\t\t\t\tthis._on(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\t// types can be a string of space-separated words\r\n\t\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t/* @method off(type: String, fn?: Function, context?: Object): this\r\n\t * Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to `on`, you must pass the same context to `off` in order to remove the listener.\r\n\t *\r\n\t * @alternative\r\n\t * @method off(eventMap: Object): this\r\n\t * Removes a set of type/listener pairs.\r\n\t *\r\n\t * @alternative\r\n\t * @method off: this\r\n\t * Removes all listeners to all events on the object.\r\n\t */\r\n\toff: function (types, fn, context) {\r\n\r\n\t\tif (!types) {\r\n\t\t\t// clear all listeners if called without arguments\r\n\t\t\tdelete this._events;\r\n\r\n\t\t} else if (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._off(type, types[type], fn);\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._off(types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// attach listener (without syntactic sugar now)\r\n\t_on: function (type, fn, context) {\r\n\t\tthis._events = this._events || {};\r\n\r\n\t\t/* get/init listeners for type */\r\n\t\tvar typeListeners = this._events[type];\r\n\t\tif (!typeListeners) {\r\n\t\t\ttypeListeners = [];\r\n\t\t\tthis._events[type] = typeListeners;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\t// Less memory footprint.\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\t\tvar newListener = {fn: fn, ctx: context},\r\n\t\t listeners = typeListeners;\r\n\r\n\t\t// check if fn already there\r\n\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\tif (listeners[i].fn === fn && listeners[i].ctx === context) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlisteners.push(newListener);\r\n\t\ttypeListeners.count++;\r\n\t},\r\n\r\n\t_off: function (type, fn, context) {\r\n\t\tvar listeners,\r\n\t\t i,\r\n\t\t len;\r\n\r\n\t\tif (!this._events) { return; }\r\n\r\n\t\tlisteners = this._events[type];\r\n\r\n\t\tif (!listeners) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!fn) {\r\n\t\t\t// Set all removed listeners to noop so they are not called if remove happens in fire\r\n\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\tlisteners[i].fn = L.Util.falseFn;\r\n\t\t\t}\r\n\t\t\t// clear all listeners for a type if function isn't specified\r\n\t\t\tdelete this._events[type];\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (context === this) {\r\n\t\t\tcontext = undefined;\r\n\t\t}\r\n\r\n\t\tif (listeners) {\r\n\r\n\t\t\t// find fn and remove it\r\n\t\t\tfor (i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\tvar l = listeners[i];\r\n\t\t\t\tif (l.ctx !== context) { continue; }\r\n\t\t\t\tif (l.fn === fn) {\r\n\r\n\t\t\t\t\t// set the removed listener to noop so that's not called if remove happens in fire\r\n\t\t\t\t\tl.fn = L.Util.falseFn;\r\n\r\n\t\t\t\t\tif (this._firingCount) {\r\n\t\t\t\t\t\t/* copy array in case events are being fired */\r\n\t\t\t\t\t\tthis._events[type] = listeners = listeners.slice();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlisteners.splice(i, 1);\r\n\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method fire(type: String, data?: Object, propagate?: Boolean): this\r\n\t// Fires an event of the specified type. You can optionally provide an data\r\n\t// object — the first argument of the listener function will contain its\r\n\t// properties. The event might can optionally be propagated to event parents.\r\n\tfire: function (type, data, propagate) {\r\n\t\tif (!this.listens(type, propagate)) { return this; }\r\n\r\n\t\tvar event = L.Util.extend({}, data, {type: type, target: this});\r\n\r\n\t\tif (this._events) {\r\n\t\t\tvar listeners = this._events[type];\r\n\r\n\t\t\tif (listeners) {\r\n\t\t\t\tthis._firingCount = (this._firingCount + 1) || 1;\r\n\t\t\t\tfor (var i = 0, len = listeners.length; i < len; i++) {\r\n\t\t\t\t\tvar l = listeners[i];\r\n\t\t\t\t\tl.fn.call(l.ctx || this, event);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis._firingCount--;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// propagate the event to parents (set with addEventParent)\r\n\t\t\tthis._propagateEvent(event);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method listens(type: String): Boolean\r\n\t// Returns `true` if a particular event type has any listeners attached to it.\r\n\tlistens: function (type, propagate) {\r\n\t\tvar listeners = this._events && this._events[type];\r\n\t\tif (listeners && listeners.length) { return true; }\r\n\r\n\t\tif (propagate) {\r\n\t\t\t// also check parents for listeners if event propagates\r\n\t\t\tfor (var id in this._eventParents) {\r\n\t\t\t\tif (this._eventParents[id].listens(type, propagate)) { return true; }\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t// @method once(…): this\r\n\t// Behaves as [`on(…)`](#evented-on), except the listener will only get fired once and then removed.\r\n\tonce: function (types, fn, context) {\r\n\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis.once(type, types[type], fn);\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar handler = L.bind(function () {\r\n\t\t\tthis\r\n\t\t\t .off(types, fn, context)\r\n\t\t\t .off(types, handler, context);\r\n\t\t}, this);\r\n\r\n\t\t// add a listener that's executed once and removed after that\r\n\t\treturn this\r\n\t\t .on(types, fn, context)\r\n\t\t .on(types, handler, context);\r\n\t},\r\n\r\n\t// @method addEventParent(obj: Evented): this\r\n\t// Adds an event parent - an `Evented` that will receive propagated events\r\n\taddEventParent: function (obj) {\r\n\t\tthis._eventParents = this._eventParents || {};\r\n\t\tthis._eventParents[L.stamp(obj)] = obj;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeEventParent(obj: Evented): this\r\n\t// Removes an event parent, so it will stop receiving propagated events\r\n\tremoveEventParent: function (obj) {\r\n\t\tif (this._eventParents) {\r\n\t\t\tdelete this._eventParents[L.stamp(obj)];\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_propagateEvent: function (e) {\r\n\t\tfor (var id in this._eventParents) {\r\n\t\t\tthis._eventParents[id].fire(e.type, L.extend({layer: e.target}, e), true);\r\n\t\t}\r\n\t}\r\n});\r\n\r\nvar proto = L.Evented.prototype;\r\n\r\n// aliases; we should ditch those eventually\r\n\r\n// @method addEventListener(…): this\r\n// Alias to [`on(…)`](#evented-on)\r\nproto.addEventListener = proto.on;\r\n\r\n// @method removeEventListener(…): this\r\n// Alias to [`off(…)`](#evented-off)\r\n\r\n// @method clearAllEventListeners(…): this\r\n// Alias to [`off()`](#evented-off)\r\nproto.removeEventListener = proto.clearAllEventListeners = proto.off;\r\n\r\n// @method addOneTimeEventListener(…): this\r\n// Alias to [`once(…)`](#evented-once)\r\nproto.addOneTimeEventListener = proto.once;\r\n\r\n// @method fireEvent(…): this\r\n// Alias to [`fire(…)`](#evented-fire)\r\nproto.fireEvent = proto.fire;\r\n\r\n// @method hasEventListeners(…): Boolean\r\n// Alias to [`listens(…)`](#evented-listens)\r\nproto.hasEventListeners = proto.listens;\r\n\r\nL.Mixin = {Events: proto};\r\n","/*\r\n * @namespace Browser\r\n * @aka L.Browser\r\n *\r\n * A namespace with static properties for browser/feature detection used by Leaflet internally.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * if (L.Browser.ielt9) {\r\n * alert('Upgrade your browser, dude!');\r\n * }\r\n * ```\r\n */\r\n\r\n(function () {\r\n\r\n\tvar ua = navigator.userAgent.toLowerCase(),\r\n\t doc = document.documentElement,\r\n\r\n\t ie = 'ActiveXObject' in window,\r\n\r\n\t webkit = ua.indexOf('webkit') !== -1,\r\n\t phantomjs = ua.indexOf('phantom') !== -1,\r\n\t android23 = ua.search('android [23]') !== -1,\r\n\t chrome = ua.indexOf('chrome') !== -1,\r\n\t gecko = ua.indexOf('gecko') !== -1 && !webkit && !window.opera && !ie,\r\n\r\n\t win = navigator.platform.indexOf('Win') === 0,\r\n\r\n\t mobile = typeof orientation !== 'undefined' || ua.indexOf('mobile') !== -1,\r\n\t msPointer = !window.PointerEvent && window.MSPointerEvent,\r\n\t pointer = window.PointerEvent || msPointer,\r\n\r\n\t ie3d = ie && ('transition' in doc.style),\r\n\t webkit3d = ('WebKitCSSMatrix' in window) && ('m11' in new window.WebKitCSSMatrix()) && !android23,\r\n\t gecko3d = 'MozPerspective' in doc.style,\r\n\t opera12 = 'OTransition' in doc.style;\r\n\r\n\r\n\tvar touch = !window.L_NO_TOUCH && (pointer || 'ontouchstart' in window ||\r\n\t\t\t(window.DocumentTouch && document instanceof window.DocumentTouch));\r\n\r\n\tL.Browser = {\r\n\r\n\t\t// @property ie: Boolean\r\n\t\t// `true` for all Internet Explorer versions (not Edge).\r\n\t\tie: ie,\r\n\r\n\t\t// @property ielt9: Boolean\r\n\t\t// `true` for Internet Explorer versions less than 9.\r\n\t\tielt9: ie && !document.addEventListener,\r\n\r\n\t\t// @property edge: Boolean\r\n\t\t// `true` for the Edge web browser.\r\n\t\tedge: 'msLaunchUri' in navigator && !('documentMode' in document),\r\n\r\n\t\t// @property webkit: Boolean\r\n\t\t// `true` for webkit-based browsers like Chrome and Safari (including mobile versions).\r\n\t\twebkit: webkit,\r\n\r\n\t\t// @property gecko: Boolean\r\n\t\t// `true` for gecko-based browsers like Firefox.\r\n\t\tgecko: gecko,\r\n\r\n\t\t// @property android: Boolean\r\n\t\t// `true` for any browser running on an Android platform.\r\n\t\tandroid: ua.indexOf('android') !== -1,\r\n\r\n\t\t// @property android23: Boolean\r\n\t\t// `true` for browsers running on Android 2 or Android 3.\r\n\t\tandroid23: android23,\r\n\r\n\t\t// @property chrome: Boolean\r\n\t\t// `true` for the Chrome browser.\r\n\t\tchrome: chrome,\r\n\r\n\t\t// @property safari: Boolean\r\n\t\t// `true` for the Safari browser.\r\n\t\tsafari: !chrome && ua.indexOf('safari') !== -1,\r\n\r\n\r\n\t\t// @property win: Boolean\r\n\t\t// `true` when the browser is running in a Windows platform\r\n\t\twin: win,\r\n\r\n\r\n\t\t// @property ie3d: Boolean\r\n\t\t// `true` for all Internet Explorer versions supporting CSS transforms.\r\n\t\tie3d: ie3d,\r\n\r\n\t\t// @property webkit3d: Boolean\r\n\t\t// `true` for webkit-based browsers supporting CSS transforms.\r\n\t\twebkit3d: webkit3d,\r\n\r\n\t\t// @property gecko3d: Boolean\r\n\t\t// `true` for gecko-based browsers supporting CSS transforms.\r\n\t\tgecko3d: gecko3d,\r\n\r\n\t\t// @property opera12: Boolean\r\n\t\t// `true` for the Opera browser supporting CSS transforms (version 12 or later).\r\n\t\topera12: opera12,\r\n\r\n\t\t// @property any3d: Boolean\r\n\t\t// `true` for all browsers supporting CSS transforms.\r\n\t\tany3d: !window.L_DISABLE_3D && (ie3d || webkit3d || gecko3d) && !opera12 && !phantomjs,\r\n\r\n\r\n\t\t// @property mobile: Boolean\r\n\t\t// `true` for all browsers running in a mobile device.\r\n\t\tmobile: mobile,\r\n\r\n\t\t// @property mobileWebkit: Boolean\r\n\t\t// `true` for all webkit-based browsers in a mobile device.\r\n\t\tmobileWebkit: mobile && webkit,\r\n\r\n\t\t// @property mobileWebkit3d: Boolean\r\n\t\t// `true` for all webkit-based browsers in a mobile device supporting CSS transforms.\r\n\t\tmobileWebkit3d: mobile && webkit3d,\r\n\r\n\t\t// @property mobileOpera: Boolean\r\n\t\t// `true` for the Opera browser in a mobile device.\r\n\t\tmobileOpera: mobile && window.opera,\r\n\r\n\t\t// @property mobileGecko: Boolean\r\n\t\t// `true` for gecko-based browsers running in a mobile device.\r\n\t\tmobileGecko: mobile && gecko,\r\n\r\n\r\n\t\t// @property touch: Boolean\r\n\t\t// `true` for all browsers supporting [touch events](https://developer.mozilla.org/docs/Web/API/Touch_events).\r\n\t\ttouch: !!touch,\r\n\r\n\t\t// @property msPointer: Boolean\r\n\t\t// `true` for browsers implementing the Microsoft touch events model (notably IE10).\r\n\t\tmsPointer: !!msPointer,\r\n\r\n\t\t// @property pointer: Boolean\r\n\t\t// `true` for all browsers supporting [pointer events](https://msdn.microsoft.com/en-us/library/dn433244%28v=vs.85%29.aspx).\r\n\t\tpointer: !!pointer,\r\n\r\n\r\n\t\t// @property retina: Boolean\r\n\t\t// `true` for browsers on a high-resolution \"retina\" screen.\r\n\t\tretina: (window.devicePixelRatio || (window.screen.deviceXDPI / window.screen.logicalXDPI)) > 1\r\n\t};\r\n\r\n}());\r\n","/*\r\n * @class Point\r\n * @aka L.Point\r\n *\r\n * Represents a point with `x` and `y` coordinates in pixels.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var point = L.point(200, 300);\r\n * ```\r\n *\r\n * All Leaflet methods and options that accept `Point` objects also accept them in a simple Array form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```js\r\n * map.panBy([200, 300]);\r\n * map.panBy(L.point(200, 300));\r\n * ```\r\n */\r\n\r\nL.Point = function (x, y, round) {\r\n\tthis.x = (round ? Math.round(x) : x);\r\n\tthis.y = (round ? Math.round(y) : y);\r\n};\r\n\r\nL.Point.prototype = {\r\n\r\n\t// @method clone(): Point\r\n\t// Returns a copy of the current point.\r\n\tclone: function () {\r\n\t\treturn new L.Point(this.x, this.y);\r\n\t},\r\n\r\n\t// @method add(otherPoint: Point): Point\r\n\t// Returns the result of addition of the current and the given points.\r\n\tadd: function (point) {\r\n\t\t// non-destructive, returns a new point\r\n\t\treturn this.clone()._add(L.point(point));\r\n\t},\r\n\r\n\t_add: function (point) {\r\n\t\t// destructive, used directly for performance in situations where it's safe to modify existing point\r\n\t\tthis.x += point.x;\r\n\t\tthis.y += point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method subtract(otherPoint: Point): Point\r\n\t// Returns the result of subtraction of the given point from the current.\r\n\tsubtract: function (point) {\r\n\t\treturn this.clone()._subtract(L.point(point));\r\n\t},\r\n\r\n\t_subtract: function (point) {\r\n\t\tthis.x -= point.x;\r\n\t\tthis.y -= point.y;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method divideBy(num: Number): Point\r\n\t// Returns the result of division of the current point by the given number.\r\n\tdivideBy: function (num) {\r\n\t\treturn this.clone()._divideBy(num);\r\n\t},\r\n\r\n\t_divideBy: function (num) {\r\n\t\tthis.x /= num;\r\n\t\tthis.y /= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method multiplyBy(num: Number): Point\r\n\t// Returns the result of multiplication of the current point by the given number.\r\n\tmultiplyBy: function (num) {\r\n\t\treturn this.clone()._multiplyBy(num);\r\n\t},\r\n\r\n\t_multiplyBy: function (num) {\r\n\t\tthis.x *= num;\r\n\t\tthis.y *= num;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method scaleBy(scale: Point): Point\r\n\t// Multiply each coordinate of the current point by each coordinate of\r\n\t// `scale`. In linear algebra terms, multiply the point by the\r\n\t// [scaling matrix](https://en.wikipedia.org/wiki/Scaling_%28geometry%29#Matrix_representation)\r\n\t// defined by `scale`.\r\n\tscaleBy: function (point) {\r\n\t\treturn new L.Point(this.x * point.x, this.y * point.y);\r\n\t},\r\n\r\n\t// @method unscaleBy(scale: Point): Point\r\n\t// Inverse of `scaleBy`. Divide each coordinate of the current point by\r\n\t// each coordinate of `scale`.\r\n\tunscaleBy: function (point) {\r\n\t\treturn new L.Point(this.x / point.x, this.y / point.y);\r\n\t},\r\n\r\n\t// @method round(): Point\r\n\t// Returns a copy of the current point with rounded coordinates.\r\n\tround: function () {\r\n\t\treturn this.clone()._round();\r\n\t},\r\n\r\n\t_round: function () {\r\n\t\tthis.x = Math.round(this.x);\r\n\t\tthis.y = Math.round(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method floor(): Point\r\n\t// Returns a copy of the current point with floored coordinates (rounded down).\r\n\tfloor: function () {\r\n\t\treturn this.clone()._floor();\r\n\t},\r\n\r\n\t_floor: function () {\r\n\t\tthis.x = Math.floor(this.x);\r\n\t\tthis.y = Math.floor(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method ceil(): Point\r\n\t// Returns a copy of the current point with ceiled coordinates (rounded up).\r\n\tceil: function () {\r\n\t\treturn this.clone()._ceil();\r\n\t},\r\n\r\n\t_ceil: function () {\r\n\t\tthis.x = Math.ceil(this.x);\r\n\t\tthis.y = Math.ceil(this.y);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method distanceTo(otherPoint: Point): Number\r\n\t// Returns the cartesian distance between the current and the given points.\r\n\tdistanceTo: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\tvar x = point.x - this.x,\r\n\t\t y = point.y - this.y;\r\n\r\n\t\treturn Math.sqrt(x * x + y * y);\r\n\t},\r\n\r\n\t// @method equals(otherPoint: Point): Boolean\r\n\t// Returns `true` if the given point has the same coordinates.\r\n\tequals: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\treturn point.x === this.x &&\r\n\t\t point.y === this.y;\r\n\t},\r\n\r\n\t// @method contains(otherPoint: Point): Boolean\r\n\t// Returns `true` if both coordinates of the given point are less than the corresponding current point coordinates (in absolute values).\r\n\tcontains: function (point) {\r\n\t\tpoint = L.point(point);\r\n\r\n\t\treturn Math.abs(point.x) <= Math.abs(this.x) &&\r\n\t\t Math.abs(point.y) <= Math.abs(this.y);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point for debugging purposes.\r\n\ttoString: function () {\r\n\t\treturn 'Point(' +\r\n\t\t L.Util.formatNum(this.x) + ', ' +\r\n\t\t L.Util.formatNum(this.y) + ')';\r\n\t}\r\n};\r\n\r\n// @factory L.point(x: Number, y: Number, round?: Boolean)\r\n// Creates a Point object with the given `x` and `y` coordinates. If optional `round` is set to true, rounds the `x` and `y` values.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Number[])\r\n// Expects an array of the form `[x, y]` instead.\r\n\r\n// @alternative\r\n// @factory L.point(coords: Object)\r\n// Expects a plain object of the form `{x: Number, y: Number}` instead.\r\nL.point = function (x, y, round) {\r\n\tif (x instanceof L.Point) {\r\n\t\treturn x;\r\n\t}\r\n\tif (L.Util.isArray(x)) {\r\n\t\treturn new L.Point(x[0], x[1]);\r\n\t}\r\n\tif (x === undefined || x === null) {\r\n\t\treturn x;\r\n\t}\r\n\tif (typeof x === 'object' && 'x' in x && 'y' in x) {\r\n\t\treturn new L.Point(x.x, x.y);\r\n\t}\r\n\treturn new L.Point(x, y, round);\r\n};\r\n","/*\r\n * @class Bounds\r\n * @aka L.Bounds\r\n *\r\n * Represents a rectangular area in pixel coordinates.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var p1 = L.point(10, 10),\r\n * p2 = L.point(40, 60),\r\n * bounds = L.bounds(p1, p2);\r\n * ```\r\n *\r\n * All Leaflet methods that accept `Bounds` objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * otherBounds.intersects([[10, 10], [40, 60]]);\r\n * ```\r\n */\r\n\r\nL.Bounds = function (a, b) {\r\n\tif (!a) { return; }\r\n\r\n\tvar points = b ? [a, b] : a;\r\n\r\n\tfor (var i = 0, len = points.length; i < len; i++) {\r\n\t\tthis.extend(points[i]);\r\n\t}\r\n};\r\n\r\nL.Bounds.prototype = {\r\n\t// @method extend(point: Point): this\r\n\t// Extends the bounds to contain the given point.\r\n\textend: function (point) { // (Point)\r\n\t\tpoint = L.point(point);\r\n\r\n\t\t// @property min: Point\r\n\t\t// The top left corner of the rectangle.\r\n\t\t// @property max: Point\r\n\t\t// The bottom right corner of the rectangle.\r\n\t\tif (!this.min && !this.max) {\r\n\t\t\tthis.min = point.clone();\r\n\t\t\tthis.max = point.clone();\r\n\t\t} else {\r\n\t\t\tthis.min.x = Math.min(point.x, this.min.x);\r\n\t\t\tthis.max.x = Math.max(point.x, this.max.x);\r\n\t\t\tthis.min.y = Math.min(point.y, this.min.y);\r\n\t\t\tthis.max.y = Math.max(point.y, this.max.y);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getCenter(round?: Boolean): Point\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function (round) {\r\n\t\treturn new L.Point(\r\n\t\t (this.min.x + this.max.x) / 2,\r\n\t\t (this.min.y + this.max.y) / 2, round);\r\n\t},\r\n\r\n\t// @method getBottomLeft(): Point\r\n\t// Returns the bottom-left point of the bounds.\r\n\tgetBottomLeft: function () {\r\n\t\treturn new L.Point(this.min.x, this.max.y);\r\n\t},\r\n\r\n\t// @method getTopRight(): Point\r\n\t// Returns the top-right point of the bounds.\r\n\tgetTopRight: function () { // -> Point\r\n\t\treturn new L.Point(this.max.x, this.min.y);\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the size of the given bounds\r\n\tgetSize: function () {\r\n\t\treturn this.max.subtract(this.min);\r\n\t},\r\n\r\n\t// @method contains(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\t// @alternative\r\n\t// @method contains(point: Point): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) {\r\n\t\tvar min, max;\r\n\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof L.Point) {\r\n\t\t\tobj = L.point(obj);\r\n\t\t} else {\r\n\t\t\tobj = L.bounds(obj);\r\n\t\t}\r\n\r\n\t\tif (obj instanceof L.Bounds) {\r\n\t\t\tmin = obj.min;\r\n\t\t\tmax = obj.max;\r\n\t\t} else {\r\n\t\t\tmin = max = obj;\r\n\t\t}\r\n\r\n\t\treturn (min.x >= this.min.x) &&\r\n\t\t (max.x <= this.max.x) &&\r\n\t\t (min.y >= this.min.y) &&\r\n\t\t (max.y <= this.max.y);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds\r\n\t// intersect if they have at least one point in common.\r\n\tintersects: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = L.bounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xIntersects = (max2.x >= min.x) && (min2.x <= max.x),\r\n\t\t yIntersects = (max2.y >= min.y) && (min2.y <= max.y);\r\n\r\n\t\treturn xIntersects && yIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds\r\n\t// overlap if their intersection is an area.\r\n\toverlaps: function (bounds) { // (Bounds) -> Boolean\r\n\t\tbounds = L.bounds(bounds);\r\n\r\n\t\tvar min = this.min,\r\n\t\t max = this.max,\r\n\t\t min2 = bounds.min,\r\n\t\t max2 = bounds.max,\r\n\t\t xOverlaps = (max2.x > min.x) && (min2.x < max.x),\r\n\t\t yOverlaps = (max2.y > min.y) && (min2.y < max.y);\r\n\r\n\t\treturn xOverlaps && yOverlaps;\r\n\t},\r\n\r\n\tisValid: function () {\r\n\t\treturn !!(this.min && this.max);\r\n\t}\r\n};\r\n\r\n\r\n// @factory L.bounds(topLeft: Point, bottomRight: Point)\r\n// Creates a Bounds object from two coordinates (usually top-left and bottom-right corners).\r\n// @alternative\r\n// @factory L.bounds(points: Point[])\r\n// Creates a Bounds object from the points it contains\r\nL.bounds = function (a, b) {\r\n\tif (!a || a instanceof L.Bounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new L.Bounds(a, b);\r\n};\r\n","/*\r\n * @class Transformation\r\n * @aka L.Transformation\r\n *\r\n * Represents an affine transformation: a set of coefficients `a`, `b`, `c`, `d`\r\n * for transforming a point of a form `(x, y)` into `(a*x + b, c*y + d)` and doing\r\n * the reverse. Used by Leaflet in its projections code.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var transformation = new L.Transformation(2, 5, -1, 10),\r\n * \tp = L.point(1, 2),\r\n * \tp2 = transformation.transform(p), // L.point(7, 8)\r\n * \tp3 = transformation.untransform(p2); // L.point(1, 2)\r\n * ```\r\n */\r\n\r\n\r\n// factory new L.Transformation(a: Number, b: Number, c: Number, d: Number)\r\n// Creates a `Transformation` object with the given coefficients.\r\nL.Transformation = function (a, b, c, d) {\r\n\tthis._a = a;\r\n\tthis._b = b;\r\n\tthis._c = c;\r\n\tthis._d = d;\r\n};\r\n\r\nL.Transformation.prototype = {\r\n\t// @method transform(point: Point, scale?: Number): Point\r\n\t// Returns a transformed point, optionally multiplied by the given scale.\r\n\t// Only accepts real `L.Point` instances, not arrays.\r\n\ttransform: function (point, scale) { // (Point, Number) -> Point\r\n\t\treturn this._transform(point.clone(), scale);\r\n\t},\r\n\r\n\t// destructive transform (faster)\r\n\t_transform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\tpoint.x = scale * (this._a * point.x + this._b);\r\n\t\tpoint.y = scale * (this._c * point.y + this._d);\r\n\t\treturn point;\r\n\t},\r\n\r\n\t// @method untransform(point: Point, scale?: Number): Point\r\n\t// Returns the reverse transformation of the given point, optionally divided\r\n\t// by the given scale. Only accepts real `L.Point` instances, not arrays.\r\n\tuntransform: function (point, scale) {\r\n\t\tscale = scale || 1;\r\n\t\treturn new L.Point(\r\n\t\t (point.x / scale - this._b) / this._a,\r\n\t\t (point.y / scale - this._d) / this._c);\r\n\t}\r\n};\r\n","/*\r\n * @namespace DomUtil\r\n *\r\n * Utility functions to work with the [DOM](https://developer.mozilla.org/docs/Web/API/Document_Object_Model)\r\n * tree, used by Leaflet internally.\r\n *\r\n * Most functions expecting or returning a `HTMLElement` also work for\r\n * SVG elements. The only difference is that classes refer to CSS classes\r\n * in HTML and SVG classes in SVG.\r\n */\r\n\r\nL.DomUtil = {\r\n\r\n\t// @function get(id: String|HTMLElement): HTMLElement\r\n\t// Returns an element given its DOM id, or returns the element itself\r\n\t// if it was passed directly.\r\n\tget: function (id) {\r\n\t\treturn typeof id === 'string' ? document.getElementById(id) : id;\r\n\t},\r\n\r\n\t// @function getStyle(el: HTMLElement, styleAttrib: String): String\r\n\t// Returns the value for a certain style attribute on an element,\r\n\t// including computed values or values set through CSS.\r\n\tgetStyle: function (el, style) {\r\n\r\n\t\tvar value = el.style[style] || (el.currentStyle && el.currentStyle[style]);\r\n\r\n\t\tif ((!value || value === 'auto') && document.defaultView) {\r\n\t\t\tvar css = document.defaultView.getComputedStyle(el, null);\r\n\t\t\tvalue = css ? css[style] : null;\r\n\t\t}\r\n\r\n\t\treturn value === 'auto' ? null : value;\r\n\t},\r\n\r\n\t// @function create(tagName: String, className?: String, container?: HTMLElement): HTMLElement\r\n\t// Creates an HTML element with `tagName`, sets its class to `className`, and optionally appends it to `container` element.\r\n\tcreate: function (tagName, className, container) {\r\n\r\n\t\tvar el = document.createElement(tagName);\r\n\t\tel.className = className || '';\r\n\r\n\t\tif (container) {\r\n\t\t\tcontainer.appendChild(el);\r\n\t\t}\r\n\r\n\t\treturn el;\r\n\t},\r\n\r\n\t// @function remove(el: HTMLElement)\r\n\t// Removes `el` from its parent element\r\n\tremove: function (el) {\r\n\t\tvar parent = el.parentNode;\r\n\t\tif (parent) {\r\n\t\t\tparent.removeChild(el);\r\n\t\t}\r\n\t},\r\n\r\n\t// @function empty(el: HTMLElement)\r\n\t// Removes all of `el`'s children elements from `el`\r\n\tempty: function (el) {\r\n\t\twhile (el.firstChild) {\r\n\t\t\tel.removeChild(el.firstChild);\r\n\t\t}\r\n\t},\r\n\r\n\t// @function toFront(el: HTMLElement)\r\n\t// Makes `el` the last children of its parent, so it renders in front of the other children.\r\n\ttoFront: function (el) {\r\n\t\tel.parentNode.appendChild(el);\r\n\t},\r\n\r\n\t// @function toBack(el: HTMLElement)\r\n\t// Makes `el` the first children of its parent, so it renders back from the other children.\r\n\ttoBack: function (el) {\r\n\t\tvar parent = el.parentNode;\r\n\t\tparent.insertBefore(el, parent.firstChild);\r\n\t},\r\n\r\n\t// @function hasClass(el: HTMLElement, name: String): Boolean\r\n\t// Returns `true` if the element's class attribute contains `name`.\r\n\thasClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\treturn el.classList.contains(name);\r\n\t\t}\r\n\t\tvar className = L.DomUtil.getClass(el);\r\n\t\treturn className.length > 0 && new RegExp('(^|\\\\s)' + name + '(\\\\s|$)').test(className);\r\n\t},\r\n\r\n\t// @function addClass(el: HTMLElement, name: String)\r\n\t// Adds `name` to the element's class attribute.\r\n\taddClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\tvar classes = L.Util.splitWords(name);\r\n\t\t\tfor (var i = 0, len = classes.length; i < len; i++) {\r\n\t\t\t\tel.classList.add(classes[i]);\r\n\t\t\t}\r\n\t\t} else if (!L.DomUtil.hasClass(el, name)) {\r\n\t\t\tvar className = L.DomUtil.getClass(el);\r\n\t\t\tL.DomUtil.setClass(el, (className ? className + ' ' : '') + name);\r\n\t\t}\r\n\t},\r\n\r\n\t// @function removeClass(el: HTMLElement, name: String)\r\n\t// Removes `name` from the element's class attribute.\r\n\tremoveClass: function (el, name) {\r\n\t\tif (el.classList !== undefined) {\r\n\t\t\tel.classList.remove(name);\r\n\t\t} else {\r\n\t\t\tL.DomUtil.setClass(el, L.Util.trim((' ' + L.DomUtil.getClass(el) + ' ').replace(' ' + name + ' ', ' ')));\r\n\t\t}\r\n\t},\r\n\r\n\t// @function setClass(el: HTMLElement, name: String)\r\n\t// Sets the element's class.\r\n\tsetClass: function (el, name) {\r\n\t\tif (el.className.baseVal === undefined) {\r\n\t\t\tel.className = name;\r\n\t\t} else {\r\n\t\t\t// in case of SVG element\r\n\t\t\tel.className.baseVal = name;\r\n\t\t}\r\n\t},\r\n\r\n\t// @function getClass(el: HTMLElement): String\r\n\t// Returns the element's class.\r\n\tgetClass: function (el) {\r\n\t\treturn el.className.baseVal === undefined ? el.className : el.className.baseVal;\r\n\t},\r\n\r\n\t// @function setOpacity(el: HTMLElement, opacity: Number)\r\n\t// Set the opacity of an element (including old IE support).\r\n\t// `opacity` must be a number from `0` to `1`.\r\n\tsetOpacity: function (el, value) {\r\n\r\n\t\tif ('opacity' in el.style) {\r\n\t\t\tel.style.opacity = value;\r\n\r\n\t\t} else if ('filter' in el.style) {\r\n\t\t\tL.DomUtil._setOpacityIE(el, value);\r\n\t\t}\r\n\t},\r\n\r\n\t_setOpacityIE: function (el, value) {\r\n\t\tvar filter = false,\r\n\t\t filterName = 'DXImageTransform.Microsoft.Alpha';\r\n\r\n\t\t// filters collection throws an error if we try to retrieve a filter that doesn't exist\r\n\t\ttry {\r\n\t\t\tfilter = el.filters.item(filterName);\r\n\t\t} catch (e) {\r\n\t\t\t// don't set opacity to 1 if we haven't already set an opacity,\r\n\t\t\t// it isn't needed and breaks transparent pngs.\r\n\t\t\tif (value === 1) { return; }\r\n\t\t}\r\n\r\n\t\tvalue = Math.round(value * 100);\r\n\r\n\t\tif (filter) {\r\n\t\t\tfilter.Enabled = (value !== 100);\r\n\t\t\tfilter.Opacity = value;\r\n\t\t} else {\r\n\t\t\tel.style.filter += ' progid:' + filterName + '(opacity=' + value + ')';\r\n\t\t}\r\n\t},\r\n\r\n\t// @function testProp(props: String[]): String|false\r\n\t// Goes through the array of style names and returns the first name\r\n\t// that is a valid style name for an element. If no such name is found,\r\n\t// it returns false. Useful for vendor-prefixed styles like `transform`.\r\n\ttestProp: function (props) {\r\n\r\n\t\tvar style = document.documentElement.style;\r\n\r\n\t\tfor (var i = 0; i < props.length; i++) {\r\n\t\t\tif (props[i] in style) {\r\n\t\t\t\treturn props[i];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t},\r\n\r\n\t// @function setTransform(el: HTMLElement, offset: Point, scale?: Number)\r\n\t// Resets the 3D CSS transform of `el` so it is translated by `offset` pixels\r\n\t// and optionally scaled by `scale`. Does not have an effect if the\r\n\t// browser doesn't support 3D CSS transforms.\r\n\tsetTransform: function (el, offset, scale) {\r\n\t\tvar pos = offset || new L.Point(0, 0);\r\n\r\n\t\tel.style[L.DomUtil.TRANSFORM] =\r\n\t\t\t(L.Browser.ie3d ?\r\n\t\t\t\t'translate(' + pos.x + 'px,' + pos.y + 'px)' :\r\n\t\t\t\t'translate3d(' + pos.x + 'px,' + pos.y + 'px,0)') +\r\n\t\t\t(scale ? ' scale(' + scale + ')' : '');\r\n\t},\r\n\r\n\t// @function setPosition(el: HTMLElement, position: Point)\r\n\t// Sets the position of `el` to coordinates specified by `position`,\r\n\t// using CSS translate or top/left positioning depending on the browser\r\n\t// (used by Leaflet internally to position its layers).\r\n\tsetPosition: function (el, point) { // (HTMLElement, Point[, Boolean])\r\n\r\n\t\t/*eslint-disable */\r\n\t\tel._leaflet_pos = point;\r\n\t\t/*eslint-enable */\r\n\r\n\t\tif (L.Browser.any3d) {\r\n\t\t\tL.DomUtil.setTransform(el, point);\r\n\t\t} else {\r\n\t\t\tel.style.left = point.x + 'px';\r\n\t\t\tel.style.top = point.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t// @function getPosition(el: HTMLElement): Point\r\n\t// Returns the coordinates of an element previously positioned with setPosition.\r\n\tgetPosition: function (el) {\r\n\t\t// this method is only used for elements previously positioned using setPosition,\r\n\t\t// so it's safe to cache the position for performance\r\n\r\n\t\treturn el._leaflet_pos || new L.Point(0, 0);\r\n\t}\r\n};\r\n\r\n\r\n(function () {\r\n\t// prefix style property names\r\n\r\n\t// @property TRANSFORM: String\r\n\t// Vendor-prefixed fransform style name (e.g. `'webkitTransform'` for WebKit).\r\n\tL.DomUtil.TRANSFORM = L.DomUtil.testProp(\r\n\t\t\t['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform']);\r\n\r\n\r\n\t// webkitTransition comes first because some browser versions that drop vendor prefix don't do\r\n\t// the same for the transitionend event, in particular the Android 4.1 stock browser\r\n\r\n\t// @property TRANSITION: String\r\n\t// Vendor-prefixed transform style name.\r\n\tvar transition = L.DomUtil.TRANSITION = L.DomUtil.testProp(\r\n\t\t\t['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition']);\r\n\r\n\tL.DomUtil.TRANSITION_END =\r\n\t\t\ttransition === 'webkitTransition' || transition === 'OTransition' ? transition + 'End' : 'transitionend';\r\n\r\n\t// @function disableTextSelection()\r\n\t// Prevents the user from generating `selectstart` DOM events, usually generated\r\n\t// when the user drags the mouse through a page with text. Used internally\r\n\t// by Leaflet to override the behaviour of any click-and-drag interaction on\r\n\t// the map. Affects drag interactions on the whole document.\r\n\r\n\t// @function enableTextSelection()\r\n\t// Cancels the effects of a previous [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection).\r\n\tif ('onselectstart' in document) {\r\n\t\tL.DomUtil.disableTextSelection = function () {\r\n\t\t\tL.DomEvent.on(window, 'selectstart', L.DomEvent.preventDefault);\r\n\t\t};\r\n\t\tL.DomUtil.enableTextSelection = function () {\r\n\t\t\tL.DomEvent.off(window, 'selectstart', L.DomEvent.preventDefault);\r\n\t\t};\r\n\r\n\t} else {\r\n\t\tvar userSelectProperty = L.DomUtil.testProp(\r\n\t\t\t['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']);\r\n\r\n\t\tL.DomUtil.disableTextSelection = function () {\r\n\t\t\tif (userSelectProperty) {\r\n\t\t\t\tvar style = document.documentElement.style;\r\n\t\t\t\tthis._userSelect = style[userSelectProperty];\r\n\t\t\t\tstyle[userSelectProperty] = 'none';\r\n\t\t\t}\r\n\t\t};\r\n\t\tL.DomUtil.enableTextSelection = function () {\r\n\t\t\tif (userSelectProperty) {\r\n\t\t\t\tdocument.documentElement.style[userSelectProperty] = this._userSelect;\r\n\t\t\t\tdelete this._userSelect;\r\n\t\t\t}\r\n\t\t};\r\n\t}\r\n\r\n\t// @function disableImageDrag()\r\n\t// As [`L.DomUtil.disableTextSelection`](#domutil-disabletextselection), but\r\n\t// for `dragstart` DOM events, usually generated when the user drags an image.\r\n\tL.DomUtil.disableImageDrag = function () {\r\n\t\tL.DomEvent.on(window, 'dragstart', L.DomEvent.preventDefault);\r\n\t};\r\n\r\n\t// @function enableImageDrag()\r\n\t// Cancels the effects of a previous [`L.DomUtil.disableImageDrag`](#domutil-disabletextselection).\r\n\tL.DomUtil.enableImageDrag = function () {\r\n\t\tL.DomEvent.off(window, 'dragstart', L.DomEvent.preventDefault);\r\n\t};\r\n\r\n\t// @function preventOutline(el: HTMLElement)\r\n\t// Makes the [outline](https://developer.mozilla.org/docs/Web/CSS/outline)\r\n\t// of the element `el` invisible. Used internally by Leaflet to prevent\r\n\t// focusable elements from displaying an outline when the user performs a\r\n\t// drag interaction on them.\r\n\tL.DomUtil.preventOutline = function (element) {\r\n\t\twhile (element.tabIndex === -1) {\r\n\t\t\telement = element.parentNode;\r\n\t\t}\r\n\t\tif (!element || !element.style) { return; }\r\n\t\tL.DomUtil.restoreOutline();\r\n\t\tthis._outlineElement = element;\r\n\t\tthis._outlineStyle = element.style.outline;\r\n\t\telement.style.outline = 'none';\r\n\t\tL.DomEvent.on(window, 'keydown', L.DomUtil.restoreOutline, this);\r\n\t};\r\n\r\n\t// @function restoreOutline()\r\n\t// Cancels the effects of a previous [`L.DomUtil.preventOutline`]().\r\n\tL.DomUtil.restoreOutline = function () {\r\n\t\tif (!this._outlineElement) { return; }\r\n\t\tthis._outlineElement.style.outline = this._outlineStyle;\r\n\t\tdelete this._outlineElement;\r\n\t\tdelete this._outlineStyle;\r\n\t\tL.DomEvent.off(window, 'keydown', L.DomUtil.restoreOutline, this);\r\n\t};\r\n})();\r\n","/* @class LatLng\r\n * @aka L.LatLng\r\n *\r\n * Represents a geographical point with a certain latitude and longitude.\r\n *\r\n * @example\r\n *\r\n * ```\r\n * var latlng = L.latLng(50.5, 30.5);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLng objects also accept them in a simple Array form and simple object form (unless noted otherwise), so these lines are equivalent:\r\n *\r\n * ```\r\n * map.panTo([50, 30]);\r\n * map.panTo({lon: 30, lat: 50});\r\n * map.panTo({lat: 50, lng: 30});\r\n * map.panTo(L.latLng(50, 30));\r\n * ```\r\n */\r\n\r\nL.LatLng = function (lat, lng, alt) {\r\n\tif (isNaN(lat) || isNaN(lng)) {\r\n\t\tthrow new Error('Invalid LatLng object: (' + lat + ', ' + lng + ')');\r\n\t}\r\n\r\n\t// @property lat: Number\r\n\t// Latitude in degrees\r\n\tthis.lat = +lat;\r\n\r\n\t// @property lng: Number\r\n\t// Longitude in degrees\r\n\tthis.lng = +lng;\r\n\r\n\t// @property alt: Number\r\n\t// Altitude in meters (optional)\r\n\tif (alt !== undefined) {\r\n\t\tthis.alt = +alt;\r\n\t}\r\n};\r\n\r\nL.LatLng.prototype = {\r\n\t// @method equals(otherLatLng: LatLng, maxMargin?: Number): Boolean\r\n\t// Returns `true` if the given `LatLng` point is at the same position (within a small margin of error). The margin of error can be overriden by setting `maxMargin` to a small number.\r\n\tequals: function (obj, maxMargin) {\r\n\t\tif (!obj) { return false; }\r\n\r\n\t\tobj = L.latLng(obj);\r\n\r\n\t\tvar margin = Math.max(\r\n\t\t Math.abs(this.lat - obj.lat),\r\n\t\t Math.abs(this.lng - obj.lng));\r\n\r\n\t\treturn margin <= (maxMargin === undefined ? 1.0E-9 : maxMargin);\r\n\t},\r\n\r\n\t// @method toString(): String\r\n\t// Returns a string representation of the point (for debugging purposes).\r\n\ttoString: function (precision) {\r\n\t\treturn 'LatLng(' +\r\n\t\t L.Util.formatNum(this.lat, precision) + ', ' +\r\n\t\t L.Util.formatNum(this.lng, precision) + ')';\r\n\t},\r\n\r\n\t// @method distanceTo(otherLatLng: LatLng): Number\r\n\t// Returns the distance (in meters) to the given `LatLng` calculated using the [Haversine formula](http://en.wikipedia.org/wiki/Haversine_formula).\r\n\tdistanceTo: function (other) {\r\n\t\treturn L.CRS.Earth.distance(this, L.latLng(other));\r\n\t},\r\n\r\n\t// @method wrap(): LatLng\r\n\t// Returns a new `LatLng` object with the longitude wrapped so it's always between -180 and +180 degrees.\r\n\twrap: function () {\r\n\t\treturn L.CRS.Earth.wrapLatLng(this);\r\n\t},\r\n\r\n\t// @method toBounds(sizeInMeters: Number): LatLngBounds\r\n\t// Returns a new `LatLngBounds` object in which each boundary is `sizeInMeters` meters apart from the `LatLng`.\r\n\ttoBounds: function (sizeInMeters) {\r\n\t\tvar latAccuracy = 180 * sizeInMeters / 40075017,\r\n\t\t lngAccuracy = latAccuracy / Math.cos((Math.PI / 180) * this.lat);\r\n\r\n\t\treturn L.latLngBounds(\r\n\t\t [this.lat - latAccuracy, this.lng - lngAccuracy],\r\n\t\t [this.lat + latAccuracy, this.lng + lngAccuracy]);\r\n\t},\r\n\r\n\tclone: function () {\r\n\t\treturn new L.LatLng(this.lat, this.lng, this.alt);\r\n\t}\r\n};\r\n\r\n\r\n\r\n// @factory L.latLng(latitude: Number, longitude: Number, altitude?: Number): LatLng\r\n// Creates an object representing a geographical point with the given latitude and longitude (and optionally altitude).\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Array): LatLng\r\n// Expects an array of the form `[Number, Number]` or `[Number, Number, Number]` instead.\r\n\r\n// @alternative\r\n// @factory L.latLng(coords: Object): LatLng\r\n// Expects an plain object of the form `{lat: Number, lng: Number}` or `{lat: Number, lng: Number, alt: Number}` instead.\r\n\r\nL.latLng = function (a, b, c) {\r\n\tif (a instanceof L.LatLng) {\r\n\t\treturn a;\r\n\t}\r\n\tif (L.Util.isArray(a) && typeof a[0] !== 'object') {\r\n\t\tif (a.length === 3) {\r\n\t\t\treturn new L.LatLng(a[0], a[1], a[2]);\r\n\t\t}\r\n\t\tif (a.length === 2) {\r\n\t\t\treturn new L.LatLng(a[0], a[1]);\r\n\t\t}\r\n\t\treturn null;\r\n\t}\r\n\tif (a === undefined || a === null) {\r\n\t\treturn a;\r\n\t}\r\n\tif (typeof a === 'object' && 'lat' in a) {\r\n\t\treturn new L.LatLng(a.lat, 'lng' in a ? a.lng : a.lon, a.alt);\r\n\t}\r\n\tif (b === undefined) {\r\n\t\treturn null;\r\n\t}\r\n\treturn new L.LatLng(a, b, c);\r\n};\r\n","/*\r\n * @class LatLngBounds\r\n * @aka L.LatLngBounds\r\n *\r\n * Represents a rectangular geographical area on a map.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var southWest = L.latLng(40.712, -74.227),\r\n * northEast = L.latLng(40.774, -74.125),\r\n * bounds = L.latLngBounds(southWest, northEast);\r\n * ```\r\n *\r\n * All Leaflet methods that accept LatLngBounds objects also accept them in a simple Array form (unless noted otherwise), so the bounds example above can be passed like this:\r\n *\r\n * ```js\r\n * map.fitBounds([\r\n * \t[40.712, -74.227],\r\n * \t[40.774, -74.125]\r\n * ]);\r\n * ```\r\n */\r\n\r\nL.LatLngBounds = function (southWest, northEast) { // (LatLng, LatLng) or (LatLng[])\r\n\tif (!southWest) { return; }\r\n\r\n\tvar latlngs = northEast ? [southWest, northEast] : southWest;\r\n\r\n\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\tthis.extend(latlngs[i]);\r\n\t}\r\n};\r\n\r\nL.LatLngBounds.prototype = {\r\n\r\n\t// @method extend(latlng: LatLng): this\r\n\t// Extend the bounds to contain the given point\r\n\r\n\t// @alternative\r\n\t// @method extend(otherBounds: LatLngBounds): this\r\n\t// Extend the bounds to contain the given bounds\r\n\textend: function (obj) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof L.LatLng) {\r\n\t\t\tsw2 = obj;\r\n\t\t\tne2 = obj;\r\n\r\n\t\t} else if (obj instanceof L.LatLngBounds) {\r\n\t\t\tsw2 = obj._southWest;\r\n\t\t\tne2 = obj._northEast;\r\n\r\n\t\t\tif (!sw2 || !ne2) { return this; }\r\n\r\n\t\t} else {\r\n\t\t\treturn obj ? this.extend(L.latLng(obj) || L.latLngBounds(obj)) : this;\r\n\t\t}\r\n\r\n\t\tif (!sw && !ne) {\r\n\t\t\tthis._southWest = new L.LatLng(sw2.lat, sw2.lng);\r\n\t\t\tthis._northEast = new L.LatLng(ne2.lat, ne2.lng);\r\n\t\t} else {\r\n\t\t\tsw.lat = Math.min(sw2.lat, sw.lat);\r\n\t\t\tsw.lng = Math.min(sw2.lng, sw.lng);\r\n\t\t\tne.lat = Math.max(ne2.lat, ne.lat);\r\n\t\t\tne.lng = Math.max(ne2.lng, ne.lng);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method pad(bufferRatio: Number): LatLngBounds\r\n\t// Returns bigger bounds created by extending the current bounds by a given percentage in each direction.\r\n\tpad: function (bufferRatio) {\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t heightBuffer = Math.abs(sw.lat - ne.lat) * bufferRatio,\r\n\t\t widthBuffer = Math.abs(sw.lng - ne.lng) * bufferRatio;\r\n\r\n\t\treturn new L.LatLngBounds(\r\n\t\t new L.LatLng(sw.lat - heightBuffer, sw.lng - widthBuffer),\r\n\t\t new L.LatLng(ne.lat + heightBuffer, ne.lng + widthBuffer));\r\n\t},\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the center point of the bounds.\r\n\tgetCenter: function () {\r\n\t\treturn new L.LatLng(\r\n\t\t (this._southWest.lat + this._northEast.lat) / 2,\r\n\t\t (this._southWest.lng + this._northEast.lng) / 2);\r\n\t},\r\n\r\n\t// @method getSouthWest(): LatLng\r\n\t// Returns the south-west point of the bounds.\r\n\tgetSouthWest: function () {\r\n\t\treturn this._southWest;\r\n\t},\r\n\r\n\t// @method getNorthEast(): LatLng\r\n\t// Returns the north-east point of the bounds.\r\n\tgetNorthEast: function () {\r\n\t\treturn this._northEast;\r\n\t},\r\n\r\n\t// @method getNorthWest(): LatLng\r\n\t// Returns the north-west point of the bounds.\r\n\tgetNorthWest: function () {\r\n\t\treturn new L.LatLng(this.getNorth(), this.getWest());\r\n\t},\r\n\r\n\t// @method getSouthEast(): LatLng\r\n\t// Returns the south-east point of the bounds.\r\n\tgetSouthEast: function () {\r\n\t\treturn new L.LatLng(this.getSouth(), this.getEast());\r\n\t},\r\n\r\n\t// @method getWest(): Number\r\n\t// Returns the west longitude of the bounds\r\n\tgetWest: function () {\r\n\t\treturn this._southWest.lng;\r\n\t},\r\n\r\n\t// @method getSouth(): Number\r\n\t// Returns the south latitude of the bounds\r\n\tgetSouth: function () {\r\n\t\treturn this._southWest.lat;\r\n\t},\r\n\r\n\t// @method getEast(): Number\r\n\t// Returns the east longitude of the bounds\r\n\tgetEast: function () {\r\n\t\treturn this._northEast.lng;\r\n\t},\r\n\r\n\t// @method getNorth(): Number\r\n\t// Returns the north latitude of the bounds\r\n\tgetNorth: function () {\r\n\t\treturn this._northEast.lat;\r\n\t},\r\n\r\n\t// @method contains(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle contains the given one.\r\n\r\n\t// @alternative\r\n\t// @method contains (latlng: LatLng): Boolean\r\n\t// Returns `true` if the rectangle contains the given point.\r\n\tcontains: function (obj) { // (LatLngBounds) or (LatLng) -> Boolean\r\n\t\tif (typeof obj[0] === 'number' || obj instanceof L.LatLng) {\r\n\t\t\tobj = L.latLng(obj);\r\n\t\t} else {\r\n\t\t\tobj = L.latLngBounds(obj);\r\n\t\t}\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2, ne2;\r\n\r\n\t\tif (obj instanceof L.LatLngBounds) {\r\n\t\t\tsw2 = obj.getSouthWest();\r\n\t\t\tne2 = obj.getNorthEast();\r\n\t\t} else {\r\n\t\t\tsw2 = ne2 = obj;\r\n\t\t}\r\n\r\n\t\treturn (sw2.lat >= sw.lat) && (ne2.lat <= ne.lat) &&\r\n\t\t (sw2.lng >= sw.lng) && (ne2.lng <= ne.lng);\r\n\t},\r\n\r\n\t// @method intersects(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle intersects the given bounds. Two bounds intersect if they have at least one point in common.\r\n\tintersects: function (bounds) {\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latIntersects = (ne2.lat >= sw.lat) && (sw2.lat <= ne.lat),\r\n\t\t lngIntersects = (ne2.lng >= sw.lng) && (sw2.lng <= ne.lng);\r\n\r\n\t\treturn latIntersects && lngIntersects;\r\n\t},\r\n\r\n\t// @method overlaps(otherBounds: Bounds): Boolean\r\n\t// Returns `true` if the rectangle overlaps the given bounds. Two bounds overlap if their intersection is an area.\r\n\toverlaps: function (bounds) {\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tvar sw = this._southWest,\r\n\t\t ne = this._northEast,\r\n\t\t sw2 = bounds.getSouthWest(),\r\n\t\t ne2 = bounds.getNorthEast(),\r\n\r\n\t\t latOverlaps = (ne2.lat > sw.lat) && (sw2.lat < ne.lat),\r\n\t\t lngOverlaps = (ne2.lng > sw.lng) && (sw2.lng < ne.lng);\r\n\r\n\t\treturn latOverlaps && lngOverlaps;\r\n\t},\r\n\r\n\t// @method toBBoxString(): String\r\n\t// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.\r\n\ttoBBoxString: function () {\r\n\t\treturn [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');\r\n\t},\r\n\r\n\t// @method equals(otherBounds: LatLngBounds): Boolean\r\n\t// Returns `true` if the rectangle is equivalent (within a small margin of error) to the given bounds.\r\n\tequals: function (bounds) {\r\n\t\tif (!bounds) { return false; }\r\n\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\treturn this._southWest.equals(bounds.getSouthWest()) &&\r\n\t\t this._northEast.equals(bounds.getNorthEast());\r\n\t},\r\n\r\n\t// @method isValid(): Boolean\r\n\t// Returns `true` if the bounds are properly initialized.\r\n\tisValid: function () {\r\n\t\treturn !!(this._southWest && this._northEast);\r\n\t}\r\n};\r\n\r\n// TODO International date line?\r\n\r\n// @factory L.latLngBounds(southWest: LatLng, northEast: LatLng)\r\n// Creates a `LatLngBounds` object by defining south-west and north-east corners of the rectangle.\r\n\r\n// @alternative\r\n// @factory L.latLngBounds(latlngs: LatLng[])\r\n// Creates a `LatLngBounds` object defined by the geographical points it contains. Very useful for zooming the map to fit a particular set of locations with [`fitBounds`](#map-fitbounds).\r\nL.latLngBounds = function (a, b) {\r\n\tif (a instanceof L.LatLngBounds) {\r\n\t\treturn a;\r\n\t}\r\n\treturn new L.LatLngBounds(a, b);\r\n};\r\n","/*\r\n * @namespace Projection\r\n * @section\r\n * Leaflet comes with a set of already defined Projections out of the box:\r\n *\r\n * @projection L.Projection.LonLat\r\n *\r\n * Equirectangular, or Plate Carree projection — the most simple projection,\r\n * mostly used by GIS enthusiasts. Directly maps `x` as longitude, and `y` as\r\n * latitude. Also suitable for flat worlds, e.g. game maps. Used by the\r\n * `EPSG:3395` and `Simple` CRS.\r\n */\r\n\r\nL.Projection = {};\r\n\r\nL.Projection.LonLat = {\r\n\tproject: function (latlng) {\r\n\t\treturn new L.Point(latlng.lng, latlng.lat);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\treturn new L.LatLng(point.y, point.x);\r\n\t},\r\n\r\n\tbounds: L.bounds([-180, -90], [180, 90])\r\n};\r\n","/*\r\n * @namespace Projection\r\n * @projection L.Projection.SphericalMercator\r\n *\r\n * Spherical Mercator projection — the most common projection for online maps,\r\n * used by almost all free and commercial tile providers. Assumes that Earth is\r\n * a sphere. Used by the `EPSG:3857` CRS.\r\n */\r\n\r\nL.Projection.SphericalMercator = {\r\n\r\n\tR: 6378137,\r\n\tMAX_LATITUDE: 85.0511287798,\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t max = this.MAX_LATITUDE,\r\n\t\t lat = Math.max(Math.min(max, latlng.lat), -max),\r\n\t\t sin = Math.sin(lat * d);\r\n\r\n\t\treturn new L.Point(\r\n\t\t\t\tthis.R * latlng.lng * d,\r\n\t\t\t\tthis.R * Math.log((1 + sin) / (1 - sin)) / 2);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI;\r\n\r\n\t\treturn new L.LatLng(\r\n\t\t\t(2 * Math.atan(Math.exp(point.y / this.R)) - (Math.PI / 2)) * d,\r\n\t\t\tpoint.x * d / this.R);\r\n\t},\r\n\r\n\tbounds: (function () {\r\n\t\tvar d = 6378137 * Math.PI;\r\n\t\treturn L.bounds([-d, -d], [d, d]);\r\n\t})()\r\n};\r\n","/*\r\n * @class CRS\r\n * @aka L.CRS\r\n * Abstract class that defines coordinate reference systems for projecting\r\n * geographical points into pixel (screen) coordinates and back (and to\r\n * coordinates in other units for [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services). See\r\n * [spatial reference system](http://en.wikipedia.org/wiki/Coordinate_reference_system).\r\n *\r\n * Leaflet defines the most usual CRSs by default. If you want to use a\r\n * CRS not defined by default, take a look at the\r\n * [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) plugin.\r\n */\r\n\r\nL.CRS = {\r\n\t// @method latLngToPoint(latlng: LatLng, zoom: Number): Point\r\n\t// Projects geographical coordinates into pixel coordinates for a given zoom.\r\n\tlatLngToPoint: function (latlng, zoom) {\r\n\t\tvar projectedPoint = this.projection.project(latlng),\r\n\t\t scale = this.scale(zoom);\r\n\r\n\t\treturn this.transformation._transform(projectedPoint, scale);\r\n\t},\r\n\r\n\t// @method pointToLatLng(point: Point, zoom: Number): LatLng\r\n\t// The inverse of `latLngToPoint`. Projects pixel coordinates on a given\r\n\t// zoom into geographical coordinates.\r\n\tpointToLatLng: function (point, zoom) {\r\n\t\tvar scale = this.scale(zoom),\r\n\t\t untransformedPoint = this.transformation.untransform(point, scale);\r\n\r\n\t\treturn this.projection.unproject(untransformedPoint);\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng): Point\r\n\t// Projects geographical coordinates into coordinates in units accepted for\r\n\t// this CRS (e.g. meters for EPSG:3857, for passing it to WMS services).\r\n\tproject: function (latlng) {\r\n\t\treturn this.projection.project(latlng);\r\n\t},\r\n\r\n\t// @method unproject(point: Point): LatLng\r\n\t// Given a projected coordinate returns the corresponding LatLng.\r\n\t// The inverse of `project`.\r\n\tunproject: function (point) {\r\n\t\treturn this.projection.unproject(point);\r\n\t},\r\n\r\n\t// @method scale(zoom: Number): Number\r\n\t// Returns the scale used when transforming projected coordinates into\r\n\t// pixel coordinates for a particular zoom. For example, it returns\r\n\t// `256 * 2^zoom` for Mercator-based CRS.\r\n\tscale: function (zoom) {\r\n\t\treturn 256 * Math.pow(2, zoom);\r\n\t},\r\n\r\n\t// @method zoom(scale: Number): Number\r\n\t// Inverse of `scale()`, returns the zoom level corresponding to a scale\r\n\t// factor of `scale`.\r\n\tzoom: function (scale) {\r\n\t\treturn Math.log(scale / 256) / Math.LN2;\r\n\t},\r\n\r\n\t// @method getProjectedBounds(zoom: Number): Bounds\r\n\t// Returns the projection's bounds scaled and transformed for the provided `zoom`.\r\n\tgetProjectedBounds: function (zoom) {\r\n\t\tif (this.infinite) { return null; }\r\n\r\n\t\tvar b = this.projection.bounds,\r\n\t\t s = this.scale(zoom),\r\n\t\t min = this.transformation.transform(b.min, s),\r\n\t\t max = this.transformation.transform(b.max, s);\r\n\r\n\t\treturn L.bounds(min, max);\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates.\r\n\r\n\t// @property code: String\r\n\t// Standard code name of the CRS passed into WMS services (e.g. `'EPSG:3857'`)\r\n\t//\r\n\t// @property wrapLng: Number[]\r\n\t// An array of two numbers defining whether the longitude (horizontal) coordinate\r\n\t// axis wraps around a given range and how. Defaults to `[-180, 180]` in most\r\n\t// geographical CRSs. If `undefined`, the longitude axis does not wrap around.\r\n\t//\r\n\t// @property wrapLat: Number[]\r\n\t// Like `wrapLng`, but for the latitude (vertical) axis.\r\n\r\n\t// wrapLng: [min, max],\r\n\t// wrapLat: [min, max],\r\n\r\n\t// @property infinite: Boolean\r\n\t// If true, the coordinate space will be unbounded (infinite in both axes)\r\n\tinfinite: false,\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where lat and lng has been wrapped according to the\r\n\t// CRS's `wrapLat` and `wrapLng` properties, if they are outside the CRS's bounds.\r\n\twrapLatLng: function (latlng) {\r\n\t\tvar lng = this.wrapLng ? L.Util.wrapNum(latlng.lng, this.wrapLng, true) : latlng.lng,\r\n\t\t lat = this.wrapLat ? L.Util.wrapNum(latlng.lat, this.wrapLat, true) : latlng.lat,\r\n\t\t alt = latlng.alt;\r\n\r\n\t\treturn L.latLng(lat, lng, alt);\r\n\t}\r\n};\r\n","/*\n * @namespace CRS\n * @crs L.CRS.Simple\n *\n * A simple CRS that maps longitude and latitude into `x` and `y` directly.\n * May be used for maps of flat surfaces (e.g. game maps). Note that the `y`\n * axis should still be inverted (going from bottom to top). `distance()` returns\n * simple euclidean distance.\n */\n\nL.CRS.Simple = L.extend({}, L.CRS, {\n\tprojection: L.Projection.LonLat,\n\ttransformation: new L.Transformation(1, 0, -1, 0),\n\n\tscale: function (zoom) {\n\t\treturn Math.pow(2, zoom);\n\t},\n\n\tzoom: function (scale) {\n\t\treturn Math.log(scale) / Math.LN2;\n\t},\n\n\tdistance: function (latlng1, latlng2) {\n\t\tvar dx = latlng2.lng - latlng1.lng,\n\t\t dy = latlng2.lat - latlng1.lat;\n\n\t\treturn Math.sqrt(dx * dx + dy * dy);\n\t},\n\n\tinfinite: true\n});\n","/*\n * @namespace CRS\n * @crs L.CRS.Earth\n *\n * Serves as the base for CRS that are global such that they cover the earth.\n * Can only be used as the base for other CRS and cannot be used directly,\n * since it does not have a `code`, `projection` or `transformation`. `distance()` returns\n * meters.\n */\n\nL.CRS.Earth = L.extend({}, L.CRS, {\n\twrapLng: [-180, 180],\n\n\t// Mean Earth Radius, as recommended for use by\n\t// the International Union of Geodesy and Geophysics,\n\t// see http://rosettacode.org/wiki/Haversine_formula\n\tR: 6371000,\n\n\t// distance between two geographical points using spherical law of cosines approximation\n\tdistance: function (latlng1, latlng2) {\n\t\tvar rad = Math.PI / 180,\n\t\t lat1 = latlng1.lat * rad,\n\t\t lat2 = latlng2.lat * rad,\n\t\t a = Math.sin(lat1) * Math.sin(lat2) +\n\t\t Math.cos(lat1) * Math.cos(lat2) * Math.cos((latlng2.lng - latlng1.lng) * rad);\n\n\t\treturn this.R * Math.acos(Math.min(a, 1));\n\t}\n});\n","/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3857\r\n *\r\n * The most common CRS for online maps, used by almost all free and commercial\r\n * tile providers. Uses Spherical Mercator projection. Set in by default in\r\n * Map's `crs` option.\r\n */\r\n\r\nL.CRS.EPSG3857 = L.extend({}, L.CRS.Earth, {\r\n\tcode: 'EPSG:3857',\r\n\tprojection: L.Projection.SphericalMercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * L.Projection.SphericalMercator.R);\r\n\t\treturn new L.Transformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n\r\nL.CRS.EPSG900913 = L.extend({}, L.CRS.EPSG3857, {\r\n\tcode: 'EPSG:900913'\r\n});\r\n","/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG4326\r\n *\r\n * A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.\r\n */\r\n\r\nL.CRS.EPSG4326 = L.extend({}, L.CRS.Earth, {\r\n\tcode: 'EPSG:4326',\r\n\tprojection: L.Projection.LonLat,\r\n\ttransformation: new L.Transformation(1 / 180, 1, -1 / 180, 0.5)\r\n});\r\n","/*\r\n * @class Map\r\n * @aka L.Map\r\n * @inherits Evented\r\n *\r\n * The central class of the API — it is used to create a map on a page and manipulate it.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * // initialize the map on the \"map\" div with a given center and zoom\r\n * var map = L.map('map', {\r\n * \tcenter: [51.505, -0.09],\r\n * \tzoom: 13\r\n * });\r\n * ```\r\n *\r\n */\r\n\r\nL.Map = L.Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @section Map State Options\r\n\t\t// @option crs: CRS = L.CRS.EPSG3857\r\n\t\t// The [Coordinate Reference System](#crs) to use. Don't change this if you're not\r\n\t\t// sure what it means.\r\n\t\tcrs: L.CRS.EPSG3857,\r\n\r\n\t\t// @option center: LatLng = undefined\r\n\t\t// Initial geographic center of the map\r\n\t\tcenter: undefined,\r\n\r\n\t\t// @option zoom: Number = undefined\r\n\t\t// Initial map zoom level\r\n\t\tzoom: undefined,\r\n\r\n\t\t// @option minZoom: Number = undefined\r\n\t\t// Minimum zoom level of the map. Overrides any `minZoom` option set on map layers.\r\n\t\tminZoom: undefined,\r\n\r\n\t\t// @option maxZoom: Number = undefined\r\n\t\t// Maximum zoom level of the map. Overrides any `maxZoom` option set on map layers.\r\n\t\tmaxZoom: undefined,\r\n\r\n\t\t// @option layers: Layer[] = []\r\n\t\t// Array of layers that will be added to the map initially\r\n\t\tlayers: [],\r\n\r\n\t\t// @option maxBounds: LatLngBounds = null\r\n\t\t// When this option is set, the map restricts the view to the given\r\n\t\t// geographical bounds, bouncing the user back when he tries to pan\r\n\t\t// outside the view. To set the restriction dynamically, use\r\n\t\t// [`setMaxBounds`](#map-setmaxbounds) method.\r\n\t\tmaxBounds: undefined,\r\n\r\n\t\t// @option renderer: Renderer = *\r\n\t\t// The default method for drawing vector layers on the map. `L.SVG`\r\n\t\t// or `L.Canvas` by default depending on browser support.\r\n\t\trenderer: undefined,\r\n\r\n\r\n\t\t// @section Animation Options\r\n\t\t// @option fadeAnimation: Boolean = true\r\n\t\t// Whether the tile fade animation is enabled. By default it's enabled\r\n\t\t// in all browsers that support CSS3 Transitions except Android.\r\n\t\tfadeAnimation: true,\r\n\r\n\t\t// @option markerZoomAnimation: Boolean = true\r\n\t\t// Whether markers animate their zoom with the zoom animation, if disabled\r\n\t\t// they will disappear for the length of the animation. By default it's\r\n\t\t// enabled in all browsers that support CSS3 Transitions except Android.\r\n\t\tmarkerZoomAnimation: true,\r\n\r\n\t\t// @option transform3DLimit: Number = 2^23\r\n\t\t// Defines the maximum size of a CSS translation transform. The default\r\n\t\t// value should not be changed unless a web browser positions layers in\r\n\t\t// the wrong place after doing a large `panBy`.\r\n\t\ttransform3DLimit: 8388608, // Precision limit of a 32-bit float\r\n\r\n\t\t// @section Interaction Options\r\n\t\t// @option zoomSnap: Number = 1\r\n\t\t// Forces the map's zoom level to always be a multiple of this, particularly\r\n\t\t// right after a [`fitBounds()`](#map-fitbounds) or a pinch-zoom.\r\n\t\t// By default, the zoom level snaps to the nearest integer; lower values\r\n\t\t// (e.g. `0.5` or `0.1`) allow for greater granularity. A value of `0`\r\n\t\t// means the zoom level will not be snapped after `fitBounds` or a pinch-zoom.\r\n\t\tzoomSnap: 1,\r\n\r\n\t\t// @option zoomDelta: Number = 1\r\n\t\t// Controls how much the map's zoom level will change after a\r\n\t\t// [`zoomIn()`](#map-zoomin), [`zoomOut()`](#map-zoomout), pressing `+`\r\n\t\t// or `-` on the keyboard, or using the [zoom controls](#control-zoom).\r\n\t\t// Values smaller than `1` (e.g. `0.5`) allow for greater granularity.\r\n\t\tzoomDelta: 1,\r\n\r\n\t\t// @option trackResize: Boolean = true\r\n\t\t// Whether the map automatically handles browser window resize to update itself.\r\n\t\ttrackResize: true\r\n\t},\r\n\r\n\tinitialize: function (id, options) { // (HTMLElement or String, Object)\r\n\t\toptions = L.setOptions(this, options);\r\n\r\n\t\tthis._initContainer(id);\r\n\t\tthis._initLayout();\r\n\r\n\t\t// hack for https://github.com/Leaflet/Leaflet/issues/1980\r\n\t\tthis._onResize = L.bind(this._onResize, this);\r\n\r\n\t\tthis._initEvents();\r\n\r\n\t\tif (options.maxBounds) {\r\n\t\t\tthis.setMaxBounds(options.maxBounds);\r\n\t\t}\r\n\r\n\t\tif (options.zoom !== undefined) {\r\n\t\t\tthis._zoom = this._limitZoom(options.zoom);\r\n\t\t}\r\n\r\n\t\tif (options.center && options.zoom !== undefined) {\r\n\t\t\tthis.setView(L.latLng(options.center), options.zoom, {reset: true});\r\n\t\t}\r\n\r\n\t\tthis._handlers = [];\r\n\t\tthis._layers = {};\r\n\t\tthis._zoomBoundLayers = {};\r\n\t\tthis._sizeChanged = true;\r\n\r\n\t\tthis.callInitHooks();\r\n\r\n\t\tthis._addLayers(this.options.layers);\r\n\t},\r\n\r\n\r\n\t// @section Methods for modifying map state\r\n\r\n\t// @method setView(center: LatLng, zoom: Number, options?: Zoom/pan options): this\r\n\t// Sets the view of the map (geographical center and zoom) with the given\r\n\t// animation options.\r\n\tsetView: function (center, zoom) {\r\n\t\t// replaced by animation-powered implementation in Map.PanAnimation.js\r\n\t\tzoom = zoom === undefined ? this.getZoom() : zoom;\r\n\t\tthis._resetView(L.latLng(center), zoom);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setZoom(zoom: Number, options: Zoom/pan options): this\r\n\t// Sets the zoom of the map.\r\n\tsetZoom: function (zoom, options) {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthis._zoom = zoom;\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\treturn this.setView(this.getCenter(), zoom, {zoom: options});\r\n\t},\r\n\r\n\t// @method zoomIn(delta?: Number, options?: Zoom options): this\r\n\t// Increases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomIn: function (delta, options) {\r\n\t\tdelta = delta || (L.Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom + delta, options);\r\n\t},\r\n\r\n\t// @method zoomOut(delta?: Number, options?: Zoom options): this\r\n\t// Decreases the zoom of the map by `delta` ([`zoomDelta`](#map-zoomdelta) by default).\r\n\tzoomOut: function (delta, options) {\r\n\t\tdelta = delta || (L.Browser.any3d ? this.options.zoomDelta : 1);\r\n\t\treturn this.setZoom(this._zoom - delta, options);\r\n\t},\r\n\r\n\t// @method setZoomAround(latlng: LatLng, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified geographical point on the map\r\n\t// stationary (e.g. used internally for scroll zoom and double-click zoom).\r\n\t// @alternative\r\n\t// @method setZoomAround(offset: Point, zoom: Number, options: Zoom options): this\r\n\t// Zooms the map while keeping a specified pixel on the map (relative to the top-left corner) stationary.\r\n\tsetZoomAround: function (latlng, zoom, options) {\r\n\t\tvar scale = this.getZoomScale(zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t containerPoint = latlng instanceof L.Point ? latlng : this.latLngToContainerPoint(latlng),\r\n\r\n\t\t centerOffset = containerPoint.subtract(viewHalf).multiplyBy(1 - 1 / scale),\r\n\t\t newCenter = this.containerPointToLatLng(viewHalf.add(centerOffset));\r\n\r\n\t\treturn this.setView(newCenter, zoom, {zoom: options});\r\n\t},\r\n\r\n\t_getBoundsCenterZoom: function (bounds, options) {\r\n\r\n\t\toptions = options || {};\r\n\t\tbounds = bounds.getBounds ? bounds.getBounds() : L.latLngBounds(bounds);\r\n\r\n\t\tvar paddingTL = L.point(options.paddingTopLeft || options.padding || [0, 0]),\r\n\t\t paddingBR = L.point(options.paddingBottomRight || options.padding || [0, 0]),\r\n\r\n\t\t zoom = this.getBoundsZoom(bounds, false, paddingTL.add(paddingBR));\r\n\r\n\t\tzoom = (typeof options.maxZoom === 'number') ? Math.min(options.maxZoom, zoom) : zoom;\r\n\r\n\t\tvar paddingOffset = paddingBR.subtract(paddingTL).divideBy(2),\r\n\r\n\t\t swPoint = this.project(bounds.getSouthWest(), zoom),\r\n\t\t nePoint = this.project(bounds.getNorthEast(), zoom),\r\n\t\t center = this.unproject(swPoint.add(nePoint).divideBy(2).add(paddingOffset), zoom);\r\n\r\n\t\treturn {\r\n\t\t\tcenter: center,\r\n\t\t\tzoom: zoom\r\n\t\t};\r\n\t},\r\n\r\n\t// @method fitBounds(bounds: LatLngBounds, options: fitBounds options): this\r\n\t// Sets a map view that contains the given geographical bounds with the\r\n\t// maximum zoom level possible.\r\n\tfitBounds: function (bounds, options) {\r\n\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthrow new Error('Bounds are not valid.');\r\n\t\t}\r\n\r\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\r\n\t\treturn this.setView(target.center, target.zoom, options);\r\n\t},\r\n\r\n\t// @method fitWorld(options?: fitBounds options): this\r\n\t// Sets a map view that mostly contains the whole world with the maximum\r\n\t// zoom level possible.\r\n\tfitWorld: function (options) {\r\n\t\treturn this.fitBounds([[-90, -180], [90, 180]], options);\r\n\t},\r\n\r\n\t// @method panTo(latlng: LatLng, options?: Pan options): this\r\n\t// Pans the map to a given center.\r\n\tpanTo: function (center, options) { // (LatLng)\r\n\t\treturn this.setView(center, this._zoom, {pan: options});\r\n\t},\r\n\r\n\t// @method panBy(offset: Point): this\r\n\t// Pans the map by a given number of pixels (animated).\r\n\tpanBy: function (offset) { // (Point)\r\n\t\t// replaced with animated panBy in Map.PanAnimation.js\r\n\t\tthis.fire('movestart');\r\n\r\n\t\tthis._rawPanBy(L.point(offset));\r\n\r\n\t\tthis.fire('move');\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\t// @method setMaxBounds(bounds: Bounds): this\r\n\t// Restricts the map view to the given bounds (see the [maxBounds](#map-maxbounds) option).\r\n\tsetMaxBounds: function (bounds) {\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\r\n\t\tif (!bounds.isValid()) {\r\n\t\t\tthis.options.maxBounds = null;\r\n\t\t\treturn this.off('moveend', this._panInsideMaxBounds);\r\n\t\t} else if (this.options.maxBounds) {\r\n\t\t\tthis.off('moveend', this._panInsideMaxBounds);\r\n\t\t}\r\n\r\n\t\tthis.options.maxBounds = bounds;\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\tthis._panInsideMaxBounds();\r\n\t\t}\r\n\r\n\t\treturn this.on('moveend', this._panInsideMaxBounds);\r\n\t},\r\n\r\n\t// @method setMinZoom(zoom: Number): this\r\n\t// Sets the lower limit for the available zoom levels (see the [minZoom](#map-minzoom) option).\r\n\tsetMinZoom: function (zoom) {\r\n\t\tthis.options.minZoom = zoom;\r\n\r\n\t\tif (this._loaded && this.getZoom() < this.options.minZoom) {\r\n\t\t\treturn this.setZoom(zoom);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setMaxZoom(zoom: Number): this\r\n\t// Sets the upper limit for the available zoom levels (see the [maxZoom](#map-maxzoom) option).\r\n\tsetMaxZoom: function (zoom) {\r\n\t\tthis.options.maxZoom = zoom;\r\n\r\n\t\tif (this._loaded && (this.getZoom() > this.options.maxZoom)) {\r\n\t\t\treturn this.setZoom(zoom);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method panInsideBounds(bounds: LatLngBounds, options?: Pan options): this\r\n\t// Pans the map to the closest view that would lie inside the given bounds (if it's not already), controlling the animation using the options specific, if any.\r\n\tpanInsideBounds: function (bounds, options) {\r\n\t\tthis._enforcingBounds = true;\r\n\t\tvar center = this.getCenter(),\r\n\t\t newCenter = this._limitCenter(center, this._zoom, L.latLngBounds(bounds));\r\n\r\n\t\tif (!center.equals(newCenter)) {\r\n\t\t\tthis.panTo(newCenter, options);\r\n\t\t}\r\n\r\n\t\tthis._enforcingBounds = false;\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method invalidateSize(options: Zoom/Pan options): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default. If `options.pan` is `false`, panning will not occur.\r\n\t// If `options.debounceMoveend` is `true`, it will delay `moveend` event so\r\n\t// that it doesn't happen often even if the method is called many\r\n\t// times in a row.\r\n\r\n\t// @alternative\r\n\t// @method invalidateSize(animate: Boolean): this\r\n\t// Checks if the map container size changed and updates the map if so —\r\n\t// call it after you've changed the map size dynamically, also animating\r\n\t// pan by default.\r\n\tinvalidateSize: function (options) {\r\n\t\tif (!this._loaded) { return this; }\r\n\r\n\t\toptions = L.extend({\r\n\t\t\tanimate: false,\r\n\t\t\tpan: true\r\n\t\t}, options === true ? {animate: true} : options);\r\n\r\n\t\tvar oldSize = this.getSize();\r\n\t\tthis._sizeChanged = true;\r\n\t\tthis._lastCenter = null;\r\n\r\n\t\tvar newSize = this.getSize(),\r\n\t\t oldCenter = oldSize.divideBy(2).round(),\r\n\t\t newCenter = newSize.divideBy(2).round(),\r\n\t\t offset = oldCenter.subtract(newCenter);\r\n\r\n\t\tif (!offset.x && !offset.y) { return this; }\r\n\r\n\t\tif (options.animate && options.pan) {\r\n\t\t\tthis.panBy(offset);\r\n\r\n\t\t} else {\r\n\t\t\tif (options.pan) {\r\n\t\t\t\tthis._rawPanBy(offset);\r\n\t\t\t}\r\n\r\n\t\t\tthis.fire('move');\r\n\r\n\t\t\tif (options.debounceMoveend) {\r\n\t\t\t\tclearTimeout(this._sizeTimer);\r\n\t\t\t\tthis._sizeTimer = setTimeout(L.bind(this.fire, this, 'moveend'), 200);\r\n\t\t\t} else {\r\n\t\t\t\tthis.fire('moveend');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @section Map state change events\r\n\t\t// @event resize: ResizeEvent\r\n\t\t// Fired when the map is resized.\r\n\t\treturn this.fire('resize', {\r\n\t\t\toldSize: oldSize,\r\n\t\t\tnewSize: newSize\r\n\t\t});\r\n\t},\r\n\r\n\t// @section Methods for modifying map state\r\n\t// @method stop(): this\r\n\t// Stops the currently running `panTo` or `flyTo` animation, if any.\r\n\tstop: function () {\r\n\t\tthis.setZoom(this._limitZoom(this._zoom));\r\n\t\tif (!this.options.zoomSnap) {\r\n\t\t\tthis.fire('viewreset');\r\n\t\t}\r\n\t\treturn this._stop();\r\n\t},\r\n\r\n\r\n\t// TODO handler.addTo\r\n\t// TODO Appropiate docs section?\r\n\t// @section Other Methods\r\n\t// @method addHandler(name: String, HandlerClass: Function): this\r\n\t// Adds a new `Handler` to the map, given its name and constructor function.\r\n\taddHandler: function (name, HandlerClass) {\r\n\t\tif (!HandlerClass) { return this; }\r\n\r\n\t\tvar handler = this[name] = new HandlerClass(this);\r\n\r\n\t\tthis._handlers.push(handler);\r\n\r\n\t\tif (this.options[name]) {\r\n\t\t\thandler.enable();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove(): this\r\n\t// Destroys the map and clears all related event listeners.\r\n\tremove: function () {\r\n\r\n\t\tthis._initEvents(true);\r\n\r\n\t\tif (this._containerId !== this._container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is being reused by another instance');\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\t// throws error in IE6-8\r\n\t\t\tdelete this._container._leaflet_id;\r\n\t\t\tdelete this._containerId;\r\n\t\t} catch (e) {\r\n\t\t\t/*eslint-disable */\r\n\t\t\tthis._container._leaflet_id = undefined;\r\n\t\t\t/*eslint-enable */\r\n\t\t\tthis._containerId = undefined;\r\n\t\t}\r\n\r\n\t\tL.DomUtil.remove(this._mapPane);\r\n\r\n\t\tif (this._clearControlPos) {\r\n\t\t\tthis._clearControlPos();\r\n\t\t}\r\n\r\n\t\tthis._clearHandlers();\r\n\r\n\t\tif (this._loaded) {\r\n\t\t\t// @section Map state change events\r\n\t\t\t// @event unload: Event\r\n\t\t\t// Fired when the map is destroyed with [remove](#map-remove) method.\r\n\t\t\tthis.fire('unload');\r\n\t\t}\r\n\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tthis._layers[i].remove();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\t// @method createPane(name: String, container?: HTMLElement): HTMLElement\r\n\t// Creates a new [map pane](#map-pane) with the given name if it doesn't exist already,\r\n\t// then returns it. The pane is created as a children of `container`, or\r\n\t// as a children of the main map pane if not set.\r\n\tcreatePane: function (name, container) {\r\n\t\tvar className = 'leaflet-pane' + (name ? ' leaflet-' + name.replace('Pane', '') + '-pane' : ''),\r\n\t\t pane = L.DomUtil.create('div', className, container || this._mapPane);\r\n\r\n\t\tif (name) {\r\n\t\t\tthis._panes[name] = pane;\r\n\t\t}\r\n\t\treturn pane;\r\n\t},\r\n\r\n\t// @section Methods for Getting Map State\r\n\r\n\t// @method getCenter(): LatLng\r\n\t// Returns the geographical center of the map view\r\n\tgetCenter: function () {\r\n\t\tthis._checkIfLoaded();\r\n\r\n\t\tif (this._lastCenter && !this._moved()) {\r\n\t\t\treturn this._lastCenter;\r\n\t\t}\r\n\t\treturn this.layerPointToLatLng(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// @method getZoom(): Number\r\n\t// Returns the current zoom level of the map view\r\n\tgetZoom: function () {\r\n\t\treturn this._zoom;\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the geographical bounds visible in the current map view\r\n\tgetBounds: function () {\r\n\t\tvar bounds = this.getPixelBounds(),\r\n\t\t sw = this.unproject(bounds.getBottomLeft()),\r\n\t\t ne = this.unproject(bounds.getTopRight());\r\n\r\n\t\treturn new L.LatLngBounds(sw, ne);\r\n\t},\r\n\r\n\t// @method getMinZoom(): Number\r\n\t// Returns the minimum zoom level of the map (if set in the `minZoom` option of the map or of any layers), or `0` by default.\r\n\tgetMinZoom: function () {\r\n\t\treturn this.options.minZoom === undefined ? this._layersMinZoom || 0 : this.options.minZoom;\r\n\t},\r\n\r\n\t// @method getMaxZoom(): Number\r\n\t// Returns the maximum zoom level of the map (if set in the `maxZoom` option of the map or of any layers).\r\n\tgetMaxZoom: function () {\r\n\t\treturn this.options.maxZoom === undefined ?\r\n\t\t\t(this._layersMaxZoom === undefined ? Infinity : this._layersMaxZoom) :\r\n\t\t\tthis.options.maxZoom;\r\n\t},\r\n\r\n\t// @method getBoundsZoom(bounds: LatLngBounds, inside?: Boolean): Number\r\n\t// Returns the maximum zoom level on which the given bounds fit to the map\r\n\t// view in its entirety. If `inside` (optional) is set to `true`, the method\r\n\t// instead returns the minimum zoom level on which the map view fits into\r\n\t// the given bounds in its entirety.\r\n\tgetBoundsZoom: function (bounds, inside, padding) { // (LatLngBounds[, Boolean, Point]) -> Number\r\n\t\tbounds = L.latLngBounds(bounds);\r\n\t\tpadding = L.point(padding || [0, 0]);\r\n\r\n\t\tvar zoom = this.getZoom() || 0,\r\n\t\t min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t nw = bounds.getNorthWest(),\r\n\t\t se = bounds.getSouthEast(),\r\n\t\t size = this.getSize().subtract(padding),\r\n\t\t boundsSize = this.project(se, zoom).subtract(this.project(nw, zoom)),\r\n\t\t snap = L.Browser.any3d ? this.options.zoomSnap : 1;\r\n\r\n\t\tvar scale = Math.min(size.x / boundsSize.x, size.y / boundsSize.y);\r\n\t\tzoom = this.getScaleZoom(scale, zoom);\r\n\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / (snap / 100)) * (snap / 100); // don't jump if within 1% of a snap level\r\n\t\t\tzoom = inside ? Math.ceil(zoom / snap) * snap : Math.floor(zoom / snap) * snap;\r\n\t\t}\r\n\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t},\r\n\r\n\t// @method getSize(): Point\r\n\t// Returns the current size of the map container (in pixels).\r\n\tgetSize: function () {\r\n\t\tif (!this._size || this._sizeChanged) {\r\n\t\t\tthis._size = new L.Point(\r\n\t\t\t\tthis._container.clientWidth,\r\n\t\t\t\tthis._container.clientHeight);\r\n\r\n\t\t\tthis._sizeChanged = false;\r\n\t\t}\r\n\t\treturn this._size.clone();\r\n\t},\r\n\r\n\t// @method getPixelBounds(): Bounds\r\n\t// Returns the bounds of the current map view in projected pixel\r\n\t// coordinates (sometimes useful in layer and overlay implementations).\r\n\tgetPixelBounds: function (center, zoom) {\r\n\t\tvar topLeftPoint = this._getTopLeftPoint(center, zoom);\r\n\t\treturn new L.Bounds(topLeftPoint, topLeftPoint.add(this.getSize()));\r\n\t},\r\n\r\n\t// TODO: Check semantics - isn't the pixel origin the 0,0 coord relative to\r\n\t// the map pane? \"left point of the map layer\" can be confusing, specially\r\n\t// since there can be negative offsets.\r\n\t// @method getPixelOrigin(): Point\r\n\t// Returns the projected pixel coordinates of the top left point of\r\n\t// the map layer (useful in custom layer and overlay implementations).\r\n\tgetPixelOrigin: function () {\r\n\t\tthis._checkIfLoaded();\r\n\t\treturn this._pixelOrigin;\r\n\t},\r\n\r\n\t// @method getPixelWorldBounds(zoom?: Number): Bounds\r\n\t// Returns the world's bounds in pixel coordinates for zoom level `zoom`.\r\n\t// If `zoom` is omitted, the map's current zoom level is used.\r\n\tgetPixelWorldBounds: function (zoom) {\r\n\t\treturn this.options.crs.getProjectedBounds(zoom === undefined ? this.getZoom() : zoom);\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method getPane(pane: String|HTMLElement): HTMLElement\r\n\t// Returns a [map pane](#map-pane), given its name or its HTML element (its identity).\r\n\tgetPane: function (pane) {\r\n\t\treturn typeof pane === 'string' ? this._panes[pane] : pane;\r\n\t},\r\n\r\n\t// @method getPanes(): Object\r\n\t// Returns a plain object containing the names of all [panes](#map-pane) as keys and\r\n\t// the panes as values.\r\n\tgetPanes: function () {\r\n\t\treturn this._panes;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTML element that contains the map.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\r\n\t// @section Conversion Methods\r\n\r\n\t// @method getZoomScale(toZoom: Number, fromZoom: Number): Number\r\n\t// Returns the scale factor to be applied to a map transition from zoom level\r\n\t// `fromZoom` to `toZoom`. Used internally to help with zoom animations.\r\n\tgetZoomScale: function (toZoom, fromZoom) {\r\n\t\t// TODO replace with universal implementation after refactoring projections\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\treturn crs.scale(toZoom) / crs.scale(fromZoom);\r\n\t},\r\n\r\n\t// @method getScaleZoom(scale: Number, fromZoom: Number): Number\r\n\t// Returns the zoom level that the map would end up at, if it is at `fromZoom`\r\n\t// level and everything is scaled by a factor of `scale`. Inverse of\r\n\t// [`getZoomScale`](#map-getZoomScale).\r\n\tgetScaleZoom: function (scale, fromZoom) {\r\n\t\tvar crs = this.options.crs;\r\n\t\tfromZoom = fromZoom === undefined ? this._zoom : fromZoom;\r\n\t\tvar zoom = crs.zoom(scale * crs.scale(fromZoom));\r\n\t\treturn isNaN(zoom) ? Infinity : zoom;\r\n\t},\r\n\r\n\t// @method project(latlng: LatLng, zoom: Number): Point\r\n\t// Projects a geographical coordinate `LatLng` according to the projection\r\n\t// of the map's CRS, then scales it according to `zoom` and the CRS's\r\n\t// `Transformation`. The result is pixel coordinate relative to\r\n\t// the CRS origin.\r\n\tproject: function (latlng, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.latLngToPoint(L.latLng(latlng), zoom);\r\n\t},\r\n\r\n\t// @method unproject(point: Point, zoom: Number): LatLng\r\n\t// Inverse of [`project`](#map-project).\r\n\tunproject: function (point, zoom) {\r\n\t\tzoom = zoom === undefined ? this._zoom : zoom;\r\n\t\treturn this.options.crs.pointToLatLng(L.point(point), zoom);\r\n\t},\r\n\r\n\t// @method layerPointToLatLng(point: Point): LatLng\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding geographical coordinate (for the current zoom level).\r\n\tlayerPointToLatLng: function (point) {\r\n\t\tvar projectedPoint = L.point(point).add(this.getPixelOrigin());\r\n\t\treturn this.unproject(projectedPoint);\r\n\t},\r\n\r\n\t// @method latLngToLayerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the [origin pixel](#map-getpixelorigin).\r\n\tlatLngToLayerPoint: function (latlng) {\r\n\t\tvar projectedPoint = this.project(L.latLng(latlng))._round();\r\n\t\treturn projectedPoint._subtract(this.getPixelOrigin());\r\n\t},\r\n\r\n\t// @method wrapLatLng(latlng: LatLng): LatLng\r\n\t// Returns a `LatLng` where `lat` and `lng` has been wrapped according to the\r\n\t// map's CRS's `wrapLat` and `wrapLng` properties, if they are outside the\r\n\t// CRS's bounds.\r\n\t// By default this means longitude is wrapped around the dateline so its\r\n\t// value is between -180 and +180 degrees.\r\n\twrapLatLng: function (latlng) {\r\n\t\treturn this.options.crs.wrapLatLng(L.latLng(latlng));\r\n\t},\r\n\r\n\t// @method distance(latlng1: LatLng, latlng2: LatLng): Number\r\n\t// Returns the distance between two geographical coordinates according to\r\n\t// the map's CRS. By default this measures distance in meters.\r\n\tdistance: function (latlng1, latlng2) {\r\n\t\treturn this.options.crs.distance(L.latLng(latlng1), L.latLng(latlng2));\r\n\t},\r\n\r\n\t// @method containerPointToLayerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns the corresponding\r\n\t// pixel coordinate relative to the [origin pixel](#map-getpixelorigin).\r\n\tcontainerPointToLayerPoint: function (point) { // (Point)\r\n\t\treturn L.point(point).subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method layerPointToContainerPoint(point: Point): Point\r\n\t// Given a pixel coordinate relative to the [origin pixel](#map-getpixelorigin),\r\n\t// returns the corresponding pixel coordinate relative to the map container.\r\n\tlayerPointToContainerPoint: function (point) { // (Point)\r\n\t\treturn L.point(point).add(this._getMapPanePos());\r\n\t},\r\n\r\n\t// @method containerPointToLatLng(point: Point): Point\r\n\t// Given a pixel coordinate relative to the map container, returns\r\n\t// the corresponding geographical coordinate (for the current zoom level).\r\n\tcontainerPointToLatLng: function (point) {\r\n\t\tvar layerPoint = this.containerPointToLayerPoint(L.point(point));\r\n\t\treturn this.layerPointToLatLng(layerPoint);\r\n\t},\r\n\r\n\t// @method latLngToContainerPoint(latlng: LatLng): Point\r\n\t// Given a geographical coordinate, returns the corresponding pixel coordinate\r\n\t// relative to the map container.\r\n\tlatLngToContainerPoint: function (latlng) {\r\n\t\treturn this.layerPointToContainerPoint(this.latLngToLayerPoint(L.latLng(latlng)));\r\n\t},\r\n\r\n\t// @method mouseEventToContainerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to the\r\n\t// map container where the event took place.\r\n\tmouseEventToContainerPoint: function (e) {\r\n\t\treturn L.DomEvent.getMousePosition(e, this._container);\r\n\t},\r\n\r\n\t// @method mouseEventToLayerPoint(ev: MouseEvent): Point\r\n\t// Given a MouseEvent object, returns the pixel coordinate relative to\r\n\t// the [origin pixel](#map-getpixelorigin) where the event took place.\r\n\tmouseEventToLayerPoint: function (e) {\r\n\t\treturn this.containerPointToLayerPoint(this.mouseEventToContainerPoint(e));\r\n\t},\r\n\r\n\t// @method mouseEventToLatLng(ev: MouseEvent): LatLng\r\n\t// Given a MouseEvent object, returns geographical coordinate where the\r\n\t// event took place.\r\n\tmouseEventToLatLng: function (e) { // (MouseEvent)\r\n\t\treturn this.layerPointToLatLng(this.mouseEventToLayerPoint(e));\r\n\t},\r\n\r\n\r\n\t// map initialization methods\r\n\r\n\t_initContainer: function (id) {\r\n\t\tvar container = this._container = L.DomUtil.get(id);\r\n\r\n\t\tif (!container) {\r\n\t\t\tthrow new Error('Map container not found.');\r\n\t\t} else if (container._leaflet_id) {\r\n\t\t\tthrow new Error('Map container is already initialized.');\r\n\t\t}\r\n\r\n\t\tL.DomEvent.addListener(container, 'scroll', this._onScroll, this);\r\n\t\tthis._containerId = L.Util.stamp(container);\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar container = this._container;\r\n\r\n\t\tthis._fadeAnimated = this.options.fadeAnimation && L.Browser.any3d;\r\n\r\n\t\tL.DomUtil.addClass(container, 'leaflet-container' +\r\n\t\t\t(L.Browser.touch ? ' leaflet-touch' : '') +\r\n\t\t\t(L.Browser.retina ? ' leaflet-retina' : '') +\r\n\t\t\t(L.Browser.ielt9 ? ' leaflet-oldie' : '') +\r\n\t\t\t(L.Browser.safari ? ' leaflet-safari' : '') +\r\n\t\t\t(this._fadeAnimated ? ' leaflet-fade-anim' : ''));\r\n\r\n\t\tvar position = L.DomUtil.getStyle(container, 'position');\r\n\r\n\t\tif (position !== 'absolute' && position !== 'relative' && position !== 'fixed') {\r\n\t\t\tcontainer.style.position = 'relative';\r\n\t\t}\r\n\r\n\t\tthis._initPanes();\r\n\r\n\t\tif (this._initControlPos) {\r\n\t\t\tthis._initControlPos();\r\n\t\t}\r\n\t},\r\n\r\n\t_initPanes: function () {\r\n\t\tvar panes = this._panes = {};\r\n\t\tthis._paneRenderers = {};\r\n\r\n\t\t// @section\r\n\t\t//\r\n\t\t// Panes are DOM elements used to control the ordering of layers on the map. You\r\n\t\t// can access panes with [`map.getPane`](#map-getpane) or\r\n\t\t// [`map.getPanes`](#map-getpanes) methods. New panes can be created with the\r\n\t\t// [`map.createPane`](#map-createpane) method.\r\n\t\t//\r\n\t\t// Every map has the following default panes that differ only in zIndex.\r\n\t\t//\r\n\t\t// @pane mapPane: HTMLElement = 'auto'\r\n\t\t// Pane that contains all other map panes\r\n\r\n\t\tthis._mapPane = this.createPane('mapPane', this._container);\r\n\t\tL.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\r\n\r\n\t\t// @pane tilePane: HTMLElement = 200\r\n\t\t// Pane for `GridLayer`s and `TileLayer`s\r\n\t\tthis.createPane('tilePane');\r\n\t\t// @pane overlayPane: HTMLElement = 400\r\n\t\t// Pane for vector overlays (`Path`s), like `Polyline`s and `Polygon`s\r\n\t\tthis.createPane('shadowPane');\r\n\t\t// @pane shadowPane: HTMLElement = 500\r\n\t\t// Pane for overlay shadows (e.g. `Marker` shadows)\r\n\t\tthis.createPane('overlayPane');\r\n\t\t// @pane markerPane: HTMLElement = 600\r\n\t\t// Pane for `Icon`s of `Marker`s\r\n\t\tthis.createPane('markerPane');\r\n\t\t// @pane tooltipPane: HTMLElement = 650\r\n\t\t// Pane for tooltip.\r\n\t\tthis.createPane('tooltipPane');\r\n\t\t// @pane popupPane: HTMLElement = 700\r\n\t\t// Pane for `Popup`s.\r\n\t\tthis.createPane('popupPane');\r\n\r\n\t\tif (!this.options.markerZoomAnimation) {\r\n\t\t\tL.DomUtil.addClass(panes.markerPane, 'leaflet-zoom-hide');\r\n\t\t\tL.DomUtil.addClass(panes.shadowPane, 'leaflet-zoom-hide');\r\n\t\t}\r\n\t},\r\n\r\n\r\n\t// private methods that modify map state\r\n\r\n\t// @section Map state change events\r\n\t_resetView: function (center, zoom) {\r\n\t\tL.DomUtil.setPosition(this._mapPane, new L.Point(0, 0));\r\n\r\n\t\tvar loading = !this._loaded;\r\n\t\tthis._loaded = true;\r\n\t\tzoom = this._limitZoom(zoom);\r\n\r\n\t\tthis.fire('viewprereset');\r\n\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\t\tthis\r\n\t\t\t._moveStart(zoomChanged)\r\n\t\t\t._move(center, zoom)\r\n\t\t\t._moveEnd(zoomChanged);\r\n\r\n\t\t// @event viewreset: Event\r\n\t\t// Fired when the map needs to redraw its content (this usually happens\r\n\t\t// on map zoom or load). Very useful for creating custom overlays.\r\n\t\tthis.fire('viewreset');\r\n\r\n\t\t// @event load: Event\r\n\t\t// Fired when the map is initialized (when its center and zoom are set\r\n\t\t// for the first time).\r\n\t\tif (loading) {\r\n\t\t\tthis.fire('load');\r\n\t\t}\r\n\t},\r\n\r\n\t_moveStart: function (zoomChanged) {\r\n\t\t// @event zoomstart: Event\r\n\t\t// Fired when the map zoom is about to change (e.g. before zoom animation).\r\n\t\t// @event movestart: Event\r\n\t\t// Fired when the view of the map starts changing (e.g. user starts dragging the map).\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomstart');\r\n\t\t}\r\n\t\treturn this.fire('movestart');\r\n\t},\r\n\r\n\t_move: function (center, zoom, data) {\r\n\t\tif (zoom === undefined) {\r\n\t\t\tzoom = this._zoom;\r\n\t\t}\r\n\t\tvar zoomChanged = this._zoom !== zoom;\r\n\r\n\t\tthis._zoom = zoom;\r\n\t\tthis._lastCenter = center;\r\n\t\tthis._pixelOrigin = this._getNewPixelOrigin(center);\r\n\r\n\t\t// @event zoom: Event\r\n\t\t// Fired repeatedly during any change in zoom level, including zoom\r\n\t\t// and fly animations.\r\n\t\tif (zoomChanged || (data && data.pinch)) {\t// Always fire 'zoom' if pinching because #3530\r\n\t\t\tthis.fire('zoom', data);\r\n\t\t}\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired repeatedly during any movement of the map, including pan and\r\n\t\t// fly animations.\r\n\t\treturn this.fire('move', data);\r\n\t},\r\n\r\n\t_moveEnd: function (zoomChanged) {\r\n\t\t// @event zoomend: Event\r\n\t\t// Fired when the map has changed, after any animations.\r\n\t\tif (zoomChanged) {\r\n\t\t\tthis.fire('zoomend');\r\n\t\t}\r\n\r\n\t\t// @event moveend: Event\r\n\t\t// Fired when the center of the map stops changing (e.g. user stopped\r\n\t\t// dragging the map).\r\n\t\treturn this.fire('moveend');\r\n\t},\r\n\r\n\t_stop: function () {\r\n\t\tL.Util.cancelAnimFrame(this._flyToFrame);\r\n\t\tif (this._panAnim) {\r\n\t\t\tthis._panAnim.stop();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_rawPanBy: function (offset) {\r\n\t\tL.DomUtil.setPosition(this._mapPane, this._getMapPanePos().subtract(offset));\r\n\t},\r\n\r\n\t_getZoomSpan: function () {\r\n\t\treturn this.getMaxZoom() - this.getMinZoom();\r\n\t},\r\n\r\n\t_panInsideMaxBounds: function () {\r\n\t\tif (!this._enforcingBounds) {\r\n\t\t\tthis.panInsideBounds(this.options.maxBounds);\r\n\t\t}\r\n\t},\r\n\r\n\t_checkIfLoaded: function () {\r\n\t\tif (!this._loaded) {\r\n\t\t\tthrow new Error('Set map center and zoom first.');\r\n\t\t}\r\n\t},\r\n\r\n\t// DOM event handling\r\n\r\n\t// @section Interaction events\r\n\t_initEvents: function (remove) {\r\n\t\tif (!L.DomEvent) { return; }\r\n\r\n\t\tthis._targets = {};\r\n\t\tthis._targets[L.stamp(this._container)] = this;\r\n\r\n\t\tvar onOff = remove ? 'off' : 'on';\r\n\r\n\t\t// @event click: MouseEvent\r\n\t\t// Fired when the user clicks (or taps) the map.\r\n\t\t// @event dblclick: MouseEvent\r\n\t\t// Fired when the user double-clicks (or double-taps) the map.\r\n\t\t// @event mousedown: MouseEvent\r\n\t\t// Fired when the user pushes the mouse button on the map.\r\n\t\t// @event mouseup: MouseEvent\r\n\t\t// Fired when the user releases the mouse button on the map.\r\n\t\t// @event mouseover: MouseEvent\r\n\t\t// Fired when the mouse enters the map.\r\n\t\t// @event mouseout: MouseEvent\r\n\t\t// Fired when the mouse leaves the map.\r\n\t\t// @event mousemove: MouseEvent\r\n\t\t// Fired while the mouse moves over the map.\r\n\t\t// @event contextmenu: MouseEvent\r\n\t\t// Fired when the user pushes the right mouse button on the map, prevents\r\n\t\t// default browser context menu from showing if there are listeners on\r\n\t\t// this event. Also fired on mobile when the user holds a single touch\r\n\t\t// for a second (also called long press).\r\n\t\t// @event keypress: KeyboardEvent\r\n\t\t// Fired when the user presses a key from the keyboard while the map is focused.\r\n\t\tL.DomEvent[onOff](this._container, 'click dblclick mousedown mouseup ' +\r\n\t\t\t'mouseover mouseout mousemove contextmenu keypress', this._handleDOMEvent, this);\r\n\r\n\t\tif (this.options.trackResize) {\r\n\t\t\tL.DomEvent[onOff](window, 'resize', this._onResize, this);\r\n\t\t}\r\n\r\n\t\tif (L.Browser.any3d && this.options.transform3DLimit) {\r\n\t\t\tthis[onOff]('moveend', this._onMoveEnd);\r\n\t\t}\r\n\t},\r\n\r\n\t_onResize: function () {\r\n\t\tL.Util.cancelAnimFrame(this._resizeRequest);\r\n\t\tthis._resizeRequest = L.Util.requestAnimFrame(\r\n\t\t function () { this.invalidateSize({debounceMoveend: true}); }, this);\r\n\t},\r\n\r\n\t_onScroll: function () {\r\n\t\tthis._container.scrollTop = 0;\r\n\t\tthis._container.scrollLeft = 0;\r\n\t},\r\n\r\n\t_onMoveEnd: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\tif (Math.max(Math.abs(pos.x), Math.abs(pos.y)) >= this.options.transform3DLimit) {\r\n\t\t\t// https://bugzilla.mozilla.org/show_bug.cgi?id=1203873 but Webkit also have\r\n\t\t\t// a pixel offset on very high values, see: http://jsfiddle.net/dg6r5hhb/\r\n\t\t\tthis._resetView(this.getCenter(), this.getZoom());\r\n\t\t}\r\n\t},\r\n\r\n\t_findEventTargets: function (e, type) {\r\n\t\tvar targets = [],\r\n\t\t target,\r\n\t\t isHover = type === 'mouseout' || type === 'mouseover',\r\n\t\t src = e.target || e.srcElement,\r\n\t\t dragging = false;\r\n\r\n\t\twhile (src) {\r\n\t\t\ttarget = this._targets[L.stamp(src)];\r\n\t\t\tif (target && (type === 'click' || type === 'preclick') && !e._simulated && this._draggableMoved(target)) {\r\n\t\t\t\t// Prevent firing click after you just dragged an object.\r\n\t\t\t\tdragging = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (target && target.listens(type, true)) {\r\n\t\t\t\tif (isHover && !L.DomEvent._isExternalTarget(src, e)) { break; }\r\n\t\t\t\ttargets.push(target);\r\n\t\t\t\tif (isHover) { break; }\r\n\t\t\t}\r\n\t\t\tif (src === this._container) { break; }\r\n\t\t\tsrc = src.parentNode;\r\n\t\t}\r\n\t\tif (!targets.length && !dragging && !isHover && L.DomEvent._isExternalTarget(src, e)) {\r\n\t\t\ttargets = [this];\r\n\t\t}\r\n\t\treturn targets;\r\n\t},\r\n\r\n\t_handleDOMEvent: function (e) {\r\n\t\tif (!this._loaded || L.DomEvent._skipped(e)) { return; }\r\n\r\n\t\tvar type = e.type === 'keypress' && e.keyCode === 13 ? 'click' : e.type;\r\n\r\n\t\tif (type === 'mousedown') {\r\n\t\t\t// prevents outline when clicking on keyboard-focusable element\r\n\t\t\tL.DomUtil.preventOutline(e.target || e.srcElement);\r\n\t\t}\r\n\r\n\t\tthis._fireDOMEvent(e, type);\r\n\t},\r\n\r\n\t_fireDOMEvent: function (e, type, targets) {\r\n\r\n\t\tif (e.type === 'click') {\r\n\t\t\t// Fire a synthetic 'preclick' event which propagates up (mainly for closing popups).\r\n\t\t\t// @event preclick: MouseEvent\r\n\t\t\t// Fired before mouse click on the map (sometimes useful when you\r\n\t\t\t// want something to happen on click before any existing click\r\n\t\t\t// handlers start running).\r\n\t\t\tvar synth = L.Util.extend({}, e);\r\n\t\t\tsynth.type = 'preclick';\r\n\t\t\tthis._fireDOMEvent(synth, synth.type, targets);\r\n\t\t}\r\n\r\n\t\tif (e._stopped) { return; }\r\n\r\n\t\t// Find the layer the event is propagating from and its parents.\r\n\t\ttargets = (targets || []).concat(this._findEventTargets(e, type));\r\n\r\n\t\tif (!targets.length) { return; }\r\n\r\n\t\tvar target = targets[0];\r\n\t\tif (type === 'contextmenu' && target.listens(type, true)) {\r\n\t\t\tL.DomEvent.preventDefault(e);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\toriginalEvent: e\r\n\t\t};\r\n\r\n\t\tif (e.type !== 'keypress') {\r\n\t\t\tvar isMarker = target instanceof L.Marker;\r\n\t\t\tdata.containerPoint = isMarker ?\r\n\t\t\t\t\tthis.latLngToContainerPoint(target.getLatLng()) : this.mouseEventToContainerPoint(e);\r\n\t\t\tdata.layerPoint = this.containerPointToLayerPoint(data.containerPoint);\r\n\t\t\tdata.latlng = isMarker ? target.getLatLng() : this.layerPointToLatLng(data.layerPoint);\r\n\t\t}\r\n\r\n\t\tfor (var i = 0; i < targets.length; i++) {\r\n\t\t\ttargets[i].fire(type, data, true);\r\n\t\t\tif (data.originalEvent._stopped ||\r\n\t\t\t\t(targets[i].options.nonBubblingEvents && L.Util.indexOf(targets[i].options.nonBubblingEvents, type) !== -1)) { return; }\r\n\t\t}\r\n\t},\r\n\r\n\t_draggableMoved: function (obj) {\r\n\t\tobj = obj.dragging && obj.dragging.enabled() ? obj : this;\r\n\t\treturn (obj.dragging && obj.dragging.moved()) || (this.boxZoom && this.boxZoom.moved());\r\n\t},\r\n\r\n\t_clearHandlers: function () {\r\n\t\tfor (var i = 0, len = this._handlers.length; i < len; i++) {\r\n\t\t\tthis._handlers[i].disable();\r\n\t\t}\r\n\t},\r\n\r\n\t// @section Other Methods\r\n\r\n\t// @method whenReady(fn: Function, context?: Object): this\r\n\t// Runs the given function `fn` when the map gets initialized with\r\n\t// a view (center and zoom) and at least one layer, or immediately\r\n\t// if it's already initialized, optionally passing a function context.\r\n\twhenReady: function (callback, context) {\r\n\t\tif (this._loaded) {\r\n\t\t\tcallback.call(context || this, {target: this});\r\n\t\t} else {\r\n\t\t\tthis.on('load', callback, context);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\r\n\t// private methods for getting map state\r\n\r\n\t_getMapPanePos: function () {\r\n\t\treturn L.DomUtil.getPosition(this._mapPane) || new L.Point(0, 0);\r\n\t},\r\n\r\n\t_moved: function () {\r\n\t\tvar pos = this._getMapPanePos();\r\n\t\treturn pos && !pos.equals([0, 0]);\r\n\t},\r\n\r\n\t_getTopLeftPoint: function (center, zoom) {\r\n\t\tvar pixelOrigin = center && zoom !== undefined ?\r\n\t\t\tthis._getNewPixelOrigin(center, zoom) :\r\n\t\t\tthis.getPixelOrigin();\r\n\t\treturn pixelOrigin.subtract(this._getMapPanePos());\r\n\t},\r\n\r\n\t_getNewPixelOrigin: function (center, zoom) {\r\n\t\tvar viewHalf = this.getSize()._divideBy(2);\r\n\t\treturn this.project(center, zoom)._subtract(viewHalf)._add(this._getMapPanePos())._round();\r\n\t},\r\n\r\n\t_latLngToNewLayerPoint: function (latlng, zoom, center) {\r\n\t\tvar topLeft = this._getNewPixelOrigin(center, zoom);\r\n\t\treturn this.project(latlng, zoom)._subtract(topLeft);\r\n\t},\r\n\r\n\t// layer point of the current center\r\n\t_getCenterLayerPoint: function () {\r\n\t\treturn this.containerPointToLayerPoint(this.getSize()._divideBy(2));\r\n\t},\r\n\r\n\t// offset of the specified place to the current center in pixels\r\n\t_getCenterOffset: function (latlng) {\r\n\t\treturn this.latLngToLayerPoint(latlng).subtract(this._getCenterLayerPoint());\r\n\t},\r\n\r\n\t// adjust center for view to get inside bounds\r\n\t_limitCenter: function (center, zoom, bounds) {\r\n\r\n\t\tif (!bounds) { return center; }\r\n\r\n\t\tvar centerPoint = this.project(center, zoom),\r\n\t\t viewHalf = this.getSize().divideBy(2),\r\n\t\t viewBounds = new L.Bounds(centerPoint.subtract(viewHalf), centerPoint.add(viewHalf)),\r\n\t\t offset = this._getBoundsOffset(viewBounds, bounds, zoom);\r\n\r\n\t\t// If offset is less than a pixel, ignore.\r\n\t\t// This prevents unstable projections from getting into\r\n\t\t// an infinite loop of tiny offsets.\r\n\t\tif (offset.round().equals([0, 0])) {\r\n\t\t\treturn center;\r\n\t\t}\r\n\r\n\t\treturn this.unproject(centerPoint.add(offset), zoom);\r\n\t},\r\n\r\n\t// adjust offset for view to get inside bounds\r\n\t_limitOffset: function (offset, bounds) {\r\n\t\tif (!bounds) { return offset; }\r\n\r\n\t\tvar viewBounds = this.getPixelBounds(),\r\n\t\t newBounds = new L.Bounds(viewBounds.min.add(offset), viewBounds.max.add(offset));\r\n\r\n\t\treturn offset.add(this._getBoundsOffset(newBounds, bounds));\r\n\t},\r\n\r\n\t// returns offset needed for pxBounds to get inside maxBounds at a specified zoom\r\n\t_getBoundsOffset: function (pxBounds, maxBounds, zoom) {\r\n\t\tvar projectedMaxBounds = L.bounds(\r\n\t\t this.project(maxBounds.getNorthEast(), zoom),\r\n\t\t this.project(maxBounds.getSouthWest(), zoom)\r\n\t\t ),\r\n\t\t minOffset = projectedMaxBounds.min.subtract(pxBounds.min),\r\n\t\t maxOffset = projectedMaxBounds.max.subtract(pxBounds.max),\r\n\r\n\t\t dx = this._rebound(minOffset.x, -maxOffset.x),\r\n\t\t dy = this._rebound(minOffset.y, -maxOffset.y);\r\n\r\n\t\treturn new L.Point(dx, dy);\r\n\t},\r\n\r\n\t_rebound: function (left, right) {\r\n\t\treturn left + right > 0 ?\r\n\t\t\tMath.round(left - right) / 2 :\r\n\t\t\tMath.max(0, Math.ceil(left)) - Math.max(0, Math.floor(right));\r\n\t},\r\n\r\n\t_limitZoom: function (zoom) {\r\n\t\tvar min = this.getMinZoom(),\r\n\t\t max = this.getMaxZoom(),\r\n\t\t snap = L.Browser.any3d ? this.options.zoomSnap : 1;\r\n\t\tif (snap) {\r\n\t\t\tzoom = Math.round(zoom / snap) * snap;\r\n\t\t}\r\n\t\treturn Math.max(min, Math.min(max, zoom));\r\n\t}\r\n});\r\n\r\n// @section\r\n\r\n// @factory L.map(id: String, options?: Map options)\r\n// Instantiates a map object given the DOM ID of a `<div>` element\r\n// and optionally an object literal with `Map options`.\r\n//\r\n// @alternative\r\n// @factory L.map(el: HTMLElement, options?: Map options)\r\n// Instantiates a map object given an instance of a `<div>` HTML element\r\n// and optionally an object literal with `Map options`.\r\nL.map = function (id, options) {\r\n\treturn new L.Map(id, options);\r\n};\r\n","\n/*\n * @class Layer\n * @inherits Evented\n * @aka L.Layer\n * @aka ILayer\n *\n * A set of methods from the Layer base class that all Leaflet layers use.\n * Inherits all methods, options and events from `L.Evented`.\n *\n * @example\n *\n * ```js\n * var layer = L.Marker(latlng).addTo(map);\n * layer.addTo(map);\n * layer.remove();\n * ```\n *\n * @event add: Event\n * Fired after the layer is added to a map\n *\n * @event remove: Event\n * Fired after the layer is removed from a map\n */\n\n\nL.Layer = L.Evented.extend({\n\n\t// Classes extending `L.Layer` will inherit the following options:\n\toptions: {\n\t\t// @option pane: String = 'overlayPane'\n\t\t// By default the layer will be added to the map's [overlay pane](#map-overlaypane). Overriding this option will cause the layer to be placed on another pane by default.\n\t\tpane: 'overlayPane',\n\t\tnonBubblingEvents: [] // Array of events that should not be bubbled to DOM parents (like the map)\n\t},\n\n\t/* @section\n\t * Classes extending `L.Layer` will inherit the following methods:\n\t *\n\t * @method addTo(map: Map): this\n\t * Adds the layer to the given map\n\t */\n\taddTo: function (map) {\n\t\tmap.addLayer(this);\n\t\treturn this;\n\t},\n\n\t// @method remove: this\n\t// Removes the layer from the map it is currently active on.\n\tremove: function () {\n\t\treturn this.removeFrom(this._map || this._mapToAdd);\n\t},\n\n\t// @method removeFrom(map: Map): this\n\t// Removes the layer from the given map\n\tremoveFrom: function (obj) {\n\t\tif (obj) {\n\t\t\tobj.removeLayer(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getPane(name? : String): HTMLElement\n\t// Returns the `HTMLElement` representing the named pane on the map. If `name` is omitted, returns the pane for this layer.\n\tgetPane: function (name) {\n\t\treturn this._map.getPane(name ? (this.options[name] || name) : this.options.pane);\n\t},\n\n\taddInteractiveTarget: function (targetEl) {\n\t\tthis._map._targets[L.stamp(targetEl)] = this;\n\t\treturn this;\n\t},\n\n\tremoveInteractiveTarget: function (targetEl) {\n\t\tdelete this._map._targets[L.stamp(targetEl)];\n\t\treturn this;\n\t},\n\n\t_layerAdd: function (e) {\n\t\tvar map = e.target;\n\n\t\t// check in case layer gets added and then removed before the map is ready\n\t\tif (!map.hasLayer(this)) { return; }\n\n\t\tthis._map = map;\n\t\tthis._zoomAnimated = map._zoomAnimated;\n\n\t\tif (this.getEvents) {\n\t\t\tvar events = this.getEvents();\n\t\t\tmap.on(events, this);\n\t\t\tthis.once('remove', function () {\n\t\t\t\tmap.off(events, this);\n\t\t\t}, this);\n\t\t}\n\n\t\tthis.onAdd(map);\n\n\t\tif (this.getAttribution && this._map.attributionControl) {\n\t\t\tthis._map.attributionControl.addAttribution(this.getAttribution());\n\t\t}\n\n\t\tthis.fire('add');\n\t\tmap.fire('layeradd', {layer: this});\n\t}\n});\n\n/* @section Extension methods\n * @uninheritable\n *\n * Every layer should extend from `L.Layer` and (re-)implement the following methods.\n *\n * @method onAdd(map: Map): this\n * Should contain code that creates DOM elements for the layer, adds them to `map panes` where they should belong and puts listeners on relevant map events. Called on [`map.addLayer(layer)`](#map-addlayer).\n *\n * @method onRemove(map: Map): this\n * Should contain all clean up code that removes the layer's elements from the DOM and removes listeners previously added in [`onAdd`](#layer-onadd). Called on [`map.removeLayer(layer)`](#map-removelayer).\n *\n * @method getEvents(): Object\n * This optional method should return an object like `{ viewreset: this._reset }` for [`addEventListener`](#evented-addeventlistener). The event handlers in this object will be automatically added and removed from the map with your layer.\n *\n * @method getAttribution(): String\n * This optional method should return a string containing HTML to be shown on the `Attribution control` whenever the layer is visible.\n *\n * @method beforeAdd(map: Map): this\n * Optional method. Called on [`map.addLayer(layer)`](#map-addlayer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.\n */\n\n\n/* @namespace Map\n * @section Layer events\n *\n * @event layeradd: LayerEvent\n * Fired when a new layer is added to the map.\n *\n * @event layerremove: LayerEvent\n * Fired when some layer is removed from the map\n *\n * @section Methods for Layers and Controls\n */\nL.Map.include({\n\t// @method addLayer(layer: Layer): this\n\t// Adds the given layer to the map\n\taddLayer: function (layer) {\n\t\tvar id = L.stamp(layer);\n\t\tif (this._layers[id]) { return this; }\n\t\tthis._layers[id] = layer;\n\n\t\tlayer._mapToAdd = this;\n\n\t\tif (layer.beforeAdd) {\n\t\t\tlayer.beforeAdd(this);\n\t\t}\n\n\t\tthis.whenReady(layer._layerAdd, layer);\n\n\t\treturn this;\n\t},\n\n\t// @method removeLayer(layer: Layer): this\n\t// Removes the given layer from the map.\n\tremoveLayer: function (layer) {\n\t\tvar id = L.stamp(layer);\n\n\t\tif (!this._layers[id]) { return this; }\n\n\t\tif (this._loaded) {\n\t\t\tlayer.onRemove(this);\n\t\t}\n\n\t\tif (layer.getAttribution && this.attributionControl) {\n\t\t\tthis.attributionControl.removeAttribution(layer.getAttribution());\n\t\t}\n\n\t\tdelete this._layers[id];\n\n\t\tif (this._loaded) {\n\t\t\tthis.fire('layerremove', {layer: layer});\n\t\t\tlayer.fire('remove');\n\t\t}\n\n\t\tlayer._map = layer._mapToAdd = null;\n\n\t\treturn this;\n\t},\n\n\t// @method hasLayer(layer: Layer): Boolean\n\t// Returns `true` if the given layer is currently added to the map\n\thasLayer: function (layer) {\n\t\treturn !!layer && (L.stamp(layer) in this._layers);\n\t},\n\n\t/* @method eachLayer(fn: Function, context?: Object): this\n\t * Iterates over the layers of the map, optionally specifying context of the iterator function.\n\t * ```\n\t * map.eachLayer(function(layer){\n\t * layer.bindPopup('Hello');\n\t * });\n\t * ```\n\t */\n\teachLayer: function (method, context) {\n\t\tfor (var i in this._layers) {\n\t\t\tmethod.call(context, this._layers[i]);\n\t\t}\n\t\treturn this;\n\t},\n\n\t_addLayers: function (layers) {\n\t\tlayers = layers ? (L.Util.isArray(layers) ? layers : [layers]) : [];\n\n\t\tfor (var i = 0, len = layers.length; i < len; i++) {\n\t\t\tthis.addLayer(layers[i]);\n\t\t}\n\t},\n\n\t_addZoomLimit: function (layer) {\n\t\tif (isNaN(layer.options.maxZoom) || !isNaN(layer.options.minZoom)) {\n\t\t\tthis._zoomBoundLayers[L.stamp(layer)] = layer;\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_removeZoomLimit: function (layer) {\n\t\tvar id = L.stamp(layer);\n\n\t\tif (this._zoomBoundLayers[id]) {\n\t\t\tdelete this._zoomBoundLayers[id];\n\t\t\tthis._updateZoomLevels();\n\t\t}\n\t},\n\n\t_updateZoomLevels: function () {\n\t\tvar minZoom = Infinity,\n\t\t maxZoom = -Infinity,\n\t\t oldZoomSpan = this._getZoomSpan();\n\n\t\tfor (var i in this._zoomBoundLayers) {\n\t\t\tvar options = this._zoomBoundLayers[i].options;\n\n\t\t\tminZoom = options.minZoom === undefined ? minZoom : Math.min(minZoom, options.minZoom);\n\t\t\tmaxZoom = options.maxZoom === undefined ? maxZoom : Math.max(maxZoom, options.maxZoom);\n\t\t}\n\n\t\tthis._layersMaxZoom = maxZoom === -Infinity ? undefined : maxZoom;\n\t\tthis._layersMinZoom = minZoom === Infinity ? undefined : minZoom;\n\n\t\t// @section Map state change events\n\t\t// @event zoomlevelschange: Event\n\t\t// Fired when the number of zoomlevels on the map is changed due\n\t\t// to adding or removing a layer.\n\t\tif (oldZoomSpan !== this._getZoomSpan()) {\n\t\t\tthis.fire('zoomlevelschange');\n\t\t}\n\t}\n});\n","/*\r\n * @namespace Projection\r\n * @projection L.Projection.Mercator\r\n *\r\n * Elliptical Mercator projection — more complex than Spherical Mercator. Takes into account that Earth is a geoid, not a perfect sphere. Used by the EPSG:3395 CRS.\r\n */\r\n\r\nL.Projection.Mercator = {\r\n\tR: 6378137,\r\n\tR_MINOR: 6356752.314245179,\r\n\r\n\tbounds: L.bounds([-20037508.34279, -15496570.73972], [20037508.34279, 18764656.23138]),\r\n\r\n\tproject: function (latlng) {\r\n\t\tvar d = Math.PI / 180,\r\n\t\t r = this.R,\r\n\t\t y = latlng.lat * d,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t con = e * Math.sin(y);\r\n\r\n\t\tvar ts = Math.tan(Math.PI / 4 - y / 2) / Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\ty = -r * Math.log(Math.max(ts, 1E-10));\r\n\r\n\t\treturn new L.Point(latlng.lng * d * r, y);\r\n\t},\r\n\r\n\tunproject: function (point) {\r\n\t\tvar d = 180 / Math.PI,\r\n\t\t r = this.R,\r\n\t\t tmp = this.R_MINOR / r,\r\n\t\t e = Math.sqrt(1 - tmp * tmp),\r\n\t\t ts = Math.exp(-point.y / r),\r\n\t\t phi = Math.PI / 2 - 2 * Math.atan(ts);\r\n\r\n\t\tfor (var i = 0, dphi = 0.1, con; i < 15 && Math.abs(dphi) > 1e-7; i++) {\r\n\t\t\tcon = e * Math.sin(phi);\r\n\t\t\tcon = Math.pow((1 - con) / (1 + con), e / 2);\r\n\t\t\tdphi = Math.PI / 2 - 2 * Math.atan(ts * con) - phi;\r\n\t\t\tphi += dphi;\r\n\t\t}\r\n\r\n\t\treturn new L.LatLng(phi * d, point.x * d / r);\r\n\t}\r\n};\r\n","/*\r\n * @namespace CRS\r\n * @crs L.CRS.EPSG3395\r\n *\r\n * Rarely used by some commercial tile providers. Uses Elliptical Mercator projection.\r\n */\r\n\r\nL.CRS.EPSG3395 = L.extend({}, L.CRS.Earth, {\r\n\tcode: 'EPSG:3395',\r\n\tprojection: L.Projection.Mercator,\r\n\r\n\ttransformation: (function () {\r\n\t\tvar scale = 0.5 / (Math.PI * L.Projection.Mercator.R);\r\n\t\treturn new L.Transformation(scale, 0.5, -scale, 0.5);\r\n\t}())\r\n});\r\n","/*\n * @class GridLayer\n * @inherits Layer\n * @aka L.GridLayer\n *\n * Generic class for handling a tiled grid of HTML elements. This is the base class for all tile layers and replaces `TileLayer.Canvas`.\n * GridLayer can be extended to create a tiled grid of HTML elements like `<canvas>`, `<img>` or `<div>`. GridLayer will handle creating and animating these DOM elements for you.\n *\n *\n * @section Synchronous usage\n * @example\n *\n * To create a custom layer, extend GridLayer and implement the `createTile()` method, which will be passed a `Point` object with the `x`, `y`, and `z` (zoom level) coordinates to draw your tile.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords){\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // get a canvas context and draw something on it using coords.x, coords.y and coords.z\n * var ctx = tile.getContext('2d');\n *\n * // return the tile so it can be rendered on screen\n * return tile;\n * }\n * });\n * ```\n *\n * @section Asynchronous usage\n * @example\n *\n * Tile creation can also be asynchronous, this is useful when using a third-party drawing library. Once the tile is finished drawing it can be passed to the `done()` callback.\n *\n * ```js\n * var CanvasLayer = L.GridLayer.extend({\n * createTile: function(coords, done){\n * var error;\n *\n * // create a <canvas> element for drawing\n * var tile = L.DomUtil.create('canvas', 'leaflet-tile');\n *\n * // setup tile width and height according to the options\n * var size = this.getTileSize();\n * tile.width = size.x;\n * tile.height = size.y;\n *\n * // draw something asynchronously and pass the tile to the done() callback\n * setTimeout(function() {\n * done(error, tile);\n * }, 1000);\n *\n * return tile;\n * }\n * });\n * ```\n *\n * @section\n */\n\n\nL.GridLayer = L.Layer.extend({\n\n\t// @section\n\t// @aka GridLayer options\n\toptions: {\n\t\t// @option tileSize: Number|Point = 256\n\t\t// Width and height of tiles in the grid. Use a number if width and height are equal, or `L.point(width, height)` otherwise.\n\t\ttileSize: 256,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Opacity of the tiles. Can be used in the `createTile()` function.\n\t\topacity: 1,\n\n\t\t// @option updateWhenIdle: Boolean = depends\n\t\t// If `false`, new tiles are loaded during panning, otherwise only after it (for better performance). `true` by default on mobile browsers, otherwise `false`.\n\t\tupdateWhenIdle: L.Browser.mobile,\n\n\t\t// @option updateWhenZooming: Boolean = true\n\t\t// By default, a smooth zoom animation (during a [touch zoom](#map-touchzoom) or a [`flyTo()`](#map-flyto)) will update grid layers every integer zoom level. Setting this option to `false` will update the grid layer only when the smooth animation ends.\n\t\tupdateWhenZooming: true,\n\n\t\t// @option updateInterval: Number = 200\n\t\t// Tiles will not update more than once every `updateInterval` milliseconds when panning.\n\t\tupdateInterval: 200,\n\n\t\t// @option attribution: String = null\n\t\t// String to be shown in the attribution control, describes the layer data, e.g. \"© Mapbox\".\n\t\tattribution: null,\n\n\t\t// @option zIndex: Number = 1\n\t\t// The explicit zIndex of the tile layer.\n\t\tzIndex: 1,\n\n\t\t// @option bounds: LatLngBounds = undefined\n\t\t// If set, tiles will only be loaded inside the set `LatLngBounds`.\n\t\tbounds: null,\n\n\t\t// @option minZoom: Number = 0\n\t\t// The minimum zoom level that tiles will be loaded at. By default the entire map.\n\t\tminZoom: 0,\n\n\t\t// @option maxZoom: Number = undefined\n\t\t// The maximum zoom level that tiles will be loaded at.\n\t\tmaxZoom: undefined,\n\n\t\t// @option noWrap: Boolean = false\n\t\t// Whether the layer is wrapped around the antimeridian. If `true`, the\n\t\t// GridLayer will only be displayed once at low zoom levels. Has no\n\t\t// effect when the [map CRS](#map-crs) doesn't wrap around.\n\t\tnoWrap: false,\n\n\t\t// @option pane: String = 'tilePane'\n\t\t// `Map pane` where the grid layer will be added.\n\t\tpane: 'tilePane',\n\n\t\t// @option className: String = ''\n\t\t// A custom class name to assign to the tile layer. Empty by default.\n\t\tclassName: '',\n\n\t\t// @option keepBuffer: Number = 2\n\t\t// When panning the map, keep this many rows and columns of tiles before unloading them.\n\t\tkeepBuffer: 2\n\t},\n\n\tinitialize: function (options) {\n\t\tL.setOptions(this, options);\n\t},\n\n\tonAdd: function () {\n\t\tthis._initContainer();\n\n\t\tthis._levels = {};\n\t\tthis._tiles = {};\n\n\t\tthis._resetView();\n\t\tthis._update();\n\t},\n\n\tbeforeAdd: function (map) {\n\t\tmap._addZoomLimit(this);\n\t},\n\n\tonRemove: function (map) {\n\t\tthis._removeAllTiles();\n\t\tL.DomUtil.remove(this._container);\n\t\tmap._removeZoomLimit(this);\n\t\tthis._container = null;\n\t\tthis._tileZoom = null;\n\t},\n\n\t// @method bringToFront: this\n\t// Brings the tile layer to the top of all tile layers.\n\tbringToFront: function () {\n\t\tif (this._map) {\n\t\t\tL.DomUtil.toFront(this._container);\n\t\t\tthis._setAutoZIndex(Math.max);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack: this\n\t// Brings the tile layer to the bottom of all tile layers.\n\tbringToBack: function () {\n\t\tif (this._map) {\n\t\t\tL.DomUtil.toBack(this._container);\n\t\t\tthis._setAutoZIndex(Math.min);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getAttribution: String\n\t// Used by the `attribution control`, returns the [attribution option](#gridlayer-attribution).\n\tgetAttribution: function () {\n\t\treturn this.options.attribution;\n\t},\n\n\t// @method getContainer: HTMLElement\n\t// Returns the HTML element that contains the tiles for this layer.\n\tgetContainer: function () {\n\t\treturn this._container;\n\t},\n\n\t// @method setOpacity(opacity: Number): this\n\t// Changes the [opacity](#gridlayer-opacity) of the grid layer.\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\t\tthis._updateOpacity();\n\t\treturn this;\n\t},\n\n\t// @method setZIndex(zIndex: Number): this\n\t// Changes the [zIndex](#gridlayer-zindex) of the grid layer.\n\tsetZIndex: function (zIndex) {\n\t\tthis.options.zIndex = zIndex;\n\t\tthis._updateZIndex();\n\n\t\treturn this;\n\t},\n\n\t// @method isLoading: Boolean\n\t// Returns `true` if any tile in the grid layer has not finished loading.\n\tisLoading: function () {\n\t\treturn this._loading;\n\t},\n\n\t// @method redraw: this\n\t// Causes the layer to clear all the tiles and request them again.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._removeAllTiles();\n\t\t\tthis._update();\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewprereset: this._invalidateAll,\n\t\t\tviewreset: this._resetView,\n\t\t\tzoom: this._resetView,\n\t\t\tmoveend: this._onMoveEnd\n\t\t};\n\n\t\tif (!this.options.updateWhenIdle) {\n\t\t\t// update tiles on move, but not more often than once per given interval\n\t\t\tif (!this._onMove) {\n\t\t\t\tthis._onMove = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);\n\t\t\t}\n\n\t\t\tevents.move = this._onMove;\n\t\t}\n\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._animateZoom;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t// @section Extension methods\n\t// Layers extending `GridLayer` shall reimplement the following method.\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\n\t// Called only internally, must be overriden by classes extending `GridLayer`.\n\t// Returns the `HTMLElement` corresponding to the given `coords`. If the `done` callback\n\t// is specified, it must be called when the tile has finished loading and drawing.\n\tcreateTile: function () {\n\t\treturn document.createElement('div');\n\t},\n\n\t// @section\n\t// @method getTileSize: Point\n\t// Normalizes the [tileSize option](#gridlayer-tilesize) into a point. Used by the `createTile()` method.\n\tgetTileSize: function () {\n\t\tvar s = this.options.tileSize;\n\t\treturn s instanceof L.Point ? s : new L.Point(s, s);\n\t},\n\n\t_updateZIndex: function () {\n\t\tif (this._container && this.options.zIndex !== undefined && this.options.zIndex !== null) {\n\t\t\tthis._container.style.zIndex = this.options.zIndex;\n\t\t}\n\t},\n\n\t_setAutoZIndex: function (compare) {\n\t\t// go through all other layers of the same pane, set zIndex to max + 1 (front) or min - 1 (back)\n\n\t\tvar layers = this.getPane().children,\n\t\t edgeZIndex = -compare(-Infinity, Infinity); // -Infinity for max, Infinity for min\n\n\t\tfor (var i = 0, len = layers.length, zIndex; i < len; i++) {\n\n\t\t\tzIndex = layers[i].style.zIndex;\n\n\t\t\tif (layers[i] !== this._container && zIndex) {\n\t\t\t\tedgeZIndex = compare(edgeZIndex, +zIndex);\n\t\t\t}\n\t\t}\n\n\t\tif (isFinite(edgeZIndex)) {\n\t\t\tthis.options.zIndex = edgeZIndex + compare(-1, 1);\n\t\t\tthis._updateZIndex();\n\t\t}\n\t},\n\n\t_updateOpacity: function () {\n\t\tif (!this._map) { return; }\n\n\t\t// IE doesn't inherit filter opacity properly, so we're forced to set it on tiles\n\t\tif (L.Browser.ielt9) { return; }\n\n\t\tL.DomUtil.setOpacity(this._container, this.options.opacity);\n\n\t\tvar now = +new Date(),\n\t\t nextFrame = false,\n\t\t willPrune = false;\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar tile = this._tiles[key];\n\t\t\tif (!tile.current || !tile.loaded) { continue; }\n\n\t\t\tvar fade = Math.min(1, (now - tile.loaded) / 200);\n\n\t\t\tL.DomUtil.setOpacity(tile.el, fade);\n\t\t\tif (fade < 1) {\n\t\t\t\tnextFrame = true;\n\t\t\t} else {\n\t\t\t\tif (tile.active) { willPrune = true; }\n\t\t\t\ttile.active = true;\n\t\t\t}\n\t\t}\n\n\t\tif (willPrune && !this._noPrune) { this._pruneTiles(); }\n\n\t\tif (nextFrame) {\n\t\t\tL.Util.cancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = L.Util.requestAnimFrame(this._updateOpacity, this);\n\t\t}\n\t},\n\n\t_initContainer: function () {\n\t\tif (this._container) { return; }\n\n\t\tthis._container = L.DomUtil.create('div', 'leaflet-layer ' + (this.options.className || ''));\n\t\tthis._updateZIndex();\n\n\t\tif (this.options.opacity < 1) {\n\t\t\tthis._updateOpacity();\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t},\n\n\t_updateLevels: function () {\n\n\t\tvar zoom = this._tileZoom,\n\t\t maxZoom = this.options.maxZoom;\n\n\t\tif (zoom === undefined) { return undefined; }\n\n\t\tfor (var z in this._levels) {\n\t\t\tif (this._levels[z].el.children.length || z === zoom) {\n\t\t\t\tthis._levels[z].el.style.zIndex = maxZoom - Math.abs(zoom - z);\n\t\t\t} else {\n\t\t\t\tL.DomUtil.remove(this._levels[z].el);\n\t\t\t\tthis._removeTilesAtZoom(z);\n\t\t\t\tdelete this._levels[z];\n\t\t\t}\n\t\t}\n\n\t\tvar level = this._levels[zoom],\n\t\t map = this._map;\n\n\t\tif (!level) {\n\t\t\tlevel = this._levels[zoom] = {};\n\n\t\t\tlevel.el = L.DomUtil.create('div', 'leaflet-tile-container leaflet-zoom-animated', this._container);\n\t\t\tlevel.el.style.zIndex = maxZoom;\n\n\t\t\tlevel.origin = map.project(map.unproject(map.getPixelOrigin()), zoom).round();\n\t\t\tlevel.zoom = zoom;\n\n\t\t\tthis._setZoomTransform(level, map.getCenter(), map.getZoom());\n\n\t\t\t// force the browser to consider the newly added element for transition\n\t\t\tL.Util.falseFn(level.el.offsetWidth);\n\t\t}\n\n\t\tthis._level = level;\n\n\t\treturn level;\n\t},\n\n\t_pruneTiles: function () {\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar key, tile;\n\n\t\tvar zoom = this._map.getZoom();\n\t\tif (zoom > this.options.maxZoom ||\n\t\t\tzoom < this.options.minZoom) {\n\t\t\tthis._removeAllTiles();\n\t\t\treturn;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\ttile.retain = tile.current;\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\ttile = this._tiles[key];\n\t\t\tif (tile.current && !tile.active) {\n\t\t\t\tvar coords = tile.coords;\n\t\t\t\tif (!this._retainParent(coords.x, coords.y, coords.z, coords.z - 5)) {\n\t\t\t\t\tthis._retainChildren(coords.x, coords.y, coords.z, coords.z + 2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (key in this._tiles) {\n\t\t\tif (!this._tiles[key].retain) {\n\t\t\t\tthis._removeTile(key);\n\t\t\t}\n\t\t}\n\t},\n\n\t_removeTilesAtZoom: function (zoom) {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (this._tiles[key].coords.z !== zoom) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_removeAllTiles: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tthis._removeTile(key);\n\t\t}\n\t},\n\n\t_invalidateAll: function () {\n\t\tfor (var z in this._levels) {\n\t\t\tL.DomUtil.remove(this._levels[z].el);\n\t\t\tdelete this._levels[z];\n\t\t}\n\t\tthis._removeAllTiles();\n\n\t\tthis._tileZoom = null;\n\t},\n\n\t_retainParent: function (x, y, z, minZoom) {\n\t\tvar x2 = Math.floor(x / 2),\n\t\t y2 = Math.floor(y / 2),\n\t\t z2 = z - 1,\n\t\t coords2 = new L.Point(+x2, +y2);\n\t\tcoords2.z = +z2;\n\n\t\tvar key = this._tileCoordsToKey(coords2),\n\t\t tile = this._tiles[key];\n\n\t\tif (tile && tile.active) {\n\t\t\ttile.retain = true;\n\t\t\treturn true;\n\n\t\t} else if (tile && tile.loaded) {\n\t\t\ttile.retain = true;\n\t\t}\n\n\t\tif (z2 > minZoom) {\n\t\t\treturn this._retainParent(x2, y2, z2, minZoom);\n\t\t}\n\n\t\treturn false;\n\t},\n\n\t_retainChildren: function (x, y, z, maxZoom) {\n\n\t\tfor (var i = 2 * x; i < 2 * x + 2; i++) {\n\t\t\tfor (var j = 2 * y; j < 2 * y + 2; j++) {\n\n\t\t\t\tvar coords = new L.Point(i, j);\n\t\t\t\tcoords.z = z + 1;\n\n\t\t\t\tvar key = this._tileCoordsToKey(coords),\n\t\t\t\t tile = this._tiles[key];\n\n\t\t\t\tif (tile && tile.active) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t\tcontinue;\n\n\t\t\t\t} else if (tile && tile.loaded) {\n\t\t\t\t\ttile.retain = true;\n\t\t\t\t}\n\n\t\t\t\tif (z + 1 < maxZoom) {\n\t\t\t\t\tthis._retainChildren(i, j, z + 1, maxZoom);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t_resetView: function (e) {\n\t\tvar animating = e && (e.pinch || e.flyTo);\n\t\tthis._setView(this._map.getCenter(), this._map.getZoom(), animating, animating);\n\t},\n\n\t_animateZoom: function (e) {\n\t\tthis._setView(e.center, e.zoom, true, e.noUpdate);\n\t},\n\n\t_setView: function (center, zoom, noPrune, noUpdate) {\n\t\tvar tileZoom = Math.round(zoom);\n\t\tif ((this.options.maxZoom !== undefined && tileZoom > this.options.maxZoom) ||\n\t\t (this.options.minZoom !== undefined && tileZoom < this.options.minZoom)) {\n\t\t\ttileZoom = undefined;\n\t\t}\n\n\t\tvar tileZoomChanged = this.options.updateWhenZooming && (tileZoom !== this._tileZoom);\n\n\t\tif (!noUpdate || tileZoomChanged) {\n\n\t\t\tthis._tileZoom = tileZoom;\n\n\t\t\tif (this._abortLoading) {\n\t\t\t\tthis._abortLoading();\n\t\t\t}\n\n\t\t\tthis._updateLevels();\n\t\t\tthis._resetGrid();\n\n\t\t\tif (tileZoom !== undefined) {\n\t\t\t\tthis._update(center);\n\t\t\t}\n\n\t\t\tif (!noPrune) {\n\t\t\t\tthis._pruneTiles();\n\t\t\t}\n\n\t\t\t// Flag to prevent _updateOpacity from pruning tiles during\n\t\t\t// a zoom anim or a pinch gesture\n\t\t\tthis._noPrune = !!noPrune;\n\t\t}\n\n\t\tthis._setZoomTransforms(center, zoom);\n\t},\n\n\t_setZoomTransforms: function (center, zoom) {\n\t\tfor (var i in this._levels) {\n\t\t\tthis._setZoomTransform(this._levels[i], center, zoom);\n\t\t}\n\t},\n\n\t_setZoomTransform: function (level, center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, level.zoom),\n\t\t translate = level.origin.multiplyBy(scale)\n\t\t .subtract(this._map._getNewPixelOrigin(center, zoom)).round();\n\n\t\tif (L.Browser.any3d) {\n\t\t\tL.DomUtil.setTransform(level.el, translate, scale);\n\t\t} else {\n\t\t\tL.DomUtil.setPosition(level.el, translate);\n\t\t}\n\t},\n\n\t_resetGrid: function () {\n\t\tvar map = this._map,\n\t\t crs = map.options.crs,\n\t\t tileSize = this._tileSize = this.getTileSize(),\n\t\t tileZoom = this._tileZoom;\n\n\t\tvar bounds = this._map.getPixelWorldBounds(this._tileZoom);\n\t\tif (bounds) {\n\t\t\tthis._globalTileRange = this._pxBoundsToTileRange(bounds);\n\t\t}\n\n\t\tthis._wrapX = crs.wrapLng && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([0, crs.wrapLng[0]], tileZoom).x / tileSize.x),\n\t\t\tMath.ceil(map.project([0, crs.wrapLng[1]], tileZoom).x / tileSize.y)\n\t\t];\n\t\tthis._wrapY = crs.wrapLat && !this.options.noWrap && [\n\t\t\tMath.floor(map.project([crs.wrapLat[0], 0], tileZoom).y / tileSize.x),\n\t\t\tMath.ceil(map.project([crs.wrapLat[1], 0], tileZoom).y / tileSize.y)\n\t\t];\n\t},\n\n\t_onMoveEnd: function () {\n\t\tif (!this._map || this._map._animatingZoom) { return; }\n\n\t\tthis._update();\n\t},\n\n\t_getTiledPixelBounds: function (center) {\n\t\tvar map = this._map,\n\t\t mapZoom = map._animatingZoom ? Math.max(map._animateToZoom, map.getZoom()) : map.getZoom(),\n\t\t scale = map.getZoomScale(mapZoom, this._tileZoom),\n\t\t pixelCenter = map.project(center, this._tileZoom).floor(),\n\t\t halfSize = map.getSize().divideBy(scale * 2);\n\n\t\treturn new L.Bounds(pixelCenter.subtract(halfSize), pixelCenter.add(halfSize));\n\t},\n\n\t// Private method to load tiles in the grid's active zoom level according to map bounds\n\t_update: function (center) {\n\t\tvar map = this._map;\n\t\tif (!map) { return; }\n\t\tvar zoom = map.getZoom();\n\n\t\tif (center === undefined) { center = map.getCenter(); }\n\t\tif (this._tileZoom === undefined) { return; }\t// if out of minzoom/maxzoom\n\n\t\tvar pixelBounds = this._getTiledPixelBounds(center),\n\t\t tileRange = this._pxBoundsToTileRange(pixelBounds),\n\t\t tileCenter = tileRange.getCenter(),\n\t\t queue = [],\n\t\t margin = this.options.keepBuffer,\n\t\t noPruneRange = new L.Bounds(tileRange.getBottomLeft().subtract([margin, -margin]),\n\t\t tileRange.getTopRight().add([margin, -margin]));\n\n\t\tfor (var key in this._tiles) {\n\t\t\tvar c = this._tiles[key].coords;\n\t\t\tif (c.z !== this._tileZoom || !noPruneRange.contains(L.point(c.x, c.y))) {\n\t\t\t\tthis._tiles[key].current = false;\n\t\t\t}\n\t\t}\n\n\t\t// _update just loads more tiles. If the tile zoom level differs too much\n\t\t// from the map's, let _setView reset levels and prune old tiles.\n\t\tif (Math.abs(zoom - this._tileZoom) > 1) { this._setView(center, zoom); return; }\n\n\t\t// create a queue of coordinates to load tiles from\n\t\tfor (var j = tileRange.min.y; j <= tileRange.max.y; j++) {\n\t\t\tfor (var i = tileRange.min.x; i <= tileRange.max.x; i++) {\n\t\t\t\tvar coords = new L.Point(i, j);\n\t\t\t\tcoords.z = this._tileZoom;\n\n\t\t\t\tif (!this._isValidTile(coords)) { continue; }\n\n\t\t\t\tvar tile = this._tiles[this._tileCoordsToKey(coords)];\n\t\t\t\tif (tile) {\n\t\t\t\t\ttile.current = true;\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push(coords);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// sort tile queue to load tiles in order of their distance to center\n\t\tqueue.sort(function (a, b) {\n\t\t\treturn a.distanceTo(tileCenter) - b.distanceTo(tileCenter);\n\t\t});\n\n\t\tif (queue.length !== 0) {\n\t\t\t// if it's the first batch of tiles to load\n\t\t\tif (!this._loading) {\n\t\t\t\tthis._loading = true;\n\t\t\t\t// @event loading: Event\n\t\t\t\t// Fired when the grid layer starts loading tiles.\n\t\t\t\tthis.fire('loading');\n\t\t\t}\n\n\t\t\t// create DOM fragment to append tiles in one batch\n\t\t\tvar fragment = document.createDocumentFragment();\n\n\t\t\tfor (i = 0; i < queue.length; i++) {\n\t\t\t\tthis._addTile(queue[i], fragment);\n\t\t\t}\n\n\t\t\tthis._level.el.appendChild(fragment);\n\t\t}\n\t},\n\n\t_isValidTile: function (coords) {\n\t\tvar crs = this._map.options.crs;\n\n\t\tif (!crs.infinite) {\n\t\t\t// don't load tile if it's out of bounds and not wrapped\n\t\t\tvar bounds = this._globalTileRange;\n\t\t\tif ((!crs.wrapLng && (coords.x < bounds.min.x || coords.x > bounds.max.x)) ||\n\t\t\t (!crs.wrapLat && (coords.y < bounds.min.y || coords.y > bounds.max.y))) { return false; }\n\t\t}\n\n\t\tif (!this.options.bounds) { return true; }\n\n\t\t// don't load tile if it doesn't intersect the bounds in options\n\t\tvar tileBounds = this._tileCoordsToBounds(coords);\n\t\treturn L.latLngBounds(this.options.bounds).overlaps(tileBounds);\n\t},\n\n\t_keyToBounds: function (key) {\n\t\treturn this._tileCoordsToBounds(this._keyToTileCoords(key));\n\t},\n\n\t// converts tile coordinates to its geographical bounds\n\t_tileCoordsToBounds: function (coords) {\n\n\t\tvar map = this._map,\n\t\t tileSize = this.getTileSize(),\n\n\t\t nwPoint = coords.scaleBy(tileSize),\n\t\t sePoint = nwPoint.add(tileSize),\n\n\t\t nw = map.unproject(nwPoint, coords.z),\n\t\t se = map.unproject(sePoint, coords.z);\n\n\t\tif (!this.options.noWrap) {\n\t\t\tnw = map.wrapLatLng(nw);\n\t\t\tse = map.wrapLatLng(se);\n\t\t}\n\n\t\treturn new L.LatLngBounds(nw, se);\n\t},\n\n\t// converts tile coordinates to key for the tile cache\n\t_tileCoordsToKey: function (coords) {\n\t\treturn coords.x + ':' + coords.y + ':' + coords.z;\n\t},\n\n\t// converts tile cache key to coordinates\n\t_keyToTileCoords: function (key) {\n\t\tvar k = key.split(':'),\n\t\t coords = new L.Point(+k[0], +k[1]);\n\t\tcoords.z = +k[2];\n\t\treturn coords;\n\t},\n\n\t_removeTile: function (key) {\n\t\tvar tile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\tL.DomUtil.remove(tile.el);\n\n\t\tdelete this._tiles[key];\n\n\t\t// @event tileunload: TileEvent\n\t\t// Fired when a tile is removed (e.g. when a tile goes off the screen).\n\t\tthis.fire('tileunload', {\n\t\t\ttile: tile.el,\n\t\t\tcoords: this._keyToTileCoords(key)\n\t\t});\n\t},\n\n\t_initTile: function (tile) {\n\t\tL.DomUtil.addClass(tile, 'leaflet-tile');\n\n\t\tvar tileSize = this.getTileSize();\n\t\ttile.style.width = tileSize.x + 'px';\n\t\ttile.style.height = tileSize.y + 'px';\n\n\t\ttile.onselectstart = L.Util.falseFn;\n\t\ttile.onmousemove = L.Util.falseFn;\n\n\t\t// update opacity on tiles in IE7-8 because of filter inheritance problems\n\t\tif (L.Browser.ielt9 && this.options.opacity < 1) {\n\t\t\tL.DomUtil.setOpacity(tile, this.options.opacity);\n\t\t}\n\n\t\t// without this hack, tiles disappear after zoom on Chrome for Android\n\t\t// https://github.com/Leaflet/Leaflet/issues/2078\n\t\tif (L.Browser.android && !L.Browser.android23) {\n\t\t\ttile.style.WebkitBackfaceVisibility = 'hidden';\n\t\t}\n\t},\n\n\t_addTile: function (coords, container) {\n\t\tvar tilePos = this._getTilePos(coords),\n\t\t key = this._tileCoordsToKey(coords);\n\n\t\tvar tile = this.createTile(this._wrapCoords(coords), L.bind(this._tileReady, this, coords));\n\n\t\tthis._initTile(tile);\n\n\t\t// if createTile is defined with a second argument (\"done\" callback),\n\t\t// we know that tile is async and will be ready later; otherwise\n\t\tif (this.createTile.length < 2) {\n\t\t\t// mark tile as ready, but delay one frame for opacity animation to happen\n\t\t\tL.Util.requestAnimFrame(L.bind(this._tileReady, this, coords, null, tile));\n\t\t}\n\n\t\tL.DomUtil.setPosition(tile, tilePos);\n\n\t\t// save tile in cache\n\t\tthis._tiles[key] = {\n\t\t\tel: tile,\n\t\t\tcoords: coords,\n\t\t\tcurrent: true\n\t\t};\n\n\t\tcontainer.appendChild(tile);\n\t\t// @event tileloadstart: TileEvent\n\t\t// Fired when a tile is requested and starts loading.\n\t\tthis.fire('tileloadstart', {\n\t\t\ttile: tile,\n\t\t\tcoords: coords\n\t\t});\n\t},\n\n\t_tileReady: function (coords, err, tile) {\n\t\tif (!this._map) { return; }\n\n\t\tif (err) {\n\t\t\t// @event tileerror: TileErrorEvent\n\t\t\t// Fired when there is an error loading a tile.\n\t\t\tthis.fire('tileerror', {\n\t\t\t\terror: err,\n\t\t\t\ttile: tile,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tvar key = this._tileCoordsToKey(coords);\n\n\t\ttile = this._tiles[key];\n\t\tif (!tile) { return; }\n\n\t\ttile.loaded = +new Date();\n\t\tif (this._map._fadeAnimated) {\n\t\t\tL.DomUtil.setOpacity(tile.el, 0);\n\t\t\tL.Util.cancelAnimFrame(this._fadeFrame);\n\t\t\tthis._fadeFrame = L.Util.requestAnimFrame(this._updateOpacity, this);\n\t\t} else {\n\t\t\ttile.active = true;\n\t\t\tthis._pruneTiles();\n\t\t}\n\n\t\tif (!err) {\n\t\t\tL.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');\n\n\t\t\t// @event tileload: TileEvent\n\t\t\t// Fired when a tile loads.\n\t\t\tthis.fire('tileload', {\n\t\t\t\ttile: tile.el,\n\t\t\t\tcoords: coords\n\t\t\t});\n\t\t}\n\n\t\tif (this._noTilesToLoad()) {\n\t\t\tthis._loading = false;\n\t\t\t// @event load: Event\n\t\t\t// Fired when the grid layer loaded all visible tiles.\n\t\t\tthis.fire('load');\n\n\t\t\tif (L.Browser.ielt9 || !this._map._fadeAnimated) {\n\t\t\t\tL.Util.requestAnimFrame(this._pruneTiles, this);\n\t\t\t} else {\n\t\t\t\t// Wait a bit more than 0.2 secs (the duration of the tile fade-in)\n\t\t\t\t// to trigger a pruning.\n\t\t\t\tsetTimeout(L.bind(this._pruneTiles, this), 250);\n\t\t\t}\n\t\t}\n\t},\n\n\t_getTilePos: function (coords) {\n\t\treturn coords.scaleBy(this.getTileSize()).subtract(this._level.origin);\n\t},\n\n\t_wrapCoords: function (coords) {\n\t\tvar newCoords = new L.Point(\n\t\t\tthis._wrapX ? L.Util.wrapNum(coords.x, this._wrapX) : coords.x,\n\t\t\tthis._wrapY ? L.Util.wrapNum(coords.y, this._wrapY) : coords.y);\n\t\tnewCoords.z = coords.z;\n\t\treturn newCoords;\n\t},\n\n\t_pxBoundsToTileRange: function (bounds) {\n\t\tvar tileSize = this.getTileSize();\n\t\treturn new L.Bounds(\n\t\t\tbounds.min.unscaleBy(tileSize).floor(),\n\t\t\tbounds.max.unscaleBy(tileSize).ceil().subtract([1, 1]));\n\t},\n\n\t_noTilesToLoad: function () {\n\t\tfor (var key in this._tiles) {\n\t\t\tif (!this._tiles[key].loaded) { return false; }\n\t\t}\n\t\treturn true;\n\t}\n});\n\n// @factory L.gridLayer(options?: GridLayer options)\n// Creates a new instance of GridLayer with the supplied options.\nL.gridLayer = function (options) {\n\treturn new L.GridLayer(options);\n};\n","/*\r\n * @class TileLayer\r\n * @inherits GridLayer\r\n * @aka L.TileLayer\r\n * Used to load and display tile layers on the map. Extends `GridLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar'}).addTo(map);\r\n * ```\r\n *\r\n * @section URL template\r\n * @example\r\n *\r\n * A string of the following form:\r\n *\r\n * ```\r\n * 'http://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'\r\n * ```\r\n *\r\n * `{s}` means one of the available subdomains (used sequentially to help with browser parallel requests per domain limitation; subdomain values are specified in options; `a`, `b` or `c` by default, can be omitted), `{z}` — zoom level, `{x}` and `{y}` — tile coordinates. `{r}` can be used to add @2x to the URL to load retina tiles.\r\n *\r\n * You can use custom keys in the template, which will be [evaluated](#util-template) from TileLayer options, like this:\r\n *\r\n * ```\r\n * L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {foo: 'bar'});\r\n * ```\r\n */\r\n\r\n\r\nL.TileLayer = L.GridLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer options\r\n\toptions: {\r\n\t\t// @option minZoom: Number = 0\r\n\t\t// Minimum zoom number.\r\n\t\tminZoom: 0,\r\n\r\n\t\t// @option maxZoom: Number = 18\r\n\t\t// Maximum zoom number.\r\n\t\tmaxZoom: 18,\r\n\r\n\t\t// @option maxNativeZoom: Number = null\r\n\t\t// Maximum zoom number the tile source has available. If it is specified,\r\n\t\t// the tiles on all zoom levels higher than `maxNativeZoom` will be loaded\r\n\t\t// from `maxNativeZoom` level and auto-scaled.\r\n\t\tmaxNativeZoom: null,\r\n\r\n\t\t// @option subdomains: String|String[] = 'abc'\r\n\t\t// Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.\r\n\t\tsubdomains: 'abc',\r\n\r\n\t\t// @option errorTileUrl: String = ''\r\n\t\t// URL to the tile image to show in place of the tile that failed to load.\r\n\t\terrorTileUrl: '',\r\n\r\n\t\t// @option zoomOffset: Number = 0\r\n\t\t// The zoom number used in tile URLs will be offset with this value.\r\n\t\tzoomOffset: 0,\r\n\r\n\t\t// @option tms: Boolean = false\r\n\t\t// If `true`, inverses Y axis numbering for tiles (turn this on for [TMS](https://en.wikipedia.org/wiki/Tile_Map_Service) services).\r\n\t\ttms: false,\r\n\r\n\t\t// @option zoomReverse: Boolean = false\r\n\t\t// If set to true, the zoom number used in tile URLs will be reversed (`maxZoom - zoom` instead of `zoom`)\r\n\t\tzoomReverse: false,\r\n\r\n\t\t// @option detectRetina: Boolean = false\r\n\t\t// If `true` and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.\r\n\t\tdetectRetina: false,\r\n\r\n\t\t// @option crossOrigin: Boolean = false\r\n\t\t// If true, all tiles will have their crossOrigin attribute set to ''. This is needed if you want to access tile pixel data.\r\n\t\tcrossOrigin: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\toptions = L.setOptions(this, options);\r\n\r\n\t\t// detecting retina displays, adjusting tileSize and zoom levels\r\n\t\tif (options.detectRetina && L.Browser.retina && options.maxZoom > 0) {\r\n\r\n\t\t\toptions.tileSize = Math.floor(options.tileSize / 2);\r\n\r\n\t\t\tif (!options.zoomReverse) {\r\n\t\t\t\toptions.zoomOffset++;\r\n\t\t\t\toptions.maxZoom--;\r\n\t\t\t} else {\r\n\t\t\t\toptions.zoomOffset--;\r\n\t\t\t\toptions.minZoom++;\r\n\t\t\t}\r\n\r\n\t\t\toptions.minZoom = Math.max(0, options.minZoom);\r\n\t\t}\r\n\r\n\t\tif (typeof options.subdomains === 'string') {\r\n\t\t\toptions.subdomains = options.subdomains.split('');\r\n\t\t}\r\n\r\n\t\t// for https://github.com/Leaflet/Leaflet/issues/137\r\n\t\tif (!L.Browser.android) {\r\n\t\t\tthis.on('tileunload', this._onTileRemove);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setUrl(url: String, noRedraw?: Boolean): this\r\n\t// Updates the layer's URL template and redraws it (unless `noRedraw` is set to `true`).\r\n\tsetUrl: function (url, noRedraw) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method createTile(coords: Object, done?: Function): HTMLElement\r\n\t// Called only internally, overrides GridLayer's [`createTile()`](#gridlayer-createtile)\r\n\t// to return an `<img>` HTML element with the appropiate image URL given `coords`. The `done`\r\n\t// callback is called when the tile has been loaded.\r\n\tcreateTile: function (coords, done) {\r\n\t\tvar tile = document.createElement('img');\r\n\r\n\t\tL.DomEvent.on(tile, 'load', L.bind(this._tileOnLoad, this, done, tile));\r\n\t\tL.DomEvent.on(tile, 'error', L.bind(this._tileOnError, this, done, tile));\r\n\r\n\t\tif (this.options.crossOrigin) {\r\n\t\t\ttile.crossOrigin = '';\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t Alt tag is set to empty string to keep screen readers from reading URL and for compliance reasons\r\n\t\t http://www.w3.org/TR/WCAG20-TECHS/H67\r\n\t\t*/\r\n\t\ttile.alt = '';\r\n\r\n\t\ttile.src = this.getTileUrl(coords);\r\n\r\n\t\treturn tile;\r\n\t},\r\n\r\n\t// @section Extension methods\r\n\t// @uninheritable\r\n\t// Layers extending `TileLayer` might reimplement the following method.\r\n\t// @method getTileUrl(coords: Object): String\r\n\t// Called only internally, returns the URL for a tile given its coordinates.\r\n\t// Classes extending `TileLayer` can override this function to provide custom tile URL naming schemes.\r\n\tgetTileUrl: function (coords) {\r\n\t\tvar data = {\r\n\t\t\tr: L.Browser.retina ? '@2x' : '',\r\n\t\t\ts: this._getSubdomain(coords),\r\n\t\t\tx: coords.x,\r\n\t\t\ty: coords.y,\r\n\t\t\tz: this._getZoomForUrl()\r\n\t\t};\r\n\t\tif (this._map && !this._map.options.crs.infinite) {\r\n\t\t\tvar invertedY = this._globalTileRange.max.y - coords.y;\r\n\t\t\tif (this.options.tms) {\r\n\t\t\t\tdata['y'] = invertedY;\r\n\t\t\t}\r\n\t\t\tdata['-y'] = invertedY;\r\n\t\t}\r\n\r\n\t\treturn L.Util.template(this._url, L.extend(data, this.options));\r\n\t},\r\n\r\n\t_tileOnLoad: function (done, tile) {\r\n\t\t// For https://github.com/Leaflet/Leaflet/issues/3332\r\n\t\tif (L.Browser.ielt9) {\r\n\t\t\tsetTimeout(L.bind(done, this, null, tile), 0);\r\n\t\t} else {\r\n\t\t\tdone(null, tile);\r\n\t\t}\r\n\t},\r\n\r\n\t_tileOnError: function (done, tile, e) {\r\n\t\tvar errorUrl = this.options.errorTileUrl;\r\n\t\tif (errorUrl) {\r\n\t\t\ttile.src = errorUrl;\r\n\t\t}\r\n\t\tdone(e, tile);\r\n\t},\r\n\r\n\tgetTileSize: function () {\r\n\t\tvar map = this._map,\r\n\t\t tileSize = L.GridLayer.prototype.getTileSize.call(this),\r\n\t\t zoom = this._tileZoom + this.options.zoomOffset,\r\n\t\t zoomN = this.options.maxNativeZoom;\r\n\r\n\t\t// increase tile size when overscaling\r\n\t\treturn zoomN !== null && zoom > zoomN ?\r\n\t\t\t\ttileSize.divideBy(map.getZoomScale(zoomN, zoom)).round() :\r\n\t\t\t\ttileSize;\r\n\t},\r\n\r\n\t_onTileRemove: function (e) {\r\n\t\te.tile.onload = null;\r\n\t},\r\n\r\n\t_getZoomForUrl: function () {\r\n\r\n\t\tvar options = this.options,\r\n\t\t zoom = this._tileZoom;\r\n\r\n\t\tif (options.zoomReverse) {\r\n\t\t\tzoom = options.maxZoom - zoom;\r\n\t\t}\r\n\r\n\t\tzoom += options.zoomOffset;\r\n\r\n\t\treturn options.maxNativeZoom !== null ? Math.min(zoom, options.maxNativeZoom) : zoom;\r\n\t},\r\n\r\n\t_getSubdomain: function (tilePoint) {\r\n\t\tvar index = Math.abs(tilePoint.x + tilePoint.y) % this.options.subdomains.length;\r\n\t\treturn this.options.subdomains[index];\r\n\t},\r\n\r\n\t// stops loading all tiles in the background layer\r\n\t_abortLoading: function () {\r\n\t\tvar i, tile;\r\n\t\tfor (i in this._tiles) {\r\n\t\t\tif (this._tiles[i].coords.z !== this._tileZoom) {\r\n\t\t\t\ttile = this._tiles[i].el;\r\n\r\n\t\t\t\ttile.onload = L.Util.falseFn;\r\n\t\t\t\ttile.onerror = L.Util.falseFn;\r\n\r\n\t\t\t\tif (!tile.complete) {\r\n\t\t\t\t\ttile.src = L.Util.emptyImageUrl;\r\n\t\t\t\t\tL.DomUtil.remove(tile);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tilelayer(urlTemplate: String, options?: TileLayer options)\r\n// Instantiates a tile layer object given a `URL template` and optionally an options object.\r\n\r\nL.tileLayer = function (url, options) {\r\n\treturn new L.TileLayer(url, options);\r\n};\r\n","/*\r\n * @class TileLayer.WMS\r\n * @inherits TileLayer\r\n * @aka L.TileLayer.WMS\r\n * Used to display [WMS](https://en.wikipedia.org/wiki/Web_Map_Service) services as tile layers on the map. Extends `TileLayer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var nexrad = L.tileLayer.wms(\"http://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi\", {\r\n * \tlayers: 'nexrad-n0r-900913',\r\n * \tformat: 'image/png',\r\n * \ttransparent: true,\r\n * \tattribution: \"Weather data © 2012 IEM Nexrad\"\r\n * });\r\n * ```\r\n */\r\n\r\nL.TileLayer.WMS = L.TileLayer.extend({\r\n\r\n\t// @section\r\n\t// @aka TileLayer.WMS options\r\n\t// If any custom options not documented here are used, they will be sent to the\r\n\t// WMS server as extra parameters in each request URL. This can be useful for\r\n\t// [non-standard vendor WMS parameters](http://docs.geoserver.org/stable/en/user/services/wms/vendor.html).\r\n\tdefaultWmsParams: {\r\n\t\tservice: 'WMS',\r\n\t\trequest: 'GetMap',\r\n\r\n\t\t// @option layers: String = ''\r\n\t\t// **(required)** Comma-separated list of WMS layers to show.\r\n\t\tlayers: '',\r\n\r\n\t\t// @option styles: String = ''\r\n\t\t// Comma-separated list of WMS styles.\r\n\t\tstyles: '',\r\n\r\n\t\t// @option format: String = 'image/jpeg'\r\n\t\t// WMS image format (use `'image/png'` for layers with transparency).\r\n\t\tformat: 'image/jpeg',\r\n\r\n\t\t// @option transparent: Boolean = false\r\n\t\t// If `true`, the WMS service will return images with transparency.\r\n\t\ttransparent: false,\r\n\r\n\t\t// @option version: String = '1.1.1'\r\n\t\t// Version of the WMS service to use\r\n\t\tversion: '1.1.1'\r\n\t},\r\n\r\n\toptions: {\r\n\t\t// @option crs: CRS = null\r\n\t\t// Coordinate Reference System to use for the WMS requests, defaults to\r\n\t\t// map CRS. Don't change this if you're not sure what it means.\r\n\t\tcrs: null,\r\n\r\n\t\t// @option uppercase: Boolean = false\r\n\t\t// If `true`, WMS request parameter keys will be uppercase.\r\n\t\tuppercase: false\r\n\t},\r\n\r\n\tinitialize: function (url, options) {\r\n\r\n\t\tthis._url = url;\r\n\r\n\t\tvar wmsParams = L.extend({}, this.defaultWmsParams);\r\n\r\n\t\t// all keys that are not TileLayer options go to WMS params\r\n\t\tfor (var i in options) {\r\n\t\t\tif (!(i in this.options)) {\r\n\t\t\t\twmsParams[i] = options[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\toptions = L.setOptions(this, options);\r\n\r\n\t\twmsParams.width = wmsParams.height = options.tileSize * (options.detectRetina && L.Browser.retina ? 2 : 1);\r\n\r\n\t\tthis.wmsParams = wmsParams;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\r\n\t\tthis._crs = this.options.crs || map.options.crs;\r\n\t\tthis._wmsVersion = parseFloat(this.wmsParams.version);\r\n\r\n\t\tvar projectionKey = this._wmsVersion >= 1.3 ? 'crs' : 'srs';\r\n\t\tthis.wmsParams[projectionKey] = this._crs.code;\r\n\r\n\t\tL.TileLayer.prototype.onAdd.call(this, map);\r\n\t},\r\n\r\n\tgetTileUrl: function (coords) {\r\n\r\n\t\tvar tileBounds = this._tileCoordsToBounds(coords),\r\n\t\t nw = this._crs.project(tileBounds.getNorthWest()),\r\n\t\t se = this._crs.project(tileBounds.getSouthEast()),\r\n\r\n\t\t bbox = (this._wmsVersion >= 1.3 && this._crs === L.CRS.EPSG4326 ?\r\n\t\t\t [se.y, nw.x, nw.y, se.x] :\r\n\t\t\t [nw.x, se.y, se.x, nw.y]).join(','),\r\n\r\n\t\t url = L.TileLayer.prototype.getTileUrl.call(this, coords);\r\n\r\n\t\treturn url +\r\n\t\t\tL.Util.getParamString(this.wmsParams, url, this.options.uppercase) +\r\n\t\t\t(this.options.uppercase ? '&BBOX=' : '&bbox=') + bbox;\r\n\t},\r\n\r\n\t// @method setParams(params: Object, noRedraw?: Boolean): this\r\n\t// Merges an object with the new parameters and re-requests tiles on the current screen (unless `noRedraw` was set to true).\r\n\tsetParams: function (params, noRedraw) {\r\n\r\n\t\tL.extend(this.wmsParams, params);\r\n\r\n\t\tif (!noRedraw) {\r\n\t\t\tthis.redraw();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.tileLayer.wms(baseUrl: String, options: TileLayer.WMS options)\r\n// Instantiates a WMS tile layer object given a base URL of the WMS service and a WMS parameters/options object.\r\nL.tileLayer.wms = function (url, options) {\r\n\treturn new L.TileLayer.WMS(url, options);\r\n};\r\n","/*\r\n * @class ImageOverlay\r\n * @aka L.ImageOverlay\r\n * @inherits Interactive layer\r\n *\r\n * Used to load and display a single image over specific bounds of the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',\r\n * \timageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];\r\n * L.imageOverlay(imageUrl, imageBounds).addTo(map);\r\n * ```\r\n */\r\n\r\nL.ImageOverlay = L.Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka ImageOverlay options\r\n\toptions: {\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the image overlay.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option interactive: Boolean = false\r\n\t\t// If `true`, the image overlay will emit [mouse events](#interactive-layer) when clicked or hovered.\r\n\t\tinteractive: false,\r\n\r\n\t\t// @option attribution: String = null\r\n\t\t// An optional string containing HTML to be shown on the `Attribution control`\r\n\t\tattribution: null,\r\n\r\n\t\t// @option crossOrigin: Boolean = false\r\n\t\t// If true, the image will have its crossOrigin attribute set to ''. This is needed if you want to access image pixel data.\r\n\t\tcrossOrigin: false\r\n\t},\r\n\r\n\tinitialize: function (url, bounds, options) { // (String, LatLngBounds, Object)\r\n\t\tthis._url = url;\r\n\t\tthis._bounds = L.latLngBounds(bounds);\r\n\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\tonAdd: function () {\r\n\t\tif (!this._image) {\r\n\t\t\tthis._initImage();\r\n\r\n\t\t\tif (this.options.opacity < 1) {\r\n\t\t\t\tthis._updateOpacity();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (this.options.interactive) {\r\n\t\t\tL.DomUtil.addClass(this._image, 'leaflet-interactive');\r\n\t\t\tthis.addInteractiveTarget(this._image);\r\n\t\t}\r\n\r\n\t\tthis.getPane().appendChild(this._image);\r\n\t\tthis._reset();\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tL.DomUtil.remove(this._image);\r\n\t\tif (this.options.interactive) {\r\n\t\t\tthis.removeInteractiveTarget(this._image);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Sets the opacity of the overlay.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetStyle: function (styleOpts) {\r\n\t\tif (styleOpts.opacity) {\r\n\t\t\tthis.setOpacity(styleOpts.opacity);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer to the top of all overlays.\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\tL.DomUtil.toFront(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer to the bottom of all overlays.\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\tL.DomUtil.toBack(this._image);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setUrl(url: String): this\r\n\t// Changes the URL of the image.\r\n\tsetUrl: function (url) {\r\n\t\tthis._url = url;\r\n\r\n\t\tif (this._image) {\r\n\t\t\tthis._image.src = url;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tsetBounds: function (bounds) {\r\n\t\tthis._bounds = bounds;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._reset();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetAttribution: function () {\r\n\t\treturn this.options.attribution;\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._reset,\r\n\t\t\tviewreset: this._reset\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\tgetBounds: function () {\r\n\t\treturn this._bounds;\r\n\t},\r\n\r\n\tgetElement: function () {\r\n\t\treturn this._image;\r\n\t},\r\n\r\n\t_initImage: function () {\r\n\t\tvar img = this._image = L.DomUtil.create('img',\r\n\t\t\t\t'leaflet-image-layer ' + (this._zoomAnimated ? 'leaflet-zoom-animated' : ''));\r\n\r\n\t\timg.onselectstart = L.Util.falseFn;\r\n\t\timg.onmousemove = L.Util.falseFn;\r\n\r\n\t\timg.onload = L.bind(this.fire, this, 'load');\r\n\r\n\t\tif (this.options.crossOrigin) {\r\n\t\t\timg.crossOrigin = '';\r\n\t\t}\r\n\r\n\t\timg.src = this._url;\r\n\t\timg.alt = this.options.alt;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar scale = this._map.getZoomScale(e.zoom),\r\n\t\t offset = this._map._latLngToNewLayerPoint(this._bounds.getNorthWest(), e.zoom, e.center);\r\n\r\n\t\tL.DomUtil.setTransform(this._image, offset, scale);\r\n\t},\r\n\r\n\t_reset: function () {\r\n\t\tvar image = this._image,\r\n\t\t bounds = new L.Bounds(\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getNorthWest()),\r\n\t\t this._map.latLngToLayerPoint(this._bounds.getSouthEast())),\r\n\t\t size = bounds.getSize();\r\n\r\n\t\tL.DomUtil.setPosition(image, bounds.min);\r\n\r\n\t\timage.style.width = size.x + 'px';\r\n\t\timage.style.height = size.y + 'px';\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tL.DomUtil.setOpacity(this._image, this.options.opacity);\r\n\t}\r\n});\r\n\r\n// @factory L.imageOverlay(imageUrl: String, bounds: LatLngBounds, options?: ImageOverlay options)\r\n// Instantiates an image overlay object given the URL of the image and the\r\n// geographical bounds it is tied to.\r\nL.imageOverlay = function (url, bounds, options) {\r\n\treturn new L.ImageOverlay(url, bounds, options);\r\n};\r\n","/*\r\n * @class Icon\r\n * @aka L.Icon\r\n * @inherits Layer\r\n *\r\n * Represents an icon to provide when creating a marker.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var myIcon = L.icon({\r\n * iconUrl: 'my-icon.png',\r\n * iconRetinaUrl: 'my-icon@2x.png',\r\n * iconSize: [38, 95],\r\n * iconAnchor: [22, 94],\r\n * popupAnchor: [-3, -76],\r\n * shadowUrl: 'my-icon-shadow.png',\r\n * shadowRetinaUrl: 'my-icon-shadow@2x.png',\r\n * shadowSize: [68, 95],\r\n * shadowAnchor: [22, 94]\r\n * });\r\n *\r\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\r\n * ```\r\n *\r\n * `L.Icon.Default` extends `L.Icon` and is the blue icon Leaflet uses for markers by default.\r\n *\r\n */\r\n\r\nL.Icon = L.Class.extend({\r\n\r\n\t/* @section\r\n\t * @aka Icon options\r\n\t *\r\n\t * @option iconUrl: String = null\r\n\t * **(required)** The URL to the icon image (absolute or relative to your script path).\r\n\t *\r\n\t * @option iconRetinaUrl: String = null\r\n\t * The URL to a retina sized version of the icon image (absolute or relative to your\r\n\t * script path). Used for Retina screen devices.\r\n\t *\r\n\t * @option iconSize: Point = null\r\n\t * Size of the icon image in pixels.\r\n\t *\r\n\t * @option iconAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the icon (relative to its top left corner). The icon\r\n\t * will be aligned so that this point is at the marker's geographical location. Centered\r\n\t * by default if size is specified, also can be set in CSS with negative margins.\r\n\t *\r\n\t * @option popupAnchor: Point = null\r\n\t * The coordinates of the point from which popups will \"open\", relative to the icon anchor.\r\n\t *\r\n\t * @option shadowUrl: String = null\r\n\t * The URL to the icon shadow image. If not specified, no shadow image will be created.\r\n\t *\r\n\t * @option shadowRetinaUrl: String = null\r\n\t *\r\n\t * @option shadowSize: Point = null\r\n\t * Size of the shadow image in pixels.\r\n\t *\r\n\t * @option shadowAnchor: Point = null\r\n\t * The coordinates of the \"tip\" of the shadow (relative to its top left corner) (the same\r\n\t * as iconAnchor if not specified).\r\n\t *\r\n\t * @option className: String = ''\r\n\t * A custom class name to assign to both icon and shadow images. Empty by default.\r\n\t */\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\t// @method createIcon(oldIcon?: HTMLElement): HTMLElement\r\n\t// Called internally when the icon has to be shown, returns a `<img>` HTML element\r\n\t// styled according to the options.\r\n\tcreateIcon: function (oldIcon) {\r\n\t\treturn this._createIcon('icon', oldIcon);\r\n\t},\r\n\r\n\t// @method createShadow(oldIcon?: HTMLElement): HTMLElement\r\n\t// As `createIcon`, but for the shadow beneath it.\r\n\tcreateShadow: function (oldIcon) {\r\n\t\treturn this._createIcon('shadow', oldIcon);\r\n\t},\r\n\r\n\t_createIcon: function (name, oldIcon) {\r\n\t\tvar src = this._getIconUrl(name);\r\n\r\n\t\tif (!src) {\r\n\t\t\tif (name === 'icon') {\r\n\t\t\t\tthrow new Error('iconUrl not set in Icon options (see the docs).');\r\n\t\t\t}\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tvar img = this._createImg(src, oldIcon && oldIcon.tagName === 'IMG' ? oldIcon : null);\r\n\t\tthis._setIconStyles(img, name);\r\n\r\n\t\treturn img;\r\n\t},\r\n\r\n\t_setIconStyles: function (img, name) {\r\n\t\tvar options = this.options;\r\n\t\tvar sizeOption = options[name + 'Size'];\r\n\r\n\t\tif (typeof sizeOption === 'number') {\r\n\t\t\tsizeOption = [sizeOption, sizeOption];\r\n\t\t}\r\n\r\n\t\tvar size = L.point(sizeOption),\r\n\t\t anchor = L.point(name === 'shadow' && options.shadowAnchor || options.iconAnchor ||\r\n\t\t size && size.divideBy(2, true));\r\n\r\n\t\timg.className = 'leaflet-marker-' + name + ' ' + (options.className || '');\r\n\r\n\t\tif (anchor) {\r\n\t\t\timg.style.marginLeft = (-anchor.x) + 'px';\r\n\t\t\timg.style.marginTop = (-anchor.y) + 'px';\r\n\t\t}\r\n\r\n\t\tif (size) {\r\n\t\t\timg.style.width = size.x + 'px';\r\n\t\t\timg.style.height = size.y + 'px';\r\n\t\t}\r\n\t},\r\n\r\n\t_createImg: function (src, el) {\r\n\t\tel = el || document.createElement('img');\r\n\t\tel.src = src;\r\n\t\treturn el;\r\n\t},\r\n\r\n\t_getIconUrl: function (name) {\r\n\t\treturn L.Browser.retina && this.options[name + 'RetinaUrl'] || this.options[name + 'Url'];\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.icon(options: Icon options)\r\n// Creates an icon instance with the given options.\r\nL.icon = function (options) {\r\n\treturn new L.Icon(options);\r\n};\r\n","/*\n * @miniclass Icon.Default (Icon)\n * @aka L.Icon.Default\n * @section\n *\n * A trivial subclass of `Icon`, represents the icon to use in `Marker`s when\n * no icon is specified. Points to the blue marker image distributed with Leaflet\n * releases.\n *\n * In order to change the default icon, just change the properties of `L.Icon.Default.prototype.options`\n * (which is a set of `Icon options`).\n */\n\nL.Icon.Default = L.Icon.extend({\n\n\toptions: {\n\t\ticonUrl: 'marker-icon.png',\n\t\ticonRetinaUrl: 'marker-icon-2x.png',\n\t\tshadowUrl: 'marker-shadow.png',\n\t\ticonSize: [25, 41],\n\t\ticonAnchor: [12, 41],\n\t\tpopupAnchor: [1, -34],\n\t\ttooltipAnchor: [16, -28],\n\t\tshadowSize: [41, 41]\n\t},\n\n\t_getIconUrl: function (name) {\n\t\tif (!L.Icon.Default.imagePath) {\t// Deprecated, backwards-compatibility only\n\t\t\tL.Icon.Default.imagePath = this._detectIconPath();\n\t\t}\n\n\t\t// @option imagePath: String\n\t\t// `L.Icon.Default` will try to auto-detect the absolute location of the\n\t\t// blue icon images. If you are placing these images in a non-standard\n\t\t// way, set this option to point to the right absolute path.\n\t\treturn (this.options.imagePath || L.Icon.Default.imagePath) + L.Icon.prototype._getIconUrl.call(this, name);\n\t},\n\n\t_detectIconPath: function () {\n\t\tvar el = L.DomUtil.create('div', 'leaflet-default-icon-path', document.body);\n\t\tvar path = L.DomUtil.getStyle(el, 'background-image') ||\n\t\t L.DomUtil.getStyle(el, 'backgroundImage');\t// IE8\n\n\t\tdocument.body.removeChild(el);\n\n\t\treturn path.indexOf('url') === 0 ?\n\t\t\tpath.replace(/^url\\([\\\"\\']?/, '').replace(/marker-icon\\.png[\\\"\\']?\\)$/, '') : '';\n\t}\n});\n","/*\r\n * @class Marker\r\n * @inherits Interactive layer\r\n * @aka L.Marker\r\n * L.Marker is used to display clickable/draggable icons on the map. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.marker([50.5, 30.5]).addTo(map);\r\n * ```\r\n */\r\n\r\nL.Marker = L.Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka Marker options\r\n\toptions: {\r\n\t\t// @option icon: Icon = *\r\n\t\t// Icon class to use for rendering the marker. See [Icon documentation](#L.Icon) for details on how to customize the marker icon. If not specified, a new `L.Icon.Default` is used.\r\n\t\ticon: new L.Icon.Default(),\r\n\r\n\t\t// Option inherited from \"Interactive layer\" abstract class\r\n\t\tinteractive: true,\r\n\r\n\t\t// @option draggable: Boolean = false\r\n\t\t// Whether the marker is draggable with mouse/touch or not.\r\n\t\tdraggable: false,\r\n\r\n\t\t// @option keyboard: Boolean = true\r\n\t\t// Whether the marker can be tabbed to with a keyboard and clicked by pressing enter.\r\n\t\tkeyboard: true,\r\n\r\n\t\t// @option title: String = ''\r\n\t\t// Text for the browser tooltip that appear on marker hover (no tooltip by default).\r\n\t\ttitle: '',\r\n\r\n\t\t// @option alt: String = ''\r\n\t\t// Text for the `alt` attribute of the icon image (useful for accessibility).\r\n\t\talt: '',\r\n\r\n\t\t// @option zIndexOffset: Number = 0\r\n\t\t// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).\r\n\t\tzIndexOffset: 0,\r\n\r\n\t\t// @option opacity: Number = 1.0\r\n\t\t// The opacity of the marker.\r\n\t\topacity: 1,\r\n\r\n\t\t// @option riseOnHover: Boolean = false\r\n\t\t// If `true`, the marker will get on top of others when you hover the mouse over it.\r\n\t\triseOnHover: false,\r\n\r\n\t\t// @option riseOffset: Number = 250\r\n\t\t// The z-index offset used for the `riseOnHover` feature.\r\n\t\triseOffset: 250,\r\n\r\n\t\t// @option pane: String = 'markerPane'\r\n\t\t// `Map pane` where the markers icon will be added.\r\n\t\tpane: 'markerPane',\r\n\r\n\t\t// FIXME: shadowPane is no longer a valid option\r\n\t\tnonBubblingEvents: ['click', 'dblclick', 'mouseover', 'mouseout', 'contextmenu']\r\n\t},\r\n\r\n\t/* @section\r\n\t *\r\n\t * In addition to [shared layer methods](#Layer) like `addTo()` and `remove()` and [popup methods](#Popup) like bindPopup() you can also use the following methods:\r\n\t */\r\n\r\n\tinitialize: function (latlng, options) {\r\n\t\tL.setOptions(this, options);\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = this._zoomAnimated && map.options.markerZoomAnimation;\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.on('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._initIcon();\r\n\t\tthis.update();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (this.dragging && this.dragging.enabled()) {\r\n\t\t\tthis.options.draggable = true;\r\n\t\t\tthis.dragging.removeHooks();\r\n\t\t}\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tmap.off('zoomanim', this._animateZoom, this);\r\n\t\t}\r\n\r\n\t\tthis._removeIcon();\r\n\t\tthis._removeShadow();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\treturn {\r\n\t\t\tzoom: this.update,\r\n\t\t\tviewreset: this.update\r\n\t\t};\r\n\t},\r\n\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the current geographical position of the marker.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Changes the marker position to the given point.\r\n\tsetLatLng: function (latlng) {\r\n\t\tvar oldLatLng = this._latlng;\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t\tthis.update();\r\n\r\n\t\t// @event move: Event\r\n\t\t// Fired when the marker is moved via [`setLatLng`](#marker-setlatlng) or by [dragging](#marker-dragging). Old and new coordinates are included in event arguments as `oldLatLng`, `latlng`.\r\n\t\treturn this.fire('move', {oldLatLng: oldLatLng, latlng: this._latlng});\r\n\t},\r\n\r\n\t// @method setZIndexOffset(offset: Number): this\r\n\t// Changes the [zIndex offset](#marker-zindexoffset) of the marker.\r\n\tsetZIndexOffset: function (offset) {\r\n\t\tthis.options.zIndexOffset = offset;\r\n\t\treturn this.update();\r\n\t},\r\n\r\n\t// @method setIcon(icon: Icon): this\r\n\t// Changes the marker icon.\r\n\tsetIcon: function (icon) {\r\n\r\n\t\tthis.options.icon = icon;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._initIcon();\r\n\t\t\tthis.update();\r\n\t\t}\r\n\r\n\t\tif (this._popup) {\r\n\t\t\tthis.bindPopup(this._popup, this._popup.options);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tgetElement: function () {\r\n\t\treturn this._icon;\r\n\t},\r\n\r\n\tupdate: function () {\r\n\r\n\t\tif (this._icon) {\r\n\t\t\tvar pos = this._map.latLngToLayerPoint(this._latlng).round();\r\n\t\t\tthis._setPos(pos);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initIcon: function () {\r\n\t\tvar options = this.options,\r\n\t\t classToAdd = 'leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\r\n\r\n\t\tvar icon = options.icon.createIcon(this._icon),\r\n\t\t addIcon = false;\r\n\r\n\t\t// if we're not reusing the icon, remove the old one and init new one\r\n\t\tif (icon !== this._icon) {\r\n\t\t\tif (this._icon) {\r\n\t\t\t\tthis._removeIcon();\r\n\t\t\t}\r\n\t\t\taddIcon = true;\r\n\r\n\t\t\tif (options.title) {\r\n\t\t\t\ticon.title = options.title;\r\n\t\t\t}\r\n\t\t\tif (options.alt) {\r\n\t\t\t\ticon.alt = options.alt;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tL.DomUtil.addClass(icon, classToAdd);\r\n\r\n\t\tif (options.keyboard) {\r\n\t\t\ticon.tabIndex = '0';\r\n\t\t}\r\n\r\n\t\tthis._icon = icon;\r\n\r\n\t\tif (options.riseOnHover) {\r\n\t\t\tthis.on({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tvar newShadow = options.icon.createShadow(this._shadow),\r\n\t\t addShadow = false;\r\n\r\n\t\tif (newShadow !== this._shadow) {\r\n\t\t\tthis._removeShadow();\r\n\t\t\taddShadow = true;\r\n\t\t}\r\n\r\n\t\tif (newShadow) {\r\n\t\t\tL.DomUtil.addClass(newShadow, classToAdd);\r\n\t\t}\r\n\t\tthis._shadow = newShadow;\r\n\r\n\r\n\t\tif (options.opacity < 1) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\r\n\t\tif (addIcon) {\r\n\t\t\tthis.getPane().appendChild(this._icon);\r\n\t\t}\r\n\t\tthis._initInteraction();\r\n\t\tif (newShadow && addShadow) {\r\n\t\t\tthis.getPane('shadowPane').appendChild(this._shadow);\r\n\t\t}\r\n\t},\r\n\r\n\t_removeIcon: function () {\r\n\t\tif (this.options.riseOnHover) {\r\n\t\t\tthis.off({\r\n\t\t\t\tmouseover: this._bringToFront,\r\n\t\t\t\tmouseout: this._resetZIndex\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tL.DomUtil.remove(this._icon);\r\n\t\tthis.removeInteractiveTarget(this._icon);\r\n\r\n\t\tthis._icon = null;\r\n\t},\r\n\r\n\t_removeShadow: function () {\r\n\t\tif (this._shadow) {\r\n\t\t\tL.DomUtil.remove(this._shadow);\r\n\t\t}\r\n\t\tthis._shadow = null;\r\n\t},\r\n\r\n\t_setPos: function (pos) {\r\n\t\tL.DomUtil.setPosition(this._icon, pos);\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tL.DomUtil.setPosition(this._shadow, pos);\r\n\t\t}\r\n\r\n\t\tthis._zIndex = pos.y + this.options.zIndexOffset;\r\n\r\n\t\tthis._resetZIndex();\r\n\t},\r\n\r\n\t_updateZIndex: function (offset) {\r\n\t\tthis._icon.style.zIndex = this._zIndex + offset;\r\n\t},\r\n\r\n\t_animateZoom: function (opt) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, opt.zoom, opt.center).round();\r\n\r\n\t\tthis._setPos(pos);\r\n\t},\r\n\r\n\t_initInteraction: function () {\r\n\r\n\t\tif (!this.options.interactive) { return; }\r\n\r\n\t\tL.DomUtil.addClass(this._icon, 'leaflet-interactive');\r\n\r\n\t\tthis.addInteractiveTarget(this._icon);\r\n\r\n\t\tif (L.Handler.MarkerDrag) {\r\n\t\t\tvar draggable = this.options.draggable;\r\n\t\t\tif (this.dragging) {\r\n\t\t\t\tdraggable = this.dragging.enabled();\r\n\t\t\t\tthis.dragging.disable();\r\n\t\t\t}\r\n\r\n\t\t\tthis.dragging = new L.Handler.MarkerDrag(this);\r\n\r\n\t\t\tif (draggable) {\r\n\t\t\t\tthis.dragging.enable();\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method setOpacity(opacity: Number): this\r\n\t// Changes the opacity of the marker.\r\n\tsetOpacity: function (opacity) {\r\n\t\tthis.options.opacity = opacity;\r\n\t\tif (this._map) {\r\n\t\t\tthis._updateOpacity();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateOpacity: function () {\r\n\t\tvar opacity = this.options.opacity;\r\n\r\n\t\tL.DomUtil.setOpacity(this._icon, opacity);\r\n\r\n\t\tif (this._shadow) {\r\n\t\t\tL.DomUtil.setOpacity(this._shadow, opacity);\r\n\t\t}\r\n\t},\r\n\r\n\t_bringToFront: function () {\r\n\t\tthis._updateZIndex(this.options.riseOffset);\r\n\t},\r\n\r\n\t_resetZIndex: function () {\r\n\t\tthis._updateZIndex(0);\r\n\t}\r\n});\r\n\r\n\r\n// factory L.marker(latlng: LatLng, options? : Marker options)\r\n\r\n// @factory L.marker(latlng: LatLng, options? : Marker options)\r\n// Instantiates a Marker object given a geographical point and optionally an options object.\r\nL.marker = function (latlng, options) {\r\n\treturn new L.Marker(latlng, options);\r\n};\r\n","/*\n * @class DivIcon\n * @aka L.DivIcon\n * @inherits Icon\n *\n * Represents a lightweight icon for markers that uses a simple `<div>`\n * element instead of an image. Inherits from `Icon` but ignores the `iconUrl` and shadow options.\n *\n * @example\n * ```js\n * var myIcon = L.divIcon({className: 'my-div-icon'});\n * // you can set .my-div-icon styles in CSS\n *\n * L.marker([50.505, 30.57], {icon: myIcon}).addTo(map);\n * ```\n *\n * By default, it has a 'leaflet-div-icon' CSS class and is styled as a little white square with a shadow.\n */\n\nL.DivIcon = L.Icon.extend({\n\toptions: {\n\t\t// @section\n\t\t// @aka DivIcon options\n\t\ticonSize: [12, 12], // also can be set through CSS\n\n\t\t// iconAnchor: (Point),\n\t\t// popupAnchor: (Point),\n\n\t\t// @option html: String = ''\n\t\t// Custom HTML code to put inside the div element, empty by default.\n\t\thtml: false,\n\n\t\t// @option bgPos: Point = [0, 0]\n\t\t// Optional relative position of the background, in pixels\n\t\tbgPos: null,\n\n\t\tclassName: 'leaflet-div-icon'\n\t},\n\n\tcreateIcon: function (oldIcon) {\n\t\tvar div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),\n\t\t options = this.options;\n\n\t\tdiv.innerHTML = options.html !== false ? options.html : '';\n\n\t\tif (options.bgPos) {\n\t\t\tvar bgPos = L.point(options.bgPos);\n\t\t\tdiv.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';\n\t\t}\n\t\tthis._setIconStyles(div, 'icon');\n\n\t\treturn div;\n\t},\n\n\tcreateShadow: function () {\n\t\treturn null;\n\t}\n});\n\n// @factory L.divIcon(options: DivIcon options)\n// Creates a `DivIcon` instance with the given options.\nL.divIcon = function (options) {\n\treturn new L.DivIcon(options);\n};\n","/*\r\n * @class DivOverlay\r\n * @inherits Layer\r\n * @aka L.DivOverlay\r\n * Base model for L.Popup and L.Tooltip. Inherit from it for custom popup like plugins.\r\n */\r\n\r\n// @namespace DivOverlay\r\nL.DivOverlay = L.Layer.extend({\r\n\r\n\t// @section\r\n\t// @aka DivOverlay options\r\n\toptions: {\r\n\t\t// @option offset: Point = Point(0, 7)\r\n\t\t// The offset of the popup position. Useful to control the anchor\r\n\t\t// of the popup when opening it on some overlays.\r\n\t\toffset: [0, 7],\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the popup.\r\n\t\tclassName: '',\r\n\r\n\t\t// @option pane: String = 'popupPane'\r\n\t\t// `Map pane` where the popup will be added.\r\n\t\tpane: 'popupPane'\r\n\t},\r\n\r\n\tinitialize: function (options, source) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._source = source;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._zoomAnimated = map._zoomAnimated;\r\n\r\n\t\tif (!this._container) {\r\n\t\t\tthis._initLayout();\r\n\t\t}\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 0);\r\n\t\t}\r\n\r\n\t\tclearTimeout(this._removeTimeout);\r\n\t\tthis.getPane().appendChild(this._container);\r\n\t\tthis.update();\r\n\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 1);\r\n\t\t}\r\n\r\n\t\tthis.bringToFront();\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tif (map._fadeAnimated) {\r\n\t\t\tL.DomUtil.setOpacity(this._container, 0);\r\n\t\t\tthis._removeTimeout = setTimeout(L.bind(L.DomUtil.remove, L.DomUtil, this._container), 200);\r\n\t\t} else {\r\n\t\t\tL.DomUtil.remove(this._container);\r\n\t\t}\r\n\t},\r\n\r\n\t// @namespace Popup\r\n\t// @method getLatLng: LatLng\r\n\t// Returns the geographical point of popup.\r\n\tgetLatLng: function () {\r\n\t\treturn this._latlng;\r\n\t},\r\n\r\n\t// @method setLatLng(latlng: LatLng): this\r\n\t// Sets the geographical point where the popup will open.\r\n\tsetLatLng: function (latlng) {\r\n\t\tthis._latlng = L.latLng(latlng);\r\n\t\tif (this._map) {\r\n\t\t\tthis._updatePosition();\r\n\t\t\tthis._adjustPan();\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContent: String|HTMLElement\r\n\t// Returns the content of the popup.\r\n\tgetContent: function () {\r\n\t\treturn this._content;\r\n\t},\r\n\r\n\t// @method setContent(htmlContent: String|HTMLElement|Function): this\r\n\t// Sets the HTML content of the popup. If a function is passed the source layer will be passed to the function. The function should return a `String` or `HTMLElement` to be used in the popup.\r\n\tsetContent: function (content) {\r\n\t\tthis._content = content;\r\n\t\tthis.update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getElement: String|HTMLElement\r\n\t// Alias for [getContent()](#popup-getcontent)\r\n\tgetElement: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method update: null\r\n\t// Updates the popup content, layout and position. Useful for updating the popup after something inside changed, e.g. image loaded.\r\n\tupdate: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tthis._container.style.visibility = 'hidden';\r\n\r\n\t\tthis._updateContent();\r\n\t\tthis._updateLayout();\r\n\t\tthis._updatePosition();\r\n\r\n\t\tthis._container.style.visibility = '';\r\n\r\n\t\tthis._adjustPan();\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = {\r\n\t\t\tzoom: this._updatePosition,\r\n\t\t\tviewreset: this._updatePosition\r\n\t\t};\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tevents.zoomanim = this._animateZoom;\r\n\t\t}\r\n\t\treturn events;\r\n\t},\r\n\r\n\t// @method isOpen: Boolean\r\n\t// Returns `true` when the popup is visible on the map.\r\n\tisOpen: function () {\r\n\t\treturn !!this._map && this._map.hasLayer(this);\r\n\t},\r\n\r\n\t// @method bringToFront: this\r\n\t// Brings this popup in front of other popups (in the same map pane).\r\n\tbringToFront: function () {\r\n\t\tif (this._map) {\r\n\t\t\tL.DomUtil.toFront(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method bringToBack: this\r\n\t// Brings this popup to the back of other popups (in the same map pane).\r\n\tbringToBack: function () {\r\n\t\tif (this._map) {\r\n\t\t\tL.DomUtil.toBack(this._container);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_updateContent: function () {\r\n\t\tif (!this._content) { return; }\r\n\r\n\t\tvar node = this._contentNode;\r\n\t\tvar content = (typeof this._content === 'function') ? this._content(this._source || this) : this._content;\r\n\r\n\t\tif (typeof content === 'string') {\r\n\t\t\tnode.innerHTML = content;\r\n\t\t} else {\r\n\t\t\twhile (node.hasChildNodes()) {\r\n\t\t\t\tnode.removeChild(node.firstChild);\r\n\t\t\t}\r\n\t\t\tnode.appendChild(content);\r\n\t\t}\r\n\t\tthis.fire('contentupdate');\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng),\r\n\t\t offset = L.point(this.options.offset),\r\n\t\t anchor = this._getAnchor();\r\n\r\n\t\tif (this._zoomAnimated) {\r\n\t\t\tL.DomUtil.setPosition(this._container, pos.add(anchor));\r\n\t\t} else {\r\n\t\t\toffset = offset.add(pos).add(anchor);\r\n\t\t}\r\n\r\n\t\tvar bottom = this._containerBottom = -offset.y,\r\n\t\t left = this._containerLeft = -Math.round(this._containerWidth / 2) + offset.x;\r\n\r\n\t\t// bottom position the popup in case the height of the popup changes (images loading etc)\r\n\t\tthis._container.style.bottom = bottom + 'px';\r\n\t\tthis._container.style.left = left + 'px';\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\treturn [0, 0];\r\n\t}\r\n\r\n});\r\n","/*\r\n * @class Popup\r\n * @inherits DivOverlay\r\n * @aka L.Popup\r\n * Used to open popups in certain places of the map. Use [Map.openPopup](#map-openpopup) to\r\n * open popups while making sure that only one popup is open at one time\r\n * (recommended for usability), or use [Map.addLayer](#map-addlayer) to open as many as you want.\r\n *\r\n * @example\r\n *\r\n * If you want to just bind a popup to marker click and then open it, it's really easy:\r\n *\r\n * ```js\r\n * marker.bindPopup(popupContent).openPopup();\r\n * ```\r\n * Path overlays like polylines also have a `bindPopup` method.\r\n * Here's a more complicated way to open a popup on a map:\r\n *\r\n * ```js\r\n * var popup = L.popup()\r\n * \t.setLatLng(latlng)\r\n * \t.setContent('<p>Hello world!<br />This is a nice popup.</p>')\r\n * \t.openOn(map);\r\n * ```\r\n */\r\n\r\n\r\n// @namespace Popup\r\nL.Popup = L.DivOverlay.extend({\r\n\r\n\t// @section\r\n\t// @aka Popup options\r\n\toptions: {\r\n\t\t// @option maxWidth: Number = 300\r\n\t\t// Max width of the popup, in pixels.\r\n\t\tmaxWidth: 300,\r\n\r\n\t\t// @option minWidth: Number = 50\r\n\t\t// Min width of the popup, in pixels.\r\n\t\tminWidth: 50,\r\n\r\n\t\t// @option maxHeight: Number = null\r\n\t\t// If set, creates a scrollable container of the given height\r\n\t\t// inside a popup if its content exceeds it.\r\n\t\tmaxHeight: null,\r\n\r\n\t\t// @option autoPan: Boolean = true\r\n\t\t// Set it to `false` if you don't want the map to do panning animation\r\n\t\t// to fit the opened popup.\r\n\t\tautoPan: true,\r\n\r\n\t\t// @option autoPanPaddingTopLeft: Point = null\r\n\t\t// The margin between the popup and the top left corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingTopLeft: null,\r\n\r\n\t\t// @option autoPanPaddingBottomRight: Point = null\r\n\t\t// The margin between the popup and the bottom right corner of the map\r\n\t\t// view after autopanning was performed.\r\n\t\tautoPanPaddingBottomRight: null,\r\n\r\n\t\t// @option autoPanPadding: Point = Point(5, 5)\r\n\t\t// Equivalent of setting both top left and bottom right autopan padding to the same value.\r\n\t\tautoPanPadding: [5, 5],\r\n\r\n\t\t// @option keepInView: Boolean = false\r\n\t\t// Set it to `true` if you want to prevent users from panning the popup\r\n\t\t// off of the screen while it is open.\r\n\t\tkeepInView: false,\r\n\r\n\t\t// @option closeButton: Boolean = true\r\n\t\t// Controls the presence of a close button in the popup.\r\n\t\tcloseButton: true,\r\n\r\n\t\t// @option autoClose: Boolean = true\r\n\t\t// Set it to `false` if you want to override the default behavior of\r\n\t\t// the popup closing when user clicks the map (set globally by\r\n\t\t// the Map's [closePopupOnClick](#map-closepopuponclick) option).\r\n\t\tautoClose: true,\r\n\r\n\t\t// @option className: String = ''\r\n\t\t// A custom CSS class name to assign to the popup.\r\n\t\tclassName: ''\r\n\t},\r\n\r\n\t// @namespace Popup\r\n\t// @method openOn(map: Map): this\r\n\t// Adds the popup to the map and closes the previous one. The same as `map.openPopup(popup)`.\r\n\topenOn: function (map) {\r\n\t\tmap.openPopup(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tL.DivOverlay.prototype.onAdd.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupopen: PopupEvent\r\n\t\t// Fired when a popup is opened in the map\r\n\t\tmap.fire('popupopen', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupopen: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is opened\r\n\t\t\tthis._source.fire('popupopen', {popup: this}, true);\r\n\t\t\t// For non-path layers, we toggle the popup when clicking\r\n\t\t\t// again the layer, so prevent the map to reopen it.\r\n\t\t\tif (!(this._source instanceof L.Path)) {\r\n\t\t\t\tthis._source.on('preclick', L.DomEvent.stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tL.DivOverlay.prototype.onRemove.call(this, map);\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event popupclose: PopupEvent\r\n\t\t// Fired when a popup in the map is closed\r\n\t\tmap.fire('popupclose', {popup: this});\r\n\r\n\t\tif (this._source) {\r\n\t\t\t// @namespace Layer\r\n\t\t\t// @section Popup events\r\n\t\t\t// @event popupclose: PopupEvent\r\n\t\t\t// Fired when a popup bound to this layer is closed\r\n\t\t\tthis._source.fire('popupclose', {popup: this}, true);\r\n\t\t\tif (!(this._source instanceof L.Path)) {\r\n\t\t\t\tthis._source.off('preclick', L.DomEvent.stopPropagation);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\tgetEvents: function () {\r\n\t\tvar events = L.DivOverlay.prototype.getEvents.call(this);\r\n\r\n\t\tif ('closeOnClick' in this.options ? this.options.closeOnClick : this._map.options.closePopupOnClick) {\r\n\t\t\tevents.preclick = this._close;\r\n\t\t}\r\n\r\n\t\tif (this.options.keepInView) {\r\n\t\t\tevents.moveend = this._adjustPan;\r\n\t\t}\r\n\r\n\t\treturn events;\r\n\t},\r\n\r\n\t_close: function () {\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.closePopup(this);\r\n\t\t}\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar prefix = 'leaflet-popup',\r\n\t\t container = this._container = L.DomUtil.create('div',\r\n\t\t\tprefix + ' ' + (this.options.className || '') +\r\n\t\t\t' leaflet-zoom-animated');\r\n\r\n\t\tif (this.options.closeButton) {\r\n\t\t\tvar closeButton = this._closeButton = L.DomUtil.create('a', prefix + '-close-button', container);\r\n\t\t\tcloseButton.href = '#close';\r\n\t\t\tcloseButton.innerHTML = '×';\r\n\r\n\t\t\tL.DomEvent.on(closeButton, 'click', this._onCloseButtonClick, this);\r\n\t\t}\r\n\r\n\t\tvar wrapper = this._wrapper = L.DomUtil.create('div', prefix + '-content-wrapper', container);\r\n\t\tthis._contentNode = L.DomUtil.create('div', prefix + '-content', wrapper);\r\n\r\n\t\tL.DomEvent\r\n\t\t\t.disableClickPropagation(wrapper)\r\n\t\t\t.disableScrollPropagation(this._contentNode)\r\n\t\t\t.on(wrapper, 'contextmenu', L.DomEvent.stopPropagation);\r\n\r\n\t\tthis._tipContainer = L.DomUtil.create('div', prefix + '-tip-container', container);\r\n\t\tthis._tip = L.DomUtil.create('div', prefix + '-tip', this._tipContainer);\r\n\t},\r\n\r\n\t_updateLayout: function () {\r\n\t\tvar container = this._contentNode,\r\n\t\t style = container.style;\r\n\r\n\t\tstyle.width = '';\r\n\t\tstyle.whiteSpace = 'nowrap';\r\n\r\n\t\tvar width = container.offsetWidth;\r\n\t\twidth = Math.min(width, this.options.maxWidth);\r\n\t\twidth = Math.max(width, this.options.minWidth);\r\n\r\n\t\tstyle.width = (width + 1) + 'px';\r\n\t\tstyle.whiteSpace = '';\r\n\r\n\t\tstyle.height = '';\r\n\r\n\t\tvar height = container.offsetHeight,\r\n\t\t maxHeight = this.options.maxHeight,\r\n\t\t scrolledClass = 'leaflet-popup-scrolled';\r\n\r\n\t\tif (maxHeight && height > maxHeight) {\r\n\t\t\tstyle.height = maxHeight + 'px';\r\n\t\t\tL.DomUtil.addClass(container, scrolledClass);\r\n\t\t} else {\r\n\t\t\tL.DomUtil.removeClass(container, scrolledClass);\r\n\t\t}\r\n\r\n\t\tthis._containerWidth = this._container.offsetWidth;\r\n\t},\r\n\r\n\t_animateZoom: function (e) {\r\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center),\r\n\t\t anchor = this._getAnchor();\r\n\t\tL.DomUtil.setPosition(this._container, pos.add(anchor));\r\n\t},\r\n\r\n\t_adjustPan: function () {\r\n\t\tif (!this.options.autoPan || (this._map._panAnim && this._map._panAnim._inProgress)) { return; }\r\n\r\n\t\tvar map = this._map,\r\n\t\t marginBottom = parseInt(L.DomUtil.getStyle(this._container, 'marginBottom'), 10) || 0,\r\n\t\t containerHeight = this._container.offsetHeight + marginBottom,\r\n\t\t containerWidth = this._containerWidth,\r\n\t\t layerPos = new L.Point(this._containerLeft, -containerHeight - this._containerBottom);\r\n\r\n\t\tlayerPos._add(L.DomUtil.getPosition(this._container));\r\n\r\n\t\tvar containerPos = map.layerPointToContainerPoint(layerPos),\r\n\t\t padding = L.point(this.options.autoPanPadding),\r\n\t\t paddingTL = L.point(this.options.autoPanPaddingTopLeft || padding),\r\n\t\t paddingBR = L.point(this.options.autoPanPaddingBottomRight || padding),\r\n\t\t size = map.getSize(),\r\n\t\t dx = 0,\r\n\t\t dy = 0;\r\n\r\n\t\tif (containerPos.x + containerWidth + paddingBR.x > size.x) { // right\r\n\t\t\tdx = containerPos.x + containerWidth - size.x + paddingBR.x;\r\n\t\t}\r\n\t\tif (containerPos.x - dx - paddingTL.x < 0) { // left\r\n\t\t\tdx = containerPos.x - paddingTL.x;\r\n\t\t}\r\n\t\tif (containerPos.y + containerHeight + paddingBR.y > size.y) { // bottom\r\n\t\t\tdy = containerPos.y + containerHeight - size.y + paddingBR.y;\r\n\t\t}\r\n\t\tif (containerPos.y - dy - paddingTL.y < 0) { // top\r\n\t\t\tdy = containerPos.y - paddingTL.y;\r\n\t\t}\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Popup events\r\n\t\t// @event autopanstart: Event\r\n\t\t// Fired when the map starts autopanning when opening a popup.\r\n\t\tif (dx || dy) {\r\n\t\t\tmap\r\n\t\t\t .fire('autopanstart')\r\n\t\t\t .panBy([dx, dy]);\r\n\t\t}\r\n\t},\r\n\r\n\t_onCloseButtonClick: function (e) {\r\n\t\tthis._close();\r\n\t\tL.DomEvent.stop(e);\r\n\t},\r\n\r\n\t_getAnchor: function () {\r\n\t\t// Where should we anchor the popup on the source layer?\r\n\t\treturn L.point(this._source && this._source._getPopupAnchor ? this._source._getPopupAnchor() : [0, 0]);\r\n\t}\r\n\r\n});\r\n\r\n// @namespace Popup\r\n// @factory L.popup(options?: Popup options, source?: Layer)\r\n// Instantiates a `Popup` object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the popup with a reference to the Layer to which it refers.\r\nL.popup = function (options, source) {\r\n\treturn new L.Popup(options, source);\r\n};\r\n\r\n\r\n/* @namespace Map\r\n * @section Interaction Options\r\n * @option closePopupOnClick: Boolean = true\r\n * Set it to `false` if you don't want popups to close when user clicks the map.\r\n */\r\nL.Map.mergeOptions({\r\n\tclosePopupOnClick: true\r\n});\r\n\r\n\r\n// @namespace Map\r\n// @section Methods for Layers and Controls\r\nL.Map.include({\r\n\t// @method openPopup(popup: Popup): this\r\n\t// Opens the specified popup while closing the previously opened (to make sure only one is opened at one time for usability).\r\n\t// @alternative\r\n\t// @method openPopup(content: String|HTMLElement, latlng: LatLng, options?: Popup options): this\r\n\t// Creates a popup with the specified content and options and opens it in the given point on a map.\r\n\topenPopup: function (popup, latlng, options) {\r\n\t\tif (!(popup instanceof L.Popup)) {\r\n\t\t\tpopup = new L.Popup(options).setContent(popup);\r\n\t\t}\r\n\r\n\t\tif (latlng) {\r\n\t\t\tpopup.setLatLng(latlng);\r\n\t\t}\r\n\r\n\t\tif (this.hasLayer(popup)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tif (this._popup && this._popup.options.autoClose) {\r\n\t\t\tthis.closePopup();\r\n\t\t}\r\n\r\n\t\tthis._popup = popup;\r\n\t\treturn this.addLayer(popup);\r\n\t},\r\n\r\n\t// @method closePopup(popup?: Popup): this\r\n\t// Closes the popup previously opened with [openPopup](#map-openpopup) (or the given one).\r\n\tclosePopup: function (popup) {\r\n\t\tif (!popup || popup === this._popup) {\r\n\t\t\tpopup = this._popup;\r\n\t\t\tthis._popup = null;\r\n\t\t}\r\n\t\tif (popup) {\r\n\t\t\tthis.removeLayer(popup);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n});\r\n","/*\n * @namespace Layer\n * @section Popup methods example\n *\n * All layers share a set of methods convenient for binding popups to it.\n *\n * ```js\n * var layer = L.Polygon(latlngs).bindPopup('Hi There!').addTo(map);\n * layer.openPopup();\n * layer.closePopup();\n * ```\n *\n * Popups will also be automatically opened when the layer is clicked on and closed when the layer is removed from the map or another popup is opened.\n */\n\n// @section Popup methods\nL.Layer.include({\n\n\t// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this\n\t// Binds a popup to the layer with the passed `content` and sets up the\n\t// neccessary event listeners. If a `Function` is passed it will receive\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\n\tbindPopup: function (content, options) {\n\n\t\tif (content instanceof L.Popup) {\n\t\t\tL.setOptions(content, options);\n\t\t\tthis._popup = content;\n\t\t\tcontent._source = this;\n\t\t} else {\n\t\t\tif (!this._popup || options) {\n\t\t\t\tthis._popup = new L.Popup(options, this);\n\t\t\t}\n\t\t\tthis._popup.setContent(content);\n\t\t}\n\n\t\tif (!this._popupHandlersAdded) {\n\t\t\tthis.on({\n\t\t\t\tclick: this._openPopup,\n\t\t\t\tremove: this.closePopup,\n\t\t\t\tmove: this._movePopup\n\t\t\t});\n\t\t\tthis._popupHandlersAdded = true;\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method unbindPopup(): this\n\t// Removes the popup previously bound with `bindPopup`.\n\tunbindPopup: function () {\n\t\tif (this._popup) {\n\t\t\tthis.off({\n\t\t\t\tclick: this._openPopup,\n\t\t\t\tremove: this.closePopup,\n\t\t\t\tmove: this._movePopup\n\t\t\t});\n\t\t\tthis._popupHandlersAdded = false;\n\t\t\tthis._popup = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method openPopup(latlng?: LatLng): this\n\t// Opens the bound popup at the specificed `latlng` or at the default popup anchor if no `latlng` is passed.\n\topenPopup: function (layer, latlng) {\n\t\tif (!(layer instanceof L.Layer)) {\n\t\t\tlatlng = layer;\n\t\t\tlayer = this;\n\t\t}\n\n\t\tif (layer instanceof L.FeatureGroup) {\n\t\t\tfor (var id in this._layers) {\n\t\t\t\tlayer = this._layers[id];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!latlng) {\n\t\t\tlatlng = layer.getCenter ? layer.getCenter() : layer.getLatLng();\n\t\t}\n\n\t\tif (this._popup && this._map) {\n\t\t\t// set popup source to this layer\n\t\t\tthis._popup._source = layer;\n\n\t\t\t// update the popup (content, layout, ect...)\n\t\t\tthis._popup.update();\n\n\t\t\t// open the popup on the map\n\t\t\tthis._map.openPopup(this._popup, latlng);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method closePopup(): this\n\t// Closes the popup bound to this layer if it is open.\n\tclosePopup: function () {\n\t\tif (this._popup) {\n\t\t\tthis._popup._close();\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method togglePopup(): this\n\t// Opens or closes the popup bound to this layer depending on its current state.\n\ttogglePopup: function (target) {\n\t\tif (this._popup) {\n\t\t\tif (this._popup._map) {\n\t\t\t\tthis.closePopup();\n\t\t\t} else {\n\t\t\t\tthis.openPopup(target);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method isPopupOpen(): boolean\n\t// Returns `true` if the popup bound to this layer is currently open.\n\tisPopupOpen: function () {\n\t\treturn this._popup.isOpen();\n\t},\n\n\t// @method setPopupContent(content: String|HTMLElement|Popup): this\n\t// Sets the content of the popup bound to this layer.\n\tsetPopupContent: function (content) {\n\t\tif (this._popup) {\n\t\t\tthis._popup.setContent(content);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getPopup(): Popup\n\t// Returns the popup bound to this layer.\n\tgetPopup: function () {\n\t\treturn this._popup;\n\t},\n\n\t_openPopup: function (e) {\n\t\tvar layer = e.layer || e.target;\n\n\t\tif (!this._popup) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._map) {\n\t\t\treturn;\n\t\t}\n\n\t\t// prevent map click\n\t\tL.DomEvent.stop(e);\n\n\t\t// if this inherits from Path its a vector and we can just\n\t\t// open the popup at the new location\n\t\tif (layer instanceof L.Path) {\n\t\t\tthis.openPopup(e.layer || e.target, e.latlng);\n\t\t\treturn;\n\t\t}\n\n\t\t// otherwise treat it like a marker and figure out\n\t\t// if we should toggle it open/closed\n\t\tif (this._map.hasLayer(this._popup) && this._popup._source === layer) {\n\t\t\tthis.closePopup();\n\t\t} else {\n\t\t\tthis.openPopup(layer, e.latlng);\n\t\t}\n\t},\n\n\t_movePopup: function (e) {\n\t\tthis._popup.setLatLng(e.latlng);\n\t}\n});\n","/*\r\n * Popup extension to L.Marker, adding popup-related methods.\r\n */\r\n\r\nL.Marker.include({\r\n\t_getPopupAnchor: function () {\r\n\t\treturn this.options.icon.options.popupAnchor || [0, 0];\r\n\t}\r\n});\r\n","/*\n * @class Tooltip\n * @inherits DivOverlay\n * @aka L.Tooltip\n * Used to display small texts on top of map layers.\n *\n * @example\n *\n * ```js\n * marker.bindTooltip(\"my tooltip text\").openTooltip();\n * ```\n * Note about tooltip offset. Leaflet takes two options in consideration\n * for computing tooltip offseting:\n * - the `offset` Tooltip option: it defaults to [0, 0], and it's specific to one tooltip.\n * Add a positive x offset to move the tooltip to the right, and a positive y offset to\n * move it to the bottom. Negatives will move to the left and top.\n * - the `tooltipAnchor` Icon option: this will only be considered for Marker. You\n * should adapt this value if you use a custom icon.\n */\n\n\n// @namespace Tooltip\nL.Tooltip = L.DivOverlay.extend({\n\n\t// @section\n\t// @aka Tooltip options\n\toptions: {\n\t\t// @option pane: String = 'tooltipPane'\n\t\t// `Map pane` where the tooltip will be added.\n\t\tpane: 'tooltipPane',\n\n\t\t// @option offset: Point = Point(0, 0)\n\t\t// Optional offset of the tooltip position.\n\t\toffset: [0, 0],\n\n\t\t// @option direction: String = 'auto'\n\t\t// Direction where to open the tooltip. Possible values are: `right`, `left`,\n\t\t// `top`, `bottom`, `center`, `auto`.\n\t\t// `auto` will dynamicaly switch between `right` and `left` according to the tooltip\n\t\t// position on the map.\n\t\tdirection: 'auto',\n\n\t\t// @option permanent: Boolean = false\n\t\t// Whether to open the tooltip permanently or only on mouseover.\n\t\tpermanent: false,\n\n\t\t// @option sticky: Boolean = false\n\t\t// If true, the tooltip will follow the mouse instead of being fixed at the feature center.\n\t\tsticky: false,\n\n\t\t// @option interactive: Boolean = false\n\t\t// If true, the tooltip will listen to the feature events.\n\t\tinteractive: false,\n\n\t\t// @option opacity: Number = 0.9\n\t\t// Tooltip container opacity.\n\t\topacity: 0.9\n\t},\n\n\tonAdd: function (map) {\n\t\tL.DivOverlay.prototype.onAdd.call(this, map);\n\t\tthis.setOpacity(this.options.opacity);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipopen: TooltipEvent\n\t\t// Fired when a tooltip is opened in the map.\n\t\tmap.fire('tooltipopen', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipopen: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is opened.\n\t\t\tthis._source.fire('tooltipopen', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tonRemove: function (map) {\n\t\tL.DivOverlay.prototype.onRemove.call(this, map);\n\n\t\t// @namespace Map\n\t\t// @section Tooltip events\n\t\t// @event tooltipclose: TooltipEvent\n\t\t// Fired when a tooltip in the map is closed.\n\t\tmap.fire('tooltipclose', {tooltip: this});\n\n\t\tif (this._source) {\n\t\t\t// @namespace Layer\n\t\t\t// @section Tooltip events\n\t\t\t// @event tooltipclose: TooltipEvent\n\t\t\t// Fired when a tooltip bound to this layer is closed.\n\t\t\tthis._source.fire('tooltipclose', {tooltip: this}, true);\n\t\t}\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = L.DivOverlay.prototype.getEvents.call(this);\n\n\t\tif (L.Browser.touch && !this.options.permanent) {\n\t\t\tevents.preclick = this._close;\n\t\t}\n\n\t\treturn events;\n\t},\n\n\t_close: function () {\n\t\tif (this._map) {\n\t\t\tthis._map.closeTooltip(this);\n\t\t}\n\t},\n\n\t_initLayout: function () {\n\t\tvar prefix = 'leaflet-tooltip',\n\t\t className = prefix + ' ' + (this.options.className || '') + ' leaflet-zoom-' + (this._zoomAnimated ? 'animated' : 'hide');\n\n\t\tthis._contentNode = this._container = L.DomUtil.create('div', className);\n\t},\n\n\t_updateLayout: function () {},\n\n\t_adjustPan: function () {},\n\n\t_setPosition: function (pos) {\n\t\tvar map = this._map,\n\t\t container = this._container,\n\t\t centerPoint = map.latLngToContainerPoint(map.getCenter()),\n\t\t tooltipPoint = map.layerPointToContainerPoint(pos),\n\t\t direction = this.options.direction,\n\t\t tooltipWidth = container.offsetWidth,\n\t\t tooltipHeight = container.offsetHeight,\n\t\t offset = L.point(this.options.offset),\n\t\t anchor = this._getAnchor();\n\n\t\tif (direction === 'top') {\n\t\t\tpos = pos.add(L.point(-tooltipWidth / 2 + offset.x, -tooltipHeight + offset.y + anchor.y));\n\t\t} else if (direction === 'bottom') {\n\t\t\tpos = pos.subtract(L.point(tooltipWidth / 2 - offset.x, -offset.y));\n\t\t} else if (direction === 'center') {\n\t\t\tpos = pos.subtract(L.point(tooltipWidth / 2 + offset.x, tooltipHeight / 2 - anchor.y + offset.y));\n\t\t} else if (direction === 'right' || direction === 'auto' && tooltipPoint.x < centerPoint.x) {\n\t\t\tdirection = 'right';\n\t\t\tpos = pos.add([offset.x + anchor.x, anchor.y - tooltipHeight / 2 + offset.y]);\n\t\t} else {\n\t\t\tdirection = 'left';\n\t\t\tpos = pos.subtract(L.point(tooltipWidth + anchor.x - offset.x, tooltipHeight / 2 - anchor.y - offset.y));\n\t\t}\n\n\t\tL.DomUtil.removeClass(container, 'leaflet-tooltip-right');\n\t\tL.DomUtil.removeClass(container, 'leaflet-tooltip-left');\n\t\tL.DomUtil.removeClass(container, 'leaflet-tooltip-top');\n\t\tL.DomUtil.removeClass(container, 'leaflet-tooltip-bottom');\n\t\tL.DomUtil.addClass(container, 'leaflet-tooltip-' + direction);\n\t\tL.DomUtil.setPosition(container, pos);\n\t},\n\n\t_updatePosition: function () {\n\t\tvar pos = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._setPosition(pos);\n\t},\n\n\tsetOpacity: function (opacity) {\n\t\tthis.options.opacity = opacity;\n\n\t\tif (this._container) {\n\t\t\tL.DomUtil.setOpacity(this._container, opacity);\n\t\t}\n\t},\n\n\t_animateZoom: function (e) {\n\t\tvar pos = this._map._latLngToNewLayerPoint(this._latlng, e.zoom, e.center);\n\t\tthis._setPosition(pos);\n\t},\n\n\t_getAnchor: function () {\n\t\t// Where should we anchor the tooltip on the source layer?\n\t\treturn L.point(this._source && this._source._getTooltipAnchor && !this.options.sticky ? this._source._getTooltipAnchor() : [0, 0]);\n\t}\n\n});\n\n// @namespace Tooltip\n// @factory L.tooltip(options?: Tooltip options, source?: Layer)\n// Instantiates a Tooltip object given an optional `options` object that describes its appearance and location and an optional `source` object that is used to tag the tooltip with a reference to the Layer to which it refers.\nL.tooltip = function (options, source) {\n\treturn new L.Tooltip(options, source);\n};\n\n// @namespace Map\n// @section Methods for Layers and Controls\nL.Map.include({\n\n\t// @method openTooltip(tooltip: Tooltip): this\n\t// Opens the specified tooltip.\n\t// @alternative\n\t// @method openTooltip(content: String|HTMLElement, latlng: LatLng, options?: Tooltip options): this\n\t// Creates a tooltip with the specified content and options and open it.\n\topenTooltip: function (tooltip, latlng, options) {\n\t\tif (!(tooltip instanceof L.Tooltip)) {\n\t\t\ttooltip = new L.Tooltip(options).setContent(tooltip);\n\t\t}\n\n\t\tif (latlng) {\n\t\t\ttooltip.setLatLng(latlng);\n\t\t}\n\n\t\tif (this.hasLayer(tooltip)) {\n\t\t\treturn this;\n\t\t}\n\n\t\treturn this.addLayer(tooltip);\n\t},\n\n\t// @method closeTooltip(tooltip?: Tooltip): this\n\t// Closes the tooltip given as parameter.\n\tcloseTooltip: function (tooltip) {\n\t\tif (tooltip) {\n\t\t\tthis.removeLayer(tooltip);\n\t\t}\n\t\treturn this;\n\t}\n\n});\n","/*\n * @namespace Layer\n * @section Tooltip methods example\n *\n * All layers share a set of methods convenient for binding tooltips to it.\n *\n * ```js\n * var layer = L.Polygon(latlngs).bindTooltip('Hi There!').addTo(map);\n * layer.openTooltip();\n * layer.closeTooltip();\n * ```\n */\n\n// @section Tooltip methods\nL.Layer.include({\n\n\t// @method bindTooltip(content: String|HTMLElement|Function|Tooltip, options?: Tooltip options): this\n\t// Binds a tooltip to the layer with the passed `content` and sets up the\n\t// neccessary event listeners. If a `Function` is passed it will receive\n\t// the layer as the first argument and should return a `String` or `HTMLElement`.\n\tbindTooltip: function (content, options) {\n\n\t\tif (content instanceof L.Tooltip) {\n\t\t\tL.setOptions(content, options);\n\t\t\tthis._tooltip = content;\n\t\t\tcontent._source = this;\n\t\t} else {\n\t\t\tif (!this._tooltip || options) {\n\t\t\t\tthis._tooltip = L.tooltip(options, this);\n\t\t\t}\n\t\t\tthis._tooltip.setContent(content);\n\n\t\t}\n\n\t\tthis._initTooltipInteractions();\n\n\t\tif (this._tooltip.options.permanent && this._map && this._map.hasLayer(this)) {\n\t\t\tthis.openTooltip();\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method unbindTooltip(): this\n\t// Removes the tooltip previously bound with `bindTooltip`.\n\tunbindTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._initTooltipInteractions(true);\n\t\t\tthis.closeTooltip();\n\t\t\tthis._tooltip = null;\n\t\t}\n\t\treturn this;\n\t},\n\n\t_initTooltipInteractions: function (remove) {\n\t\tif (!remove && this._tooltipHandlersAdded) { return; }\n\t\tvar onOff = remove ? 'off' : 'on',\n\t\t events = {\n\t\t\tremove: this.closeTooltip,\n\t\t\tmove: this._moveTooltip\n\t\t };\n\t\tif (!this._tooltip.options.permanent) {\n\t\t\tevents.mouseover = this._openTooltip;\n\t\t\tevents.mouseout = this.closeTooltip;\n\t\t\tif (this._tooltip.options.sticky) {\n\t\t\t\tevents.mousemove = this._moveTooltip;\n\t\t\t}\n\t\t\tif (L.Browser.touch) {\n\t\t\t\tevents.click = this._openTooltip;\n\t\t\t}\n\t\t} else {\n\t\t\tevents.add = this._openTooltip;\n\t\t}\n\t\tthis[onOff](events);\n\t\tthis._tooltipHandlersAdded = !remove;\n\t},\n\n\t// @method openTooltip(latlng?: LatLng): this\n\t// Opens the bound tooltip at the specificed `latlng` or at the default tooltip anchor if no `latlng` is passed.\n\topenTooltip: function (layer, latlng) {\n\t\tif (!(layer instanceof L.Layer)) {\n\t\t\tlatlng = layer;\n\t\t\tlayer = this;\n\t\t}\n\n\t\tif (layer instanceof L.FeatureGroup) {\n\t\t\tfor (var id in this._layers) {\n\t\t\t\tlayer = this._layers[id];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (!latlng) {\n\t\t\tlatlng = layer.getCenter ? layer.getCenter() : layer.getLatLng();\n\t\t}\n\n\t\tif (this._tooltip && this._map) {\n\n\t\t\t// set tooltip source to this layer\n\t\t\tthis._tooltip._source = layer;\n\n\t\t\t// update the tooltip (content, layout, ect...)\n\t\t\tthis._tooltip.update();\n\n\t\t\t// open the tooltip on the map\n\t\t\tthis._map.openTooltip(this._tooltip, latlng);\n\n\t\t\t// Tooltip container may not be defined if not permanent and never\n\t\t\t// opened.\n\t\t\tif (this._tooltip.options.interactive && this._tooltip._container) {\n\t\t\t\tL.DomUtil.addClass(this._tooltip._container, 'leaflet-clickable');\n\t\t\t\tthis.addInteractiveTarget(this._tooltip._container);\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t// @method closeTooltip(): this\n\t// Closes the tooltip bound to this layer if it is open.\n\tcloseTooltip: function () {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip._close();\n\t\t\tif (this._tooltip.options.interactive && this._tooltip._container) {\n\t\t\t\tL.DomUtil.removeClass(this._tooltip._container, 'leaflet-clickable');\n\t\t\t\tthis.removeInteractiveTarget(this._tooltip._container);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method toggleTooltip(): this\n\t// Opens or closes the tooltip bound to this layer depending on its current state.\n\ttoggleTooltip: function (target) {\n\t\tif (this._tooltip) {\n\t\t\tif (this._tooltip._map) {\n\t\t\t\tthis.closeTooltip();\n\t\t\t} else {\n\t\t\t\tthis.openTooltip(target);\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method isTooltipOpen(): boolean\n\t// Returns `true` if the tooltip bound to this layer is currently open.\n\tisTooltipOpen: function () {\n\t\treturn this._tooltip.isOpen();\n\t},\n\n\t// @method setTooltipContent(content: String|HTMLElement|Tooltip): this\n\t// Sets the content of the tooltip bound to this layer.\n\tsetTooltipContent: function (content) {\n\t\tif (this._tooltip) {\n\t\t\tthis._tooltip.setContent(content);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method getTooltip(): Tooltip\n\t// Returns the tooltip bound to this layer.\n\tgetTooltip: function () {\n\t\treturn this._tooltip;\n\t},\n\n\t_openTooltip: function (e) {\n\t\tvar layer = e.layer || e.target;\n\n\t\tif (!this._tooltip || !this._map) {\n\t\t\treturn;\n\t\t}\n\t\tthis.openTooltip(layer, this._tooltip.options.sticky ? e.latlng : undefined);\n\t},\n\n\t_moveTooltip: function (e) {\n\t\tvar latlng = e.latlng, containerPoint, layerPoint;\n\t\tif (this._tooltip.options.sticky && e.originalEvent) {\n\t\t\tcontainerPoint = this._map.mouseEventToContainerPoint(e.originalEvent);\n\t\t\tlayerPoint = this._map.containerPointToLayerPoint(containerPoint);\n\t\t\tlatlng = this._map.layerPointToLatLng(layerPoint);\n\t\t}\n\t\tthis._tooltip.setLatLng(latlng);\n\t}\n});\n","/*\r\n * Tooltip extension to L.Marker, adding tooltip-related methods.\r\n */\r\n\r\nL.Marker.include({\r\n\t_getTooltipAnchor: function () {\r\n\t\treturn this.options.icon.options.tooltipAnchor || [0, 0];\r\n\t}\r\n});\r\n","/*\r\n * @class LayerGroup\r\n * @aka L.LayerGroup\r\n * @inherits Layer\r\n *\r\n * Used to group several layers and handle them as one. If you add it to the map,\r\n * any layers added or removed from the group will be added/removed on the map as\r\n * well. Extends `Layer`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.layerGroup([marker1, marker2])\r\n * \t.addLayer(polyline)\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nL.LayerGroup = L.Layer.extend({\r\n\r\n\tinitialize: function (layers) {\r\n\t\tthis._layers = {};\r\n\r\n\t\tvar i, len;\r\n\r\n\t\tif (layers) {\r\n\t\t\tfor (i = 0, len = layers.length; i < len; i++) {\r\n\t\t\t\tthis.addLayer(layers[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addLayer(layer: Layer): this\r\n\t// Adds the given layer to the group.\r\n\taddLayer: function (layer) {\r\n\t\tvar id = this.getLayerId(layer);\r\n\r\n\t\tthis._layers[id] = layer;\r\n\r\n\t\tif (this._map) {\r\n\t\t\tthis._map.addLayer(layer);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Removes the given layer from the group.\r\n\t// @alternative\r\n\t// @method removeLayer(id: Number): this\r\n\t// Removes the layer with the given internal ID from the group.\r\n\tremoveLayer: function (layer) {\r\n\t\tvar id = layer in this._layers ? layer : this.getLayerId(layer);\r\n\r\n\t\tif (this._map && this._layers[id]) {\r\n\t\t\tthis._map.removeLayer(this._layers[id]);\r\n\t\t}\r\n\r\n\t\tdelete this._layers[id];\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method hasLayer(layer: Layer): Boolean\r\n\t// Returns `true` if the given layer is currently added to the group.\r\n\thasLayer: function (layer) {\r\n\t\treturn !!layer && (layer in this._layers || this.getLayerId(layer) in this._layers);\r\n\t},\r\n\r\n\t// @method clearLayers(): this\r\n\t// Removes all the layers from the group.\r\n\tclearLayers: function () {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tthis.removeLayer(this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method invoke(methodName: String, …): this\r\n\t// Calls `methodName` on every layer contained in this group, passing any\r\n\t// additional parameters. Has no effect if the layers contained do not\r\n\t// implement `methodName`.\r\n\tinvoke: function (methodName) {\r\n\t\tvar args = Array.prototype.slice.call(arguments, 1),\r\n\t\t i, layer;\r\n\r\n\t\tfor (i in this._layers) {\r\n\t\t\tlayer = this._layers[i];\r\n\r\n\t\t\tif (layer[methodName]) {\r\n\t\t\t\tlayer[methodName].apply(layer, args);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmap.addLayer(this._layers[i]);\r\n\t\t}\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmap.removeLayer(this._layers[i]);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method eachLayer(fn: Function, context?: Object): this\r\n\t// Iterates over the layers of the group, optionally specifying context of the iterator function.\r\n\t// ```js\r\n\t// group.eachLayer(function (layer) {\r\n\t// \tlayer.bindPopup('Hello');\r\n\t// });\r\n\t// ```\r\n\teachLayer: function (method, context) {\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tmethod.call(context, this._layers[i]);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getLayer(id: Number): Layer\r\n\t// Returns the layer with the given internal ID.\r\n\tgetLayer: function (id) {\r\n\t\treturn this._layers[id];\r\n\t},\r\n\r\n\t// @method getLayers(): Layer[]\r\n\t// Returns an array of all the layers added to the group.\r\n\tgetLayers: function () {\r\n\t\tvar layers = [];\r\n\r\n\t\tfor (var i in this._layers) {\r\n\t\t\tlayers.push(this._layers[i]);\r\n\t\t}\r\n\t\treturn layers;\r\n\t},\r\n\r\n\t// @method setZIndex(zIndex: Number): this\r\n\t// Calls `setZIndex` on every layer contained in this group, passing the z-index.\r\n\tsetZIndex: function (zIndex) {\r\n\t\treturn this.invoke('setZIndex', zIndex);\r\n\t},\r\n\r\n\t// @method getLayerId(layer: Layer): Number\r\n\t// Returns the internal ID for a layer\r\n\tgetLayerId: function (layer) {\r\n\t\treturn L.stamp(layer);\r\n\t}\r\n});\r\n\r\n\r\n// @factory L.layerGroup(layers: Layer[])\r\n// Create a layer group, optionally given an initial set of layers.\r\nL.layerGroup = function (layers) {\r\n\treturn new L.LayerGroup(layers);\r\n};\r\n","/*\r\n * @class FeatureGroup\r\n * @aka L.FeatureGroup\r\n * @inherits LayerGroup\r\n *\r\n * Extended `LayerGroup` that makes it easier to do the same thing to all its member layers:\r\n * * [`bindPopup`](#layer-bindpopup) binds a popup to all of the layers at once (likewise with [`bindTooltip`](#layer-bindtooltip))\r\n * * Events are propagated to the `FeatureGroup`, so if the group has an event\r\n * handler, it will handle events from any of the layers. This includes mouse events\r\n * and custom events.\r\n * * Has `layeradd` and `layerremove` events\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.featureGroup([marker1, marker2, polyline])\r\n * \t.bindPopup('Hello world!')\r\n * \t.on('click', function() { alert('Clicked on a member of the group!'); })\r\n * \t.addTo(map);\r\n * ```\r\n */\r\n\r\nL.FeatureGroup = L.LayerGroup.extend({\r\n\r\n\taddLayer: function (layer) {\r\n\t\tif (this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tlayer.addEventParent(this);\r\n\r\n\t\tL.LayerGroup.prototype.addLayer.call(this, layer);\r\n\r\n\t\t// @event layeradd: LayerEvent\r\n\t\t// Fired when a layer is added to this `FeatureGroup`\r\n\t\treturn this.fire('layeradd', {layer: layer});\r\n\t},\r\n\r\n\tremoveLayer: function (layer) {\r\n\t\tif (!this.hasLayer(layer)) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tif (layer in this._layers) {\r\n\t\t\tlayer = this._layers[layer];\r\n\t\t}\r\n\r\n\t\tlayer.removeEventParent(this);\r\n\r\n\t\tL.LayerGroup.prototype.removeLayer.call(this, layer);\r\n\r\n\t\t// @event layerremove: LayerEvent\r\n\t\t// Fired when a layer is removed from this `FeatureGroup`\r\n\t\treturn this.fire('layerremove', {layer: layer});\r\n\t},\r\n\r\n\t// @method setStyle(style: Path options): this\r\n\t// Sets the given path options to each layer of the group that has a `setStyle` method.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.invoke('setStyle', style);\r\n\t},\r\n\r\n\t// @method bringToFront(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToFront: function () {\r\n\t\treturn this.invoke('bringToFront');\r\n\t},\r\n\r\n\t// @method bringToBack(): this\r\n\t// Brings the layer group to the top of all other layers\r\n\tbringToBack: function () {\r\n\t\treturn this.invoke('bringToBack');\r\n\t},\r\n\r\n\t// @method getBounds(): LatLngBounds\r\n\t// Returns the LatLngBounds of the Feature Group (created from bounds and coordinates of its children).\r\n\tgetBounds: function () {\r\n\t\tvar bounds = new L.LatLngBounds();\r\n\r\n\t\tfor (var id in this._layers) {\r\n\t\t\tvar layer = this._layers[id];\r\n\t\t\tbounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng());\r\n\t\t}\r\n\t\treturn bounds;\r\n\t}\r\n});\r\n\r\n// @factory L.featureGroup(layers: Layer[])\r\n// Create a feature group, optionally given an initial set of layers.\r\nL.featureGroup = function (layers) {\r\n\treturn new L.FeatureGroup(layers);\r\n};\r\n","/*\n * @class Renderer\n * @inherits Layer\n * @aka L.Renderer\n *\n * Base class for vector renderer implementations (`SVG`, `Canvas`). Handles the\n * DOM container of the renderer, its bounds, and its zoom animation.\n *\n * A `Renderer` works as an implicit layer group for all `Path`s - the renderer\n * itself can be added or removed to the map. All paths use a renderer, which can\n * be implicit (the map will decide the type of renderer and use it automatically)\n * or explicit (using the [`renderer`](#path-renderer) option of the path).\n *\n * Do not use this class directly, use `SVG` and `Canvas` instead.\n *\n * @event update: Event\n * Fired when the renderer updates its bounds, center and zoom, for example when\n * its map has moved\n */\n\nL.Renderer = L.Layer.extend({\n\n\t// @section\n\t// @aka Renderer options\n\toptions: {\n\t\t// @option padding: Number = 0.1\n\t\t// How much to extend the clip area around the map view (relative to its size)\n\t\t// e.g. 0.1 would be 10% of map view in each direction\n\t\tpadding: 0.1\n\t},\n\n\tinitialize: function (options) {\n\t\tL.setOptions(this, options);\n\t\tL.stamp(this);\n\t},\n\n\tonAdd: function () {\n\t\tif (!this._container) {\n\t\t\tthis._initContainer(); // defined by renderer implementations\n\n\t\t\tif (this._zoomAnimated) {\n\t\t\t\tL.DomUtil.addClass(this._container, 'leaflet-zoom-animated');\n\t\t\t}\n\t\t}\n\n\t\tthis.getPane().appendChild(this._container);\n\t\tthis._update();\n\t},\n\n\tonRemove: function () {\n\t\tL.DomUtil.remove(this._container);\n\t},\n\n\tgetEvents: function () {\n\t\tvar events = {\n\t\t\tviewreset: this._reset,\n\t\t\tzoom: this._onZoom,\n\t\t\tmoveend: this._update\n\t\t};\n\t\tif (this._zoomAnimated) {\n\t\t\tevents.zoomanim = this._onAnimZoom;\n\t\t}\n\t\treturn events;\n\t},\n\n\t_onAnimZoom: function (ev) {\n\t\tthis._updateTransform(ev.center, ev.zoom);\n\t},\n\n\t_onZoom: function () {\n\t\tthis._updateTransform(this._map.getCenter(), this._map.getZoom());\n\t},\n\n\t_updateTransform: function (center, zoom) {\n\t\tvar scale = this._map.getZoomScale(zoom, this._zoom),\n\t\t position = L.DomUtil.getPosition(this._container),\n\t\t viewHalf = this._map.getSize().multiplyBy(0.5 + this.options.padding),\n\t\t currentCenterPoint = this._map.project(this._center, zoom),\n\t\t destCenterPoint = this._map.project(center, zoom),\n\t\t centerOffset = destCenterPoint.subtract(currentCenterPoint),\n\n\t\t topLeftOffset = viewHalf.multiplyBy(-scale).add(position).add(viewHalf).subtract(centerOffset);\n\n\t\tif (L.Browser.any3d) {\n\t\t\tL.DomUtil.setTransform(this._container, topLeftOffset, scale);\n\t\t} else {\n\t\t\tL.DomUtil.setPosition(this._container, topLeftOffset);\n\t\t}\n\t},\n\n\t_reset: function () {\n\t\tthis._update();\n\t\tthis._updateTransform(this._center, this._zoom);\n\t},\n\n\t_update: function () {\n\t\t// Update pixel bounds of renderer container (for positioning/sizing/clipping later)\n\t\t// Subclasses are responsible of firing the 'update' event.\n\t\tvar p = this.options.padding,\n\t\t size = this._map.getSize(),\n\t\t min = this._map.containerPointToLayerPoint(size.multiplyBy(-p)).round();\n\n\t\tthis._bounds = new L.Bounds(min, min.add(size.multiplyBy(1 + p * 2)).round());\n\n\t\tthis._center = this._map.getCenter();\n\t\tthis._zoom = this._map.getZoom();\n\t}\n});\n\n\nL.Map.include({\n\t// @namespace Map; @method getRenderer(layer: Path): Renderer\n\t// Returns the instance of `Renderer` that should be used to render the given\n\t// `Path`. It will ensure that the `renderer` options of the map and paths\n\t// are respected, and that the renderers do exist on the map.\n\tgetRenderer: function (layer) {\n\t\t// @namespace Path; @option renderer: Renderer\n\t\t// Use this specific instance of `Renderer` for this path. Takes\n\t\t// precedence over the map's [default renderer](#map-renderer).\n\t\tvar renderer = layer.options.renderer || this._getPaneRenderer(layer.options.pane) || this.options.renderer || this._renderer;\n\n\t\tif (!renderer) {\n\t\t\t// @namespace Map; @option preferCanvas: Boolean = false\n\t\t\t// Whether `Path`s should be rendered on a `Canvas` renderer.\n\t\t\t// By default, all `Path`s are rendered in a `SVG` renderer.\n\t\t\trenderer = this._renderer = (this.options.preferCanvas && L.canvas()) || L.svg();\n\t\t}\n\n\t\tif (!this.hasLayer(renderer)) {\n\t\t\tthis.addLayer(renderer);\n\t\t}\n\t\treturn renderer;\n\t},\n\n\t_getPaneRenderer: function (name) {\n\t\tif (name === 'overlayPane' || name === undefined) {\n\t\t\treturn false;\n\t\t}\n\n\t\tvar renderer = this._paneRenderers[name];\n\t\tif (renderer === undefined) {\n\t\t\trenderer = (L.SVG && L.svg({pane: name})) || (L.Canvas && L.canvas({pane: name}));\n\t\t\tthis._paneRenderers[name] = renderer;\n\t\t}\n\t\treturn renderer;\n\t}\n});\n","/*\n * @class Path\n * @aka L.Path\n * @inherits Interactive layer\n *\n * An abstract class that contains options and constants shared between vector\n * overlays (Polygon, Polyline, Circle). Do not use it directly. Extends `Layer`.\n */\n\nL.Path = L.Layer.extend({\n\n\t// @section\n\t// @aka Path options\n\toptions: {\n\t\t// @option stroke: Boolean = true\n\t\t// Whether to draw stroke along the path. Set it to `false` to disable borders on polygons or circles.\n\t\tstroke: true,\n\n\t\t// @option color: String = '#3388ff'\n\t\t// Stroke color\n\t\tcolor: '#3388ff',\n\n\t\t// @option weight: Number = 3\n\t\t// Stroke width in pixels\n\t\tweight: 3,\n\n\t\t// @option opacity: Number = 1.0\n\t\t// Stroke opacity\n\t\topacity: 1,\n\n\t\t// @option lineCap: String= 'round'\n\t\t// A string that defines [shape to be used at the end](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linecap) of the stroke.\n\t\tlineCap: 'round',\n\n\t\t// @option lineJoin: String = 'round'\n\t\t// A string that defines [shape to be used at the corners](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-linejoin) of the stroke.\n\t\tlineJoin: 'round',\n\n\t\t// @option dashArray: String = null\n\t\t// A string that defines the stroke [dash pattern](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dasharray). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashArray: null,\n\n\t\t// @option dashOffset: String = null\n\t\t// A string that defines the [distance into the dash pattern to start the dash](https://developer.mozilla.org/docs/Web/SVG/Attribute/stroke-dashoffset). Doesn't work on `Canvas`-powered layers in [some old browsers](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility).\n\t\tdashOffset: null,\n\n\t\t// @option fill: Boolean = depends\n\t\t// Whether to fill the path with color. Set it to `false` to disable filling on polygons or circles.\n\t\tfill: false,\n\n\t\t// @option fillColor: String = *\n\t\t// Fill color. Defaults to the value of the [`color`](#path-color) option\n\t\tfillColor: null,\n\n\t\t// @option fillOpacity: Number = 0.2\n\t\t// Fill opacity.\n\t\tfillOpacity: 0.2,\n\n\t\t// @option fillRule: String = 'evenodd'\n\t\t// A string that defines [how the inside of a shape](https://developer.mozilla.org/docs/Web/SVG/Attribute/fill-rule) is determined.\n\t\tfillRule: 'evenodd',\n\n\t\t// className: '',\n\n\t\t// Option inherited from \"Interactive layer\" abstract class\n\t\tinteractive: true\n\t},\n\n\tbeforeAdd: function (map) {\n\t\t// Renderer is set here because we need to call renderer.getEvents\n\t\t// before this.getEvents.\n\t\tthis._renderer = map.getRenderer(this);\n\t},\n\n\tonAdd: function () {\n\t\tthis._renderer._initPath(this);\n\t\tthis._reset();\n\t\tthis._renderer._addPath(this);\n\t\tthis._renderer.on('update', this._update, this);\n\t},\n\n\tonRemove: function () {\n\t\tthis._renderer._removePath(this);\n\t\tthis._renderer.off('update', this._update, this);\n\t},\n\n\tgetEvents: function () {\n\t\treturn {\n\t\t\tzoomend: this._project,\n\t\t\tviewreset: this._reset\n\t\t};\n\t},\n\n\t// @method redraw(): this\n\t// Redraws the layer. Sometimes useful after you changed the coordinates that the path uses.\n\tredraw: function () {\n\t\tif (this._map) {\n\t\t\tthis._renderer._updatePath(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method setStyle(style: Path options): this\n\t// Changes the appearance of a Path based on the options in the `Path options` object.\n\tsetStyle: function (style) {\n\t\tL.setOptions(this, style);\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._updateStyle(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToFront(): this\n\t// Brings the layer to the top of all path layers.\n\tbringToFront: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToFront(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\t// @method bringToBack(): this\n\t// Brings the layer to the bottom of all path layers.\n\tbringToBack: function () {\n\t\tif (this._renderer) {\n\t\t\tthis._renderer._bringToBack(this);\n\t\t}\n\t\treturn this;\n\t},\n\n\tgetElement: function () {\n\t\treturn this._path;\n\t},\n\n\t_reset: function () {\n\t\t// defined in children classes\n\t\tthis._project();\n\t\tthis._update();\n\t},\n\n\t_clickTolerance: function () {\n\t\t// used when doing hit detection for Canvas layers\n\t\treturn (this.options.stroke ? this.options.weight / 2 : 0) + (L.Browser.touch ? 10 : 0);\n\t}\n});\n","/*\r\n * @namespace LineUtil\r\n *\r\n * Various utility functions for polyine points processing, used by Leaflet internally to make polylines lightning-fast.\r\n */\r\n\r\nL.LineUtil = {\r\n\r\n\t// Simplify polyline with vertex reduction and Douglas-Peucker simplification.\r\n\t// Improves rendering performance dramatically by lessening the number of points to draw.\r\n\r\n\t// @function simplify(points: Point[], tolerance: Number): Point[]\r\n\t// Dramatically reduces the number of points in a polyline while retaining\r\n\t// its shape and returns a new array of simplified points, using the\r\n\t// [Douglas-Peucker algorithm](http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm).\r\n\t// Used for a huge performance boost when processing/displaying Leaflet polylines for\r\n\t// each zoom level and also reducing visual noise. tolerance affects the amount of\r\n\t// simplification (lesser value means higher quality but slower and with more points).\r\n\t// Also released as a separated micro-library [Simplify.js](http://mourner.github.com/simplify-js/).\r\n\tsimplify: function (points, tolerance) {\r\n\t\tif (!tolerance || !points.length) {\r\n\t\t\treturn points.slice();\r\n\t\t}\r\n\r\n\t\tvar sqTolerance = tolerance * tolerance;\r\n\r\n\t\t// stage 1: vertex reduction\r\n\t\tpoints = this._reducePoints(points, sqTolerance);\r\n\r\n\t\t// stage 2: Douglas-Peucker simplification\r\n\t\tpoints = this._simplifyDP(points, sqTolerance);\r\n\r\n\t\treturn points;\r\n\t},\r\n\r\n\t// @function pointToSegmentDistance(p: Point, p1: Point, p2: Point): Number\r\n\t// Returns the distance between point `p` and segment `p1` to `p2`.\r\n\tpointToSegmentDistance: function (p, p1, p2) {\r\n\t\treturn Math.sqrt(this._sqClosestPointOnSegment(p, p1, p2, true));\r\n\t},\r\n\r\n\t// @function closestPointOnSegment(p: Point, p1: Point, p2: Point): Number\r\n\t// Returns the closest point from a point `p` on a segment `p1` to `p2`.\r\n\tclosestPointOnSegment: function (p, p1, p2) {\r\n\t\treturn this._sqClosestPointOnSegment(p, p1, p2);\r\n\t},\r\n\r\n\t// Douglas-Peucker simplification, see http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm\r\n\t_simplifyDP: function (points, sqTolerance) {\r\n\r\n\t\tvar len = points.length,\r\n\t\t ArrayConstructor = typeof Uint8Array !== undefined + '' ? Uint8Array : Array,\r\n\t\t markers = new ArrayConstructor(len);\r\n\r\n\t\tmarkers[0] = markers[len - 1] = 1;\r\n\r\n\t\tthis._simplifyDPStep(points, markers, sqTolerance, 0, len - 1);\r\n\r\n\t\tvar i,\r\n\t\t newPoints = [];\r\n\r\n\t\tfor (i = 0; i < len; i++) {\r\n\t\t\tif (markers[i]) {\r\n\t\t\t\tnewPoints.push(points[i]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn newPoints;\r\n\t},\r\n\r\n\t_simplifyDPStep: function (points, markers, sqTolerance, first, last) {\r\n\r\n\t\tvar maxSqDist = 0,\r\n\t\t index, i, sqDist;\r\n\r\n\t\tfor (i = first + 1; i <= last - 1; i++) {\r\n\t\t\tsqDist = this._sqClosestPointOnSegment(points[i], points[first], points[last], true);\r\n\r\n\t\t\tif (sqDist > maxSqDist) {\r\n\t\t\t\tindex = i;\r\n\t\t\t\tmaxSqDist = sqDist;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (maxSqDist > sqTolerance) {\r\n\t\t\tmarkers[index] = 1;\r\n\r\n\t\t\tthis._simplifyDPStep(points, markers, sqTolerance, first, index);\r\n\t\t\tthis._simplifyDPStep(points, markers, sqTolerance, index, last);\r\n\t\t}\r\n\t},\r\n\r\n\t// reduce points that are too close to each other to a single point\r\n\t_reducePoints: function (points, sqTolerance) {\r\n\t\tvar reducedPoints = [points[0]];\r\n\r\n\t\tfor (var i = 1, prev = 0, len = points.length; i < len; i++) {\r\n\t\t\tif (this._sqDist(points[i], points[prev]) > sqTolerance) {\r\n\t\t\t\treducedPoints.push(points[i]);\r\n\t\t\t\tprev = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (prev < len - 1) {\r\n\t\t\treducedPoints.push(points[len - 1]);\r\n\t\t}\r\n\t\treturn reducedPoints;\r\n\t},\r\n\r\n\r\n\t// @function clipSegment(a: Point, b: Point, bounds: Bounds, useLastCode?: Boolean, round?: Boolean): Point[]|Boolean\r\n\t// Clips the segment a to b by rectangular bounds with the\r\n\t// [Cohen-Sutherland algorithm](https://en.wikipedia.org/wiki/Cohen%E2%80%93Sutherland_algorithm)\r\n\t// (modifying the segment points directly!). Used by Leaflet to only show polyline\r\n\t// points that are on the screen or near, increasing performance.\r\n\tclipSegment: function (a, b, bounds, useLastCode, round) {\r\n\t\tvar codeA = useLastCode ? this._lastCode : this._getBitCode(a, bounds),\r\n\t\t codeB = this._getBitCode(b, bounds),\r\n\r\n\t\t codeOut, p, newCode;\r\n\r\n\t\t// save 2nd code to avoid calculating it on the next segment\r\n\t\tthis._lastCode = codeB;\r\n\r\n\t\twhile (true) {\r\n\t\t\t// if a,b is inside the clip window (trivial accept)\r\n\t\t\tif (!(codeA | codeB)) {\r\n\t\t\t\treturn [a, b];\r\n\t\t\t}\r\n\r\n\t\t\t// if a,b is outside the clip window (trivial reject)\r\n\t\t\tif (codeA & codeB) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t// other cases\r\n\t\t\tcodeOut = codeA || codeB;\r\n\t\t\tp = this._getEdgeIntersection(a, b, codeOut, bounds, round);\r\n\t\t\tnewCode = this._getBitCode(p, bounds);\r\n\r\n\t\t\tif (codeOut === codeA) {\r\n\t\t\t\ta = p;\r\n\t\t\t\tcodeA = newCode;\r\n\t\t\t} else {\r\n\t\t\t\tb = p;\r\n\t\t\t\tcodeB = newCode;\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_getEdgeIntersection: function (a, b, code, bounds, round) {\r\n\t\tvar dx = b.x - a.x,\r\n\t\t dy = b.y - a.y,\r\n\t\t min = bounds.min,\r\n\t\t max = bounds.max,\r\n\t\t x, y;\r\n\r\n\t\tif (code & 8) { // top\r\n\t\t\tx = a.x + dx * (max.y - a.y) / dy;\r\n\t\t\ty = max.y;\r\n\r\n\t\t} else if (code & 4) { // bottom\r\n\t\t\tx = a.x + dx * (min.y - a.y) / dy;\r\n\t\t\ty = min.y;\r\n\r\n\t\t} else if (code & 2) { // right\r\n\t\t\tx = max.x;\r\n\t\t\ty = a.y + dy * (max.x - a.x) / dx;\r\n\r\n\t\t} else if (code & 1) { // left\r\n\t\t\tx = min.x;\r\n\t\t\ty = a.y + dy * (min.x - a.x) / dx;\r\n\t\t}\r\n\r\n\t\treturn new L.Point(x, y, round);\r\n\t},\r\n\r\n\t_getBitCode: function (p, bounds) {\r\n\t\tvar code = 0;\r\n\r\n\t\tif (p.x < bounds.min.x) { // left\r\n\t\t\tcode |= 1;\r\n\t\t} else if (p.x > bounds.max.x) { // right\r\n\t\t\tcode |= 2;\r\n\t\t}\r\n\r\n\t\tif (p.y < bounds.min.y) { // bottom\r\n\t\t\tcode |= 4;\r\n\t\t} else if (p.y > bounds.max.y) { // top\r\n\t\t\tcode |= 8;\r\n\t\t}\r\n\r\n\t\treturn code;\r\n\t},\r\n\r\n\t// square distance (to avoid unnecessary Math.sqrt calls)\r\n\t_sqDist: function (p1, p2) {\r\n\t\tvar dx = p2.x - p1.x,\r\n\t\t dy = p2.y - p1.y;\r\n\t\treturn dx * dx + dy * dy;\r\n\t},\r\n\r\n\t// return closest point on segment or distance to that point\r\n\t_sqClosestPointOnSegment: function (p, p1, p2, sqDist) {\r\n\t\tvar x = p1.x,\r\n\t\t y = p1.y,\r\n\t\t dx = p2.x - x,\r\n\t\t dy = p2.y - y,\r\n\t\t dot = dx * dx + dy * dy,\r\n\t\t t;\r\n\r\n\t\tif (dot > 0) {\r\n\t\t\tt = ((p.x - x) * dx + (p.y - y) * dy) / dot;\r\n\r\n\t\t\tif (t > 1) {\r\n\t\t\t\tx = p2.x;\r\n\t\t\t\ty = p2.y;\r\n\t\t\t} else if (t > 0) {\r\n\t\t\t\tx += dx * t;\r\n\t\t\t\ty += dy * t;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tdx = p.x - x;\r\n\t\tdy = p.y - y;\r\n\r\n\t\treturn sqDist ? dx * dx + dy * dy : new L.Point(x, y);\r\n\t}\r\n};\r\n","/*\n * @class Polyline\n * @aka L.Polyline\n * @inherits Path\n *\n * A class for drawing polyline overlays on a map. Extends `Path`.\n *\n * @example\n *\n * ```js\n * // create a red polyline from an array of LatLng points\n * var latlngs = [\n * \t[-122.68, 45.51],\n * \t[-122.43, 37.77],\n * \t[-118.2, 34.04]\n * ];\n *\n * var polyline = L.polyline(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polyline\n * map.fitBounds(polyline.getBounds());\n * ```\n *\n * You can also pass a multi-dimensional array to represent a `MultiPolyline` shape:\n *\n * ```js\n * // create a red polyline from an array of arrays of LatLng points\n * var latlngs = [\n * \t[[-122.68, 45.51],\n * \t [-122.43, 37.77],\n * \t [-118.2, 34.04]],\n * \t[[-73.91, 40.78],\n * \t [-87.62, 41.83],\n * \t [-96.72, 32.76]]\n * ];\n * ```\n */\n\nL.Polyline = L.Path.extend({\n\n\t// @section\n\t// @aka Polyline options\n\toptions: {\n\t\t// @option smoothFactor: Number = 1.0\n\t\t// How much to simplify the polyline on each zoom level. More means\n\t\t// better performance and smoother look, and less means more accurate representation.\n\t\tsmoothFactor: 1.0,\n\n\t\t// @option noClip: Boolean = false\n\t\t// Disable polyline clipping.\n\t\tnoClip: false\n\t},\n\n\tinitialize: function (latlngs, options) {\n\t\tL.setOptions(this, options);\n\t\tthis._setLatLngs(latlngs);\n\t},\n\n\t// @method getLatLngs(): LatLng[]\n\t// Returns an array of the points in the path, or nested arrays of points in case of multi-polyline.\n\tgetLatLngs: function () {\n\t\treturn this._latlngs;\n\t},\n\n\t// @method setLatLngs(latlngs: LatLng[]): this\n\t// Replaces all the points in the polyline with the given array of geographical points.\n\tsetLatLngs: function (latlngs) {\n\t\tthis._setLatLngs(latlngs);\n\t\treturn this.redraw();\n\t},\n\n\t// @method isEmpty(): Boolean\n\t// Returns `true` if the Polyline has no LatLngs.\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length;\n\t},\n\n\tclosestLayerPoint: function (p) {\n\t\tvar minDistance = Infinity,\n\t\t minPoint = null,\n\t\t closest = L.LineUtil._sqClosestPointOnSegment,\n\t\t p1, p2;\n\n\t\tfor (var j = 0, jLen = this._parts.length; j < jLen; j++) {\n\t\t\tvar points = this._parts[j];\n\n\t\t\tfor (var i = 1, len = points.length; i < len; i++) {\n\t\t\t\tp1 = points[i - 1];\n\t\t\t\tp2 = points[i];\n\n\t\t\t\tvar sqDist = closest(p, p1, p2, true);\n\n\t\t\t\tif (sqDist < minDistance) {\n\t\t\t\t\tminDistance = sqDist;\n\t\t\t\t\tminPoint = closest(p, p1, p2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (minPoint) {\n\t\t\tminPoint.distance = Math.sqrt(minDistance);\n\t\t}\n\t\treturn minPoint;\n\t},\n\n\t// @method getCenter(): LatLng\n\t// Returns the center ([centroid](http://en.wikipedia.org/wiki/Centroid)) of the polyline.\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\n\t\tvar i, halfDist, segDist, dist, p1, p2, ratio,\n\t\t points = this._rings[0],\n\t\t len = points.length;\n\n\t\tif (!len) { return null; }\n\n\t\t// polyline centroid algorithm; only uses the first ring if there are multiple\n\n\t\tfor (i = 0, halfDist = 0; i < len - 1; i++) {\n\t\t\thalfDist += points[i].distanceTo(points[i + 1]) / 2;\n\t\t}\n\n\t\t// The line is so small in the current view that all points are on the same pixel.\n\t\tif (halfDist === 0) {\n\t\t\treturn this._map.layerPointToLatLng(points[0]);\n\t\t}\n\n\t\tfor (i = 0, dist = 0; i < len - 1; i++) {\n\t\t\tp1 = points[i];\n\t\t\tp2 = points[i + 1];\n\t\t\tsegDist = p1.distanceTo(p2);\n\t\t\tdist += segDist;\n\n\t\t\tif (dist > halfDist) {\n\t\t\t\tratio = (dist - halfDist) / segDist;\n\t\t\t\treturn this._map.layerPointToLatLng([\n\t\t\t\t\tp2.x - ratio * (p2.x - p1.x),\n\t\t\t\t\tp2.y - ratio * (p2.y - p1.y)\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\treturn this._bounds;\n\t},\n\n\t// @method addLatLng(latlng: LatLng, latlngs? LatLng[]): this\n\t// Adds a given point to the polyline. By default, adds to the first ring of\n\t// the polyline in case of a multi-polyline, but can be overridden by passing\n\t// a specific ring as a LatLng array (that you can earlier access with [`getLatLngs`](#polyline-getlatlngs)).\n\taddLatLng: function (latlng, latlngs) {\n\t\tlatlngs = latlngs || this._defaultShape();\n\t\tlatlng = L.latLng(latlng);\n\t\tlatlngs.push(latlng);\n\t\tthis._bounds.extend(latlng);\n\t\treturn this.redraw();\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tthis._bounds = new L.LatLngBounds();\n\t\tthis._latlngs = this._convertLatLngs(latlngs);\n\t},\n\n\t_defaultShape: function () {\n\t\treturn L.Polyline._flat(this._latlngs) ? this._latlngs : this._latlngs[0];\n\t},\n\n\t// recursively convert latlngs input into actual LatLng instances; calculate bounds along the way\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = [],\n\t\t flat = L.Polyline._flat(latlngs);\n\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\n\t\t\tif (flat) {\n\t\t\t\tresult[i] = L.latLng(latlngs[i]);\n\t\t\t\tthis._bounds.extend(result[i]);\n\t\t\t} else {\n\t\t\t\tresult[i] = this._convertLatLngs(latlngs[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t},\n\n\t_project: function () {\n\t\tvar pxBounds = new L.Bounds();\n\t\tthis._rings = [];\n\t\tthis._projectLatlngs(this._latlngs, this._rings, pxBounds);\n\n\t\tvar w = this._clickTolerance(),\n\t\t p = new L.Point(w, w);\n\n\t\tif (this._bounds.isValid() && pxBounds.isValid()) {\n\t\t\tpxBounds.min._subtract(p);\n\t\t\tpxBounds.max._add(p);\n\t\t\tthis._pxBounds = pxBounds;\n\t\t}\n\t},\n\n\t// recursively turns latlngs into a set of rings with projected coordinates\n\t_projectLatlngs: function (latlngs, result, projectedBounds) {\n\t\tvar flat = latlngs[0] instanceof L.LatLng,\n\t\t len = latlngs.length,\n\t\t i, ring;\n\n\t\tif (flat) {\n\t\t\tring = [];\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t}\n\t\t\tresult.push(ring);\n\t\t} else {\n\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t}\n\t\t}\n\t},\n\n\t// clip polyline by renderer bounds so that we have less to render for performance\n\t_clipPoints: function () {\n\t\tvar bounds = this._renderer._bounds;\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tvar parts = this._parts,\n\t\t i, j, k, len, len2, segment, points;\n\n\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\tpoints = this._rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\tsegment = L.LineUtil.clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\tparts[k] = parts[k] || [];\n\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\tk++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// simplify each clipped part of the polyline for performance\n\t_simplifyPoints: function () {\n\t\tvar parts = this._parts,\n\t\t tolerance = this.options.smoothFactor;\n\n\t\tfor (var i = 0, len = parts.length; i < len; i++) {\n\t\t\tparts[i] = L.LineUtil.simplify(parts[i], tolerance);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tif (!this._map) { return; }\n\n\t\tthis._clipPoints();\n\t\tthis._simplifyPoints();\n\t\tthis._updatePath();\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this);\n\t}\n});\n\n// @factory L.polyline(latlngs: LatLng[], options?: Polyline options)\n// Instantiates a polyline object given an array of geographical points and\n// optionally an options object. You can create a `Polyline` object with\n// multiple separate lines (`MultiPolyline`) by passing an array of arrays\n// of geographic points.\nL.polyline = function (latlngs, options) {\n\treturn new L.Polyline(latlngs, options);\n};\n\nL.Polyline._flat = function (latlngs) {\n\t// true if it's a flat array of latlngs; false if nested\n\treturn !L.Util.isArray(latlngs[0]) || (typeof latlngs[0][0] !== 'object' && typeof latlngs[0][0] !== 'undefined');\n};\n","/*\r\n * @namespace PolyUtil\r\n * Various utility functions for polygon geometries.\r\n */\r\n\r\nL.PolyUtil = {};\r\n\r\n/* @function clipPolygon(points: Point[], bounds: Bounds, round?: Boolean): Point[]\r\n * Clips the polygon geometry defined by the given `points` by the given bounds (using the [Sutherland-Hodgeman algorithm](https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm)).\r\n * Used by Leaflet to only show polygon points that are on the screen or near, increasing\r\n * performance. Note that polygon points needs different algorithm for clipping\r\n * than polyline, so there's a seperate method for it.\r\n */\r\nL.PolyUtil.clipPolygon = function (points, bounds, round) {\r\n\tvar clippedPoints,\r\n\t edges = [1, 4, 2, 8],\r\n\t i, j, k,\r\n\t a, b,\r\n\t len, edge, p,\r\n\t lu = L.LineUtil;\r\n\r\n\tfor (i = 0, len = points.length; i < len; i++) {\r\n\t\tpoints[i]._code = lu._getBitCode(points[i], bounds);\r\n\t}\r\n\r\n\t// for each edge (left, bottom, right, top)\r\n\tfor (k = 0; k < 4; k++) {\r\n\t\tedge = edges[k];\r\n\t\tclippedPoints = [];\r\n\r\n\t\tfor (i = 0, len = points.length, j = len - 1; i < len; j = i++) {\r\n\t\t\ta = points[i];\r\n\t\t\tb = points[j];\r\n\r\n\t\t\t// if a is inside the clip window\r\n\t\t\tif (!(a._code & edge)) {\r\n\t\t\t\t// if b is outside the clip window (a->b goes out of screen)\r\n\t\t\t\tif (b._code & edge) {\r\n\t\t\t\t\tp = lu._getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\t\tp._code = lu._getBitCode(p, bounds);\r\n\t\t\t\t\tclippedPoints.push(p);\r\n\t\t\t\t}\r\n\t\t\t\tclippedPoints.push(a);\r\n\r\n\t\t\t// else if b is inside the clip window (a->b enters the screen)\r\n\t\t\t} else if (!(b._code & edge)) {\r\n\t\t\t\tp = lu._getEdgeIntersection(b, a, edge, bounds, round);\r\n\t\t\t\tp._code = lu._getBitCode(p, bounds);\r\n\t\t\t\tclippedPoints.push(p);\r\n\t\t\t}\r\n\t\t}\r\n\t\tpoints = clippedPoints;\r\n\t}\r\n\r\n\treturn points;\r\n};\r\n","/*\n * @class Polygon\n * @aka L.Polygon\n * @inherits Polyline\n *\n * A class for drawing polygon overlays on a map. Extends `Polyline`.\n *\n * Note that points you pass when creating a polygon shouldn't have an additional last point equal to the first one — it's better to filter out such points.\n *\n *\n * @example\n *\n * ```js\n * // create a red polygon from an array of LatLng points\n * var latlngs = [[-111.03, 41],[-111.04, 45],[-104.05, 45],[-104.05, 41]];\n *\n * var polygon = L.polygon(latlngs, {color: 'red'}).addTo(map);\n *\n * // zoom the map to the polygon\n * map.fitBounds(polygon.getBounds());\n * ```\n *\n * You can also pass an array of arrays of latlngs, with the first array representing the outer shape and the other arrays representing holes in the outer shape:\n *\n * ```js\n * var latlngs = [\n * [[-111.03, 41],[-111.04, 45],[-104.05, 45],[-104.05, 41]], // outer ring\n * [[-108.58,37.29],[-108.58,40.71],[-102.50,40.71],[-102.50,37.29]] // hole\n * ];\n * ```\n *\n * Additionally, you can pass a multi-dimensional array to represent a MultiPolygon shape.\n *\n * ```js\n * var latlngs = [\n * [ // first polygon\n * [[-111.03, 41],[-111.04, 45],[-104.05, 45],[-104.05, 41]], // outer ring\n * [[-108.58,37.29],[-108.58,40.71],[-102.50,40.71],[-102.50,37.29]] // hole\n * ],\n * [ // second polygon\n * [[-109.05, 37],[-109.03, 41],[-102.05, 41],[-102.04, 37],[-109.05, 38]]\n * ]\n * ];\n * ```\n */\n\nL.Polygon = L.Polyline.extend({\n\n\toptions: {\n\t\tfill: true\n\t},\n\n\tisEmpty: function () {\n\t\treturn !this._latlngs.length || !this._latlngs[0].length;\n\t},\n\n\tgetCenter: function () {\n\t\t// throws error when not yet added to map as this center calculation requires projected coordinates\n\t\tif (!this._map) {\n\t\t\tthrow new Error('Must add layer to map before using getCenter()');\n\t\t}\n\n\t\tvar i, j, p1, p2, f, area, x, y, center,\n\t\t points = this._rings[0],\n\t\t len = points.length;\n\n\t\tif (!len) { return null; }\n\n\t\t// polygon centroid algorithm; only uses the first ring if there are multiple\n\n\t\tarea = x = y = 0;\n\n\t\tfor (i = 0, j = len - 1; i < len; j = i++) {\n\t\t\tp1 = points[i];\n\t\t\tp2 = points[j];\n\n\t\t\tf = p1.y * p2.x - p2.y * p1.x;\n\t\t\tx += (p1.x + p2.x) * f;\n\t\t\ty += (p1.y + p2.y) * f;\n\t\t\tarea += f * 3;\n\t\t}\n\n\t\tif (area === 0) {\n\t\t\t// Polygon is so small that all points are on same pixel.\n\t\t\tcenter = points[0];\n\t\t} else {\n\t\t\tcenter = [x / area, y / area];\n\t\t}\n\t\treturn this._map.layerPointToLatLng(center);\n\t},\n\n\t_convertLatLngs: function (latlngs) {\n\t\tvar result = L.Polyline.prototype._convertLatLngs.call(this, latlngs),\n\t\t len = result.length;\n\n\t\t// remove last point if it equals first one\n\t\tif (len >= 2 && result[0] instanceof L.LatLng && result[0].equals(result[len - 1])) {\n\t\t\tresult.pop();\n\t\t}\n\t\treturn result;\n\t},\n\n\t_setLatLngs: function (latlngs) {\n\t\tL.Polyline.prototype._setLatLngs.call(this, latlngs);\n\t\tif (L.Polyline._flat(this._latlngs)) {\n\t\t\tthis._latlngs = [this._latlngs];\n\t\t}\n\t},\n\n\t_defaultShape: function () {\n\t\treturn L.Polyline._flat(this._latlngs[0]) ? this._latlngs[0] : this._latlngs[0][0];\n\t},\n\n\t_clipPoints: function () {\n\t\t// polygons need a different clipping algorithm so we redefine that\n\n\t\tvar bounds = this._renderer._bounds,\n\t\t w = this.options.weight,\n\t\t p = new L.Point(w, w);\n\n\t\t// increase clip padding by stroke width to avoid stroke on clip edges\n\t\tbounds = new L.Bounds(bounds.min.subtract(p), bounds.max.add(p));\n\n\t\tthis._parts = [];\n\t\tif (!this._pxBounds || !this._pxBounds.intersects(bounds)) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.options.noClip) {\n\t\t\tthis._parts = this._rings;\n\t\t\treturn;\n\t\t}\n\n\t\tfor (var i = 0, len = this._rings.length, clipped; i < len; i++) {\n\t\t\tclipped = L.PolyUtil.clipPolygon(this._rings[i], bounds, true);\n\t\t\tif (clipped.length) {\n\t\t\t\tthis._parts.push(clipped);\n\t\t\t}\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updatePoly(this, true);\n\t}\n});\n\n\n// @factory L.polygon(latlngs: LatLng[], options?: Polyline options)\nL.polygon = function (latlngs, options) {\n\treturn new L.Polygon(latlngs, options);\n};\n","/*\n * L.Rectangle extends Polygon and creates a rectangle when passed a LatLngBounds object.\n */\n\n/*\n * @class Rectangle\n * @aka L.Retangle\n * @inherits Polygon\n *\n * A class for drawing rectangle overlays on a map. Extends `Polygon`.\n *\n * @example\n *\n * ```js\n * // define rectangle geographical bounds\n * var bounds = [[54.559322, -5.767822], [56.1210604, -3.021240]];\n *\n * // create an orange rectangle\n * L.rectangle(bounds, {color: \"#ff7800\", weight: 1}).addTo(map);\n *\n * // zoom the map to the rectangle bounds\n * map.fitBounds(bounds);\n * ```\n *\n */\n\n\nL.Rectangle = L.Polygon.extend({\n\tinitialize: function (latLngBounds, options) {\n\t\tL.Polygon.prototype.initialize.call(this, this._boundsToLatLngs(latLngBounds), options);\n\t},\n\n\t// @method setBounds(latLngBounds: LatLngBounds): this\n\t// Redraws the rectangle with the passed bounds.\n\tsetBounds: function (latLngBounds) {\n\t\treturn this.setLatLngs(this._boundsToLatLngs(latLngBounds));\n\t},\n\n\t_boundsToLatLngs: function (latLngBounds) {\n\t\tlatLngBounds = L.latLngBounds(latLngBounds);\n\t\treturn [\n\t\t\tlatLngBounds.getSouthWest(),\n\t\t\tlatLngBounds.getNorthWest(),\n\t\t\tlatLngBounds.getNorthEast(),\n\t\t\tlatLngBounds.getSouthEast()\n\t\t];\n\t}\n});\n\n\n// @factory L.rectangle(latLngBounds: LatLngBounds, options?: Polyline options)\nL.rectangle = function (latLngBounds, options) {\n\treturn new L.Rectangle(latLngBounds, options);\n};\n","/*\n * @class CircleMarker\n * @aka L.CircleMarker\n * @inherits Path\n *\n * A circle of a fixed size with radius specified in pixels. Extends `Path`.\n */\n\nL.CircleMarker = L.Path.extend({\n\n\t// @section\n\t// @aka CircleMarker options\n\toptions: {\n\t\tfill: true,\n\n\t\t// @option radius: Number = 10\n\t\t// Radius of the circle marker, in pixels\n\t\tradius: 10\n\t},\n\n\tinitialize: function (latlng, options) {\n\t\tL.setOptions(this, options);\n\t\tthis._latlng = L.latLng(latlng);\n\t\tthis._radius = this.options.radius;\n\t},\n\n\t// @method setLatLng(latLng: LatLng): this\n\t// Sets the position of a circle marker to a new location.\n\tsetLatLng: function (latlng) {\n\t\tthis._latlng = L.latLng(latlng);\n\t\tthis.redraw();\n\t\treturn this.fire('move', {latlng: this._latlng});\n\t},\n\n\t// @method getLatLng(): LatLng\n\t// Returns the current geographical position of the circle marker\n\tgetLatLng: function () {\n\t\treturn this._latlng;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle marker. Units are in pixels.\n\tsetRadius: function (radius) {\n\t\tthis.options.radius = this._radius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of the circle\n\tgetRadius: function () {\n\t\treturn this._radius;\n\t},\n\n\tsetStyle : function (options) {\n\t\tvar radius = options && options.radius || this._radius;\n\t\tL.Path.prototype.setStyle.call(this, options);\n\t\tthis.setRadius(radius);\n\t\treturn this;\n\t},\n\n\t_project: function () {\n\t\tthis._point = this._map.latLngToLayerPoint(this._latlng);\n\t\tthis._updateBounds();\n\t},\n\n\t_updateBounds: function () {\n\t\tvar r = this._radius,\n\t\t r2 = this._radiusY || r,\n\t\t w = this._clickTolerance(),\n\t\t p = [r + w, r2 + w];\n\t\tthis._pxBounds = new L.Bounds(this._point.subtract(p), this._point.add(p));\n\t},\n\n\t_update: function () {\n\t\tif (this._map) {\n\t\t\tthis._updatePath();\n\t\t}\n\t},\n\n\t_updatePath: function () {\n\t\tthis._renderer._updateCircle(this);\n\t},\n\n\t_empty: function () {\n\t\treturn this._radius && !this._renderer._bounds.intersects(this._pxBounds);\n\t}\n});\n\n\n// @factory L.circleMarker(latlng: LatLng, options?: CircleMarker options)\n// Instantiates a circle marker object given a geographical point, and an optional options object.\nL.circleMarker = function (latlng, options) {\n\treturn new L.CircleMarker(latlng, options);\n};\n","/*\n * @class Circle\n * @aka L.Circle\n * @inherits CircleMarker\n *\n * A class for drawing circle overlays on a map. Extends `CircleMarker`.\n *\n * It's an approximation and starts to diverge from a real circle closer to poles (due to projection distortion).\n *\n * @example\n *\n * ```js\n * L.circle([50.5, 30.5], {radius: 200}).addTo(map);\n * ```\n */\n\nL.Circle = L.CircleMarker.extend({\n\n\tinitialize: function (latlng, options, legacyOptions) {\n\t\tif (typeof options === 'number') {\n\t\t\t// Backwards compatibility with 0.7.x factory (latlng, radius, options?)\n\t\t\toptions = L.extend({}, legacyOptions, {radius: options});\n\t\t}\n\t\tL.setOptions(this, options);\n\t\tthis._latlng = L.latLng(latlng);\n\n\t\tif (isNaN(this.options.radius)) { throw new Error('Circle radius cannot be NaN'); }\n\n\t\t// @section\n\t\t// @aka Circle options\n\t\t// @option radius: Number; Radius of the circle, in meters.\n\t\tthis._mRadius = this.options.radius;\n\t},\n\n\t// @method setRadius(radius: Number): this\n\t// Sets the radius of a circle. Units are in meters.\n\tsetRadius: function (radius) {\n\t\tthis._mRadius = radius;\n\t\treturn this.redraw();\n\t},\n\n\t// @method getRadius(): Number\n\t// Returns the current radius of a circle. Units are in meters.\n\tgetRadius: function () {\n\t\treturn this._mRadius;\n\t},\n\n\t// @method getBounds(): LatLngBounds\n\t// Returns the `LatLngBounds` of the path.\n\tgetBounds: function () {\n\t\tvar half = [this._radius, this._radiusY || this._radius];\n\n\t\treturn new L.LatLngBounds(\n\t\t\tthis._map.layerPointToLatLng(this._point.subtract(half)),\n\t\t\tthis._map.layerPointToLatLng(this._point.add(half)));\n\t},\n\n\tsetStyle: L.Path.prototype.setStyle,\n\n\t_project: function () {\n\n\t\tvar lng = this._latlng.lng,\n\t\t lat = this._latlng.lat,\n\t\t map = this._map,\n\t\t crs = map.options.crs;\n\n\t\tif (crs.distance === L.CRS.Earth.distance) {\n\t\t\tvar d = Math.PI / 180,\n\t\t\t latR = (this._mRadius / L.CRS.Earth.R) / d,\n\t\t\t top = map.project([lat + latR, lng]),\n\t\t\t bottom = map.project([lat - latR, lng]),\n\t\t\t p = top.add(bottom).divideBy(2),\n\t\t\t lat2 = map.unproject(p).lat,\n\t\t\t lngR = Math.acos((Math.cos(latR * d) - Math.sin(lat * d) * Math.sin(lat2 * d)) /\n\t\t\t (Math.cos(lat * d) * Math.cos(lat2 * d))) / d;\n\n\t\t\tif (isNaN(lngR) || lngR === 0) {\n\t\t\t\tlngR = latR / Math.cos(Math.PI / 180 * lat); // Fallback for edge case, #2425\n\t\t\t}\n\n\t\t\tthis._point = p.subtract(map.getPixelOrigin());\n\t\t\tthis._radius = isNaN(lngR) ? 0 : Math.max(Math.round(p.x - map.project([lat2, lng - lngR]).x), 1);\n\t\t\tthis._radiusY = Math.max(Math.round(p.y - top.y), 1);\n\n\t\t} else {\n\t\t\tvar latlng2 = crs.unproject(crs.project(this._latlng).subtract([this._mRadius, 0]));\n\n\t\t\tthis._point = map.latLngToLayerPoint(this._latlng);\n\t\t\tthis._radius = this._point.x - map.latLngToLayerPoint(latlng2).x;\n\t\t}\n\n\t\tthis._updateBounds();\n\t}\n});\n\n// @factory L.circle(latlng: LatLng, options?: Circle options)\n// Instantiates a circle object given a geographical point, and an options object\n// which contains the circle radius.\n// @alternative\n// @factory L.circle(latlng: LatLng, radius: Number, options?: Circle options)\n// Obsolete way of instantiating a circle, for compatibility with 0.7.x code.\n// Do not use in new applications or plugins.\nL.circle = function (latlng, options, legacyOptions) {\n\treturn new L.Circle(latlng, options, legacyOptions);\n};\n","/*\n * @class SVG\n * @inherits Renderer\n * @aka L.SVG\n *\n * Allows vector layers to be displayed with [SVG](https://developer.mozilla.org/docs/Web/SVG).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](http://caniuse.com/#search=svg), SVG is not\n * available in all web browsers, notably Android 2.x and 3.x.\n *\n * Although SVG is not available on IE7 and IE8, these browsers support\n * [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)\n * (a now deprecated technology), and the SVG renderer will fall back to VML in\n * this case.\n *\n * @example\n *\n * Use SVG by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.svg()\n * });\n * ```\n *\n * Use a SVG renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.svg({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nL.SVG = L.Renderer.extend({\n\n\tgetEvents: function () {\n\t\tvar events = L.Renderer.prototype.getEvents.call(this);\n\t\tevents.zoomstart = this._onZoomStart;\n\t\treturn events;\n\t},\n\n\t_initContainer: function () {\n\t\tthis._container = L.SVG.create('svg');\n\n\t\t// makes it possible to click through svg root; we'll reset it back in individual paths\n\t\tthis._container.setAttribute('pointer-events', 'none');\n\n\t\tthis._rootGroup = L.SVG.create('g');\n\t\tthis._container.appendChild(this._rootGroup);\n\t},\n\n\t_onZoomStart: function () {\n\t\t// Drag-then-pinch interactions might mess up the center and zoom.\n\t\t// In this case, the easiest way to prevent this is re-do the renderer\n\t\t// bounds and padding when the zooming starts.\n\t\tthis._update();\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tL.Renderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t size = b.getSize(),\n\t\t container = this._container;\n\n\t\t// set size of svg-container if changed\n\t\tif (!this._svgSize || !this._svgSize.equals(size)) {\n\t\t\tthis._svgSize = size;\n\t\t\tcontainer.setAttribute('width', size.x);\n\t\t\tcontainer.setAttribute('height', size.y);\n\t\t}\n\n\t\t// movement: update container viewBox so that we don't have to change coordinates of individual layers\n\t\tL.DomUtil.setPosition(container, b.min);\n\t\tcontainer.setAttribute('viewBox', [b.min.x, b.min.y, size.x, size.y].join(' '));\n\n\t\tthis.fire('update');\n\t},\n\n\t// methods below are called by vector layers implementations\n\n\t_initPath: function (layer) {\n\t\tvar path = layer._path = L.SVG.create('path');\n\n\t\t// @namespace Path\n\t\t// @option className: String = null\n\t\t// Custom class name set on an element. Only for SVG renderer.\n\t\tif (layer.options.className) {\n\t\t\tL.DomUtil.addClass(path, layer.options.className);\n\t\t}\n\n\t\tif (layer.options.interactive) {\n\t\t\tL.DomUtil.addClass(path, 'leaflet-interactive');\n\t\t}\n\n\t\tthis._updateStyle(layer);\n\t},\n\n\t_addPath: function (layer) {\n\t\tthis._rootGroup.appendChild(layer._path);\n\t\tlayer.addInteractiveTarget(layer._path);\n\t},\n\n\t_removePath: function (layer) {\n\t\tL.DomUtil.remove(layer._path);\n\t\tlayer.removeInteractiveTarget(layer._path);\n\t},\n\n\t_updatePath: function (layer) {\n\t\tlayer._project();\n\t\tlayer._update();\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar path = layer._path,\n\t\t options = layer.options;\n\n\t\tif (!path) { return; }\n\n\t\tif (options.stroke) {\n\t\t\tpath.setAttribute('stroke', options.color);\n\t\t\tpath.setAttribute('stroke-opacity', options.opacity);\n\t\t\tpath.setAttribute('stroke-width', options.weight);\n\t\t\tpath.setAttribute('stroke-linecap', options.lineCap);\n\t\t\tpath.setAttribute('stroke-linejoin', options.lineJoin);\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tpath.setAttribute('stroke-dasharray', options.dashArray);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dasharray');\n\t\t\t}\n\n\t\t\tif (options.dashOffset) {\n\t\t\t\tpath.setAttribute('stroke-dashoffset', options.dashOffset);\n\t\t\t} else {\n\t\t\t\tpath.removeAttribute('stroke-dashoffset');\n\t\t\t}\n\t\t} else {\n\t\t\tpath.setAttribute('stroke', 'none');\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tpath.setAttribute('fill', options.fillColor || options.color);\n\t\t\tpath.setAttribute('fill-opacity', options.fillOpacity);\n\t\t\tpath.setAttribute('fill-rule', options.fillRule || 'evenodd');\n\t\t} else {\n\t\t\tpath.setAttribute('fill', 'none');\n\t\t}\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\t\tthis._setPath(layer, L.SVG.pointsToPath(layer._parts, closed));\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point,\n\t\t r = layer._radius,\n\t\t r2 = layer._radiusY || r,\n\t\t arc = 'a' + r + ',' + r2 + ' 0 1,0 ';\n\n\t\t// drawing a circle with two half-arcs\n\t\tvar d = layer._empty() ? 'M0 0' :\n\t\t\t\t'M' + (p.x - r) + ',' + p.y +\n\t\t\t\tarc + (r * 2) + ',0 ' +\n\t\t\t\tarc + (-r * 2) + ',0 ';\n\n\t\tthis._setPath(layer, d);\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.setAttribute('d', path);\n\t},\n\n\t// SVG does not have the concept of zIndex so we resort to changing the DOM order of elements\n\t_bringToFront: function (layer) {\n\t\tL.DomUtil.toFront(layer._path);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tL.DomUtil.toBack(layer._path);\n\t}\n});\n\n\n// @namespace SVG; @section\n// There are several static functions which can be called without instantiating L.SVG:\nL.extend(L.SVG, {\n\t// @function create(name: String): SVGElement\n\t// Returns a instance of [SVGElement](https://developer.mozilla.org/docs/Web/API/SVGElement),\n\t// corresponding to the class name passed. For example, using 'line' will return\n\t// an instance of [SVGLineElement](https://developer.mozilla.org/docs/Web/API/SVGLineElement).\n\tcreate: function (name) {\n\t\treturn document.createElementNS('http://www.w3.org/2000/svg', name);\n\t},\n\n\t// @function pointsToPath(rings: Point[], closed: Boolean): String\n\t// Generates a SVG path string for multiple rings, with each ring turning\n\t// into \"M..L..L..\" instructions\n\tpointsToPath: function (rings, closed) {\n\t\tvar str = '',\n\t\t i, j, len, len2, points, p;\n\n\t\tfor (i = 0, len = rings.length; i < len; i++) {\n\t\t\tpoints = rings[i];\n\n\t\t\tfor (j = 0, len2 = points.length; j < len2; j++) {\n\t\t\t\tp = points[j];\n\t\t\t\tstr += (j ? 'L' : 'M') + p.x + ' ' + p.y;\n\t\t\t}\n\n\t\t\t// closes the ring for polygons; \"x\" is VML syntax\n\t\t\tstr += closed ? (L.Browser.svg ? 'z' : 'x') : '';\n\t\t}\n\n\t\t// SVG complains about empty path strings\n\t\treturn str || 'M0 0';\n\t}\n});\n\n// @namespace Browser; @property svg: Boolean\n// `true` when the browser supports [SVG](https://developer.mozilla.org/docs/Web/SVG).\nL.Browser.svg = !!(document.createElementNS && L.SVG.create('svg').createSVGRect);\n\n\n// @namespace SVG\n// @factory L.svg(options?: Renderer options)\n// Creates a SVG renderer with the given options.\nL.svg = function (options) {\n\treturn L.Browser.svg || L.Browser.vml ? new L.SVG(options) : null;\n};\n","/*\n * Thanks to Dmitry Baranovsky and his Raphael library for inspiration!\n */\n\n/*\n * @class SVG\n *\n * Although SVG is not available on IE7 and IE8, these browsers support [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language), and the SVG renderer will fall back to VML in this case.\n *\n * VML was deprecated in 2012, which means VML functionality exists only for backwards compatibility\n * with old versions of Internet Explorer.\n */\n\n// @namespace Browser; @property vml: Boolean\n// `true` if the browser supports [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language).\nL.Browser.vml = !L.Browser.svg && (function () {\n\ttry {\n\t\tvar div = document.createElement('div');\n\t\tdiv.innerHTML = '<v:shape adj=\"1\"/>';\n\n\t\tvar shape = div.firstChild;\n\t\tshape.style.behavior = 'url(#default#VML)';\n\n\t\treturn shape && (typeof shape.adj === 'object');\n\n\t} catch (e) {\n\t\treturn false;\n\t}\n}());\n\n// redefine some SVG methods to handle VML syntax which is similar but with some differences\nL.SVG.include(!L.Browser.vml ? {} : {\n\n\t_initContainer: function () {\n\t\tthis._container = L.DomUtil.create('div', 'leaflet-vml-container');\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom) { return; }\n\t\tL.Renderer.prototype._update.call(this);\n\t\tthis.fire('update');\n\t},\n\n\t_initPath: function (layer) {\n\t\tvar container = layer._container = L.SVG.create('shape');\n\n\t\tL.DomUtil.addClass(container, 'leaflet-vml-shape ' + (this.options.className || ''));\n\n\t\tcontainer.coordsize = '1 1';\n\n\t\tlayer._path = L.SVG.create('path');\n\t\tcontainer.appendChild(layer._path);\n\n\t\tthis._updateStyle(layer);\n\t},\n\n\t_addPath: function (layer) {\n\t\tvar container = layer._container;\n\t\tthis._container.appendChild(container);\n\n\t\tif (layer.options.interactive) {\n\t\t\tlayer.addInteractiveTarget(container);\n\t\t}\n\t},\n\n\t_removePath: function (layer) {\n\t\tvar container = layer._container;\n\t\tL.DomUtil.remove(container);\n\t\tlayer.removeInteractiveTarget(container);\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tvar stroke = layer._stroke,\n\t\t fill = layer._fill,\n\t\t options = layer.options,\n\t\t container = layer._container;\n\n\t\tcontainer.stroked = !!options.stroke;\n\t\tcontainer.filled = !!options.fill;\n\n\t\tif (options.stroke) {\n\t\t\tif (!stroke) {\n\t\t\t\tstroke = layer._stroke = L.SVG.create('stroke');\n\t\t\t}\n\t\t\tcontainer.appendChild(stroke);\n\t\t\tstroke.weight = options.weight + 'px';\n\t\t\tstroke.color = options.color;\n\t\t\tstroke.opacity = options.opacity;\n\n\t\t\tif (options.dashArray) {\n\t\t\t\tstroke.dashStyle = L.Util.isArray(options.dashArray) ?\n\t\t\t\t options.dashArray.join(' ') :\n\t\t\t\t options.dashArray.replace(/( *, *)/g, ' ');\n\t\t\t} else {\n\t\t\t\tstroke.dashStyle = '';\n\t\t\t}\n\t\t\tstroke.endcap = options.lineCap.replace('butt', 'flat');\n\t\t\tstroke.joinstyle = options.lineJoin;\n\n\t\t} else if (stroke) {\n\t\t\tcontainer.removeChild(stroke);\n\t\t\tlayer._stroke = null;\n\t\t}\n\n\t\tif (options.fill) {\n\t\t\tif (!fill) {\n\t\t\t\tfill = layer._fill = L.SVG.create('fill');\n\t\t\t}\n\t\t\tcontainer.appendChild(fill);\n\t\t\tfill.color = options.fillColor || options.color;\n\t\t\tfill.opacity = options.fillOpacity;\n\n\t\t} else if (fill) {\n\t\t\tcontainer.removeChild(fill);\n\t\t\tlayer._fill = null;\n\t\t}\n\t},\n\n\t_updateCircle: function (layer) {\n\t\tvar p = layer._point.round(),\n\t\t r = Math.round(layer._radius),\n\t\t r2 = Math.round(layer._radiusY || r);\n\n\t\tthis._setPath(layer, layer._empty() ? 'M0 0' :\n\t\t\t\t'AL ' + p.x + ',' + p.y + ' ' + r + ',' + r2 + ' 0,' + (65535 * 360));\n\t},\n\n\t_setPath: function (layer, path) {\n\t\tlayer._path.v = path;\n\t},\n\n\t_bringToFront: function (layer) {\n\t\tL.DomUtil.toFront(layer._container);\n\t},\n\n\t_bringToBack: function (layer) {\n\t\tL.DomUtil.toBack(layer._container);\n\t}\n});\n\nif (L.Browser.vml) {\n\tL.SVG.create = (function () {\n\t\ttry {\n\t\t\tdocument.namespaces.add('lvml', 'urn:schemas-microsoft-com:vml');\n\t\t\treturn function (name) {\n\t\t\t\treturn document.createElement('<lvml:' + name + ' class=\"lvml\">');\n\t\t\t};\n\t\t} catch (e) {\n\t\t\treturn function (name) {\n\t\t\t\treturn document.createElement('<' + name + ' xmlns=\"urn:schemas-microsoft.com:vml\" class=\"lvml\">');\n\t\t\t};\n\t\t}\n\t})();\n}\n","/*\n * @class Canvas\n * @inherits Renderer\n * @aka L.Canvas\n *\n * Allows vector layers to be displayed with [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\n * Inherits `Renderer`.\n *\n * Due to [technical limitations](http://caniuse.com/#search=canvas), Canvas is not\n * available in all web browsers, notably IE8, and overlapping geometries might\n * not display properly in some edge cases.\n *\n * @example\n *\n * Use Canvas by default for all paths in the map:\n *\n * ```js\n * var map = L.map('map', {\n * \trenderer: L.canvas()\n * });\n * ```\n *\n * Use a Canvas renderer with extra padding for specific vector geometries:\n *\n * ```js\n * var map = L.map('map');\n * var myRenderer = L.canvas({ padding: 0.5 });\n * var line = L.polyline( coordinates, { renderer: myRenderer } );\n * var circle = L.circle( center, { renderer: myRenderer } );\n * ```\n */\n\nL.Canvas = L.Renderer.extend({\n\n\tonAdd: function () {\n\t\tL.Renderer.prototype.onAdd.call(this);\n\n\t\tthis._layers = this._layers || {};\n\n\t\t// Redraw vectors since canvas is cleared upon removal,\n\t\t// in case of removing the renderer itself from the map.\n\t\tthis._draw();\n\t},\n\n\t_initContainer: function () {\n\t\tvar container = this._container = document.createElement('canvas');\n\n\t\tL.DomEvent\n\t\t\t.on(container, 'mousemove', L.Util.throttle(this._onMouseMove, 32, this), this)\n\t\t\t.on(container, 'click dblclick mousedown mouseup contextmenu', this._onClick, this)\n\t\t\t.on(container, 'mouseout', this._handleMouseOut, this);\n\n\t\tthis._ctx = container.getContext('2d');\n\t},\n\n\t_update: function () {\n\t\tif (this._map._animatingZoom && this._bounds) { return; }\n\n\t\tthis._drawnLayers = {};\n\n\t\tL.Renderer.prototype._update.call(this);\n\n\t\tvar b = this._bounds,\n\t\t container = this._container,\n\t\t size = b.getSize(),\n\t\t m = L.Browser.retina ? 2 : 1;\n\n\t\tL.DomUtil.setPosition(container, b.min);\n\n\t\t// set canvas size (also clearing it); use double size on retina\n\t\tcontainer.width = m * size.x;\n\t\tcontainer.height = m * size.y;\n\t\tcontainer.style.width = size.x + 'px';\n\t\tcontainer.style.height = size.y + 'px';\n\n\t\tif (L.Browser.retina) {\n\t\t\tthis._ctx.scale(2, 2);\n\t\t}\n\n\t\t// translate so we use the same path coordinates after canvas element moves\n\t\tthis._ctx.translate(-b.min.x, -b.min.y);\n\n\t\t// Tell paths to redraw themselves\n\t\tthis.fire('update');\n\t},\n\n\t_initPath: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._layers[L.stamp(layer)] = layer;\n\t},\n\n\t_addPath: L.Util.falseFn,\n\n\t_removePath: function (layer) {\n\t\tlayer._removed = true;\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updatePath: function (layer) {\n\t\tthis._redrawBounds = layer._pxBounds;\n\t\tthis._draw(true);\n\t\tlayer._project();\n\t\tlayer._update();\n\t\tthis._draw();\n\t\tthis._redrawBounds = null;\n\t},\n\n\t_updateStyle: function (layer) {\n\t\tthis._updateDashArray(layer);\n\t\tthis._requestRedraw(layer);\n\t},\n\n\t_updateDashArray: function (layer) {\n\t\tif (layer.options.dashArray) {\n\t\t\tvar parts = layer.options.dashArray.split(','),\n\t\t\t dashArray = [],\n\t\t\t i;\n\t\t\tfor (i = 0; i < parts.length; i++) {\n\t\t\t\tdashArray.push(Number(parts[i]));\n\t\t\t}\n\t\t\tlayer.options._dashArray = dashArray;\n\t\t}\n\t},\n\n\t_requestRedraw: function (layer) {\n\t\tif (!this._map) { return; }\n\n\t\tvar padding = (layer.options.weight || 0) + 1;\n\t\tthis._redrawBounds = this._redrawBounds || new L.Bounds();\n\t\tthis._redrawBounds.extend(layer._pxBounds.min.subtract([padding, padding]));\n\t\tthis._redrawBounds.extend(layer._pxBounds.max.add([padding, padding]));\n\n\t\tthis._redrawRequest = this._redrawRequest || L.Util.requestAnimFrame(this._redraw, this);\n\t},\n\n\t_redraw: function () {\n\t\tthis._redrawRequest = null;\n\n\t\tthis._draw(true); // clear layers in redraw bounds\n\t\tthis._draw(); // draw layers\n\n\t\tthis._redrawBounds = null;\n\t},\n\n\t_draw: function (clear) {\n\t\tthis._clear = clear;\n\t\tvar layer, bounds = this._redrawBounds;\n\t\tthis._ctx.save();\n\t\tif (bounds) {\n\t\t\tthis._ctx.beginPath();\n\t\t\tthis._ctx.rect(bounds.min.x, bounds.min.y, bounds.max.x - bounds.min.x, bounds.max.y - bounds.min.y);\n\t\t\tthis._ctx.clip();\n\t\t}\n\n\t\tfor (var id in this._layers) {\n\t\t\tlayer = this._layers[id];\n\t\t\tif (!bounds || (layer._pxBounds && layer._pxBounds.intersects(bounds))) {\n\t\t\t\tlayer._updatePath();\n\t\t\t}\n\t\t\tif (clear && layer._removed) {\n\t\t\t\tdelete layer._removed;\n\t\t\t\tdelete this._layers[id];\n\t\t\t}\n\t\t}\n\t\tthis._ctx.restore(); // Restore state before clipping.\n\t},\n\n\t_updatePoly: function (layer, closed) {\n\n\t\tvar i, j, len2, p,\n\t\t parts = layer._parts,\n\t\t len = parts.length,\n\t\t ctx = this._ctx;\n\n\t\tif (!len) { return; }\n\n\t\tthis._drawnLayers[layer._leaflet_id] = layer;\n\n\t\tctx.beginPath();\n\n\t\tif (ctx.setLineDash) {\n\t\t\tctx.setLineDash(layer.options && layer.options._dashArray || []);\n\t\t}\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tfor (j = 0, len2 = parts[i].length; j < len2; j++) {\n\t\t\t\tp = parts[i][j];\n\t\t\t\tctx[j ? 'lineTo' : 'moveTo'](p.x, p.y);\n\t\t\t}\n\t\t\tif (closed) {\n\t\t\t\tctx.closePath();\n\t\t\t}\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\n\t\t// TODO optimization: 1 fill/stroke for all features with equal style instead of 1 for each feature\n\t},\n\n\t_updateCircle: function (layer) {\n\n\t\tif (layer._empty()) { return; }\n\n\t\tvar p = layer._point,\n\t\t ctx = this._ctx,\n\t\t r = layer._radius,\n\t\t s = (layer._radiusY || r) / r;\n\n\t\tthis._drawnLayers[layer._leaflet_id] = layer;\n\n\t\tif (s !== 1) {\n\t\t\tctx.save();\n\t\t\tctx.scale(1, s);\n\t\t}\n\n\t\tctx.beginPath();\n\t\tctx.arc(p.x, p.y / s, r, 0, Math.PI * 2, false);\n\n\t\tif (s !== 1) {\n\t\t\tctx.restore();\n\t\t}\n\n\t\tthis._fillStroke(ctx, layer);\n\t},\n\n\t_fillStroke: function (ctx, layer) {\n\t\tvar clear = this._clear,\n\t\t options = layer.options;\n\n\t\tctx.globalCompositeOperation = clear ? 'destination-out' : 'source-over';\n\n\t\tif (options.fill) {\n\t\t\tctx.globalAlpha = clear ? 1 : options.fillOpacity;\n\t\t\tctx.fillStyle = options.fillColor || options.color;\n\t\t\tctx.fill(options.fillRule || 'evenodd');\n\t\t}\n\n\t\tif (options.stroke && options.weight !== 0) {\n\t\t\tctx.globalAlpha = clear ? 1 : options.opacity;\n\n\t\t\t// if clearing shape, do it with the previously drawn line width\n\t\t\tlayer._prevWeight = ctx.lineWidth = clear ? layer._prevWeight + 1 : options.weight;\n\n\t\t\tctx.strokeStyle = options.color;\n\t\t\tctx.lineCap = options.lineCap;\n\t\t\tctx.lineJoin = options.lineJoin;\n\t\t\tctx.stroke();\n\t\t}\n\t},\n\n\t// Canvas obviously doesn't have mouse events for individual drawn objects,\n\t// so we emulate that by calculating what's under the mouse on mousemove/click manually\n\n\t_onClick: function (e) {\n\t\tvar point = this._map.mouseEventToLayerPoint(e), layers = [], layer;\n\n\t\tfor (var id in this._layers) {\n\t\t\tlayer = this._layers[id];\n\t\t\tif (layer.options.interactive && layer._containsPoint(point) && !this._map._draggableMoved(layer)) {\n\t\t\t\tL.DomEvent._fakeStop(e);\n\t\t\t\tlayers.push(layer);\n\t\t\t}\n\t\t}\n\t\tif (layers.length) {\n\t\t\tthis._fireEvent(layers, e);\n\t\t}\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._map || this._map.dragging.moving() || this._map._animatingZoom) { return; }\n\n\t\tvar point = this._map.mouseEventToLayerPoint(e);\n\t\tthis._handleMouseOut(e, point);\n\t\tthis._handleMouseHover(e, point);\n\t},\n\n\n\t_handleMouseOut: function (e, point) {\n\t\tvar layer = this._hoveredLayer;\n\t\tif (layer && (e.type === 'mouseout' || !layer._containsPoint(point))) {\n\t\t\t// if we're leaving the layer, fire mouseout\n\t\t\tL.DomUtil.removeClass(this._container, 'leaflet-interactive');\n\t\t\tthis._fireEvent([layer], e, 'mouseout');\n\t\t\tthis._hoveredLayer = null;\n\t\t}\n\t},\n\n\t_handleMouseHover: function (e, point) {\n\t\tvar id, layer;\n\n\t\tfor (id in this._drawnLayers) {\n\t\t\tlayer = this._drawnLayers[id];\n\t\t\tif (layer.options.interactive && layer._containsPoint(point)) {\n\t\t\t\tL.DomUtil.addClass(this._container, 'leaflet-interactive'); // change cursor\n\t\t\t\tthis._fireEvent([layer], e, 'mouseover');\n\t\t\t\tthis._hoveredLayer = layer;\n\t\t\t}\n\t\t}\n\n\t\tif (this._hoveredLayer) {\n\t\t\tthis._fireEvent([this._hoveredLayer], e);\n\t\t}\n\t},\n\n\t_fireEvent: function (layers, e, type) {\n\t\tthis._map._fireDOMEvent(e, type || e.type, layers);\n\t},\n\n\t// TODO _bringToFront & _bringToBack, pretty tricky\n\n\t_bringToFront: L.Util.falseFn,\n\t_bringToBack: L.Util.falseFn\n});\n\n// @namespace Browser; @property canvas: Boolean\n// `true` when the browser supports [`<canvas>`](https://developer.mozilla.org/docs/Web/API/Canvas_API).\nL.Browser.canvas = (function () {\n\treturn !!document.createElement('canvas').getContext;\n}());\n\n// @namespace Canvas\n// @factory L.canvas(options?: Renderer options)\n// Creates a Canvas renderer with the given options.\nL.canvas = function (options) {\n\treturn L.Browser.canvas ? new L.Canvas(options) : null;\n};\n\nL.Polyline.prototype._containsPoint = function (p, closed) {\n\tvar i, j, k, len, len2, part,\n\t w = this._clickTolerance();\n\n\tif (!this._pxBounds.contains(p)) { return false; }\n\n\t// hit detection for polylines\n\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\tpart = this._parts[i];\n\n\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\tif (!closed && (j === 0)) { continue; }\n\n\t\t\tif (L.LineUtil.pointToSegmentDistance(p, part[k], part[j]) <= w) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n};\n\nL.Polygon.prototype._containsPoint = function (p) {\n\tvar inside = false,\n\t part, p1, p2, i, j, k, len, len2;\n\n\tif (!this._pxBounds.contains(p)) { return false; }\n\n\t// ray casting algorithm for detecting if point is in polygon\n\tfor (i = 0, len = this._parts.length; i < len; i++) {\n\t\tpart = this._parts[i];\n\n\t\tfor (j = 0, len2 = part.length, k = len2 - 1; j < len2; k = j++) {\n\t\t\tp1 = part[j];\n\t\t\tp2 = part[k];\n\n\t\t\tif (((p1.y > p.y) !== (p2.y > p.y)) && (p.x < (p2.x - p1.x) * (p.y - p1.y) / (p2.y - p1.y) + p1.x)) {\n\t\t\t\tinside = !inside;\n\t\t\t}\n\t\t}\n\t}\n\n\t// also check if it's on polygon stroke\n\treturn inside || L.Polyline.prototype._containsPoint.call(this, p, true);\n};\n\nL.CircleMarker.prototype._containsPoint = function (p) {\n\treturn p.distanceTo(this._point) <= this._radius + this._clickTolerance();\n};\n","/*\r\n * @class GeoJSON\r\n * @aka L.GeoJSON\r\n * @inherits FeatureGroup\r\n *\r\n * Represents a GeoJSON object or an array of GeoJSON objects. Allows you to parse\r\n * GeoJSON data and display it on the map. Extends `FeatureGroup`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * L.geoJSON(data, {\r\n * \tstyle: function (feature) {\r\n * \t\treturn {color: feature.properties.color};\r\n * \t}\r\n * }).bindPopup(function (layer) {\r\n * \treturn layer.feature.properties.description;\r\n * }).addTo(map);\r\n * ```\r\n */\r\n\r\nL.GeoJSON = L.FeatureGroup.extend({\r\n\r\n\t/* @section\r\n\t * @aka GeoJSON options\r\n\t *\r\n\t * @option pointToLayer: Function = *\r\n\t * A `Function` defining how GeoJSON points spawn Leaflet layers. It is internally\r\n\t * called when data is added, passing the GeoJSON point feature and its `LatLng`.\r\n\t * The default is to spawn a default `Marker`:\r\n\t * ```js\r\n\t * function(geoJsonPoint, latlng) {\r\n\t * \treturn L.marker(latlng);\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option style: Function = *\r\n\t * A `Function` defining the `Path options` for styling GeoJSON lines and polygons,\r\n\t * called internally when data is added.\r\n\t * The default value is to not override any defaults:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn {}\r\n\t * }\r\n\t * ```\r\n\t *\r\n\t * @option onEachFeature: Function = *\r\n\t * A `Function` that will be called once for each created `Feature`, after it has\r\n\t * been created and styled. Useful for attaching events and popups to features.\r\n\t * The default is to do nothing with the newly created layers:\r\n\t * ```js\r\n\t * function (feature, layer) {}\r\n\t * ```\r\n\t *\r\n\t * @option filter: Function = *\r\n\t * A `Function` that will be used to decide whether to include a feature or not.\r\n\t * The default is to include all features:\r\n\t * ```js\r\n\t * function (geoJsonFeature) {\r\n\t * \treturn true;\r\n\t * }\r\n\t * ```\r\n\t * Note: dynamically changing the `filter` option will have effect only on newly\r\n\t * added data. It will _not_ re-evaluate already included features.\r\n\t *\r\n\t * @option coordsToLatLng: Function = *\r\n\t * A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.\r\n\t * The default is the `coordsToLatLng` static method.\r\n\t */\r\n\r\n\tinitialize: function (geojson, options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._layers = {};\r\n\r\n\t\tif (geojson) {\r\n\t\t\tthis.addData(geojson);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addData( <GeoJSON> data ): Layer\r\n\t// Adds a GeoJSON object to the layer.\r\n\taddData: function (geojson) {\r\n\t\tvar features = L.Util.isArray(geojson) ? geojson : geojson.features,\r\n\t\t i, len, feature;\r\n\r\n\t\tif (features) {\r\n\t\t\tfor (i = 0, len = features.length; i < len; i++) {\r\n\t\t\t\t// only add this if geometry or geometries are set and not null\r\n\t\t\t\tfeature = features[i];\r\n\t\t\t\tif (feature.geometries || feature.geometry || feature.features || feature.coordinates) {\r\n\t\t\t\t\tthis.addData(feature);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar options = this.options;\r\n\r\n\t\tif (options.filter && !options.filter(geojson)) { return this; }\r\n\r\n\t\tvar layer = L.GeoJSON.geometryToLayer(geojson, options);\r\n\t\tif (!layer) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\t\tlayer.feature = L.GeoJSON.asFeature(geojson);\r\n\r\n\t\tlayer.defaultOptions = layer.options;\r\n\t\tthis.resetStyle(layer);\r\n\r\n\t\tif (options.onEachFeature) {\r\n\t\t\toptions.onEachFeature(geojson, layer);\r\n\t\t}\r\n\r\n\t\treturn this.addLayer(layer);\r\n\t},\r\n\r\n\t// @method resetStyle( <Path> layer ): Layer\r\n\t// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.\r\n\tresetStyle: function (layer) {\r\n\t\t// reset any custom styles\r\n\t\tlayer.options = L.Util.extend({}, layer.defaultOptions);\r\n\t\tthis._setLayerStyle(layer, this.options.style);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method setStyle( <Function> style ): Layer\r\n\t// Changes styles of GeoJSON vector layers with the given style function.\r\n\tsetStyle: function (style) {\r\n\t\treturn this.eachLayer(function (layer) {\r\n\t\t\tthis._setLayerStyle(layer, style);\r\n\t\t}, this);\r\n\t},\r\n\r\n\t_setLayerStyle: function (layer, style) {\r\n\t\tif (typeof style === 'function') {\r\n\t\t\tstyle = style(layer.feature);\r\n\t\t}\r\n\t\tif (layer.setStyle) {\r\n\t\t\tlayer.setStyle(style);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @section\r\n// There are several static functions which can be called without instantiating L.GeoJSON:\r\nL.extend(L.GeoJSON, {\r\n\t// @function geometryToLayer(featureData: Object, options?: GeoJSON options): Layer\r\n\t// Creates a `Layer` from a given GeoJSON feature. Can use a custom\r\n\t// [`pointToLayer`](#geojson-pointtolayer) and/or [`coordsToLatLng`](#geojson-coordstolatlng)\r\n\t// functions if provided as options.\r\n\tgeometryToLayer: function (geojson, options) {\r\n\r\n\t\tvar geometry = geojson.type === 'Feature' ? geojson.geometry : geojson,\r\n\t\t coords = geometry ? geometry.coordinates : null,\r\n\t\t layers = [],\r\n\t\t pointToLayer = options && options.pointToLayer,\r\n\t\t coordsToLatLng = options && options.coordsToLatLng || this.coordsToLatLng,\r\n\t\t latlng, latlngs, i, len;\r\n\r\n\t\tif (!coords && !geometry) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tswitch (geometry.type) {\r\n\t\tcase 'Point':\r\n\t\t\tlatlng = coordsToLatLng(coords);\r\n\t\t\treturn pointToLayer ? pointToLayer(geojson, latlng) : new L.Marker(latlng);\r\n\r\n\t\tcase 'MultiPoint':\r\n\t\t\tfor (i = 0, len = coords.length; i < len; i++) {\r\n\t\t\t\tlatlng = coordsToLatLng(coords[i]);\r\n\t\t\t\tlayers.push(pointToLayer ? pointToLayer(geojson, latlng) : new L.Marker(latlng));\r\n\t\t\t}\r\n\t\t\treturn new L.FeatureGroup(layers);\r\n\r\n\t\tcase 'LineString':\r\n\t\tcase 'MultiLineString':\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, geometry.type === 'LineString' ? 0 : 1, coordsToLatLng);\r\n\t\t\treturn new L.Polyline(latlngs, options);\r\n\r\n\t\tcase 'Polygon':\r\n\t\tcase 'MultiPolygon':\r\n\t\t\tlatlngs = this.coordsToLatLngs(coords, geometry.type === 'Polygon' ? 1 : 2, coordsToLatLng);\r\n\t\t\treturn new L.Polygon(latlngs, options);\r\n\r\n\t\tcase 'GeometryCollection':\r\n\t\t\tfor (i = 0, len = geometry.geometries.length; i < len; i++) {\r\n\t\t\t\tvar layer = this.geometryToLayer({\r\n\t\t\t\t\tgeometry: geometry.geometries[i],\r\n\t\t\t\t\ttype: 'Feature',\r\n\t\t\t\t\tproperties: geojson.properties\r\n\t\t\t\t}, options);\r\n\r\n\t\t\t\tif (layer) {\r\n\t\t\t\t\tlayers.push(layer);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new L.FeatureGroup(layers);\r\n\r\n\t\tdefault:\r\n\t\t\tthrow new Error('Invalid GeoJSON object.');\r\n\t\t}\r\n\t},\r\n\r\n\t// @function coordsToLatLng(coords: Array): LatLng\r\n\t// Creates a `LatLng` object from an array of 2 numbers (longitude, latitude)\r\n\t// or 3 numbers (longitude, latitude, altitude) used in GeoJSON for points.\r\n\tcoordsToLatLng: function (coords) {\r\n\t\treturn new L.LatLng(coords[1], coords[0], coords[2]);\r\n\t},\r\n\r\n\t// @function coordsToLatLngs(coords: Array, levelsDeep?: Number, coordsToLatLng?: Function): Array\r\n\t// Creates a multidimensional array of `LatLng`s from a GeoJSON coordinates array.\r\n\t// `levelsDeep` specifies the nesting level (0 is for an array of points, 1 for an array of arrays of points, etc., 0 by default).\r\n\t// Can use a custom [`coordsToLatLng`](#geojson-coordstolatlng) function.\r\n\tcoordsToLatLngs: function (coords, levelsDeep, coordsToLatLng) {\r\n\t\tvar latlngs = [];\r\n\r\n\t\tfor (var i = 0, len = coords.length, latlng; i < len; i++) {\r\n\t\t\tlatlng = levelsDeep ?\r\n\t\t\t this.coordsToLatLngs(coords[i], levelsDeep - 1, coordsToLatLng) :\r\n\t\t\t (coordsToLatLng || this.coordsToLatLng)(coords[i]);\r\n\r\n\t\t\tlatlngs.push(latlng);\r\n\t\t}\r\n\r\n\t\treturn latlngs;\r\n\t},\r\n\r\n\t// @function latLngToCoords(latlng: LatLng): Array\r\n\t// Reverse of [`coordsToLatLng`](#geojson-coordstolatlng)\r\n\tlatLngToCoords: function (latlng) {\r\n\t\treturn latlng.alt !== undefined ?\r\n\t\t\t\t[latlng.lng, latlng.lat, latlng.alt] :\r\n\t\t\t\t[latlng.lng, latlng.lat];\r\n\t},\r\n\r\n\t// @function latLngsToCoords(latlngs: Array, levelsDeep?: Number, closed?: Boolean): Array\r\n\t// Reverse of [`coordsToLatLngs`](#geojson-coordstolatlngs)\r\n\t// `closed` determines whether the first point should be appended to the end of the array to close the feature, only used when `levelsDeep` is 0. False by default.\r\n\tlatLngsToCoords: function (latlngs, levelsDeep, closed) {\r\n\t\tvar coords = [];\r\n\r\n\t\tfor (var i = 0, len = latlngs.length; i < len; i++) {\r\n\t\t\tcoords.push(levelsDeep ?\r\n\t\t\t\tL.GeoJSON.latLngsToCoords(latlngs[i], levelsDeep - 1, closed) :\r\n\t\t\t\tL.GeoJSON.latLngToCoords(latlngs[i]));\r\n\t\t}\r\n\r\n\t\tif (!levelsDeep && closed) {\r\n\t\t\tcoords.push(coords[0]);\r\n\t\t}\r\n\r\n\t\treturn coords;\r\n\t},\r\n\r\n\tgetFeature: function (layer, newGeometry) {\r\n\t\treturn layer.feature ?\r\n\t\t\t\tL.extend({}, layer.feature, {geometry: newGeometry}) :\r\n\t\t\t\tL.GeoJSON.asFeature(newGeometry);\r\n\t},\r\n\r\n\t// @function asFeature(geojson: Object): Object\r\n\t// Normalize GeoJSON geometries/features into GeoJSON features.\r\n\tasFeature: function (geojson) {\r\n\t\tif (geojson.type === 'Feature') {\r\n\t\t\treturn geojson;\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'Feature',\r\n\t\t\tproperties: {},\r\n\t\t\tgeometry: geojson\r\n\t\t};\r\n\t}\r\n});\r\n\r\nvar PointToGeoJSON = {\r\n\ttoGeoJSON: function () {\r\n\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\ttype: 'Point',\r\n\t\t\tcoordinates: L.GeoJSON.latLngToCoords(this.getLatLng())\r\n\t\t});\r\n\t}\r\n};\r\n\r\nL.Marker.include(PointToGeoJSON);\r\n\r\n// @namespace CircleMarker\r\n// @method toGeoJSON(): Object\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the circle marker (as a GeoJSON `Point` Feature).\r\nL.Circle.include(PointToGeoJSON);\r\nL.CircleMarker.include(PointToGeoJSON);\r\n\r\n\r\n// @namespace Polyline\r\n// @method toGeoJSON(): Object\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polyline (as a GeoJSON `LineString` or `MultiLineString` Feature).\r\nL.Polyline.prototype.toGeoJSON = function () {\r\n\tvar multi = !L.Polyline._flat(this._latlngs);\r\n\r\n\tvar coords = L.GeoJSON.latLngsToCoords(this._latlngs, multi ? 1 : 0);\r\n\r\n\treturn L.GeoJSON.getFeature(this, {\r\n\t\ttype: (multi ? 'Multi' : '') + 'LineString',\r\n\t\tcoordinates: coords\r\n\t});\r\n};\r\n\r\n// @namespace Polygon\r\n// @method toGeoJSON(): Object\r\n// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the polygon (as a GeoJSON `Polygon` or `MultiPolygon` Feature).\r\nL.Polygon.prototype.toGeoJSON = function () {\r\n\tvar holes = !L.Polyline._flat(this._latlngs),\r\n\t multi = holes && !L.Polyline._flat(this._latlngs[0]);\r\n\r\n\tvar coords = L.GeoJSON.latLngsToCoords(this._latlngs, multi ? 2 : holes ? 1 : 0, true);\r\n\r\n\tif (!holes) {\r\n\t\tcoords = [coords];\r\n\t}\r\n\r\n\treturn L.GeoJSON.getFeature(this, {\r\n\t\ttype: (multi ? 'Multi' : '') + 'Polygon',\r\n\t\tcoordinates: coords\r\n\t});\r\n};\r\n\r\n\r\n// @namespace LayerGroup\r\nL.LayerGroup.include({\r\n\ttoMultiPoint: function () {\r\n\t\tvar coords = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tcoords.push(layer.toGeoJSON().geometry.coordinates);\r\n\t\t});\r\n\r\n\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\ttype: 'MultiPoint',\r\n\t\t\tcoordinates: coords\r\n\t\t});\r\n\t},\r\n\r\n\t// @method toGeoJSON(): Object\r\n\t// Returns a [`GeoJSON`](http://en.wikipedia.org/wiki/GeoJSON) representation of the layer group (as a GeoJSON `GeometryCollection`).\r\n\ttoGeoJSON: function () {\r\n\r\n\t\tvar type = this.feature && this.feature.geometry && this.feature.geometry.type;\r\n\r\n\t\tif (type === 'MultiPoint') {\r\n\t\t\treturn this.toMultiPoint();\r\n\t\t}\r\n\r\n\t\tvar isGeometryCollection = type === 'GeometryCollection',\r\n\t\t jsons = [];\r\n\r\n\t\tthis.eachLayer(function (layer) {\r\n\t\t\tif (layer.toGeoJSON) {\r\n\t\t\t\tvar json = layer.toGeoJSON();\r\n\t\t\t\tjsons.push(isGeometryCollection ? json.geometry : L.GeoJSON.asFeature(json));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\tif (isGeometryCollection) {\r\n\t\t\treturn L.GeoJSON.getFeature(this, {\r\n\t\t\t\tgeometries: jsons,\r\n\t\t\t\ttype: 'GeometryCollection'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\treturn {\r\n\t\t\ttype: 'FeatureCollection',\r\n\t\t\tfeatures: jsons\r\n\t\t};\r\n\t}\r\n});\r\n\r\n// @namespace GeoJSON\r\n// @factory L.geoJSON(geojson?: Object, options?: GeoJSON options)\r\n// Creates a GeoJSON layer. Optionally accepts an object in\r\n// [GeoJSON format](http://geojson.org/geojson-spec.html) to display on the map\r\n// (you can alternatively add it later with `addData` method) and an `options` object.\r\nL.geoJSON = function (geojson, options) {\r\n\treturn new L.GeoJSON(geojson, options);\r\n};\r\n// Backward compatibility.\r\nL.geoJson = L.geoJSON;\r\n","/*\r\n * @namespace DomEvent\r\n * Utility functions to work with the [DOM events](https://developer.mozilla.org/docs/Web/API/Event), used by Leaflet internally.\r\n */\r\n\r\n// Inspired by John Resig, Dean Edwards and YUI addEvent implementations.\r\n\r\n\r\n\r\nvar eventsKey = '_leaflet_events';\r\n\r\nL.DomEvent = {\r\n\r\n\t// @function on(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n\t// Adds a listener function (`fn`) to a particular DOM event type of the\r\n\t// element `el`. You can optionally specify the context of the listener\r\n\t// (object the `this` keyword will point to). You can also pass several\r\n\t// space-separated types (e.g. `'click dblclick'`).\r\n\r\n\t// @alternative\r\n\t// @function on(el: HTMLElement, eventMap: Object, context?: Object): this\r\n\t// Adds a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\ton: function (obj, types, fn, context) {\r\n\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._on(obj, type, types[type], fn);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._on(obj, types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @function off(el: HTMLElement, types: String, fn: Function, context?: Object): this\r\n\t// Removes a previously added listener function. If no function is specified,\r\n\t// it will remove all the listeners of that particular DOM event from the element.\r\n\t// Note that if you passed a custom context to on, you must pass the same\r\n\t// context to `off` in order to remove the listener.\r\n\r\n\t// @alternative\r\n\t// @function off(el: HTMLElement, eventMap: Object, context?: Object): this\r\n\t// Removes a set of type/listener pairs, e.g. `{click: onClick, mousemove: onMouseMove}`\r\n\toff: function (obj, types, fn, context) {\r\n\r\n\t\tif (typeof types === 'object') {\r\n\t\t\tfor (var type in types) {\r\n\t\t\t\tthis._off(obj, type, types[type], fn);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\ttypes = L.Util.splitWords(types);\r\n\r\n\t\t\tfor (var i = 0, len = types.length; i < len; i++) {\r\n\t\t\t\tthis._off(obj, types[i], fn, context);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_on: function (obj, type, fn, context) {\r\n\t\tvar id = type + L.stamp(fn) + (context ? '_' + L.stamp(context) : '');\r\n\r\n\t\tif (obj[eventsKey] && obj[eventsKey][id]) { return this; }\r\n\r\n\t\tvar handler = function (e) {\r\n\t\t\treturn fn.call(context || obj, e || window.event);\r\n\t\t};\r\n\r\n\t\tvar originalHandler = handler;\r\n\r\n\t\tif (L.Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t\tthis.addPointerListener(obj, type, handler, id);\r\n\r\n\t\t} else if (L.Browser.touch && (type === 'dblclick') && this.addDoubleTapListener) {\r\n\t\t\tthis.addDoubleTapListener(obj, handler, id);\r\n\r\n\t\t} else if ('addEventListener' in obj) {\r\n\r\n\t\t\tif (type === 'mousewheel') {\r\n\t\t\t\tobj.addEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false);\r\n\r\n\t\t\t} else if ((type === 'mouseenter') || (type === 'mouseleave')) {\r\n\t\t\t\thandler = function (e) {\r\n\t\t\t\t\te = e || window.event;\r\n\t\t\t\t\tif (L.DomEvent._isExternalTarget(obj, e)) {\r\n\t\t\t\t\t\toriginalHandler(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t\tobj.addEventListener(type === 'mouseenter' ? 'mouseover' : 'mouseout', handler, false);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tif (type === 'click' && L.Browser.android) {\r\n\t\t\t\t\thandler = function (e) {\r\n\t\t\t\t\t\treturn L.DomEvent._filterClick(e, originalHandler);\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\t\t\t\tobj.addEventListener(type, handler, false);\r\n\t\t\t}\r\n\r\n\t\t} else if ('attachEvent' in obj) {\r\n\t\t\tobj.attachEvent('on' + type, handler);\r\n\t\t}\r\n\r\n\t\tobj[eventsKey] = obj[eventsKey] || {};\r\n\t\tobj[eventsKey][id] = handler;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_off: function (obj, type, fn, context) {\r\n\r\n\t\tvar id = type + L.stamp(fn) + (context ? '_' + L.stamp(context) : ''),\r\n\t\t handler = obj[eventsKey] && obj[eventsKey][id];\r\n\r\n\t\tif (!handler) { return this; }\r\n\r\n\t\tif (L.Browser.pointer && type.indexOf('touch') === 0) {\r\n\t\t\tthis.removePointerListener(obj, type, id);\r\n\r\n\t\t} else if (L.Browser.touch && (type === 'dblclick') && this.removeDoubleTapListener) {\r\n\t\t\tthis.removeDoubleTapListener(obj, id);\r\n\r\n\t\t} else if ('removeEventListener' in obj) {\r\n\r\n\t\t\tif (type === 'mousewheel') {\r\n\t\t\t\tobj.removeEventListener('onwheel' in obj ? 'wheel' : 'mousewheel', handler, false);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tobj.removeEventListener(\r\n\t\t\t\t\ttype === 'mouseenter' ? 'mouseover' :\r\n\t\t\t\t\ttype === 'mouseleave' ? 'mouseout' : type, handler, false);\r\n\t\t\t}\r\n\r\n\t\t} else if ('detachEvent' in obj) {\r\n\t\t\tobj.detachEvent('on' + type, handler);\r\n\t\t}\r\n\r\n\t\tobj[eventsKey][id] = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @function stopPropagation(ev: DOMEvent): this\r\n\t// Stop the given event from propagation to parent elements. Used inside the listener functions:\r\n\t// ```js\r\n\t// L.DomEvent.on(div, 'click', function (ev) {\r\n\t// \tL.DomEvent.stopPropagation(ev);\r\n\t// });\r\n\t// ```\r\n\tstopPropagation: function (e) {\r\n\r\n\t\tif (e.stopPropagation) {\r\n\t\t\te.stopPropagation();\r\n\t\t} else if (e.originalEvent) { // In case of Leaflet event.\r\n\t\t\te.originalEvent._stopped = true;\r\n\t\t} else {\r\n\t\t\te.cancelBubble = true;\r\n\t\t}\r\n\t\tL.DomEvent._skipped(e);\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @function disableScrollPropagation(el: HTMLElement): this\r\n\t// Adds `stopPropagation` to the element's `'mousewheel'` events (plus browser variants).\r\n\tdisableScrollPropagation: function (el) {\r\n\t\treturn L.DomEvent.on(el, 'mousewheel', L.DomEvent.stopPropagation);\r\n\t},\r\n\r\n\t// @function disableClickPropagation(el: HTMLElement): this\r\n\t// Adds `stopPropagation` to the element's `'click'`, `'doubleclick'`,\r\n\t// `'mousedown'` and `'touchstart'` events (plus browser variants).\r\n\tdisableClickPropagation: function (el) {\r\n\t\tvar stop = L.DomEvent.stopPropagation;\r\n\r\n\t\tL.DomEvent.on(el, L.Draggable.START.join(' '), stop);\r\n\r\n\t\treturn L.DomEvent.on(el, {\r\n\t\t\tclick: L.DomEvent._fakeStop,\r\n\t\t\tdblclick: stop\r\n\t\t});\r\n\t},\r\n\r\n\t// @function preventDefault(ev: DOMEvent): this\r\n\t// Prevents the default action of the DOM Event `ev` from happening (such as\r\n\t// following a link in the href of the a element, or doing a POST request\r\n\t// with page reload when a `<form>` is submitted).\r\n\t// Use it inside listener functions.\r\n\tpreventDefault: function (e) {\r\n\r\n\t\tif (e.preventDefault) {\r\n\t\t\te.preventDefault();\r\n\t\t} else {\r\n\t\t\te.returnValue = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @function stop(ev): this\r\n\t// Does `stopPropagation` and `preventDefault` at the same time.\r\n\tstop: function (e) {\r\n\t\treturn L.DomEvent\r\n\t\t\t.preventDefault(e)\r\n\t\t\t.stopPropagation(e);\r\n\t},\r\n\r\n\t// @function getMousePosition(ev: DOMEvent, container?: HTMLElement): Point\r\n\t// Gets normalized mouse position from a DOM event relative to the\r\n\t// `container` or to the whole page if not specified.\r\n\tgetMousePosition: function (e, container) {\r\n\t\tif (!container) {\r\n\t\t\treturn new L.Point(e.clientX, e.clientY);\r\n\t\t}\r\n\r\n\t\tvar rect = container.getBoundingClientRect();\r\n\r\n\t\treturn new L.Point(\r\n\t\t\te.clientX - rect.left - container.clientLeft,\r\n\t\t\te.clientY - rect.top - container.clientTop);\r\n\t},\r\n\r\n\t// Chrome on Win scrolls double the pixels as in other platforms (see #4538),\r\n\t// and Firefox scrolls device pixels, not CSS pixels\r\n\t_wheelPxFactor: (L.Browser.win && L.Browser.chrome) ? 2 :\r\n\t L.Browser.gecko ? window.devicePixelRatio :\r\n\t 1,\r\n\r\n\t// @function getWheelDelta(ev: DOMEvent): Number\r\n\t// Gets normalized wheel delta from a mousewheel DOM event, in vertical\r\n\t// pixels scrolled (negative if scrolling down).\r\n\t// Events from pointing devices without precise scrolling are mapped to\r\n\t// a best guess of 60 pixels.\r\n\tgetWheelDelta: function (e) {\r\n\t\treturn (L.Browser.edge) ? e.wheelDeltaY / 2 : // Don't trust window-geometry-based delta\r\n\t\t (e.deltaY && e.deltaMode === 0) ? -e.deltaY / L.DomEvent._wheelPxFactor : // Pixels\r\n\t\t (e.deltaY && e.deltaMode === 1) ? -e.deltaY * 20 : // Lines\r\n\t\t (e.deltaY && e.deltaMode === 2) ? -e.deltaY * 60 : // Pages\r\n\t\t (e.deltaX || e.deltaZ) ? 0 :\t// Skip horizontal/depth wheel events\r\n\t\t e.wheelDelta ? (e.wheelDeltaY || e.wheelDelta) / 2 : // Legacy IE pixels\r\n\t\t (e.detail && Math.abs(e.detail) < 32765) ? -e.detail * 20 : // Legacy Moz lines\r\n\t\t e.detail ? e.detail / -32765 * 60 : // Legacy Moz pages\r\n\t\t 0;\r\n\t},\r\n\r\n\t_skipEvents: {},\r\n\r\n\t_fakeStop: function (e) {\r\n\t\t// fakes stopPropagation by setting a special event flag, checked/reset with L.DomEvent._skipped(e)\r\n\t\tL.DomEvent._skipEvents[e.type] = true;\r\n\t},\r\n\r\n\t_skipped: function (e) {\r\n\t\tvar skipped = this._skipEvents[e.type];\r\n\t\t// reset when checking, as it's only used in map container and propagates outside of the map\r\n\t\tthis._skipEvents[e.type] = false;\r\n\t\treturn skipped;\r\n\t},\r\n\r\n\t// check if element really left/entered the event target (for mouseenter/mouseleave)\r\n\t_isExternalTarget: function (el, e) {\r\n\r\n\t\tvar related = e.relatedTarget;\r\n\r\n\t\tif (!related) { return true; }\r\n\r\n\t\ttry {\r\n\t\t\twhile (related && (related !== el)) {\r\n\t\t\t\trelated = related.parentNode;\r\n\t\t\t}\r\n\t\t} catch (err) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn (related !== el);\r\n\t},\r\n\r\n\t// this is a horrible workaround for a bug in Android where a single touch triggers two click events\r\n\t_filterClick: function (e, handler) {\r\n\t\tvar timeStamp = (e.timeStamp || (e.originalEvent && e.originalEvent.timeStamp)),\r\n\t\t elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick);\r\n\r\n\t\t// are they closer together than 500ms yet more than 100ms?\r\n\t\t// Android typically triggers them ~300ms apart while multiple listeners\r\n\t\t// on the same event should be triggered far faster;\r\n\t\t// or check if click is simulated on the element, and if it is, reject any non-simulated events\r\n\r\n\t\tif ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) {\r\n\t\t\tL.DomEvent.stop(e);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tL.DomEvent._lastClick = timeStamp;\r\n\r\n\t\thandler(e);\r\n\t}\r\n};\r\n\r\n// @function addListener(…): this\r\n// Alias to [`L.DomEvent.on`](#domevent-on)\r\nL.DomEvent.addListener = L.DomEvent.on;\r\n\r\n// @function removeListener(…): this\r\n// Alias to [`L.DomEvent.off`](#domevent-off)\r\nL.DomEvent.removeListener = L.DomEvent.off;\r\n","/*\r\n * @class Draggable\r\n * @aka L.Draggable\r\n * @inherits Evented\r\n *\r\n * A class for making DOM elements draggable (including touch support).\r\n * Used internally for map and marker dragging. Only works for elements\r\n * that were positioned with [`L.DomUtil.setPosition`](#domutil-setposition).\r\n *\r\n * @example\r\n * ```js\r\n * var draggable = new L.Draggable(elementToDrag);\r\n * draggable.enable();\r\n * ```\r\n */\r\n\r\nL.Draggable = L.Evented.extend({\r\n\r\n\toptions: {\r\n\t\t// @option clickTolerance: Number = 3\r\n\t\t// The max number of pixels a user can shift the mouse pointer during a click\r\n\t\t// for it to be considered a valid click (as opposed to a mouse drag).\r\n\t\tclickTolerance: 3\r\n\t},\r\n\r\n\tstatics: {\r\n\t\tSTART: L.Browser.touch ? ['touchstart', 'mousedown'] : ['mousedown'],\r\n\t\tEND: {\r\n\t\t\tmousedown: 'mouseup',\r\n\t\t\ttouchstart: 'touchend',\r\n\t\t\tpointerdown: 'touchend',\r\n\t\t\tMSPointerDown: 'touchend'\r\n\t\t},\r\n\t\tMOVE: {\r\n\t\t\tmousedown: 'mousemove',\r\n\t\t\ttouchstart: 'touchmove',\r\n\t\t\tpointerdown: 'touchmove',\r\n\t\t\tMSPointerDown: 'touchmove'\r\n\t\t}\r\n\t},\r\n\r\n\t// @constructor L.Draggable(el: HTMLElement, dragHandle?: HTMLElement, preventOutline: Boolean)\r\n\t// Creates a `Draggable` object for moving `el` when you start dragging the `dragHandle` element (equals `el` itself by default).\r\n\tinitialize: function (element, dragStartTarget, preventOutline) {\r\n\t\tthis._element = element;\r\n\t\tthis._dragStartTarget = dragStartTarget || element;\r\n\t\tthis._preventOutline = preventOutline;\r\n\t},\r\n\r\n\t// @method enable()\r\n\t// Enables the dragging ability\r\n\tenable: function () {\r\n\t\tif (this._enabled) { return; }\r\n\r\n\t\tL.DomEvent.on(this._dragStartTarget, L.Draggable.START.join(' '), this._onDown, this);\r\n\r\n\t\tthis._enabled = true;\r\n\t},\r\n\r\n\t// @method disable()\r\n\t// Disables the dragging ability\r\n\tdisable: function () {\r\n\t\tif (!this._enabled) { return; }\r\n\r\n\t\tL.DomEvent.off(this._dragStartTarget, L.Draggable.START.join(' '), this._onDown, this);\r\n\r\n\t\tthis._enabled = false;\r\n\t\tthis._moved = false;\r\n\t},\r\n\r\n\t_onDown: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n\t\tthis._moved = false;\r\n\r\n\t\tif (L.DomUtil.hasClass(this._element, 'leaflet-zoom-anim')) { return; }\r\n\r\n\t\tif (L.Draggable._dragging || e.shiftKey || ((e.which !== 1) && (e.button !== 1) && !e.touches) || !this._enabled) { return; }\r\n\t\tL.Draggable._dragging = true; // Prevent dragging multiple objects at once.\r\n\r\n\t\tif (this._preventOutline) {\r\n\t\t\tL.DomUtil.preventOutline(this._element);\r\n\t\t}\r\n\r\n\t\tL.DomUtil.disableImageDrag();\r\n\t\tL.DomUtil.disableTextSelection();\r\n\r\n\t\tif (this._moving) { return; }\r\n\r\n\t\t// @event down: Event\r\n\t\t// Fired when a drag is about to start.\r\n\t\tthis.fire('down');\r\n\r\n\t\tvar first = e.touches ? e.touches[0] : e;\r\n\r\n\t\tthis._startPoint = new L.Point(first.clientX, first.clientY);\r\n\r\n\t\tL.DomEvent\r\n\t\t\t.on(document, L.Draggable.MOVE[e.type], this._onMove, this)\r\n\t\t\t.on(document, L.Draggable.END[e.type], this._onUp, this);\r\n\t},\r\n\r\n\t_onMove: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n\t\tif (e.touches && e.touches.length > 1) {\r\n\t\t\tthis._moved = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar first = (e.touches && e.touches.length === 1 ? e.touches[0] : e),\r\n\t\t newPoint = new L.Point(first.clientX, first.clientY),\r\n\t\t offset = newPoint.subtract(this._startPoint);\r\n\r\n\t\tif (!offset.x && !offset.y) { return; }\r\n\t\tif (Math.abs(offset.x) + Math.abs(offset.y) < this.options.clickTolerance) { return; }\r\n\r\n\t\tL.DomEvent.preventDefault(e);\r\n\r\n\t\tif (!this._moved) {\r\n\t\t\t// @event dragstart: Event\r\n\t\t\t// Fired when a drag starts\r\n\t\t\tthis.fire('dragstart');\r\n\r\n\t\t\tthis._moved = true;\r\n\t\t\tthis._startPos = L.DomUtil.getPosition(this._element).subtract(offset);\r\n\r\n\t\t\tL.DomUtil.addClass(document.body, 'leaflet-dragging');\r\n\r\n\t\t\tthis._lastTarget = e.target || e.srcElement;\r\n\t\t\t// IE and Edge do not give the <use> element, so fetch it\r\n\t\t\t// if necessary\r\n\t\t\tif ((window.SVGElementInstance) && (this._lastTarget instanceof SVGElementInstance)) {\r\n\t\t\t\tthis._lastTarget = this._lastTarget.correspondingUseElement;\r\n\t\t\t}\r\n\t\t\tL.DomUtil.addClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t}\r\n\r\n\t\tthis._newPos = this._startPos.add(offset);\r\n\t\tthis._moving = true;\r\n\r\n\t\tL.Util.cancelAnimFrame(this._animRequest);\r\n\t\tthis._lastEvent = e;\r\n\t\tthis._animRequest = L.Util.requestAnimFrame(this._updatePosition, this, true);\r\n\t},\r\n\r\n\t_updatePosition: function () {\r\n\t\tvar e = {originalEvent: this._lastEvent};\r\n\r\n\t\t// @event predrag: Event\r\n\t\t// Fired continuously during dragging *before* each corresponding\r\n\t\t// update of the element's position.\r\n\t\tthis.fire('predrag', e);\r\n\t\tL.DomUtil.setPosition(this._element, this._newPos);\r\n\r\n\t\t// @event drag: Event\r\n\t\t// Fired continuously during dragging.\r\n\t\tthis.fire('drag', e);\r\n\t},\r\n\r\n\t_onUp: function (e) {\r\n\t\t// Ignore simulated events, since we handle both touch and\r\n\t\t// mouse explicitly; otherwise we risk getting duplicates of\r\n\t\t// touch events, see #4315.\r\n\t\t// Also ignore the event if disabled; this happens in IE11\r\n\t\t// under some circumstances, see #3666.\r\n\t\tif (e._simulated || !this._enabled) { return; }\r\n\r\n\t\tL.DomUtil.removeClass(document.body, 'leaflet-dragging');\r\n\r\n\t\tif (this._lastTarget) {\r\n\t\t\tL.DomUtil.removeClass(this._lastTarget, 'leaflet-drag-target');\r\n\t\t\tthis._lastTarget = null;\r\n\t\t}\r\n\r\n\t\tfor (var i in L.Draggable.MOVE) {\r\n\t\t\tL.DomEvent\r\n\t\t\t\t.off(document, L.Draggable.MOVE[i], this._onMove, this)\r\n\t\t\t\t.off(document, L.Draggable.END[i], this._onUp, this);\r\n\t\t}\r\n\r\n\t\tL.DomUtil.enableImageDrag();\r\n\t\tL.DomUtil.enableTextSelection();\r\n\r\n\t\tif (this._moved && this._moving) {\r\n\t\t\t// ensure drag is not fired after dragend\r\n\t\t\tL.Util.cancelAnimFrame(this._animRequest);\r\n\r\n\t\t\t// @event dragend: DragEndEvent\r\n\t\t\t// Fired when the drag ends.\r\n\t\t\tthis.fire('dragend', {\r\n\t\t\t\tdistance: this._newPos.distanceTo(this._startPos)\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tthis._moving = false;\r\n\t\tL.Draggable._dragging = false;\r\n\t}\r\n});\r\n","/*\n\tL.Handler is a base class for handler classes that are used internally to inject\n\tinteraction features like dragging to classes like Map and Marker.\n*/\n\n// @class Handler\n// @aka L.Handler\n// Abstract class for map interaction handlers\n\nL.Handler = L.Class.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t},\n\n\t// @method enable(): this\n\t// Enables the handler\n\tenable: function () {\n\t\tif (this._enabled) { return this; }\n\n\t\tthis._enabled = true;\n\t\tthis.addHooks();\n\t\treturn this;\n\t},\n\n\t// @method disable(): this\n\t// Disables the handler\n\tdisable: function () {\n\t\tif (!this._enabled) { return this; }\n\n\t\tthis._enabled = false;\n\t\tthis.removeHooks();\n\t\treturn this;\n\t},\n\n\t// @method enabled(): Boolean\n\t// Returns `true` if the handler is enabled\n\tenabled: function () {\n\t\treturn !!this._enabled;\n\t}\n\n\t// @section Extension methods\n\t// Classes inheriting from `Handler` must implement the two following methods:\n\t// @method addHooks()\n\t// Called when the handler is enabled, should add event hooks.\n\t// @method removeHooks()\n\t// Called when the handler is disabled, should remove the event hooks added previously.\n});\n","/*\n * L.Handler.MapDrag is used to make the map draggable (with panning inertia), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\t// @option dragging: Boolean = true\n\t// Whether the map be draggable with mouse/touch or not.\n\tdragging: true,\n\n\t// @section Panning Inertia Options\n\t// @option inertia: Boolean = *\n\t// If enabled, panning of the map will have an inertia effect where\n\t// the map builds momentum while dragging and continues moving in\n\t// the same direction for some time. Feels especially nice on touch\n\t// devices. Enabled by default unless running on old Android devices.\n\tinertia: !L.Browser.android23,\n\n\t// @option inertiaDeceleration: Number = 3000\n\t// The rate with which the inertial movement slows down, in pixels/second².\n\tinertiaDeceleration: 3400, // px/s^2\n\n\t// @option inertiaMaxSpeed: Number = Infinity\n\t// Max speed of the inertial movement, in pixels/second.\n\tinertiaMaxSpeed: Infinity, // px/s\n\n\t// @option easeLinearity: Number = 0.2\n\teaseLinearity: 0.2,\n\n\t// TODO refactor, move to CRS\n\t// @option worldCopyJump: Boolean = false\n\t// With this option enabled, the map tracks when you pan to another \"copy\"\n\t// of the world and seamlessly jumps to the original one so that all overlays\n\t// like markers and vector layers are still visible.\n\tworldCopyJump: false,\n\n\t// @option maxBoundsViscosity: Number = 0.0\n\t// If `maxBounds` is set, this option will control how solid the bounds\n\t// are when dragging the map around. The default value of `0.0` allows the\n\t// user to drag outside the bounds at normal speed, higher values will\n\t// slow down map dragging outside bounds, and `1.0` makes the bounds fully\n\t// solid, preventing the user from dragging outside the bounds.\n\tmaxBoundsViscosity: 0.0\n});\n\nL.Map.Drag = L.Handler.extend({\n\taddHooks: function () {\n\t\tif (!this._draggable) {\n\t\t\tvar map = this._map;\n\n\t\t\tthis._draggable = new L.Draggable(map._mapPane, map._container);\n\n\t\t\tthis._draggable.on({\n\t\t\t\tdown: this._onDown,\n\t\t\t\tdragstart: this._onDragStart,\n\t\t\t\tdrag: this._onDrag,\n\t\t\t\tdragend: this._onDragEnd\n\t\t\t}, this);\n\n\t\t\tthis._draggable.on('predrag', this._onPreDragLimit, this);\n\t\t\tif (map.options.worldCopyJump) {\n\t\t\t\tthis._draggable.on('predrag', this._onPreDragWrap, this);\n\t\t\t\tmap.on('zoomend', this._onZoomEnd, this);\n\n\t\t\t\tmap.whenReady(this._onZoomEnd, this);\n\t\t\t}\n\t\t}\n\t\tL.DomUtil.addClass(this._map._container, 'leaflet-grab leaflet-touch-drag');\n\t\tthis._draggable.enable();\n\t\tthis._positions = [];\n\t\tthis._times = [];\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomUtil.removeClass(this._map._container, 'leaflet-grab');\n\t\tL.DomUtil.removeClass(this._map._container, 'leaflet-touch-drag');\n\t\tthis._draggable.disable();\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\tmoving: function () {\n\t\treturn this._draggable && this._draggable._moving;\n\t},\n\n\t_onDown: function () {\n\t\tthis._map._stop();\n\t},\n\n\t_onDragStart: function () {\n\t\tvar map = this._map;\n\n\t\tif (this._map.options.maxBounds && this._map.options.maxBoundsViscosity) {\n\t\t\tvar bounds = L.latLngBounds(this._map.options.maxBounds);\n\n\t\t\tthis._offsetLimit = L.bounds(\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getNorthWest()).multiplyBy(-1),\n\t\t\t\tthis._map.latLngToContainerPoint(bounds.getSouthEast()).multiplyBy(-1)\n\t\t\t\t\t.add(this._map.getSize()));\n\n\t\t\tthis._viscosity = Math.min(1.0, Math.max(0.0, this._map.options.maxBoundsViscosity));\n\t\t} else {\n\t\t\tthis._offsetLimit = null;\n\t\t}\n\n\t\tmap\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\n\t\tif (map.options.inertia) {\n\t\t\tthis._positions = [];\n\t\t\tthis._times = [];\n\t\t}\n\t},\n\n\t_onDrag: function (e) {\n\t\tif (this._map.options.inertia) {\n\t\t\tvar time = this._lastTime = +new Date(),\n\t\t\t pos = this._lastPos = this._draggable._absPos || this._draggable._newPos;\n\n\t\t\tthis._positions.push(pos);\n\t\t\tthis._times.push(time);\n\n\t\t\tif (time - this._times[0] > 50) {\n\t\t\t\tthis._positions.shift();\n\t\t\t\tthis._times.shift();\n\t\t\t}\n\t\t}\n\n\t\tthis._map\n\t\t .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_onZoomEnd: function () {\n\t\tvar pxCenter = this._map.getSize().divideBy(2),\n\t\t pxWorldCenter = this._map.latLngToLayerPoint([0, 0]);\n\n\t\tthis._initialWorldOffset = pxWorldCenter.subtract(pxCenter).x;\n\t\tthis._worldWidth = this._map.getPixelWorldBounds().getSize().x;\n\t},\n\n\t_viscousLimit: function (value, threshold) {\n\t\treturn value - (value - threshold) * this._viscosity;\n\t},\n\n\t_onPreDragLimit: function () {\n\t\tif (!this._viscosity || !this._offsetLimit) { return; }\n\n\t\tvar offset = this._draggable._newPos.subtract(this._draggable._startPos);\n\n\t\tvar limit = this._offsetLimit;\n\t\tif (offset.x < limit.min.x) { offset.x = this._viscousLimit(offset.x, limit.min.x); }\n\t\tif (offset.y < limit.min.y) { offset.y = this._viscousLimit(offset.y, limit.min.y); }\n\t\tif (offset.x > limit.max.x) { offset.x = this._viscousLimit(offset.x, limit.max.x); }\n\t\tif (offset.y > limit.max.y) { offset.y = this._viscousLimit(offset.y, limit.max.y); }\n\n\t\tthis._draggable._newPos = this._draggable._startPos.add(offset);\n\t},\n\n\t_onPreDragWrap: function () {\n\t\t// TODO refactor to be able to adjust map pane position after zoom\n\t\tvar worldWidth = this._worldWidth,\n\t\t halfWidth = Math.round(worldWidth / 2),\n\t\t dx = this._initialWorldOffset,\n\t\t x = this._draggable._newPos.x,\n\t\t newX1 = (x - halfWidth + dx) % worldWidth + halfWidth - dx,\n\t\t newX2 = (x + halfWidth + dx) % worldWidth - halfWidth - dx,\n\t\t newX = Math.abs(newX1 + dx) < Math.abs(newX2 + dx) ? newX1 : newX2;\n\n\t\tthis._draggable._absPos = this._draggable._newPos.clone();\n\t\tthis._draggable._newPos.x = newX;\n\t},\n\n\t_onDragEnd: function (e) {\n\t\tvar map = this._map,\n\t\t options = map.options,\n\n\t\t noInertia = !options.inertia || this._times.length < 2;\n\n\t\tmap.fire('dragend', e);\n\n\t\tif (noInertia) {\n\t\t\tmap.fire('moveend');\n\n\t\t} else {\n\n\t\t\tvar direction = this._lastPos.subtract(this._positions[0]),\n\t\t\t duration = (this._lastTime - this._times[0]) / 1000,\n\t\t\t ease = options.easeLinearity,\n\n\t\t\t speedVector = direction.multiplyBy(ease / duration),\n\t\t\t speed = speedVector.distanceTo([0, 0]),\n\n\t\t\t limitedSpeed = Math.min(options.inertiaMaxSpeed, speed),\n\t\t\t limitedSpeedVector = speedVector.multiplyBy(limitedSpeed / speed),\n\n\t\t\t decelerationDuration = limitedSpeed / (options.inertiaDeceleration * ease),\n\t\t\t offset = limitedSpeedVector.multiplyBy(-decelerationDuration / 2).round();\n\n\t\t\tif (!offset.x && !offset.y) {\n\t\t\t\tmap.fire('moveend');\n\n\t\t\t} else {\n\t\t\t\toffset = map._limitOffset(offset, map.options.maxBounds);\n\n\t\t\t\tL.Util.requestAnimFrame(function () {\n\t\t\t\t\tmap.panBy(offset, {\n\t\t\t\t\t\tduration: decelerationDuration,\n\t\t\t\t\t\teaseLinearity: ease,\n\t\t\t\t\t\tnoMoveStart: true,\n\t\t\t\t\t\tanimate: true\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property dragging: Handler\n// Map dragging handler (by both mouse and touch).\nL.Map.addInitHook('addHandler', 'dragging', L.Map.Drag);\n","/*\n * L.Handler.DoubleClickZoom is used to handle double-click zoom on the map, enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\n\nL.Map.mergeOptions({\n\t// @option doubleClickZoom: Boolean|String = true\n\t// Whether the map can be zoomed in by double clicking on it and\n\t// zoomed out by double clicking while holding shift. If passed\n\t// `'center'`, double-click zoom will zoom to the center of the\n\t// view regardless of where the mouse was.\n\tdoubleClickZoom: true\n});\n\nL.Map.DoubleClickZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tthis._map.on('dblclick', this._onDoubleClick, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._map.off('dblclick', this._onDoubleClick, this);\n\t},\n\n\t_onDoubleClick: function (e) {\n\t\tvar map = this._map,\n\t\t oldZoom = map.getZoom(),\n\t\t delta = map.options.zoomDelta,\n\t\t zoom = e.originalEvent.shiftKey ? oldZoom - delta : oldZoom + delta;\n\n\t\tif (map.options.doubleClickZoom === 'center') {\n\t\t\tmap.setZoom(zoom);\n\t\t} else {\n\t\t\tmap.setZoomAround(e.containerPoint, zoom);\n\t\t}\n\t}\n});\n\n// @section Handlers\n//\n// Map properties include interaction handlers that allow you to control\n// interaction behavior in runtime, enabling or disabling certain features such\n// as dragging or touch zoom (see `Handler` methods). For example:\n//\n// ```js\n// map.doubleClickZoom.disable();\n// ```\n//\n// @property doubleClickZoom: Handler\n// Double click zoom handler.\nL.Map.addInitHook('addHandler', 'doubleClickZoom', L.Map.DoubleClickZoom);\n","/*\n * L.Handler.ScrollWheelZoom is used by L.Map to enable mouse scroll wheel zoom on the map.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\t// @section Mousewheel options\n\t// @option scrollWheelZoom: Boolean|String = true\n\t// Whether the map can be zoomed by using the mouse wheel. If passed `'center'`,\n\t// it will zoom to the center of the view regardless of where the mouse was.\n\tscrollWheelZoom: true,\n\n\t// @option wheelDebounceTime: Number = 40\n\t// Limits the rate at which a wheel can fire (in milliseconds). By default\n\t// user can't zoom via wheel more often than once per 40 ms.\n\twheelDebounceTime: 40,\n\n\t// @option wheelPxPerZoomLevel: Number = 60\n\t// How many scroll pixels (as reported by [L.DomEvent.getWheelDelta](#domevent-getwheeldelta))\n\t// mean a change of one full zoom level. Smaller values will make wheel-zooming\n\t// faster (and vice versa).\n\twheelPxPerZoomLevel: 60\n});\n\nL.Map.ScrollWheelZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._map._container, 'mousewheel', this._onWheelScroll, this);\n\n\t\tthis._delta = 0;\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._map._container, 'mousewheel', this._onWheelScroll, this);\n\t},\n\n\t_onWheelScroll: function (e) {\n\t\tvar delta = L.DomEvent.getWheelDelta(e);\n\n\t\tvar debounce = this._map.options.wheelDebounceTime;\n\n\t\tthis._delta += delta;\n\t\tthis._lastMousePos = this._map.mouseEventToContainerPoint(e);\n\n\t\tif (!this._startTime) {\n\t\t\tthis._startTime = +new Date();\n\t\t}\n\n\t\tvar left = Math.max(debounce - (+new Date() - this._startTime), 0);\n\n\t\tclearTimeout(this._timer);\n\t\tthis._timer = setTimeout(L.bind(this._performZoom, this), left);\n\n\t\tL.DomEvent.stop(e);\n\t},\n\n\t_performZoom: function () {\n\t\tvar map = this._map,\n\t\t zoom = map.getZoom(),\n\t\t snap = this._map.options.zoomSnap || 0;\n\n\t\tmap._stop(); // stop panning and fly animations if any\n\n\t\t// map the delta with a sigmoid function to -4..4 range leaning on -1..1\n\t\tvar d2 = this._delta / (this._map.options.wheelPxPerZoomLevel * 4),\n\t\t d3 = 4 * Math.log(2 / (1 + Math.exp(-Math.abs(d2)))) / Math.LN2,\n\t\t d4 = snap ? Math.ceil(d3 / snap) * snap : d3,\n\t\t delta = map._limitZoom(zoom + (this._delta > 0 ? d4 : -d4)) - zoom;\n\n\t\tthis._delta = 0;\n\t\tthis._startTime = null;\n\n\t\tif (!delta) { return; }\n\n\t\tif (map.options.scrollWheelZoom === 'center') {\n\t\t\tmap.setZoom(zoom + delta);\n\t\t} else {\n\t\t\tmap.setZoomAround(this._lastMousePos, zoom + delta);\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property scrollWheelZoom: Handler\n// Scroll wheel zoom handler.\nL.Map.addInitHook('addHandler', 'scrollWheelZoom', L.Map.ScrollWheelZoom);\n","/*\r\n * Extends the event handling code with double tap support for mobile browsers.\r\n */\r\n\r\nL.extend(L.DomEvent, {\r\n\r\n\t_touchstart: L.Browser.msPointer ? 'MSPointerDown' : L.Browser.pointer ? 'pointerdown' : 'touchstart',\r\n\t_touchend: L.Browser.msPointer ? 'MSPointerUp' : L.Browser.pointer ? 'pointerup' : 'touchend',\r\n\r\n\t// inspired by Zepto touch code by Thomas Fuchs\r\n\taddDoubleTapListener: function (obj, handler, id) {\r\n\t\tvar last, touch,\r\n\t\t doubleTap = false,\r\n\t\t delay = 250;\r\n\r\n\t\tfunction onTouchStart(e) {\r\n\t\t\tvar count;\r\n\r\n\t\t\tif (L.Browser.pointer) {\r\n\t\t\t\tcount = L.DomEvent._pointersCount;\r\n\t\t\t} else {\r\n\t\t\t\tcount = e.touches.length;\r\n\t\t\t}\r\n\r\n\t\t\tif (count > 1) { return; }\r\n\r\n\t\t\tvar now = Date.now(),\r\n\t\t\t delta = now - (last || now);\r\n\r\n\t\t\ttouch = e.touches ? e.touches[0] : e;\r\n\t\t\tdoubleTap = (delta > 0 && delta <= delay);\r\n\t\t\tlast = now;\r\n\t\t}\r\n\r\n\t\tfunction onTouchEnd() {\r\n\t\t\tif (doubleTap && !touch.cancelBubble) {\r\n\t\t\t\tif (L.Browser.pointer) {\r\n\t\t\t\t\t// work around .type being readonly with MSPointer* events\r\n\t\t\t\t\tvar newTouch = {},\r\n\t\t\t\t\t prop, i;\r\n\r\n\t\t\t\t\tfor (i in touch) {\r\n\t\t\t\t\t\tprop = touch[i];\r\n\t\t\t\t\t\tnewTouch[i] = prop && prop.bind ? prop.bind(touch) : prop;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttouch = newTouch;\r\n\t\t\t\t}\r\n\t\t\t\ttouch.type = 'dblclick';\r\n\t\t\t\thandler(touch);\r\n\t\t\t\tlast = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar pre = '_leaflet_',\r\n\t\t touchstart = this._touchstart,\r\n\t\t touchend = this._touchend;\r\n\r\n\t\tobj[pre + touchstart + id] = onTouchStart;\r\n\t\tobj[pre + touchend + id] = onTouchEnd;\r\n\t\tobj[pre + 'dblclick' + id] = handler;\r\n\r\n\t\tobj.addEventListener(touchstart, onTouchStart, false);\r\n\t\tobj.addEventListener(touchend, onTouchEnd, false);\r\n\r\n\t\t// On some platforms (notably, chrome on win10 + touchscreen + mouse),\r\n\t\t// the browser doesn't fire touchend/pointerup events but does fire\r\n\t\t// native dblclicks. See #4127.\r\n\t\tif (!L.Browser.edge) {\r\n\t\t\tobj.addEventListener('dblclick', handler, false);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\tremoveDoubleTapListener: function (obj, id) {\r\n\t\tvar pre = '_leaflet_',\r\n\t\t touchstart = obj[pre + this._touchstart + id],\r\n\t\t touchend = obj[pre + this._touchend + id],\r\n\t\t dblclick = obj[pre + 'dblclick' + id];\r\n\r\n\t\tobj.removeEventListener(this._touchstart, touchstart, false);\r\n\t\tobj.removeEventListener(this._touchend, touchend, false);\r\n\t\tif (!L.Browser.edge) {\r\n\t\t\tobj.removeEventListener('dblclick', dblclick, false);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t}\r\n});\r\n","/*\n * Extends L.DomEvent to provide touch support for Internet Explorer and Windows-based devices.\n */\n\nL.extend(L.DomEvent, {\n\n\tPOINTER_DOWN: L.Browser.msPointer ? 'MSPointerDown' : 'pointerdown',\n\tPOINTER_MOVE: L.Browser.msPointer ? 'MSPointerMove' : 'pointermove',\n\tPOINTER_UP: L.Browser.msPointer ? 'MSPointerUp' : 'pointerup',\n\tPOINTER_CANCEL: L.Browser.msPointer ? 'MSPointerCancel' : 'pointercancel',\n\tTAG_WHITE_LIST: ['INPUT', 'SELECT', 'OPTION'],\n\n\t_pointers: {},\n\t_pointersCount: 0,\n\n\t// Provides a touch events wrapper for (ms)pointer events.\n\t// ref http://www.w3.org/TR/pointerevents/ https://www.w3.org/Bugs/Public/show_bug.cgi?id=22890\n\n\taddPointerListener: function (obj, type, handler, id) {\n\n\t\tif (type === 'touchstart') {\n\t\t\tthis._addPointerStart(obj, handler, id);\n\n\t\t} else if (type === 'touchmove') {\n\t\t\tthis._addPointerMove(obj, handler, id);\n\n\t\t} else if (type === 'touchend') {\n\t\t\tthis._addPointerEnd(obj, handler, id);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremovePointerListener: function (obj, type, id) {\n\t\tvar handler = obj['_leaflet_' + type + id];\n\n\t\tif (type === 'touchstart') {\n\t\t\tobj.removeEventListener(this.POINTER_DOWN, handler, false);\n\n\t\t} else if (type === 'touchmove') {\n\t\t\tobj.removeEventListener(this.POINTER_MOVE, handler, false);\n\n\t\t} else if (type === 'touchend') {\n\t\t\tobj.removeEventListener(this.POINTER_UP, handler, false);\n\t\t\tobj.removeEventListener(this.POINTER_CANCEL, handler, false);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_addPointerStart: function (obj, handler, id) {\n\t\tvar onDown = L.bind(function (e) {\n\t\t\tif (e.pointerType !== 'mouse' && e.pointerType !== e.MSPOINTER_TYPE_MOUSE) {\n\t\t\t\t// In IE11, some touch events needs to fire for form controls, or\n\t\t\t\t// the controls will stop working. We keep a whitelist of tag names that\n\t\t\t\t// need these events. For other target tags, we prevent default on the event.\n\t\t\t\tif (this.TAG_WHITE_LIST.indexOf(e.target.tagName) < 0) {\n\t\t\t\t\tL.DomEvent.preventDefault(e);\n\t\t\t\t} else {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis._handlePointer(e, handler);\n\t\t}, this);\n\n\t\tobj['_leaflet_touchstart' + id] = onDown;\n\t\tobj.addEventListener(this.POINTER_DOWN, onDown, false);\n\n\t\t// need to keep track of what pointers and how many are active to provide e.touches emulation\n\t\tif (!this._pointerDocListener) {\n\t\t\tvar pointerUp = L.bind(this._globalPointerUp, this);\n\n\t\t\t// we listen documentElement as any drags that end by moving the touch off the screen get fired there\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_DOWN, L.bind(this._globalPointerDown, this), true);\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_MOVE, L.bind(this._globalPointerMove, this), true);\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_UP, pointerUp, true);\n\t\t\tdocument.documentElement.addEventListener(this.POINTER_CANCEL, pointerUp, true);\n\n\t\t\tthis._pointerDocListener = true;\n\t\t}\n\t},\n\n\t_globalPointerDown: function (e) {\n\t\tthis._pointers[e.pointerId] = e;\n\t\tthis._pointersCount++;\n\t},\n\n\t_globalPointerMove: function (e) {\n\t\tif (this._pointers[e.pointerId]) {\n\t\t\tthis._pointers[e.pointerId] = e;\n\t\t}\n\t},\n\n\t_globalPointerUp: function (e) {\n\t\tdelete this._pointers[e.pointerId];\n\t\tthis._pointersCount--;\n\t},\n\n\t_handlePointer: function (e, handler) {\n\t\te.touches = [];\n\t\tfor (var i in this._pointers) {\n\t\t\te.touches.push(this._pointers[i]);\n\t\t}\n\t\te.changedTouches = [e];\n\n\t\thandler(e);\n\t},\n\n\t_addPointerMove: function (obj, handler, id) {\n\t\tvar onMove = L.bind(function (e) {\n\t\t\t// don't fire touch moves when mouse isn't down\n\t\t\tif ((e.pointerType === e.MSPOINTER_TYPE_MOUSE || e.pointerType === 'mouse') && e.buttons === 0) { return; }\n\n\t\t\tthis._handlePointer(e, handler);\n\t\t}, this);\n\n\t\tobj['_leaflet_touchmove' + id] = onMove;\n\t\tobj.addEventListener(this.POINTER_MOVE, onMove, false);\n\t},\n\n\t_addPointerEnd: function (obj, handler, id) {\n\t\tvar onUp = L.bind(function (e) {\n\t\t\tthis._handlePointer(e, handler);\n\t\t}, this);\n\n\t\tobj['_leaflet_touchend' + id] = onUp;\n\t\tobj.addEventListener(this.POINTER_UP, onUp, false);\n\t\tobj.addEventListener(this.POINTER_CANCEL, onUp, false);\n\t}\n});\n","/*\n * L.Handler.TouchZoom is used by L.Map to add pinch zoom on supported mobile browsers.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\t// @section Touch interaction options\n\t// @option touchZoom: Boolean|String = *\n\t// Whether the map can be zoomed by touch-dragging with two fingers. If\n\t// passed `'center'`, it will zoom to the center of the view regardless of\n\t// where the touch events (fingers) were. Enabled for touch-capable web\n\t// browsers except for old Androids.\n\ttouchZoom: L.Browser.touch && !L.Browser.android23,\n\n\t// @option bounceAtZoomLimits: Boolean = true\n\t// Set it to false if you don't want the map to zoom beyond min/max zoom\n\t// and then bounce back when pinch-zooming.\n\tbounceAtZoomLimits: true\n});\n\nL.Map.TouchZoom = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomUtil.addClass(this._map._container, 'leaflet-touch-zoom');\n\t\tL.DomEvent.on(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomUtil.removeClass(this._map._container, 'leaflet-touch-zoom');\n\t\tL.DomEvent.off(this._map._container, 'touchstart', this._onTouchStart, this);\n\t},\n\n\t_onTouchStart: function (e) {\n\t\tvar map = this._map;\n\t\tif (!e.touches || e.touches.length !== 2 || map._animatingZoom || this._zooming) { return; }\n\n\t\tvar p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]);\n\n\t\tthis._centerPoint = map.getSize()._divideBy(2);\n\t\tthis._startLatLng = map.containerPointToLatLng(this._centerPoint);\n\t\tif (map.options.touchZoom !== 'center') {\n\t\t\tthis._pinchStartLatLng = map.containerPointToLatLng(p1.add(p2)._divideBy(2));\n\t\t}\n\n\t\tthis._startDist = p1.distanceTo(p2);\n\t\tthis._startZoom = map.getZoom();\n\n\t\tthis._moved = false;\n\t\tthis._zooming = true;\n\n\t\tmap._stop();\n\n\t\tL.DomEvent\n\t\t .on(document, 'touchmove', this._onTouchMove, this)\n\t\t .on(document, 'touchend', this._onTouchEnd, this);\n\n\t\tL.DomEvent.preventDefault(e);\n\t},\n\n\t_onTouchMove: function (e) {\n\t\tif (!e.touches || e.touches.length !== 2 || !this._zooming) { return; }\n\n\t\tvar map = this._map,\n\t\t p1 = map.mouseEventToContainerPoint(e.touches[0]),\n\t\t p2 = map.mouseEventToContainerPoint(e.touches[1]),\n\t\t scale = p1.distanceTo(p2) / this._startDist;\n\n\n\t\tthis._zoom = map.getScaleZoom(scale, this._startZoom);\n\n\t\tif (!map.options.bounceAtZoomLimits && (\n\t\t\t(this._zoom < map.getMinZoom() && scale < 1) ||\n\t\t\t(this._zoom > map.getMaxZoom() && scale > 1))) {\n\t\t\tthis._zoom = map._limitZoom(this._zoom);\n\t\t}\n\n\t\tif (map.options.touchZoom === 'center') {\n\t\t\tthis._center = this._startLatLng;\n\t\t\tif (scale === 1) { return; }\n\t\t} else {\n\t\t\t// Get delta from pinch to center, so centerLatLng is delta applied to initial pinchLatLng\n\t\t\tvar delta = p1._add(p2)._divideBy(2)._subtract(this._centerPoint);\n\t\t\tif (scale === 1 && delta.x === 0 && delta.y === 0) { return; }\n\t\t\tthis._center = map.unproject(map.project(this._pinchStartLatLng, this._zoom).subtract(delta), this._zoom);\n\t\t}\n\n\t\tif (!this._moved) {\n\t\t\tmap._moveStart(true);\n\t\t\tthis._moved = true;\n\t\t}\n\n\t\tL.Util.cancelAnimFrame(this._animRequest);\n\n\t\tvar moveFn = L.bind(map._move, map, this._center, this._zoom, {pinch: true, round: false});\n\t\tthis._animRequest = L.Util.requestAnimFrame(moveFn, this, true);\n\n\t\tL.DomEvent.preventDefault(e);\n\t},\n\n\t_onTouchEnd: function () {\n\t\tif (!this._moved || !this._zooming) {\n\t\t\tthis._zooming = false;\n\t\t\treturn;\n\t\t}\n\n\t\tthis._zooming = false;\n\t\tL.Util.cancelAnimFrame(this._animRequest);\n\n\t\tL.DomEvent\n\t\t .off(document, 'touchmove', this._onTouchMove)\n\t\t .off(document, 'touchend', this._onTouchEnd);\n\n\t\t// Pinch updates GridLayers' levels only when zoomSnap is off, so zoomSnap becomes noUpdate.\n\t\tif (this._map.options.zoomAnimation) {\n\t\t\tthis._map._animateZoom(this._center, this._map._limitZoom(this._zoom), true, this._map.options.zoomSnap);\n\t\t} else {\n\t\t\tthis._map._resetView(this._center, this._map._limitZoom(this._zoom));\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property touchZoom: Handler\n// Touch zoom handler.\nL.Map.addInitHook('addHandler', 'touchZoom', L.Map.TouchZoom);\n","/*\n * L.Map.Tap is used to enable mobile hacks like quick taps and long hold.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\t// @section Touch interaction options\n\t// @option tap: Boolean = true\n\t// Enables mobile hacks for supporting instant taps (fixing 200ms click\n\t// delay on iOS/Android) and touch holds (fired as `contextmenu` events).\n\ttap: true,\n\n\t// @option tapTolerance: Number = 15\n\t// The max number of pixels a user can shift his finger during touch\n\t// for it to be considered a valid tap.\n\ttapTolerance: 15\n});\n\nL.Map.Tap = L.Handler.extend({\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._map._container, 'touchstart', this._onDown, this);\n\t},\n\n\t_onDown: function (e) {\n\t\tif (!e.touches) { return; }\n\n\t\tL.DomEvent.preventDefault(e);\n\n\t\tthis._fireClick = true;\n\n\t\t// don't simulate click or track longpress if more than 1 touch\n\t\tif (e.touches.length > 1) {\n\t\t\tthis._fireClick = false;\n\t\t\tclearTimeout(this._holdTimeout);\n\t\t\treturn;\n\t\t}\n\n\t\tvar first = e.touches[0],\n\t\t el = first.target;\n\n\t\tthis._startPos = this._newPos = new L.Point(first.clientX, first.clientY);\n\n\t\t// if touching a link, highlight it\n\t\tif (el.tagName && el.tagName.toLowerCase() === 'a') {\n\t\t\tL.DomUtil.addClass(el, 'leaflet-active');\n\t\t}\n\n\t\t// simulate long hold but setting a timeout\n\t\tthis._holdTimeout = setTimeout(L.bind(function () {\n\t\t\tif (this._isTapValid()) {\n\t\t\t\tthis._fireClick = false;\n\t\t\t\tthis._onUp();\n\t\t\t\tthis._simulateEvent('contextmenu', first);\n\t\t\t}\n\t\t}, this), 1000);\n\n\t\tthis._simulateEvent('mousedown', first);\n\n\t\tL.DomEvent.on(document, {\n\t\t\ttouchmove: this._onMove,\n\t\t\ttouchend: this._onUp\n\t\t}, this);\n\t},\n\n\t_onUp: function (e) {\n\t\tclearTimeout(this._holdTimeout);\n\n\t\tL.DomEvent.off(document, {\n\t\t\ttouchmove: this._onMove,\n\t\t\ttouchend: this._onUp\n\t\t}, this);\n\n\t\tif (this._fireClick && e && e.changedTouches) {\n\n\t\t\tvar first = e.changedTouches[0],\n\t\t\t el = first.target;\n\n\t\t\tif (el && el.tagName && el.tagName.toLowerCase() === 'a') {\n\t\t\t\tL.DomUtil.removeClass(el, 'leaflet-active');\n\t\t\t}\n\n\t\t\tthis._simulateEvent('mouseup', first);\n\n\t\t\t// simulate click if the touch didn't move too much\n\t\t\tif (this._isTapValid()) {\n\t\t\t\tthis._simulateEvent('click', first);\n\t\t\t}\n\t\t}\n\t},\n\n\t_isTapValid: function () {\n\t\treturn this._newPos.distanceTo(this._startPos) <= this._map.options.tapTolerance;\n\t},\n\n\t_onMove: function (e) {\n\t\tvar first = e.touches[0];\n\t\tthis._newPos = new L.Point(first.clientX, first.clientY);\n\t\tthis._simulateEvent('mousemove', first);\n\t},\n\n\t_simulateEvent: function (type, e) {\n\t\tvar simulatedEvent = document.createEvent('MouseEvents');\n\n\t\tsimulatedEvent._simulated = true;\n\t\te.target._simulatedClick = true;\n\n\t\tsimulatedEvent.initMouseEvent(\n\t\t type, true, true, window, 1,\n\t\t e.screenX, e.screenY,\n\t\t e.clientX, e.clientY,\n\t\t false, false, false, false, 0, null);\n\n\t\te.target.dispatchEvent(simulatedEvent);\n\t}\n});\n\n// @section Handlers\n// @property tap: Handler\n// Mobile touch hacks (quick tap and touch hold) handler.\nif (L.Browser.touch && !L.Browser.pointer) {\n\tL.Map.addInitHook('addHandler', 'tap', L.Map.Tap);\n}\n","/*\n * L.Handler.BoxZoom is used to add shift-drag zoom interaction to the map\n * (zoom to a selected bounding box), enabled by default.\n */\n\n// @namespace Map\n// @section Interaction Options\nL.Map.mergeOptions({\n\t// @option boxZoom: Boolean = true\n\t// Whether the map can be zoomed to a rectangular area specified by\n\t// dragging the mouse while pressing the shift key.\n\tboxZoom: true\n});\n\nL.Map.BoxZoom = L.Handler.extend({\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\t\tthis._container = map._container;\n\t\tthis._pane = map._panes.overlayPane;\n\t},\n\n\taddHooks: function () {\n\t\tL.DomEvent.on(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tL.DomEvent.off(this._container, 'mousedown', this._onMouseDown, this);\n\t},\n\n\tmoved: function () {\n\t\treturn this._moved;\n\t},\n\n\t_resetState: function () {\n\t\tthis._moved = false;\n\t},\n\n\t_onMouseDown: function (e) {\n\t\tif (!e.shiftKey || ((e.which !== 1) && (e.button !== 1))) { return false; }\n\n\t\tthis._resetState();\n\n\t\tL.DomUtil.disableTextSelection();\n\t\tL.DomUtil.disableImageDrag();\n\n\t\tthis._startPoint = this._map.mouseEventToContainerPoint(e);\n\n\t\tL.DomEvent.on(document, {\n\t\t\tcontextmenu: L.DomEvent.stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseMove: function (e) {\n\t\tif (!this._moved) {\n\t\t\tthis._moved = true;\n\n\t\t\tthis._box = L.DomUtil.create('div', 'leaflet-zoom-box', this._container);\n\t\t\tL.DomUtil.addClass(this._container, 'leaflet-crosshair');\n\n\t\t\tthis._map.fire('boxzoomstart');\n\t\t}\n\n\t\tthis._point = this._map.mouseEventToContainerPoint(e);\n\n\t\tvar bounds = new L.Bounds(this._point, this._startPoint),\n\t\t size = bounds.getSize();\n\n\t\tL.DomUtil.setPosition(this._box, bounds.min);\n\n\t\tthis._box.style.width = size.x + 'px';\n\t\tthis._box.style.height = size.y + 'px';\n\t},\n\n\t_finish: function () {\n\t\tif (this._moved) {\n\t\t\tL.DomUtil.remove(this._box);\n\t\t\tL.DomUtil.removeClass(this._container, 'leaflet-crosshair');\n\t\t}\n\n\t\tL.DomUtil.enableTextSelection();\n\t\tL.DomUtil.enableImageDrag();\n\n\t\tL.DomEvent.off(document, {\n\t\t\tcontextmenu: L.DomEvent.stop,\n\t\t\tmousemove: this._onMouseMove,\n\t\t\tmouseup: this._onMouseUp,\n\t\t\tkeydown: this._onKeyDown\n\t\t}, this);\n\t},\n\n\t_onMouseUp: function (e) {\n\t\tif ((e.which !== 1) && (e.button !== 1)) { return; }\n\n\t\tthis._finish();\n\n\t\tif (!this._moved) { return; }\n\t\t// Postpone to next JS tick so internal click event handling\n\t\t// still see it as \"moved\".\n\t\tsetTimeout(L.bind(this._resetState, this), 0);\n\n\t\tvar bounds = new L.LatLngBounds(\n\t\t this._map.containerPointToLatLng(this._startPoint),\n\t\t this._map.containerPointToLatLng(this._point));\n\n\t\tthis._map\n\t\t\t.fitBounds(bounds)\n\t\t\t.fire('boxzoomend', {boxZoomBounds: bounds});\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.keyCode === 27) {\n\t\t\tthis._finish();\n\t\t}\n\t}\n});\n\n// @section Handlers\n// @property boxZoom: Handler\n// Box (shift-drag with mouse) zoom handler.\nL.Map.addInitHook('addHandler', 'boxZoom', L.Map.BoxZoom);\n","/*\n * L.Map.Keyboard is handling keyboard interaction with the map, enabled by default.\n */\n\n// @namespace Map\n// @section Keyboard Navigation Options\nL.Map.mergeOptions({\n\t// @option keyboard: Boolean = true\n\t// Makes the map focusable and allows users to navigate the map with keyboard\n\t// arrows and `+`/`-` keys.\n\tkeyboard: true,\n\n\t// @option keyboardPanDelta: Number = 80\n\t// Amount of pixels to pan when pressing an arrow key.\n\tkeyboardPanDelta: 80\n});\n\nL.Map.Keyboard = L.Handler.extend({\n\n\tkeyCodes: {\n\t\tleft: [37],\n\t\tright: [39],\n\t\tdown: [40],\n\t\tup: [38],\n\t\tzoomIn: [187, 107, 61, 171],\n\t\tzoomOut: [189, 109, 54, 173]\n\t},\n\n\tinitialize: function (map) {\n\t\tthis._map = map;\n\n\t\tthis._setPanDelta(map.options.keyboardPanDelta);\n\t\tthis._setZoomDelta(map.options.zoomDelta);\n\t},\n\n\taddHooks: function () {\n\t\tvar container = this._map._container;\n\n\t\t// make the container focusable by tabbing\n\t\tif (container.tabIndex <= 0) {\n\t\t\tcontainer.tabIndex = '0';\n\t\t}\n\n\t\tL.DomEvent.on(container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.on({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._removeHooks();\n\n\t\tL.DomEvent.off(this._map._container, {\n\t\t\tfocus: this._onFocus,\n\t\t\tblur: this._onBlur,\n\t\t\tmousedown: this._onMouseDown\n\t\t}, this);\n\n\t\tthis._map.off({\n\t\t\tfocus: this._addHooks,\n\t\t\tblur: this._removeHooks\n\t\t}, this);\n\t},\n\n\t_onMouseDown: function () {\n\t\tif (this._focused) { return; }\n\n\t\tvar body = document.body,\n\t\t docEl = document.documentElement,\n\t\t top = body.scrollTop || docEl.scrollTop,\n\t\t left = body.scrollLeft || docEl.scrollLeft;\n\n\t\tthis._map._container.focus();\n\n\t\twindow.scrollTo(left, top);\n\t},\n\n\t_onFocus: function () {\n\t\tthis._focused = true;\n\t\tthis._map.fire('focus');\n\t},\n\n\t_onBlur: function () {\n\t\tthis._focused = false;\n\t\tthis._map.fire('blur');\n\t},\n\n\t_setPanDelta: function (panDelta) {\n\t\tvar keys = this._panKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.left.length; i < len; i++) {\n\t\t\tkeys[codes.left[i]] = [-1 * panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.right.length; i < len; i++) {\n\t\t\tkeys[codes.right[i]] = [panDelta, 0];\n\t\t}\n\t\tfor (i = 0, len = codes.down.length; i < len; i++) {\n\t\t\tkeys[codes.down[i]] = [0, panDelta];\n\t\t}\n\t\tfor (i = 0, len = codes.up.length; i < len; i++) {\n\t\t\tkeys[codes.up[i]] = [0, -1 * panDelta];\n\t\t}\n\t},\n\n\t_setZoomDelta: function (zoomDelta) {\n\t\tvar keys = this._zoomKeys = {},\n\t\t codes = this.keyCodes,\n\t\t i, len;\n\n\t\tfor (i = 0, len = codes.zoomIn.length; i < len; i++) {\n\t\t\tkeys[codes.zoomIn[i]] = zoomDelta;\n\t\t}\n\t\tfor (i = 0, len = codes.zoomOut.length; i < len; i++) {\n\t\t\tkeys[codes.zoomOut[i]] = -zoomDelta;\n\t\t}\n\t},\n\n\t_addHooks: function () {\n\t\tL.DomEvent.on(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_removeHooks: function () {\n\t\tL.DomEvent.off(document, 'keydown', this._onKeyDown, this);\n\t},\n\n\t_onKeyDown: function (e) {\n\t\tif (e.altKey || e.ctrlKey || e.metaKey) { return; }\n\n\t\tvar key = e.keyCode,\n\t\t map = this._map,\n\t\t offset;\n\n\t\tif (key in this._panKeys) {\n\n\t\t\tif (map._panAnim && map._panAnim._inProgress) { return; }\n\n\t\t\toffset = this._panKeys[key];\n\t\t\tif (e.shiftKey) {\n\t\t\t\toffset = L.point(offset).multiplyBy(3);\n\t\t\t}\n\n\t\t\tmap.panBy(offset);\n\n\t\t\tif (map.options.maxBounds) {\n\t\t\t\tmap.panInsideBounds(map.options.maxBounds);\n\t\t\t}\n\n\t\t} else if (key in this._zoomKeys) {\n\t\t\tmap.setZoom(map.getZoom() + (e.shiftKey ? 3 : 1) * this._zoomKeys[key]);\n\n\t\t} else if (key === 27) {\n\t\t\tmap.closePopup();\n\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\n\t\tL.DomEvent.stop(e);\n\t}\n});\n\n// @section Handlers\n// @section Handlers\n// @property keyboard: Handler\n// Keyboard navigation handler.\nL.Map.addInitHook('addHandler', 'keyboard', L.Map.Keyboard);\n","/*\n * L.Handler.MarkerDrag is used internally by L.Marker to make the markers draggable.\n */\n\n\n/* @namespace Marker\n * @section Interaction handlers\n *\n * Interaction handlers are properties of a marker instance that allow you to control interaction behavior in runtime, enabling or disabling certain features such as dragging (see `Handler` methods). Example:\n *\n * ```js\n * marker.dragging.disable();\n * ```\n *\n * @property dragging: Handler\n * Marker dragging handler (by both mouse and touch).\n */\n\nL.Handler.MarkerDrag = L.Handler.extend({\n\tinitialize: function (marker) {\n\t\tthis._marker = marker;\n\t},\n\n\taddHooks: function () {\n\t\tvar icon = this._marker._icon;\n\n\t\tif (!this._draggable) {\n\t\t\tthis._draggable = new L.Draggable(icon, icon, true);\n\t\t}\n\n\t\tthis._draggable.on({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).enable();\n\n\t\tL.DomUtil.addClass(icon, 'leaflet-marker-draggable');\n\t},\n\n\tremoveHooks: function () {\n\t\tthis._draggable.off({\n\t\t\tdragstart: this._onDragStart,\n\t\t\tdrag: this._onDrag,\n\t\t\tdragend: this._onDragEnd\n\t\t}, this).disable();\n\n\t\tif (this._marker._icon) {\n\t\t\tL.DomUtil.removeClass(this._marker._icon, 'leaflet-marker-draggable');\n\t\t}\n\t},\n\n\tmoved: function () {\n\t\treturn this._draggable && this._draggable._moved;\n\t},\n\n\t_onDragStart: function () {\n\t\t// @section Dragging events\n\t\t// @event dragstart: Event\n\t\t// Fired when the user starts dragging the marker.\n\n\t\t// @event movestart: Event\n\t\t// Fired when the marker starts moving (because of dragging).\n\n\t\tthis._oldLatLng = this._marker.getLatLng();\n\t\tthis._marker\n\t\t .closePopup()\n\t\t .fire('movestart')\n\t\t .fire('dragstart');\n\t},\n\n\t_onDrag: function (e) {\n\t\tvar marker = this._marker,\n\t\t shadow = marker._shadow,\n\t\t iconPos = L.DomUtil.getPosition(marker._icon),\n\t\t latlng = marker._map.layerPointToLatLng(iconPos);\n\n\t\t// update shadow position\n\t\tif (shadow) {\n\t\t\tL.DomUtil.setPosition(shadow, iconPos);\n\t\t}\n\n\t\tmarker._latlng = latlng;\n\t\te.latlng = latlng;\n\t\te.oldLatLng = this._oldLatLng;\n\n\t\t// @event drag: Event\n\t\t// Fired repeatedly while the user drags the marker.\n\t\tmarker\n\t\t .fire('move', e)\n\t\t .fire('drag', e);\n\t},\n\n\t_onDragEnd: function (e) {\n\t\t// @event dragend: DragEndEvent\n\t\t// Fired when the user stops dragging the marker.\n\n\t\t// @event moveend: Event\n\t\t// Fired when the marker stops moving (because of dragging).\n\t\tdelete this._oldLatLng;\n\t\tthis._marker\n\t\t .fire('moveend')\n\t\t .fire('dragend', e);\n\t}\n});\n","/*\r\n * @class Control\r\n * @aka L.Control\r\n *\r\n * L.Control is a base class for implementing map controls. Handles positioning.\r\n * All other controls extend from this class.\r\n */\r\n\r\nL.Control = L.Class.extend({\r\n\t// @section\r\n\t// @aka Control options\r\n\toptions: {\r\n\t\t// @option position: String = 'topright'\r\n\t\t// The position of the control (one of the map corners). Possible values are `'topleft'`,\r\n\t\t// `'topright'`, `'bottomleft'` or `'bottomright'`\r\n\t\tposition: 'topright'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\t},\r\n\r\n\t/* @section\r\n\t * Classes extending L.Control will inherit the following methods:\r\n\t *\r\n\t * @method getPosition: string\r\n\t * Returns the position of the control.\r\n\t */\r\n\tgetPosition: function () {\r\n\t\treturn this.options.position;\r\n\t},\r\n\r\n\t// @method setPosition(position: string): this\r\n\t// Sets the position of the control.\r\n\tsetPosition: function (position) {\r\n\t\tvar map = this._map;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.removeControl(this);\r\n\t\t}\r\n\r\n\t\tthis.options.position = position;\r\n\r\n\t\tif (map) {\r\n\t\t\tmap.addControl(this);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method getContainer: HTMLElement\r\n\t// Returns the HTMLElement that contains the control.\r\n\tgetContainer: function () {\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method addTo(map: Map): this\r\n\t// Adds the control to the given map.\r\n\taddTo: function (map) {\r\n\t\tthis.remove();\r\n\t\tthis._map = map;\r\n\r\n\t\tvar container = this._container = this.onAdd(map),\r\n\t\t pos = this.getPosition(),\r\n\t\t corner = map._controlCorners[pos];\r\n\r\n\t\tL.DomUtil.addClass(container, 'leaflet-control');\r\n\r\n\t\tif (pos.indexOf('bottom') !== -1) {\r\n\t\t\tcorner.insertBefore(container, corner.firstChild);\r\n\t\t} else {\r\n\t\t\tcorner.appendChild(container);\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method remove: this\r\n\t// Removes the control from the map it is currently active on.\r\n\tremove: function () {\r\n\t\tif (!this._map) {\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tL.DomUtil.remove(this._container);\r\n\r\n\t\tif (this.onRemove) {\r\n\t\t\tthis.onRemove(this._map);\r\n\t\t}\r\n\r\n\t\tthis._map = null;\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_refocusOnMap: function (e) {\r\n\t\t// if map exists and event is not a keyboard event\r\n\t\tif (this._map && e && e.screenX > 0 && e.screenY > 0) {\r\n\t\t\tthis._map.getContainer().focus();\r\n\t\t}\r\n\t}\r\n});\r\n\r\nL.control = function (options) {\r\n\treturn new L.Control(options);\r\n};\r\n\r\n/* @section Extension methods\r\n * @uninheritable\r\n *\r\n * Every control should extend from `L.Control` and (re-)implement the following methods.\r\n *\r\n * @method onAdd(map: Map): HTMLElement\r\n * Should return the container DOM element for the control and add listeners on relevant map events. Called on [`control.addTo(map)`](#control-addTo).\r\n *\r\n * @method onRemove(map: Map)\r\n * Optional method. Should contain all clean up code that removes the listeners previously added in [`onAdd`](#control-onadd). Called on [`control.remove()`](#control-remove).\r\n */\r\n\r\n/* @namespace Map\r\n * @section Methods for Layers and Controls\r\n */\r\nL.Map.include({\r\n\t// @method addControl(control: Control): this\r\n\t// Adds the given control to the map\r\n\taddControl: function (control) {\r\n\t\tcontrol.addTo(this);\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeControl(control: Control): this\r\n\t// Removes the given control from the map\r\n\tremoveControl: function (control) {\r\n\t\tcontrol.remove();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initControlPos: function () {\r\n\t\tvar corners = this._controlCorners = {},\r\n\t\t l = 'leaflet-',\r\n\t\t container = this._controlContainer =\r\n\t\t L.DomUtil.create('div', l + 'control-container', this._container);\r\n\r\n\t\tfunction createCorner(vSide, hSide) {\r\n\t\t\tvar className = l + vSide + ' ' + l + hSide;\r\n\r\n\t\t\tcorners[vSide + hSide] = L.DomUtil.create('div', className, container);\r\n\t\t}\r\n\r\n\t\tcreateCorner('top', 'left');\r\n\t\tcreateCorner('top', 'right');\r\n\t\tcreateCorner('bottom', 'left');\r\n\t\tcreateCorner('bottom', 'right');\r\n\t},\r\n\r\n\t_clearControlPos: function () {\r\n\t\tL.DomUtil.remove(this._controlContainer);\r\n\t}\r\n});\r\n","/*\r\n * @class Control.Zoom\r\n * @aka L.Control.Zoom\r\n * @inherits Control\r\n *\r\n * A basic zoom control with two buttons (zoom in and zoom out). It is put on the map by default unless you set its [`zoomControl` option](#map-zoomcontrol) to `false`. Extends `Control`.\r\n */\r\n\r\nL.Control.Zoom = L.Control.extend({\r\n\t// @section\r\n\t// @aka Control.Zoom options\r\n\toptions: {\r\n\t\tposition: 'topleft',\r\n\r\n\t\t// @option zoomInText: String = '+'\r\n\t\t// The text set on the 'zoom in' button.\r\n\t\tzoomInText: '+',\r\n\r\n\t\t// @option zoomInTitle: String = 'Zoom in'\r\n\t\t// The title set on the 'zoom in' button.\r\n\t\tzoomInTitle: 'Zoom in',\r\n\r\n\t\t// @option zoomOutText: String = '-'\r\n\t\t// The text set on the 'zoom out' button.\r\n\t\tzoomOutText: '-',\r\n\r\n\t\t// @option zoomOutTitle: String = 'Zoom out'\r\n\t\t// The title set on the 'zoom out' button.\r\n\t\tzoomOutTitle: 'Zoom out'\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tvar zoomName = 'leaflet-control-zoom',\r\n\t\t container = L.DomUtil.create('div', zoomName + ' leaflet-bar'),\r\n\t\t options = this.options;\r\n\r\n\t\tthis._zoomInButton = this._createButton(options.zoomInText, options.zoomInTitle,\r\n\t\t zoomName + '-in', container, this._zoomIn);\r\n\t\tthis._zoomOutButton = this._createButton(options.zoomOutText, options.zoomOutTitle,\r\n\t\t zoomName + '-out', container, this._zoomOut);\r\n\r\n\t\tthis._updateDisabled();\r\n\t\tmap.on('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\r\n\t\treturn container;\r\n\t},\r\n\r\n\tonRemove: function (map) {\r\n\t\tmap.off('zoomend zoomlevelschange', this._updateDisabled, this);\r\n\t},\r\n\r\n\tdisable: function () {\r\n\t\tthis._disabled = true;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\tenable: function () {\r\n\t\tthis._disabled = false;\r\n\t\tthis._updateDisabled();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_zoomIn: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom < this._map.getMaxZoom()) {\r\n\t\t\tthis._map.zoomIn(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_zoomOut: function (e) {\r\n\t\tif (!this._disabled && this._map._zoom > this._map.getMinZoom()) {\r\n\t\t\tthis._map.zoomOut(this._map.options.zoomDelta * (e.shiftKey ? 3 : 1));\r\n\t\t}\r\n\t},\r\n\r\n\t_createButton: function (html, title, className, container, fn) {\r\n\t\tvar link = L.DomUtil.create('a', className, container);\r\n\t\tlink.innerHTML = html;\r\n\t\tlink.href = '#';\r\n\t\tlink.title = title;\r\n\r\n\t\tL.DomEvent\r\n\t\t .on(link, 'mousedown dblclick', L.DomEvent.stopPropagation)\r\n\t\t .on(link, 'click', L.DomEvent.stop)\r\n\t\t .on(link, 'click', fn, this)\r\n\t\t .on(link, 'click', this._refocusOnMap, this);\r\n\r\n\t\treturn link;\r\n\t},\r\n\r\n\t_updateDisabled: function () {\r\n\t\tvar map = this._map,\r\n\t\t className = 'leaflet-disabled';\r\n\r\n\t\tL.DomUtil.removeClass(this._zoomInButton, className);\r\n\t\tL.DomUtil.removeClass(this._zoomOutButton, className);\r\n\r\n\t\tif (this._disabled || map._zoom === map.getMinZoom()) {\r\n\t\t\tL.DomUtil.addClass(this._zoomOutButton, className);\r\n\t\t}\r\n\t\tif (this._disabled || map._zoom === map.getMaxZoom()) {\r\n\t\t\tL.DomUtil.addClass(this._zoomInButton, className);\r\n\t\t}\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option zoomControl: Boolean = true\r\n// Whether a [zoom control](#control-zoom) is added to the map by default.\r\nL.Map.mergeOptions({\r\n\tzoomControl: true\r\n});\r\n\r\nL.Map.addInitHook(function () {\r\n\tif (this.options.zoomControl) {\r\n\t\tthis.zoomControl = new L.Control.Zoom();\r\n\t\tthis.addControl(this.zoomControl);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Zoom\r\n// @factory L.control.zoom(options: Control.Zoom options)\r\n// Creates a zoom control\r\nL.control.zoom = function (options) {\r\n\treturn new L.Control.Zoom(options);\r\n};\r\n","/*\r\n * @class Control.Attribution\r\n * @aka L.Control.Attribution\r\n * @inherits Control\r\n *\r\n * The attribution control allows you to display attribution data in a small text box on a map. It is put on the map by default unless you set its [`attributionControl` option](#map-attributioncontrol) to `false`, and it fetches attribution texts from layers with the [`getAttribution` method](#layer-getattribution) automatically. Extends Control.\r\n */\r\n\r\nL.Control.Attribution = L.Control.extend({\r\n\t// @section\r\n\t// @aka Control.Attribution options\r\n\toptions: {\r\n\t\tposition: 'bottomright',\r\n\r\n\t\t// @option prefix: String = 'Leaflet'\r\n\t\t// The HTML text shown before the attributions. Pass `false` to disable.\r\n\t\tprefix: '<a href=\"http://leafletjs.com\" title=\"A JS library for interactive maps\">Leaflet</a>'\r\n\t},\r\n\r\n\tinitialize: function (options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._attributions = {};\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tmap.attributionControl = this;\r\n\t\tthis._container = L.DomUtil.create('div', 'leaflet-control-attribution');\r\n\t\tif (L.DomEvent) {\r\n\t\t\tL.DomEvent.disableClickPropagation(this._container);\r\n\t\t}\r\n\r\n\t\t// TODO ugly, refactor\r\n\t\tfor (var i in map._layers) {\r\n\t\t\tif (map._layers[i].getAttribution) {\r\n\t\t\t\tthis.addAttribution(map._layers[i].getAttribution());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\t// @method setPrefix(prefix: String): this\r\n\t// Sets the text before the attributions.\r\n\tsetPrefix: function (prefix) {\r\n\t\tthis.options.prefix = prefix;\r\n\t\tthis._update();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method addAttribution(text: String): this\r\n\t// Adds an attribution text (e.g. `'Vector data © Mapbox'`).\r\n\taddAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (!this._attributions[text]) {\r\n\t\t\tthis._attributions[text] = 0;\r\n\t\t}\r\n\t\tthis._attributions[text]++;\r\n\r\n\t\tthis._update();\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method removeAttribution(text: String): this\r\n\t// Removes an attribution text.\r\n\tremoveAttribution: function (text) {\r\n\t\tif (!text) { return this; }\r\n\r\n\t\tif (this._attributions[text]) {\r\n\t\t\tthis._attributions[text]--;\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._map) { return; }\r\n\r\n\t\tvar attribs = [];\r\n\r\n\t\tfor (var i in this._attributions) {\r\n\t\t\tif (this._attributions[i]) {\r\n\t\t\t\tattribs.push(i);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar prefixAndAttribs = [];\r\n\r\n\t\tif (this.options.prefix) {\r\n\t\t\tprefixAndAttribs.push(this.options.prefix);\r\n\t\t}\r\n\t\tif (attribs.length) {\r\n\t\t\tprefixAndAttribs.push(attribs.join(', '));\r\n\t\t}\r\n\r\n\t\tthis._container.innerHTML = prefixAndAttribs.join(' | ');\r\n\t}\r\n});\r\n\r\n// @namespace Map\r\n// @section Control options\r\n// @option attributionControl: Boolean = true\r\n// Whether a [attribution control](#control-attribution) is added to the map by default.\r\nL.Map.mergeOptions({\r\n\tattributionControl: true\r\n});\r\n\r\nL.Map.addInitHook(function () {\r\n\tif (this.options.attributionControl) {\r\n\t\tnew L.Control.Attribution().addTo(this);\r\n\t}\r\n});\r\n\r\n// @namespace Control.Attribution\r\n// @factory L.control.attribution(options: Control.Attribution options)\r\n// Creates an attribution control.\r\nL.control.attribution = function (options) {\r\n\treturn new L.Control.Attribution(options);\r\n};\r\n","/*\n * @class Control.Scale\n * @aka L.Control.Scale\n * @inherits Control\n *\n * A simple scale control that shows the scale of the current center of screen in metric (m/km) and imperial (mi/ft) systems. Extends `Control`.\n *\n * @example\n *\n * ```js\n * L.control.scale().addTo(map);\n * ```\n */\n\nL.Control.Scale = L.Control.extend({\n\t// @section\n\t// @aka Control.Scale options\n\toptions: {\n\t\tposition: 'bottomleft',\n\n\t\t// @option maxWidth: Number = 100\n\t\t// Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).\n\t\tmaxWidth: 100,\n\n\t\t// @option metric: Boolean = True\n\t\t// Whether to show the metric scale line (m/km).\n\t\tmetric: true,\n\n\t\t// @option imperial: Boolean = True\n\t\t// Whether to show the imperial scale line (mi/ft).\n\t\timperial: true\n\n\t\t// @option updateWhenIdle: Boolean = false\n\t\t// If `true`, the control is updated on [`moveend`](#map-moveend), otherwise it's always up-to-date (updated on [`move`](#map-move)).\n\t},\n\n\tonAdd: function (map) {\n\t\tvar className = 'leaflet-control-scale',\n\t\t container = L.DomUtil.create('div', className),\n\t\t options = this.options;\n\n\t\tthis._addScales(options, className + '-line', container);\n\n\t\tmap.on(options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t\tmap.whenReady(this._update, this);\n\n\t\treturn container;\n\t},\n\n\tonRemove: function (map) {\n\t\tmap.off(this.options.updateWhenIdle ? 'moveend' : 'move', this._update, this);\n\t},\n\n\t_addScales: function (options, className, container) {\n\t\tif (options.metric) {\n\t\t\tthis._mScale = L.DomUtil.create('div', className, container);\n\t\t}\n\t\tif (options.imperial) {\n\t\t\tthis._iScale = L.DomUtil.create('div', className, container);\n\t\t}\n\t},\n\n\t_update: function () {\n\t\tvar map = this._map,\n\t\t y = map.getSize().y / 2;\n\n\t\tvar maxMeters = map.distance(\n\t\t\t\tmap.containerPointToLatLng([0, y]),\n\t\t\t\tmap.containerPointToLatLng([this.options.maxWidth, y]));\n\n\t\tthis._updateScales(maxMeters);\n\t},\n\n\t_updateScales: function (maxMeters) {\n\t\tif (this.options.metric && maxMeters) {\n\t\t\tthis._updateMetric(maxMeters);\n\t\t}\n\t\tif (this.options.imperial && maxMeters) {\n\t\t\tthis._updateImperial(maxMeters);\n\t\t}\n\t},\n\n\t_updateMetric: function (maxMeters) {\n\t\tvar meters = this._getRoundNum(maxMeters),\n\t\t label = meters < 1000 ? meters + ' m' : (meters / 1000) + ' km';\n\n\t\tthis._updateScale(this._mScale, label, meters / maxMeters);\n\t},\n\n\t_updateImperial: function (maxMeters) {\n\t\tvar maxFeet = maxMeters * 3.2808399,\n\t\t maxMiles, miles, feet;\n\n\t\tif (maxFeet > 5280) {\n\t\t\tmaxMiles = maxFeet / 5280;\n\t\t\tmiles = this._getRoundNum(maxMiles);\n\t\t\tthis._updateScale(this._iScale, miles + ' mi', miles / maxMiles);\n\n\t\t} else {\n\t\t\tfeet = this._getRoundNum(maxFeet);\n\t\t\tthis._updateScale(this._iScale, feet + ' ft', feet / maxFeet);\n\t\t}\n\t},\n\n\t_updateScale: function (scale, text, ratio) {\n\t\tscale.style.width = Math.round(this.options.maxWidth * ratio) + 'px';\n\t\tscale.innerHTML = text;\n\t},\n\n\t_getRoundNum: function (num) {\n\t\tvar pow10 = Math.pow(10, (Math.floor(num) + '').length - 1),\n\t\t d = num / pow10;\n\n\t\td = d >= 10 ? 10 :\n\t\t d >= 5 ? 5 :\n\t\t d >= 3 ? 3 :\n\t\t d >= 2 ? 2 : 1;\n\n\t\treturn pow10 * d;\n\t}\n});\n\n\n// @factory L.control.scale(options?: Control.Scale options)\n// Creates an scale control with the given options.\nL.control.scale = function (options) {\n\treturn new L.Control.Scale(options);\n};\n","/*\r\n * @class Control.Layers\r\n * @aka L.Control.Layers\r\n * @inherits Control\r\n *\r\n * The layers control gives users the ability to switch between different base layers and switch overlays on/off (check out the [detailed example](http://leafletjs.com/examples/layers-control.html)). Extends `Control`.\r\n *\r\n * @example\r\n *\r\n * ```js\r\n * var baseLayers = {\r\n * \t\"Mapbox\": mapbox,\r\n * \t\"OpenStreetMap\": osm\r\n * };\r\n *\r\n * var overlays = {\r\n * \t\"Marker\": marker,\r\n * \t\"Roads\": roadsLayer\r\n * };\r\n *\r\n * L.control.layers(baseLayers, overlays).addTo(map);\r\n * ```\r\n *\r\n * The `baseLayers` and `overlays` parameters are object literals with layer names as keys and `Layer` objects as values:\r\n *\r\n * ```js\r\n * {\r\n * \"<someName1>\": layer1,\r\n * \"<someName2>\": layer2\r\n * }\r\n * ```\r\n *\r\n * The layer names can contain HTML, which allows you to add additional styling to the items:\r\n *\r\n * ```js\r\n * {\"<img src='my-layer-icon' /> <span class='my-layer-item'>My Layer</span>\": myLayer}\r\n * ```\r\n */\r\n\r\n\r\nL.Control.Layers = L.Control.extend({\r\n\t// @section\r\n\t// @aka Control.Layers options\r\n\toptions: {\r\n\t\t// @option collapsed: Boolean = true\r\n\t\t// If `true`, the control will be collapsed into an icon and expanded on mouse hover or touch.\r\n\t\tcollapsed: true,\r\n\t\tposition: 'topright',\r\n\r\n\t\t// @option autoZIndex: Boolean = true\r\n\t\t// If `true`, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.\r\n\t\tautoZIndex: true,\r\n\r\n\t\t// @option hideSingleBase: Boolean = false\r\n\t\t// If `true`, the base layers in the control will be hidden when there is only one.\r\n\t\thideSingleBase: false\r\n\t},\r\n\r\n\tinitialize: function (baseLayers, overlays, options) {\r\n\t\tL.setOptions(this, options);\r\n\r\n\t\tthis._layers = [];\r\n\t\tthis._lastZIndex = 0;\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tfor (var i in baseLayers) {\r\n\t\t\tthis._addLayer(baseLayers[i], i);\r\n\t\t}\r\n\r\n\t\tfor (i in overlays) {\r\n\t\t\tthis._addLayer(overlays[i], i, true);\r\n\t\t}\r\n\t},\r\n\r\n\tonAdd: function (map) {\r\n\t\tthis._initLayout();\r\n\t\tthis._update();\r\n\r\n\t\tthis._map = map;\r\n\t\tmap.on('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\treturn this._container;\r\n\t},\r\n\r\n\tonRemove: function () {\r\n\t\tthis._map.off('zoomend', this._checkDisabledLayers, this);\r\n\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\t\t\tthis._layers[i].layer.off('add remove', this._onLayerChange, this);\r\n\t\t}\r\n\t},\r\n\r\n\t// @method addBaseLayer(layer: Layer, name: String): this\r\n\t// Adds a base layer (radio button entry) with the given name to the control.\r\n\taddBaseLayer: function (layer, name) {\r\n\t\tthis._addLayer(layer, name);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method addOverlay(layer: Layer, name: String): this\r\n\t// Adds an overlay (checkbox entry) with the given name to the control.\r\n\taddOverlay: function (layer, name) {\r\n\t\tthis._addLayer(layer, name, true);\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method removeLayer(layer: Layer): this\r\n\t// Remove the given layer from the control.\r\n\tremoveLayer: function (layer) {\r\n\t\tlayer.off('add remove', this._onLayerChange, this);\r\n\r\n\t\tvar obj = this._getLayer(L.stamp(layer));\r\n\t\tif (obj) {\r\n\t\t\tthis._layers.splice(this._layers.indexOf(obj), 1);\r\n\t\t}\r\n\t\treturn (this._map) ? this._update() : this;\r\n\t},\r\n\r\n\t// @method expand(): this\r\n\t// Expand the control container if collapsed.\r\n\texpand: function () {\r\n\t\tL.DomUtil.addClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\tthis._form.style.height = null;\r\n\t\tvar acceptableHeight = this._map.getSize().y - (this._container.offsetTop + 50);\r\n\t\tif (acceptableHeight < this._form.clientHeight) {\r\n\t\t\tL.DomUtil.addClass(this._form, 'leaflet-control-layers-scrollbar');\r\n\t\t\tthis._form.style.height = acceptableHeight + 'px';\r\n\t\t} else {\r\n\t\t\tL.DomUtil.removeClass(this._form, 'leaflet-control-layers-scrollbar');\r\n\t\t}\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method collapse(): this\r\n\t// Collapse the control container if expanded.\r\n\tcollapse: function () {\r\n\t\tL.DomUtil.removeClass(this._container, 'leaflet-control-layers-expanded');\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_initLayout: function () {\r\n\t\tvar className = 'leaflet-control-layers',\r\n\t\t container = this._container = L.DomUtil.create('div', className);\r\n\r\n\t\t// makes this work on IE touch devices by stopping it from firing a mouseout event when the touch is released\r\n\t\tcontainer.setAttribute('aria-haspopup', true);\r\n\r\n\t\tL.DomEvent.disableClickPropagation(container);\r\n\t\tif (!L.Browser.touch) {\r\n\t\t\tL.DomEvent.disableScrollPropagation(container);\r\n\t\t}\r\n\r\n\t\tvar form = this._form = L.DomUtil.create('form', className + '-list');\r\n\r\n\t\tif (this.options.collapsed) {\r\n\t\t\tif (!L.Browser.android) {\r\n\t\t\t\tL.DomEvent.on(container, {\r\n\t\t\t\t\tmouseenter: this.expand,\r\n\t\t\t\t\tmouseleave: this.collapse\r\n\t\t\t\t}, this);\r\n\t\t\t}\r\n\r\n\t\t\tvar link = this._layersLink = L.DomUtil.create('a', className + '-toggle', container);\r\n\t\t\tlink.href = '#';\r\n\t\t\tlink.title = 'Layers';\r\n\r\n\t\t\tif (L.Browser.touch) {\r\n\t\t\t\tL.DomEvent\r\n\t\t\t\t .on(link, 'click', L.DomEvent.stop)\r\n\t\t\t\t .on(link, 'click', this.expand, this);\r\n\t\t\t} else {\r\n\t\t\t\tL.DomEvent.on(link, 'focus', this.expand, this);\r\n\t\t\t}\r\n\r\n\t\t\t// work around for Firefox Android issue https://github.com/Leaflet/Leaflet/issues/2033\r\n\t\t\tL.DomEvent.on(form, 'click', function () {\r\n\t\t\t\tsetTimeout(L.bind(this._onInputClick, this), 0);\r\n\t\t\t}, this);\r\n\r\n\t\t\tthis._map.on('click', this.collapse, this);\r\n\t\t\t// TODO keyboard accessibility\r\n\t\t} else {\r\n\t\t\tthis.expand();\r\n\t\t}\r\n\r\n\t\tthis._baseLayersList = L.DomUtil.create('div', className + '-base', form);\r\n\t\tthis._separator = L.DomUtil.create('div', className + '-separator', form);\r\n\t\tthis._overlaysList = L.DomUtil.create('div', className + '-overlays', form);\r\n\r\n\t\tcontainer.appendChild(form);\r\n\t},\r\n\r\n\t_getLayer: function (id) {\r\n\t\tfor (var i = 0; i < this._layers.length; i++) {\r\n\r\n\t\t\tif (this._layers[i] && L.stamp(this._layers[i].layer) === id) {\r\n\t\t\t\treturn this._layers[i];\r\n\t\t\t}\r\n\t\t}\r\n\t},\r\n\r\n\t_addLayer: function (layer, name, overlay) {\r\n\t\tlayer.on('add remove', this._onLayerChange, this);\r\n\r\n\t\tthis._layers.push({\r\n\t\t\tlayer: layer,\r\n\t\t\tname: name,\r\n\t\t\toverlay: overlay\r\n\t\t});\r\n\r\n\t\tif (this.options.autoZIndex && layer.setZIndex) {\r\n\t\t\tthis._lastZIndex++;\r\n\t\t\tlayer.setZIndex(this._lastZIndex);\r\n\t\t}\r\n\t},\r\n\r\n\t_update: function () {\r\n\t\tif (!this._container) { return this; }\r\n\r\n\t\tL.DomUtil.empty(this._baseLayersList);\r\n\t\tL.DomUtil.empty(this._overlaysList);\r\n\r\n\t\tvar baseLayersPresent, overlaysPresent, i, obj, baseLayersCount = 0;\r\n\r\n\t\tfor (i = 0; i < this._layers.length; i++) {\r\n\t\t\tobj = this._layers[i];\r\n\t\t\tthis._addItem(obj);\r\n\t\t\toverlaysPresent = overlaysPresent || obj.overlay;\r\n\t\t\tbaseLayersPresent = baseLayersPresent || !obj.overlay;\r\n\t\t\tbaseLayersCount += !obj.overlay ? 1 : 0;\r\n\t\t}\r\n\r\n\t\t// Hide base layers section if there's only one layer.\r\n\t\tif (this.options.hideSingleBase) {\r\n\t\t\tbaseLayersPresent = baseLayersPresent && baseLayersCount > 1;\r\n\t\t\tthis._baseLayersList.style.display = baseLayersPresent ? '' : 'none';\r\n\t\t}\r\n\r\n\t\tthis._separator.style.display = overlaysPresent && baseLayersPresent ? '' : 'none';\r\n\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_onLayerChange: function (e) {\r\n\t\tif (!this._handlingClick) {\r\n\t\t\tthis._update();\r\n\t\t}\r\n\r\n\t\tvar obj = this._getLayer(L.stamp(e.target));\r\n\r\n\t\t// @namespace Map\r\n\t\t// @section Layer events\r\n\t\t// @event baselayerchange: LayersControlEvent\r\n\t\t// Fired when the base layer is changed through the [layer control](#control-layers).\r\n\t\t// @event overlayadd: LayersControlEvent\r\n\t\t// Fired when an overlay is selected through the [layer control](#control-layers).\r\n\t\t// @event overlayremove: LayersControlEvent\r\n\t\t// Fired when an overlay is deselected through the [layer control](#control-layers).\r\n\t\t// @namespace Control.Layers\r\n\t\tvar type = obj.overlay ?\r\n\t\t\t(e.type === 'add' ? 'overlayadd' : 'overlayremove') :\r\n\t\t\t(e.type === 'add' ? 'baselayerchange' : null);\r\n\r\n\t\tif (type) {\r\n\t\t\tthis._map.fire(type, obj);\r\n\t\t}\r\n\t},\r\n\r\n\t// IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe)\r\n\t_createRadioElement: function (name, checked) {\r\n\r\n\t\tvar radioHtml = '<input type=\"radio\" class=\"leaflet-control-layers-selector\" name=\"' +\r\n\t\t\t\tname + '\"' + (checked ? ' checked=\"checked\"' : '') + '/>';\r\n\r\n\t\tvar radioFragment = document.createElement('div');\r\n\t\tradioFragment.innerHTML = radioHtml;\r\n\r\n\t\treturn radioFragment.firstChild;\r\n\t},\r\n\r\n\t_addItem: function (obj) {\r\n\t\tvar label = document.createElement('label'),\r\n\t\t checked = this._map.hasLayer(obj.layer),\r\n\t\t input;\r\n\r\n\t\tif (obj.overlay) {\r\n\t\t\tinput = document.createElement('input');\r\n\t\t\tinput.type = 'checkbox';\r\n\t\t\tinput.className = 'leaflet-control-layers-selector';\r\n\t\t\tinput.defaultChecked = checked;\r\n\t\t} else {\r\n\t\t\tinput = this._createRadioElement('leaflet-base-layers', checked);\r\n\t\t}\r\n\r\n\t\tinput.layerId = L.stamp(obj.layer);\r\n\r\n\t\tL.DomEvent.on(input, 'click', this._onInputClick, this);\r\n\r\n\t\tvar name = document.createElement('span');\r\n\t\tname.innerHTML = ' ' + obj.name;\r\n\r\n\t\t// Helps from preventing layer control flicker when checkboxes are disabled\r\n\t\t// https://github.com/Leaflet/Leaflet/issues/2771\r\n\t\tvar holder = document.createElement('div');\r\n\r\n\t\tlabel.appendChild(holder);\r\n\t\tholder.appendChild(input);\r\n\t\tholder.appendChild(name);\r\n\r\n\t\tvar container = obj.overlay ? this._overlaysList : this._baseLayersList;\r\n\t\tcontainer.appendChild(label);\r\n\r\n\t\tthis._checkDisabledLayers();\r\n\t\treturn label;\r\n\t},\r\n\r\n\t_onInputClick: function () {\r\n\t\tvar inputs = this._form.getElementsByTagName('input'),\r\n\t\t input, layer, hasLayer;\r\n\t\tvar addedLayers = [],\r\n\t\t removedLayers = [];\r\n\r\n\t\tthis._handlingClick = true;\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\t\t\thasLayer = this._map.hasLayer(layer);\r\n\r\n\t\t\tif (input.checked && !hasLayer) {\r\n\t\t\t\taddedLayers.push(layer);\r\n\r\n\t\t\t} else if (!input.checked && hasLayer) {\r\n\t\t\t\tremovedLayers.push(layer);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Bugfix issue 2318: Should remove all old layers before readding new ones\r\n\t\tfor (i = 0; i < removedLayers.length; i++) {\r\n\t\t\tthis._map.removeLayer(removedLayers[i]);\r\n\t\t}\r\n\t\tfor (i = 0; i < addedLayers.length; i++) {\r\n\t\t\tthis._map.addLayer(addedLayers[i]);\r\n\t\t}\r\n\r\n\t\tthis._handlingClick = false;\r\n\r\n\t\tthis._refocusOnMap();\r\n\t},\r\n\r\n\t_checkDisabledLayers: function () {\r\n\t\tvar inputs = this._form.getElementsByTagName('input'),\r\n\t\t input,\r\n\t\t layer,\r\n\t\t zoom = this._map.getZoom();\r\n\r\n\t\tfor (var i = inputs.length - 1; i >= 0; i--) {\r\n\t\t\tinput = inputs[i];\r\n\t\t\tlayer = this._getLayer(input.layerId).layer;\r\n\t\t\tinput.disabled = (layer.options.minZoom !== undefined && zoom < layer.options.minZoom) ||\r\n\t\t\t (layer.options.maxZoom !== undefined && zoom > layer.options.maxZoom);\r\n\r\n\t\t}\r\n\t},\r\n\r\n\t_expand: function () {\r\n\t\t// Backward compatibility, remove me in 1.1.\r\n\t\treturn this.expand();\r\n\t},\r\n\r\n\t_collapse: function () {\r\n\t\t// Backward compatibility, remove me in 1.1.\r\n\t\treturn this.collapse();\r\n\t}\r\n\r\n});\r\n\r\n\r\n// @factory L.control.layers(baselayers?: Object, overlays?: Object, options?: Control.Layers options)\r\n// Creates an attribution control with the given layers. Base layers will be switched with radio buttons, while overlays will be switched with checkboxes. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation.\r\nL.control.layers = function (baseLayers, overlays, options) {\r\n\treturn new L.Control.Layers(baseLayers, overlays, options);\r\n};\r\n","/*\n * @class PosAnimation\n * @aka L.PosAnimation\n * @inherits Evented\n * Used internally for panning animations, utilizing CSS3 Transitions for modern browsers and a timer fallback for IE6-9.\n *\n * @example\n * ```js\n * var fx = new L.PosAnimation();\n * fx.run(el, [300, 500], 0.5);\n * ```\n *\n * @constructor L.PosAnimation()\n * Creates a `PosAnimation` object.\n *\n */\n\nL.PosAnimation = L.Evented.extend({\n\n\t// @method run(el: HTMLElement, newPos: Point, duration?: Number, easeLinearity?: Number)\n\t// Run an animation of a given element to a new position, optionally setting\n\t// duration in seconds (`0.25` by default) and easing linearity factor (3rd\n\t// argument of the [cubic bezier curve](http://cubic-bezier.com/#0,0,.5,1),\n\t// `0.5` by default).\n\trun: function (el, newPos, duration, easeLinearity) {\n\t\tthis.stop();\n\n\t\tthis._el = el;\n\t\tthis._inProgress = true;\n\t\tthis._duration = duration || 0.25;\n\t\tthis._easeOutPower = 1 / Math.max(easeLinearity || 0.5, 0.2);\n\n\t\tthis._startPos = L.DomUtil.getPosition(el);\n\t\tthis._offset = newPos.subtract(this._startPos);\n\t\tthis._startTime = +new Date();\n\n\t\t// @event start: Event\n\t\t// Fired when the animation starts\n\t\tthis.fire('start');\n\n\t\tthis._animate();\n\t},\n\n\t// @method stop()\n\t// Stops the animation (if currently running).\n\tstop: function () {\n\t\tif (!this._inProgress) { return; }\n\n\t\tthis._step(true);\n\t\tthis._complete();\n\t},\n\n\t_animate: function () {\n\t\t// animation loop\n\t\tthis._animId = L.Util.requestAnimFrame(this._animate, this);\n\t\tthis._step();\n\t},\n\n\t_step: function (round) {\n\t\tvar elapsed = (+new Date()) - this._startTime,\n\t\t duration = this._duration * 1000;\n\n\t\tif (elapsed < duration) {\n\t\t\tthis._runFrame(this._easeOut(elapsed / duration), round);\n\t\t} else {\n\t\t\tthis._runFrame(1);\n\t\t\tthis._complete();\n\t\t}\n\t},\n\n\t_runFrame: function (progress, round) {\n\t\tvar pos = this._startPos.add(this._offset.multiplyBy(progress));\n\t\tif (round) {\n\t\t\tpos._round();\n\t\t}\n\t\tL.DomUtil.setPosition(this._el, pos);\n\n\t\t// @event step: Event\n\t\t// Fired continuously during the animation.\n\t\tthis.fire('step');\n\t},\n\n\t_complete: function () {\n\t\tL.Util.cancelAnimFrame(this._animId);\n\n\t\tthis._inProgress = false;\n\t\t// @event end: Event\n\t\t// Fired when the animation ends.\n\t\tthis.fire('end');\n\t},\n\n\t_easeOut: function (t) {\n\t\treturn 1 - Math.pow(1 - t, this._easeOutPower);\n\t}\n});\n","/*\n * Extends L.Map to handle panning animations.\n */\n\nL.Map.include({\n\n\tsetView: function (center, zoom, options) {\n\n\t\tzoom = zoom === undefined ? this._zoom : this._limitZoom(zoom);\n\t\tcenter = this._limitCenter(L.latLng(center), zoom, this.options.maxBounds);\n\t\toptions = options || {};\n\n\t\tthis._stop();\n\n\t\tif (this._loaded && !options.reset && options !== true) {\n\n\t\t\tif (options.animate !== undefined) {\n\t\t\t\toptions.zoom = L.extend({animate: options.animate}, options.zoom);\n\t\t\t\toptions.pan = L.extend({animate: options.animate, duration: options.duration}, options.pan);\n\t\t\t}\n\n\t\t\t// try animating pan or zoom\n\t\t\tvar moved = (this._zoom !== zoom) ?\n\t\t\t\tthis._tryAnimatedZoom && this._tryAnimatedZoom(center, zoom, options.zoom) :\n\t\t\t\tthis._tryAnimatedPan(center, options.pan);\n\n\t\t\tif (moved) {\n\t\t\t\t// prevent resize handler call, the view will refresh after animation anyway\n\t\t\t\tclearTimeout(this._sizeTimer);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}\n\n\t\t// animation didn't start, just reset the map view\n\t\tthis._resetView(center, zoom);\n\n\t\treturn this;\n\t},\n\n\tpanBy: function (offset, options) {\n\t\toffset = L.point(offset).round();\n\t\toptions = options || {};\n\n\t\tif (!offset.x && !offset.y) {\n\t\t\treturn this.fire('moveend');\n\t\t}\n\t\t// If we pan too far, Chrome gets issues with tiles\n\t\t// and makes them disappear or appear in the wrong place (slightly offset) #2602\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) {\n\t\t\tthis._resetView(this.unproject(this.project(this.getCenter()).add(offset)), this.getZoom());\n\t\t\treturn this;\n\t\t}\n\n\t\tif (!this._panAnim) {\n\t\t\tthis._panAnim = new L.PosAnimation();\n\n\t\t\tthis._panAnim.on({\n\t\t\t\t'step': this._onPanTransitionStep,\n\t\t\t\t'end': this._onPanTransitionEnd\n\t\t\t}, this);\n\t\t}\n\n\t\t// don't fire movestart if animating inertia\n\t\tif (!options.noMoveStart) {\n\t\t\tthis.fire('movestart');\n\t\t}\n\n\t\t// animate pan unless animate: false specified\n\t\tif (options.animate !== false) {\n\t\t\tL.DomUtil.addClass(this._mapPane, 'leaflet-pan-anim');\n\n\t\t\tvar newPos = this._getMapPanePos().subtract(offset).round();\n\t\t\tthis._panAnim.run(this._mapPane, newPos, options.duration || 0.25, options.easeLinearity);\n\t\t} else {\n\t\t\tthis._rawPanBy(offset);\n\t\t\tthis.fire('move').fire('moveend');\n\t\t}\n\n\t\treturn this;\n\t},\n\n\t_onPanTransitionStep: function () {\n\t\tthis.fire('move');\n\t},\n\n\t_onPanTransitionEnd: function () {\n\t\tL.DomUtil.removeClass(this._mapPane, 'leaflet-pan-anim');\n\t\tthis.fire('moveend');\n\t},\n\n\t_tryAnimatedPan: function (center, options) {\n\t\t// difference between the new and current centers in pixels\n\t\tvar offset = this._getCenterOffset(center)._floor();\n\n\t\t// don't animate too far unless animate: true specified in options\n\t\tif ((options && options.animate) !== true && !this.getSize().contains(offset)) { return false; }\n\n\t\tthis.panBy(offset, options);\n\n\t\treturn true;\n\t}\n});\n","/*\n * Extends L.Map to handle zoom animations.\n */\n\n// @namespace Map\n// @section Animation Options\nL.Map.mergeOptions({\n\t// @option zoomAnimation: Boolean = true\n\t// Whether the map zoom animation is enabled. By default it's enabled\n\t// in all browsers that support CSS3 Transitions except Android.\n\tzoomAnimation: true,\n\n\t// @option zoomAnimationThreshold: Number = 4\n\t// Won't animate zoom if the zoom difference exceeds this value.\n\tzoomAnimationThreshold: 4\n});\n\nvar zoomAnimated = L.DomUtil.TRANSITION && L.Browser.any3d && !L.Browser.mobileOpera;\n\nif (zoomAnimated) {\n\n\tL.Map.addInitHook(function () {\n\t\t// don't animate on browsers without hardware-accelerated transitions or old Android/Opera\n\t\tthis._zoomAnimated = this.options.zoomAnimation;\n\n\t\t// zoom transitions run with the same duration for all layers, so if one of transitionend events\n\t\t// happens after starting zoom animation (propagating to the map pane), we know that it ended globally\n\t\tif (this._zoomAnimated) {\n\n\t\t\tthis._createAnimProxy();\n\n\t\t\tL.DomEvent.on(this._proxy, L.DomUtil.TRANSITION_END, this._catchTransitionEnd, this);\n\t\t}\n\t});\n}\n\nL.Map.include(!zoomAnimated ? {} : {\n\n\t_createAnimProxy: function () {\n\n\t\tvar proxy = this._proxy = L.DomUtil.create('div', 'leaflet-proxy leaflet-zoom-animated');\n\t\tthis._panes.mapPane.appendChild(proxy);\n\n\t\tthis.on('zoomanim', function (e) {\n\t\t\tvar prop = L.DomUtil.TRANSFORM,\n\t\t\t transform = proxy.style[prop];\n\n\t\t\tL.DomUtil.setTransform(proxy, this.project(e.center, e.zoom), this.getZoomScale(e.zoom, 1));\n\n\t\t\t// workaround for case when transform is the same and so transitionend event is not fired\n\t\t\tif (transform === proxy.style[prop] && this._animatingZoom) {\n\t\t\t\tthis._onZoomTransitionEnd();\n\t\t\t}\n\t\t}, this);\n\n\t\tthis.on('load moveend', function () {\n\t\t\tvar c = this.getCenter(),\n\t\t\t z = this.getZoom();\n\t\t\tL.DomUtil.setTransform(proxy, this.project(c, z), this.getZoomScale(z, 1));\n\t\t}, this);\n\t},\n\n\t_catchTransitionEnd: function (e) {\n\t\tif (this._animatingZoom && e.propertyName.indexOf('transform') >= 0) {\n\t\t\tthis._onZoomTransitionEnd();\n\t\t}\n\t},\n\n\t_nothingToAnimate: function () {\n\t\treturn !this._container.getElementsByClassName('leaflet-zoom-animated').length;\n\t},\n\n\t_tryAnimatedZoom: function (center, zoom, options) {\n\n\t\tif (this._animatingZoom) { return true; }\n\n\t\toptions = options || {};\n\n\t\t// don't animate if disabled, not supported or zoom difference is too large\n\t\tif (!this._zoomAnimated || options.animate === false || this._nothingToAnimate() ||\n\t\t Math.abs(zoom - this._zoom) > this.options.zoomAnimationThreshold) { return false; }\n\n\t\t// offset is the pixel coords of the zoom origin relative to the current center\n\t\tvar scale = this.getZoomScale(zoom),\n\t\t offset = this._getCenterOffset(center)._divideBy(1 - 1 / scale);\n\n\t\t// don't animate if the zoom origin isn't within one screen from the current center, unless forced\n\t\tif (options.animate !== true && !this.getSize().contains(offset)) { return false; }\n\n\t\tL.Util.requestAnimFrame(function () {\n\t\t\tthis\n\t\t\t ._moveStart(true)\n\t\t\t ._animateZoom(center, zoom, true);\n\t\t}, this);\n\n\t\treturn true;\n\t},\n\n\t_animateZoom: function (center, zoom, startAnim, noUpdate) {\n\t\tif (startAnim) {\n\t\t\tthis._animatingZoom = true;\n\n\t\t\t// remember what center/zoom to set after animation\n\t\t\tthis._animateToCenter = center;\n\t\t\tthis._animateToZoom = zoom;\n\n\t\t\tL.DomUtil.addClass(this._mapPane, 'leaflet-zoom-anim');\n\t\t}\n\n\t\t// @event zoomanim: ZoomAnimEvent\n\t\t// Fired on every frame of a zoom animation\n\t\tthis.fire('zoomanim', {\n\t\t\tcenter: center,\n\t\t\tzoom: zoom,\n\t\t\tnoUpdate: noUpdate\n\t\t});\n\n\t\t// Work around webkit not firing 'transitionend', see https://github.com/Leaflet/Leaflet/issues/3689, 2693\n\t\tsetTimeout(L.bind(this._onZoomTransitionEnd, this), 250);\n\t},\n\n\t_onZoomTransitionEnd: function () {\n\t\tif (!this._animatingZoom) { return; }\n\n\t\tL.DomUtil.removeClass(this._mapPane, 'leaflet-zoom-anim');\n\n\t\tthis._animatingZoom = false;\n\n\t\tthis._move(this._animateToCenter, this._animateToZoom);\n\n\t\t// This anim frame should prevent an obscure iOS webkit tile loading race condition.\n\t\tL.Util.requestAnimFrame(function () {\n\t\t\tthis._moveEnd(true);\n\t\t}, this);\n\t}\n});\n","// @namespace Map\n// @section Methods for modifying map state\nL.Map.include({\n\n\t// @method flyTo(latlng: LatLng, zoom?: Number, options?: Zoom/pan options): this\n\t// Sets the view of the map (geographical center and zoom) performing a smooth\n\t// pan-zoom animation.\n\tflyTo: function (targetCenter, targetZoom, options) {\n\n\t\toptions = options || {};\n\t\tif (options.animate === false || !L.Browser.any3d) {\n\t\t\treturn this.setView(targetCenter, targetZoom, options);\n\t\t}\n\n\t\tthis._stop();\n\n\t\tvar from = this.project(this.getCenter()),\n\t\t to = this.project(targetCenter),\n\t\t size = this.getSize(),\n\t\t startZoom = this._zoom;\n\n\t\ttargetCenter = L.latLng(targetCenter);\n\t\ttargetZoom = targetZoom === undefined ? startZoom : targetZoom;\n\n\t\tvar w0 = Math.max(size.x, size.y),\n\t\t w1 = w0 * this.getZoomScale(startZoom, targetZoom),\n\t\t u1 = (to.distanceTo(from)) || 1,\n\t\t rho = 1.42,\n\t\t rho2 = rho * rho;\n\n\t\tfunction r(i) {\n\t\t\tvar s1 = i ? -1 : 1,\n\t\t\t s2 = i ? w1 : w0,\n\t\t\t t1 = w1 * w1 - w0 * w0 + s1 * rho2 * rho2 * u1 * u1,\n\t\t\t b1 = 2 * s2 * rho2 * u1,\n\t\t\t b = t1 / b1,\n\t\t\t sq = Math.sqrt(b * b + 1) - b;\n\n\t\t\t // workaround for floating point precision bug when sq = 0, log = -Infinite,\n\t\t\t // thus triggering an infinite loop in flyTo\n\t\t\t var log = sq < 0.000000001 ? -18 : Math.log(sq);\n\n\t\t\treturn log;\n\t\t}\n\n\t\tfunction sinh(n) { return (Math.exp(n) - Math.exp(-n)) / 2; }\n\t\tfunction cosh(n) { return (Math.exp(n) + Math.exp(-n)) / 2; }\n\t\tfunction tanh(n) { return sinh(n) / cosh(n); }\n\n\t\tvar r0 = r(0);\n\n\t\tfunction w(s) { return w0 * (cosh(r0) / cosh(r0 + rho * s)); }\n\t\tfunction u(s) { return w0 * (cosh(r0) * tanh(r0 + rho * s) - sinh(r0)) / rho2; }\n\n\t\tfunction easeOut(t) { return 1 - Math.pow(1 - t, 1.5); }\n\n\t\tvar start = Date.now(),\n\t\t S = (r(1) - r0) / rho,\n\t\t duration = options.duration ? 1000 * options.duration : 1000 * S * 0.8;\n\n\t\tfunction frame() {\n\t\t\tvar t = (Date.now() - start) / duration,\n\t\t\t s = easeOut(t) * S;\n\n\t\t\tif (t <= 1) {\n\t\t\t\tthis._flyToFrame = L.Util.requestAnimFrame(frame, this);\n\n\t\t\t\tthis._move(\n\t\t\t\t\tthis.unproject(from.add(to.subtract(from).multiplyBy(u(s) / u1)), startZoom),\n\t\t\t\t\tthis.getScaleZoom(w0 / w(s), startZoom),\n\t\t\t\t\t{flyTo: true});\n\n\t\t\t} else {\n\t\t\t\tthis\n\t\t\t\t\t._move(targetCenter, targetZoom)\n\t\t\t\t\t._moveEnd(true);\n\t\t\t}\n\t\t}\n\n\t\tthis._moveStart(true);\n\n\t\tframe.call(this);\n\t\treturn this;\n\t},\n\n\t// @method flyToBounds(bounds: LatLngBounds, options?: fitBounds options): this\n\t// Sets the view of the map with a smooth animation like [`flyTo`](#map-flyto),\n\t// but takes a bounds parameter like [`fitBounds`](#map-fitbounds).\n\tflyToBounds: function (bounds, options) {\n\t\tvar target = this._getBoundsCenterZoom(bounds, options);\n\t\treturn this.flyTo(target.center, target.zoom, options);\n\t}\n});\n","/*\r\n * Provides L.Map with convenient shortcuts for using browser geolocation features.\r\n */\r\n\r\n// @namespace Map\r\n\r\nL.Map.include({\r\n\t// @section Geolocation methods\r\n\t_defaultLocateOptions: {\r\n\t\ttimeout: 10000,\r\n\t\twatch: false\r\n\t\t// setView: false\r\n\t\t// maxZoom: <Number>\r\n\t\t// maximumAge: 0\r\n\t\t// enableHighAccuracy: false\r\n\t},\r\n\r\n\t// @method locate(options?: Locate options): this\r\n\t// Tries to locate the user using the Geolocation API, firing a [`locationfound`](#map-locationfound)\r\n\t// event with location data on success or a [`locationerror`](#map-locationerror) event on failure,\r\n\t// and optionally sets the map view to the user's location with respect to\r\n\t// detection accuracy (or to the world view if geolocation failed).\r\n\t// Note that, if your page doesn't use HTTPS, this method will fail in\r\n\t// modern browsers ([Chrome 50 and newer](https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins))\r\n\t// See `Locate options` for more details.\r\n\tlocate: function (options) {\r\n\r\n\t\toptions = this._locateOptions = L.extend({}, this._defaultLocateOptions, options);\r\n\r\n\t\tif (!('geolocation' in navigator)) {\r\n\t\t\tthis._handleGeolocationError({\r\n\t\t\t\tcode: 0,\r\n\t\t\t\tmessage: 'Geolocation not supported.'\r\n\t\t\t});\r\n\t\t\treturn this;\r\n\t\t}\r\n\r\n\t\tvar onResponse = L.bind(this._handleGeolocationResponse, this),\r\n\t\t onError = L.bind(this._handleGeolocationError, this);\r\n\r\n\t\tif (options.watch) {\r\n\t\t\tthis._locationWatchId =\r\n\t\t\t navigator.geolocation.watchPosition(onResponse, onError, options);\r\n\t\t} else {\r\n\t\t\tnavigator.geolocation.getCurrentPosition(onResponse, onError, options);\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t// @method stopLocate(): this\r\n\t// Stops watching location previously initiated by `map.locate({watch: true})`\r\n\t// and aborts resetting the map view if map.locate was called with\r\n\t// `{setView: true}`.\r\n\tstopLocate: function () {\r\n\t\tif (navigator.geolocation && navigator.geolocation.clearWatch) {\r\n\t\t\tnavigator.geolocation.clearWatch(this._locationWatchId);\r\n\t\t}\r\n\t\tif (this._locateOptions) {\r\n\t\t\tthis._locateOptions.setView = false;\r\n\t\t}\r\n\t\treturn this;\r\n\t},\r\n\r\n\t_handleGeolocationError: function (error) {\r\n\t\tvar c = error.code,\r\n\t\t message = error.message ||\r\n\t\t (c === 1 ? 'permission denied' :\r\n\t\t (c === 2 ? 'position unavailable' : 'timeout'));\r\n\r\n\t\tif (this._locateOptions.setView && !this._loaded) {\r\n\t\t\tthis.fitWorld();\r\n\t\t}\r\n\r\n\t\t// @section Location events\r\n\t\t// @event locationerror: ErrorEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method) failed.\r\n\t\tthis.fire('locationerror', {\r\n\t\t\tcode: c,\r\n\t\t\tmessage: 'Geolocation error: ' + message + '.'\r\n\t\t});\r\n\t},\r\n\r\n\t_handleGeolocationResponse: function (pos) {\r\n\t\tvar lat = pos.coords.latitude,\r\n\t\t lng = pos.coords.longitude,\r\n\t\t latlng = new L.LatLng(lat, lng),\r\n\t\t bounds = latlng.toBounds(pos.coords.accuracy),\r\n\t\t options = this._locateOptions;\r\n\r\n\t\tif (options.setView) {\r\n\t\t\tvar zoom = this.getBoundsZoom(bounds);\r\n\t\t\tthis.setView(latlng, options.maxZoom ? Math.min(zoom, options.maxZoom) : zoom);\r\n\t\t}\r\n\r\n\t\tvar data = {\r\n\t\t\tlatlng: latlng,\r\n\t\t\tbounds: bounds,\r\n\t\t\ttimestamp: pos.timestamp\r\n\t\t};\r\n\r\n\t\tfor (var i in pos.coords) {\r\n\t\t\tif (typeof pos.coords[i] === 'number') {\r\n\t\t\t\tdata[i] = pos.coords[i];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// @event locationfound: LocationEvent\r\n\t\t// Fired when geolocation (using the [`locate`](#map-locate) method)\r\n\t\t// went successfully.\r\n\t\tthis.fire('locationfound', data);\r\n\t}\r\n});\r\n"]} \ No newline at end of file diff --git a/public/libs/leaflet.css b/public/libs/leaflet.css new file mode 100644 index 0000000000000000000000000000000000000000..d1b47a1251c18df4c08b0b8c0b2c64522c90eab9 --- /dev/null +++ b/public/libs/leaflet.css @@ -0,0 +1,636 @@ +/* required styles */ + +.leaflet-pane, +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-tile-container, +.leaflet-pane > svg, +.leaflet-pane > canvas, +.leaflet-zoom-box, +.leaflet-image-layer, +.leaflet-layer { + position: absolute; + left: 0; + top: 0; + } +.leaflet-container { + overflow: hidden; + } +.leaflet-tile, +.leaflet-marker-icon, +.leaflet-marker-shadow { + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-user-drag: none; + } +/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ +.leaflet-safari .leaflet-tile { + image-rendering: -webkit-optimize-contrast; + } +/* hack that prevents hw layers "stretching" when loading new tiles */ +.leaflet-safari .leaflet-tile-container { + width: 1600px; + height: 1600px; + -webkit-transform-origin: 0 0; + } +.leaflet-marker-icon, +.leaflet-marker-shadow { + display: block; + } +/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ +/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ +.leaflet-container .leaflet-overlay-pane svg, +.leaflet-container .leaflet-marker-pane img, +.leaflet-container .leaflet-shadow-pane img, +.leaflet-container .leaflet-tile-pane img, +.leaflet-container img.leaflet-image-layer { + max-width: none !important; + max-height: none !important; + } + +.leaflet-container.leaflet-touch-zoom { + -ms-touch-action: pan-x pan-y; + touch-action: pan-x pan-y; + } +.leaflet-container.leaflet-touch-drag { + -ms-touch-action: pinch-zoom; + /* Fallback for FF which doesn't support pinch-zoom */ + touch-action: none; + touch-action: pinch-zoom; +} +.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { + -ms-touch-action: none; + touch-action: none; +} +.leaflet-container { + -webkit-tap-highlight-color: transparent; +} +.leaflet-container a { + -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); +} +.leaflet-tile { + filter: inherit; + visibility: hidden; + } +.leaflet-tile-loaded { + visibility: inherit; + } +.leaflet-zoom-box { + width: 0; + height: 0; + -moz-box-sizing: border-box; + box-sizing: border-box; + z-index: 800; + } +/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ +.leaflet-overlay-pane svg { + -moz-user-select: none; + } + +.leaflet-pane { z-index: 400; } + +.leaflet-tile-pane { z-index: 200; } +.leaflet-overlay-pane { z-index: 400; } +.leaflet-shadow-pane { z-index: 500; } +.leaflet-marker-pane { z-index: 600; } +.leaflet-tooltip-pane { z-index: 650; } +.leaflet-popup-pane { z-index: 700; } + +.leaflet-map-pane canvas { z-index: 100; } +.leaflet-map-pane svg { z-index: 200; } + +.leaflet-vml-shape { + width: 1px; + height: 1px; + } +.lvml { + behavior: url(#default#VML); + display: inline-block; + position: absolute; + } + + +/* control positioning */ + +.leaflet-control { + position: relative; + z-index: 800; + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } +.leaflet-top, +.leaflet-bottom { + position: absolute; + z-index: 1000; + pointer-events: none; + } +.leaflet-top { + top: 0; + } +.leaflet-right { + right: 0; + } +.leaflet-bottom { + bottom: 0; + } +.leaflet-left { + left: 0; + } +.leaflet-control { + float: left; + clear: both; + } +.leaflet-right .leaflet-control { + float: right; + } +.leaflet-top .leaflet-control { + margin-top: 10px; + } +.leaflet-bottom .leaflet-control { + margin-bottom: 10px; + } +.leaflet-left .leaflet-control { + margin-left: 10px; + } +.leaflet-right .leaflet-control { + margin-right: 10px; + } + + +/* zoom and fade animations */ + +.leaflet-fade-anim .leaflet-tile { + will-change: opacity; + } +.leaflet-fade-anim .leaflet-popup { + opacity: 0; + -webkit-transition: opacity 0.2s linear; + -moz-transition: opacity 0.2s linear; + -o-transition: opacity 0.2s linear; + transition: opacity 0.2s linear; + } +.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { + opacity: 1; + } +.leaflet-zoom-animated { + -webkit-transform-origin: 0 0; + -ms-transform-origin: 0 0; + transform-origin: 0 0; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + will-change: transform; + } +.leaflet-zoom-anim .leaflet-zoom-animated { + -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); + -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); + -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); + transition: transform 0.25s cubic-bezier(0,0,0.25,1); + } +.leaflet-zoom-anim .leaflet-tile, +.leaflet-pan-anim .leaflet-tile { + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; + } + +.leaflet-zoom-anim .leaflet-zoom-hide { + visibility: hidden; + } + + +/* cursors */ + +.leaflet-interactive { + cursor: pointer; + } +.leaflet-grab { + cursor: -webkit-grab; + cursor: -moz-grab; + } +.leaflet-crosshair, +.leaflet-crosshair .leaflet-interactive { + cursor: crosshair; + } +.leaflet-popup-pane, +.leaflet-control { + cursor: auto; + } +.leaflet-dragging .leaflet-grab, +.leaflet-dragging .leaflet-grab .leaflet-interactive, +.leaflet-dragging .leaflet-marker-draggable { + cursor: move; + cursor: -webkit-grabbing; + cursor: -moz-grabbing; + } + +/* marker & overlays interactivity */ +.leaflet-marker-icon, +.leaflet-marker-shadow, +.leaflet-image-layer, +.leaflet-pane > svg path, +.leaflet-tile-container { + pointer-events: none; + } + +.leaflet-marker-icon.leaflet-interactive, +.leaflet-image-layer.leaflet-interactive, +.leaflet-pane > svg path.leaflet-interactive { + pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ + pointer-events: auto; + } + +/* visual tweaks */ + +.leaflet-container { + background: #ddd; + outline: 0; + } +.leaflet-container a { + color: #0078A8; + } +.leaflet-container a.leaflet-active { + outline: 2px solid orange; + } +.leaflet-zoom-box { + border: 2px dotted #38f; + background: rgba(255,255,255,0.5); + } + + +/* general typography */ +.leaflet-container { + font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; + } + + +/* general toolbar styles */ + +.leaflet-bar { + box-shadow: 0 1px 5px rgba(0,0,0,0.65); + border-radius: 4px; + } +.leaflet-bar a, +.leaflet-bar a:hover { + background-color: #fff; + border-bottom: 1px solid #ccc; + width: 26px; + height: 26px; + line-height: 26px; + display: block; + text-align: center; + text-decoration: none; + color: black; + } +.leaflet-bar a, +.leaflet-control-layers-toggle { + background-position: 50% 50%; + background-repeat: no-repeat; + display: block; + } +.leaflet-bar a:hover { + background-color: #f4f4f4; + } +.leaflet-bar a:first-child { + border-top-left-radius: 4px; + border-top-right-radius: 4px; + } +.leaflet-bar a:last-child { + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-bottom: none; + } +.leaflet-bar a.leaflet-disabled { + cursor: default; + background-color: #f4f4f4; + color: #bbb; + } + +.leaflet-touch .leaflet-bar a { + width: 30px; + height: 30px; + line-height: 30px; + } +.leaflet-touch .leaflet-bar a:first-child { + border-top-left-radius: 2px; + border-top-right-radius: 2px; + } +.leaflet-touch .leaflet-bar a:last-child { + border-bottom-left-radius: 2px; + border-bottom-right-radius: 2px; + } + +/* zoom control */ + +.leaflet-control-zoom-in, +.leaflet-control-zoom-out { + font: bold 18px 'Lucida Console', Monaco, monospace; + text-indent: 1px; + } + +.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { + font-size: 22px; + } + + +/* layers control */ + +.leaflet-control-layers { + box-shadow: 0 1px 5px rgba(0,0,0,0.4); + background: #fff; + border-radius: 5px; + } +.leaflet-control-layers-toggle { + background-image: url(images/layers.png); + width: 36px; + height: 36px; + } +.leaflet-retina .leaflet-control-layers-toggle { + background-image: url(images/layers-2x.png); + background-size: 26px 26px; + } +.leaflet-touch .leaflet-control-layers-toggle { + width: 44px; + height: 44px; + } +.leaflet-control-layers .leaflet-control-layers-list, +.leaflet-control-layers-expanded .leaflet-control-layers-toggle { + display: none; + } +.leaflet-control-layers-expanded .leaflet-control-layers-list { + display: block; + position: relative; + } +.leaflet-control-layers-expanded { + padding: 6px 10px 6px 6px; + color: #333; + background: #fff; + } +.leaflet-control-layers-scrollbar { + overflow-y: scroll; + overflow-x: hidden; + padding-right: 5px; + } +.leaflet-control-layers-selector { + margin-top: 2px; + position: relative; + top: 1px; + } +.leaflet-control-layers label { + display: block; + } +.leaflet-control-layers-separator { + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; + } + +/* Default icon URLs */ +.leaflet-default-icon-path { + background-image: url(images/marker-icon.png); + } + + +/* attribution and scale controls */ + +.leaflet-container .leaflet-control-attribution { + background: #fff; + background: rgba(255, 255, 255, 0.7); + margin: 0; + } +.leaflet-control-attribution, +.leaflet-control-scale-line { + padding: 0 5px; + color: #333; + } +.leaflet-control-attribution a { + text-decoration: none; + } +.leaflet-control-attribution a:hover { + text-decoration: underline; + } +.leaflet-container .leaflet-control-attribution, +.leaflet-container .leaflet-control-scale { + font-size: 11px; + } +.leaflet-left .leaflet-control-scale { + margin-left: 5px; + } +.leaflet-bottom .leaflet-control-scale { + margin-bottom: 5px; + } +.leaflet-control-scale-line { + border: 2px solid #777; + border-top: none; + line-height: 1.1; + padding: 2px 5px 1px; + font-size: 11px; + white-space: nowrap; + overflow: hidden; + -moz-box-sizing: border-box; + box-sizing: border-box; + + background: #fff; + background: rgba(255, 255, 255, 0.5); + } +.leaflet-control-scale-line:not(:first-child) { + border-top: 2px solid #777; + border-bottom: none; + margin-top: -2px; + } +.leaflet-control-scale-line:not(:first-child):not(:last-child) { + border-bottom: 2px solid #777; + } + +.leaflet-touch .leaflet-control-attribution, +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + box-shadow: none; + } +.leaflet-touch .leaflet-control-layers, +.leaflet-touch .leaflet-bar { + border: 2px solid rgba(0,0,0,0.2); + background-clip: padding-box; + } + + +/* popup */ + +.leaflet-popup { + position: absolute; + text-align: center; + margin-bottom: 20px; + } +.leaflet-popup-content-wrapper { + padding: 1px; + text-align: left; + border-radius: 12px; + } +.leaflet-popup-content { + margin: 13px 19px; + line-height: 1.4; + } +.leaflet-popup-content p { + margin: 18px 0; + } +.leaflet-popup-tip-container { + width: 40px; + height: 20px; + position: absolute; + left: 50%; + margin-left: -20px; + overflow: hidden; + pointer-events: none; + } +.leaflet-popup-tip { + width: 17px; + height: 17px; + padding: 1px; + + margin: -10px auto 0; + + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -o-transform: rotate(45deg); + transform: rotate(45deg); + } +.leaflet-popup-content-wrapper, +.leaflet-popup-tip { + background: white; + color: #333; + box-shadow: 0 3px 14px rgba(0,0,0,0.4); + } +.leaflet-container a.leaflet-popup-close-button { + position: absolute; + top: 0; + right: 0; + padding: 4px 4px 0 0; + border: none; + text-align: center; + width: 18px; + height: 14px; + font: 16px/14px Tahoma, Verdana, sans-serif; + color: #c3c3c3; + text-decoration: none; + font-weight: bold; + background: transparent; + } +.leaflet-container a.leaflet-popup-close-button:hover { + color: #999; + } +.leaflet-popup-scrolled { + overflow: auto; + border-bottom: 1px solid #ddd; + border-top: 1px solid #ddd; + } + +.leaflet-oldie .leaflet-popup-content-wrapper { + zoom: 1; + } +.leaflet-oldie .leaflet-popup-tip { + width: 24px; + margin: 0 auto; + + -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; + filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); + } +.leaflet-oldie .leaflet-popup-tip-container { + margin-top: -1px; + } + +.leaflet-oldie .leaflet-control-zoom, +.leaflet-oldie .leaflet-control-layers, +.leaflet-oldie .leaflet-popup-content-wrapper, +.leaflet-oldie .leaflet-popup-tip { + border: 1px solid #999; + } + + +/* div icon */ + +.leaflet-div-icon { + background: #fff; + border: 1px solid #666; + } + + +/* Tooltip */ +/* Base styles for the element that has a tooltip */ +.leaflet-tooltip { + position: absolute; + padding: 6px; + background-color: #fff; + border: 1px solid #fff; + border-radius: 3px; + color: #222; + white-space: nowrap; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + pointer-events: none; + box-shadow: 0 1px 3px rgba(0,0,0,0.4); + } +.leaflet-tooltip.leaflet-clickable { + cursor: pointer; + pointer-events: auto; + } +.leaflet-tooltip-top:before, +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + position: absolute; + pointer-events: none; + border: 6px solid transparent; + background: transparent; + content: ""; + } + +/* Directions */ + +.leaflet-tooltip-bottom { + margin-top: 6px; +} +.leaflet-tooltip-top { + margin-top: -6px; +} +.leaflet-tooltip-bottom:before, +.leaflet-tooltip-top:before { + left: 50%; + margin-left: -6px; + } +.leaflet-tooltip-top:before { + bottom: 0; + margin-bottom: -12px; + border-top-color: #fff; + } +.leaflet-tooltip-bottom:before { + top: 0; + margin-top: -12px; + margin-left: -6px; + border-bottom-color: #fff; + } +.leaflet-tooltip-left { + margin-left: -6px; +} +.leaflet-tooltip-right { + margin-left: 6px; +} +.leaflet-tooltip-left:before, +.leaflet-tooltip-right:before { + top: 50%; + margin-top: -6px; + } +.leaflet-tooltip-left:before { + right: 0; + margin-right: -12px; + border-left-color: #fff; + } +.leaflet-tooltip-right:before { + left: 0; + margin-left: -12px; + border-right-color: #fff; + } diff --git a/public/libs/leaflet.geometryutil.js b/public/libs/leaflet.geometryutil.js new file mode 100644 index 0000000000000000000000000000000000000000..0d6295416355e70e20d95ecc3e75705e0d3a60bf --- /dev/null +++ b/public/libs/leaflet.geometryutil.js @@ -0,0 +1,682 @@ +// Packaging/modules magic dance. +(function (factory) { + var L; + if (typeof define === 'function' && define.amd) { + // AMD + define(['leaflet'], factory); + } else if (typeof module !== 'undefined') { + // Node/CommonJS + L = require('leaflet'); + module.exports = factory(L); + } else { + // Browser globals + if (typeof window.L === 'undefined') + throw 'Leaflet must be loaded first'; + factory(window.L); + } +}(function (L) { +"use strict"; + +/** + * @fileOverview Leaflet Geometry utilities for distances and linear referencing. + * @name L.GeometryUtil + */ + +L.GeometryUtil = L.extend(L.GeometryUtil || {}, { + + /** + Shortcut function for planar distance between two {L.LatLng} at current zoom. + + @tutorial distance-length + + @param {L.Map} map Leaflet map to be used for this method + @param {L.LatLng} latlngA geographical point A + @param {L.LatLng} latlngB geographical point B + @returns {Number} planar distance + */ + distance: function (map, latlngA, latlngB) { + return map.latLngToLayerPoint(latlngA).distanceTo(map.latLngToLayerPoint(latlngB)); + }, + + /** + Shortcut function for planar distance between a {L.LatLng} and a segment (A-B). + @param {L.Map} map Leaflet map to be used for this method + @param {L.LatLng} latlng - The position to search + @param {L.LatLng} latlngA geographical point A of the segment + @param {L.LatLng} latlngB geographical point B of the segment + @returns {Number} planar distance + */ + distanceSegment: function (map, latlng, latlngA, latlngB) { + var p = map.latLngToLayerPoint(latlng), + p1 = map.latLngToLayerPoint(latlngA), + p2 = map.latLngToLayerPoint(latlngB); + return L.LineUtil.pointToSegmentDistance(p, p1, p2); + }, + + /** + Shortcut function for converting distance to readable distance. + @param {Number} distance distance to be converted + @param {String} unit 'metric' or 'imperial' + @returns {String} in yard or miles + */ + readableDistance: function (distance, unit) { + var isMetric = (unit !== 'imperial'), + distanceStr; + if (isMetric) { + // show metres when distance is < 1km, then show km + if (distance > 1000) { + distanceStr = (distance / 1000).toFixed(2) + ' km'; + } + else { + distanceStr = Math.ceil(distance) + ' m'; + } + } + else { + distance *= 1.09361; + if (distance > 1760) { + distanceStr = (distance / 1760).toFixed(2) + ' miles'; + } + else { + distanceStr = Math.ceil(distance) + ' yd'; + } + } + return distanceStr; + }, + + /** + Returns true if the latlng belongs to segment A-B + @param {L.LatLng} latlng - The position to search + @param {L.LatLng} latlngA geographical point A of the segment + @param {L.LatLng} latlngB geographical point B of the segment + @param {?Number} [tolerance=0.2] tolerance to accept if latlng belongs really + @returns {boolean} + */ + belongsSegment: function(latlng, latlngA, latlngB, tolerance) { + tolerance = tolerance === undefined ? 0.2 : tolerance; + var hypotenuse = latlngA.distanceTo(latlngB), + delta = latlngA.distanceTo(latlng) + latlng.distanceTo(latlngB) - hypotenuse; + return delta/hypotenuse < tolerance; + }, + + /** + * Returns total length of line + * @tutorial distance-length + * + * @param {L.Polyline|Array<L.Point>|Array<L.LatLng>} coords Set of coordinates + * @returns {Number} Total length (pixels for Point, meters for LatLng) + */ + length: function (coords) { + var accumulated = L.GeometryUtil.accumulatedLengths(coords); + return accumulated.length > 0 ? accumulated[accumulated.length-1] : 0; + }, + + /** + * Returns a list of accumulated length along a line. + * @param {L.Polyline|Array<L.Point>|Array<L.LatLng>} coords Set of coordinates + * @returns {Array<Number>} Array of accumulated lengths (pixels for Point, meters for LatLng) + */ + accumulatedLengths: function (coords) { + if (typeof coords.getLatLngs == 'function') { + coords = coords.getLatLngs(); + } + if (coords.length === 0) + return []; + var total = 0, + lengths = [0]; + for (var i = 0, n = coords.length - 1; i< n; i++) { + total += coords[i].distanceTo(coords[i+1]); + lengths.push(total); + } + return lengths; + }, + + /** + Returns the closest point of a {L.LatLng} on the segment (A-B) + + @tutorial closest + + @param {L.Map} map Leaflet map to be used for this method + @param {L.LatLng} latlng - The position to search + @param {L.LatLng} latlngA geographical point A of the segment + @param {L.LatLng} latlngB geographical point B of the segment + @returns {L.LatLng} Closest geographical point + */ + closestOnSegment: function (map, latlng, latlngA, latlngB) { + var maxzoom = map.getMaxZoom(); + if (maxzoom === Infinity) + maxzoom = map.getZoom(); + var p = map.project(latlng, maxzoom), + p1 = map.project(latlngA, maxzoom), + p2 = map.project(latlngB, maxzoom), + closest = L.LineUtil.closestPointOnSegment(p, p1, p2); + return map.unproject(closest, maxzoom); + }, + + /** + Returns the closest latlng on layer. + + Accept nested arrays + + @tutorial closest + + @param {L.Map} map Leaflet map to be used for this method + @param {Array<L.LatLng>|Array<Array<L.LatLng>>|L.PolyLine|L.Polygon} layer - Layer that contains the result + @param {L.LatLng} latlng - The position to search + @param {?boolean} [vertices=false] - Whether to restrict to path vertices. + @returns {L.LatLng} Closest geographical point or null if layer param is incorrect + */ + closest: function (map, layer, latlng, vertices) { + + var latlngs, + mindist = Infinity, + result = null, + i, n, distance; + + if (layer instanceof Array) { + // if layer is Array<Array<T>> + if (layer[0] instanceof Array && typeof layer[0][0] !== 'number') { + // if we have nested arrays, we calc the closest for each array + // recursive + for (var i = 0; i < layer.length; i++) { + var subResult = L.GeometryUtil.closest(map, layer[i], latlng, vertices); + if (subResult.distance < mindist) { + mindist = subResult.distance; + result = subResult; + } + } + return result; + } else if (layer[0] instanceof L.LatLng || typeof layer[0][0] === 'number') { // we could have a latlng as [x,y] with x & y numbers + layer = L.polyline(layer); + } else { + return result; + } + } + + // if we don't have here a Polyline, that means layer is incorrect + // see https://github.com/makinacorpus/Leaflet.GeometryUtil/issues/23 + if (! ( layer instanceof L.Polyline ) ) + return result; + + /** + * Flat an array upon a predicate, saying if we have to dig digger or not + * Specific use for Polygon, Polyline, MultiPolyline (0.7.7) + * Leaflet 1.0 change the structure of Polyline (could be MultiPolyline > nested arrays), idem for Polygon + */ + function flattenArray(array, predicate, result) { + + var index = -1, + length = array.length; + + predicate || ( predicate = function(v) { return true } ); + result || ( result = []); + + if (predicate(array)) { + while (++index < length) { + var value = array[index]; + if (predicate(value)) { + flattenArray(value, predicate, result); + } else { + result.push(value); + } + } + } else { + result.push(array); + } + + return result; + + } + + latlngs = flattenArray(layer.getLatLngs().slice(0), function isFlattenable(value) { + return ( ( value instanceof Array && typeof value[0] !== 'number' ) && ! ( value instanceof L.LatLng ) ) + }); + + // Lookup vertices + if (vertices) { + for(i = 0, n = latlngs.length; i < n; i++) { + var ll = latlngs[i]; + distance = L.GeometryUtil.distance(map, latlng, ll); + if (distance < mindist) { + mindist = distance; + result = ll; + result.distance = distance; + } + } + return result; + } + + // add the first point to close the polygon + if (layer instanceof L.Polygon) { + latlngs.push(latlngs[0]); + } + + // Keep the closest point of all segments + for (i = 0, n = latlngs.length; i < n-1; i++) { + var latlngA = latlngs[i], + latlngB = latlngs[i+1]; + distance = L.GeometryUtil.distanceSegment(map, latlng, latlngA, latlngB); + if (distance <= mindist) { + mindist = distance; + result = L.GeometryUtil.closestOnSegment(map, latlng, latlngA, latlngB); + result.distance = distance; + } + } + return result; + }, + + /** + Returns the closest layer to latlng among a list of layers. + + @tutorial closest + + @param {L.Map} map Leaflet map to be used for this method + @param {Array<L.ILayer>} layers Set of layers + @param {L.LatLng} latlng - The position to search + @returns {object} ``{layer, latlng, distance}`` or ``null`` if list is empty; + */ + closestLayer: function (map, layers, latlng) { + var mindist = Infinity, + result = null, + ll = null, + distance = Infinity; + + for (var i = 0, n = layers.length; i < n; i++) { + var layer = layers[i]; + if (layer instanceof L.LayerGroup) { + // recursive + var subResult = L.GeometryUtil.closestLayer(map, layer.getLayers(), latlng); + if (subResult.distance < mindist) { + mindist = subResult.distance; + result = subResult; + } + } else { + // Single dimension, snap on points, else snap on closest + if (typeof layer.getLatLng == 'function') { + ll = layer.getLatLng(); + distance = L.GeometryUtil.distance(map, latlng, ll); + } + else { + ll = L.GeometryUtil.closest(map, layer, latlng); + if (ll) distance = ll.distance; // Can return null if layer has no points. + } + if (distance < mindist) { + mindist = distance; + result = {layer: layer, latlng: ll, distance: distance}; + } + } + } + return result; + }, + + /** + * Returns all layers within a radius of the given position, in an ascending order of distance. + @param {L.Map} map Leaflet map to be used for this method + @param {Array<ILayer>} layers - A list of layers. + @param {L.LatLng} latlng - The position to search + @param {?Number} [radius=Infinity] - Search radius in pixels + @return {object[]} an array of objects including layer within the radius, closest latlng, and distance + */ + layersWithin: function(map, layers, latlng, radius) { + radius = typeof radius == 'number' ? radius : Infinity; + + var results = []; + var ll = null; + var distance = 0; + + for (var i = 0, n = layers.length; i < n; i++) { + var layer = layers[i]; + + if (typeof layer.getLatLng == 'function') { + ll = layer.getLatLng(); + distance = L.GeometryUtil.distance(map, latlng, ll); + } + else { + ll = L.GeometryUtil.closest(map, layer, latlng); + if (ll) distance = ll.distance; // Can return null if layer has no points. + } + + if (ll && distance < radius) { + results.push({layer: layer, latlng: ll, distance: distance}); + } + } + + var sortedResults = results.sort(function(a, b) { + return a.distance - b.distance; + }); + + return sortedResults; + }, + + /** + Returns the closest position from specified {LatLng} among specified layers, + with a maximum tolerance in pixels, providing snapping behaviour. + + @tutorial closest + + @param {L.Map} map Leaflet map to be used for this method + @param {Array<ILayer>} layers - A list of layers to snap on. + @param {L.LatLng} latlng - The position to snap + @param {?Number} [tolerance=Infinity] - Maximum number of pixels. + @param {?boolean} [withVertices=true] - Snap to layers vertices or segment points (not only vertex) + @returns {object} with snapped {LatLng} and snapped {Layer} or null if tolerance exceeded. + */ + closestLayerSnap: function (map, layers, latlng, tolerance, withVertices) { + tolerance = typeof tolerance == 'number' ? tolerance : Infinity; + withVertices = typeof withVertices == 'boolean' ? withVertices : true; + + var result = L.GeometryUtil.closestLayer(map, layers, latlng); + if (!result || result.distance > tolerance) + return null; + + // If snapped layer is linear, try to snap on vertices (extremities and middle points) + if (withVertices && typeof result.layer.getLatLngs == 'function') { + var closest = L.GeometryUtil.closest(map, result.layer, result.latlng, true); + if (closest.distance < tolerance) { + result.latlng = closest; + result.distance = L.GeometryUtil.distance(map, closest, latlng); + } + } + return result; + }, + + /** + Returns the Point located on a segment at the specified ratio of the segment length. + @param {L.Point} pA coordinates of point A + @param {L.Point} pB coordinates of point B + @param {Number} the length ratio, expressed as a decimal between 0 and 1, inclusive. + @returns {L.Point} the interpolated point. + */ + interpolateOnPointSegment: function (pA, pB, ratio) { + return L.point( + (pA.x * (1 - ratio)) + (ratio * pB.x), + (pA.y * (1 - ratio)) + (ratio * pB.y) + ); + }, + + /** + Returns the coordinate of the point located on a line at the specified ratio of the line length. + @param {L.Map} map Leaflet map to be used for this method + @param {Array<L.LatLng>|L.PolyLine} latlngs Set of geographical points + @param {Number} ratio the length ratio, expressed as a decimal between 0 and 1, inclusive + @returns {Object} an object with latLng ({LatLng}) and predecessor ({Number}), the index of the preceding vertex in the Polyline + (-1 if the interpolated point is the first vertex) + */ + interpolateOnLine: function (map, latLngs, ratio) { + latLngs = (latLngs instanceof L.Polyline) ? latLngs.getLatLngs() : latLngs; + var n = latLngs.length; + if (n < 2) { + return null; + } + + // ensure the ratio is between 0 and 1; + ratio = Math.max(Math.min(ratio, 1), 0); + + if (ratio === 0) { + return { + latLng: latLngs[0] instanceof L.LatLng ? latLngs[0] : L.latLng(latLngs[0]), + predecessor: -1 + }; + } + if (ratio == 1) { + return { + latLng: latLngs[latLngs.length -1] instanceof L.LatLng ? latLngs[latLngs.length -1] : L.latLng(latLngs[latLngs.length -1]), + predecessor: latLngs.length - 2 + }; + } + + // project the LatLngs as Points, + // and compute total planar length of the line at max precision + var maxzoom = map.getMaxZoom(); + if (maxzoom === Infinity) + maxzoom = map.getZoom(); + var pts = []; + var lineLength = 0; + for(var i = 0; i < n; i++) { + pts[i] = map.project(latLngs[i], maxzoom); + if(i > 0) + lineLength += pts[i-1].distanceTo(pts[i]); + } + + var ratioDist = lineLength * ratio; + var a = pts[0], + b = pts[1], + distA = 0, + distB = a.distanceTo(b); + // follow the line segments [ab], adding lengths, + // until we find the segment where the points should lie on + var index = 1; + for (; index < n && distB < ratioDist; index++) { + a = b; + distA = distB; + b = pts[index]; + distB += a.distanceTo(b); + } + // compute the ratio relative to the segment [ab] + var segmentRatio = ((distB - distA) !== 0) ? ((ratioDist - distA) / (distB - distA)) : 0; + var interpolatedPoint = L.GeometryUtil.interpolateOnPointSegment(a, b, segmentRatio); + return { + latLng: map.unproject(interpolatedPoint, maxzoom), + predecessor: index-2 + }; + }, + + /** + Returns a float between 0 and 1 representing the location of the + closest point on polyline to the given latlng, as a fraction of total line length. + (opposite of L.GeometryUtil.interpolateOnLine()) + @param {L.Map} map Leaflet map to be used for this method + @param {L.PolyLine} polyline Polyline on which the latlng will be search + @param {L.LatLng} latlng The position to search + @returns {Number} Float between 0 and 1 + */ + locateOnLine: function (map, polyline, latlng) { + var latlngs = polyline.getLatLngs(); + if (latlng.equals(latlngs[0])) + return 0.0; + if (latlng.equals(latlngs[latlngs.length-1])) + return 1.0; + + var point = L.GeometryUtil.closest(map, polyline, latlng, false), + lengths = L.GeometryUtil.accumulatedLengths(latlngs), + total_length = lengths[lengths.length-1], + portion = 0, + found = false; + for (var i=0, n = latlngs.length-1; i < n; i++) { + var l1 = latlngs[i], + l2 = latlngs[i+1]; + portion = lengths[i]; + if (L.GeometryUtil.belongsSegment(point, l1, l2)) { + portion += l1.distanceTo(point); + found = true; + break; + } + } + if (!found) { + throw "Could not interpolate " + latlng.toString() + " within " + polyline.toString(); + } + return portion / total_length; + }, + + /** + Returns a clone with reversed coordinates. + @param {L.PolyLine} polyline polyline to reverse + @returns {L.PolyLine} polyline reversed + */ + reverse: function (polyline) { + return L.polyline(polyline.getLatLngs().slice(0).reverse()); + }, + + /** + Returns a sub-part of the polyline, from start to end. + If start is superior to end, returns extraction from inverted line. + @param {L.Map} map Leaflet map to be used for this method + @param {L.PolyLine} polyline Polyline on which will be extracted the sub-part + @param {Number} start ratio, expressed as a decimal between 0 and 1, inclusive + @param {Number} end ratio, expressed as a decimal between 0 and 1, inclusive + @returns {Array<L.LatLng>} new polyline + */ + extract: function (map, polyline, start, end) { + if (start > end) { + return L.GeometryUtil.extract(map, L.GeometryUtil.reverse(polyline), 1.0-start, 1.0-end); + } + + // Bound start and end to [0-1] + start = Math.max(Math.min(start, 1), 0); + end = Math.max(Math.min(end, 1), 0); + + var latlngs = polyline.getLatLngs(), + startpoint = L.GeometryUtil.interpolateOnLine(map, polyline, start), + endpoint = L.GeometryUtil.interpolateOnLine(map, polyline, end); + // Return single point if start == end + if (start == end) { + var point = L.GeometryUtil.interpolateOnLine(map, polyline, end); + return [point.latLng]; + } + // Array.slice() works indexes at 0 + if (startpoint.predecessor == -1) + startpoint.predecessor = 0; + if (endpoint.predecessor == -1) + endpoint.predecessor = 0; + var result = latlngs.slice(startpoint.predecessor+1, endpoint.predecessor+1); + result.unshift(startpoint.latLng); + result.push(endpoint.latLng); + return result; + }, + + /** + Returns true if first polyline ends where other second starts. + @param {L.PolyLine} polyline First polyline + @param {L.PolyLine} other Second polyline + @returns {bool} + */ + isBefore: function (polyline, other) { + if (!other) return false; + var lla = polyline.getLatLngs(), + llb = other.getLatLngs(); + return (lla[lla.length-1]).equals(llb[0]); + }, + + /** + Returns true if first polyline starts where second ends. + @param {L.PolyLine} polyline First polyline + @param {L.PolyLine} other Second polyline + @returns {bool} + */ + isAfter: function (polyline, other) { + if (!other) return false; + var lla = polyline.getLatLngs(), + llb = other.getLatLngs(); + return (lla[0]).equals(llb[llb.length-1]); + }, + + /** + Returns true if first polyline starts where second ends or start. + @param {L.PolyLine} polyline First polyline + @param {L.PolyLine} other Second polyline + @returns {bool} + */ + startsAtExtremity: function (polyline, other) { + if (!other) return false; + var lla = polyline.getLatLngs(), + llb = other.getLatLngs(), + start = lla[0]; + return start.equals(llb[0]) || start.equals(llb[llb.length-1]); + }, + + /** + Returns horizontal angle in degres between two points. + @param {L.Point} a Coordinates of point A + @param {L.Point} b Coordinates of point B + @returns {Number} horizontal angle + */ + computeAngle: function(a, b) { + return (Math.atan2(b.y - a.y, b.x - a.x) * 180 / Math.PI); + }, + + /** + Returns slope (Ax+B) between two points. + @param {L.Point} a Coordinates of point A + @param {L.Point} b Coordinates of point B + @returns {Object} with ``a`` and ``b`` properties. + */ + computeSlope: function(a, b) { + var s = (b.y - a.y) / (b.x - a.x), + o = a.y - (s * a.x); + return {'a': s, 'b': o}; + }, + + /** + Returns LatLng of rotated point around specified LatLng center. + @param {L.LatLng} latlngPoint: point to rotate + @param {double} angleDeg: angle to rotate in degrees + @param {L.LatLng} latlngCenter: center of rotation + @returns {L.LatLng} rotated point + */ + rotatePoint: function(map, latlngPoint, angleDeg, latlngCenter) { + var maxzoom = map.getMaxZoom(); + if (maxzoom === Infinity) + maxzoom = map.getZoom(); + var angleRad = angleDeg*Math.PI/180, + pPoint = map.project(latlngPoint, maxzoom), + pCenter = map.project(latlngCenter, maxzoom), + x2 = Math.cos(angleRad)*(pPoint.x-pCenter.x) - Math.sin(angleRad)*(pPoint.y-pCenter.y) + pCenter.x, + y2 = Math.sin(angleRad)*(pPoint.x-pCenter.x) + Math.cos(angleRad)*(pPoint.y-pCenter.y) + pCenter.y; + return map.unproject(new L.Point(x2,y2), maxzoom); + }, + + /** + Returns the bearing in degrees clockwise from north (0 degrees) + from the first L.LatLng to the second, at the first LatLng + @param {L.LatLng} latlng1: origin point of the bearing + @param {L.LatLng} latlng2: destination point of the bearing + @returns {float} degrees clockwise from north. + */ + bearing: function(latlng1, latlng2) { + var rad = Math.PI / 180, + lat1 = latlng1.lat * rad, + lat2 = latlng2.lat * rad, + lon1 = latlng1.lng * rad, + lon2 = latlng2.lng * rad, + y = Math.sin(lon2 - lon1) * Math.cos(lat2), + x = Math.cos(lat1) * Math.sin(lat2) - + Math.sin(lat1) * Math.cos(lat2) * Math.cos(lon2 - lon1); + + var bearing = ((Math.atan2(y, x) * 180 / Math.PI) + 360) % 360; + return bearing >= 180 ? bearing-360 : bearing; + }, + + /** + Returns the point that is a distance and heading away from + the given origin point. + @param {L.LatLng} latlng: origin point + @param {float}: heading in degrees, clockwise from 0 degrees north. + @param {float}: distance in meters + @returns {L.latLng} the destination point. + Many thanks to Chris Veness at http://www.movable-type.co.uk/scripts/latlong.html + for a great reference and examples. + */ + destination: function(latlng, heading, distance) { + heading = (heading + 360) % 360; + var rad = Math.PI / 180, + radInv = 180 / Math.PI, + R = 6378137, // approximation of Earth's radius + lon1 = latlng.lng * rad, + lat1 = latlng.lat * rad, + rheading = heading * rad, + sinLat1 = Math.sin(lat1), + cosLat1 = Math.cos(lat1), + cosDistR = Math.cos(distance / R), + sinDistR = Math.sin(distance / R), + lat2 = Math.asin(sinLat1 * cosDistR + cosLat1 * + sinDistR * Math.cos(rheading)), + lon2 = lon1 + Math.atan2(Math.sin(rheading) * sinDistR * + cosLat1, cosDistR - sinLat1 * Math.sin(lat2)); + lon2 = lon2 * radInv; + lon2 = lon2 > 180 ? lon2 - 360 : lon2 < -180 ? lon2 + 360 : lon2; + return L.latLng([lat2 * radInv, lon2]); + } +}); + +return L.GeometryUtil; + +})); diff --git a/public/libs/leaflet.snap.js b/public/libs/leaflet.snap.js new file mode 100644 index 0000000000000000000000000000000000000000..2b7f796513082d7b693dc4610ee70a6290ecc9fb --- /dev/null +++ b/public/libs/leaflet.snap.js @@ -0,0 +1,360 @@ +(function () { + +L.Handler.MarkerSnap = L.Handler.extend({ + options: { + snapDistance: 15, // in pixels + snapVertices: true + }, + + initialize: function (map, marker, options) { + L.Handler.prototype.initialize.call(this, map); + this._markers = []; + this._guides = []; + + if (arguments.length == 2) { + if (!(marker instanceof L.Class)) { + options = marker; + marker = null; + } + } + + L.Util.setOptions(this, options || {}); + + if (marker) { + // new markers should be draggable ! + if (!marker.dragging) marker.dragging = new L.Handler.MarkerDrag(marker); + marker.dragging.enable(); + this.watchMarker(marker); + } + + // Convert snap distance in pixels into buffer in degres, for searching around mouse + // It changes at each zoom change. + function computeBuffer() { + this._buffer = map.layerPointToLatLng(new L.Point(0,0)).lat - + map.layerPointToLatLng(new L.Point(this.options.snapDistance, 0)).lat; + } + map.on('zoomend', computeBuffer, this); + map.whenReady(computeBuffer, this); + computeBuffer.call(this); + }, + + enable: function () { + this.disable(); + for (var i=0; i<this._markers.length; i++) { + this.watchMarker(this._markers[i]); + } + }, + + disable: function () { + for (var i=0; i<this._markers.length; i++) { + this.unwatchMarker(this._markers[i]); + } + }, + + watchMarker: function (marker) { + if (this._markers.indexOf(marker) == -1) + this._markers.push(marker); + marker.on('move', this._snapMarker, this); + }, + + unwatchMarker: function (marker) { + marker.off('move', this._snapMarker, this); + delete marker['snap']; + }, + + addGuideLayer: function (layer) { + for (var i=0, n=this._guides.length; i<n; i++) + if (L.stamp(layer) === L.stamp(this._guides[i])) + return; + this._guides.push(layer); + }, + + _snapMarker: function(e) { + var marker = e.target, + latlng = marker.getLatLng(), + snaplist = []; + + function isDifferentLayer(layer) { + if (layer.getLatLng) { + return L.stamp(marker) !== L.stamp(layer); + } else { + if (layer.editing && layer.editing._enabled) { + var points = layer.editing._verticesHandlers[0]._markerGroup.getLayers(); + for(var i = 0, n = points.length; i < n; i++) { + if (L.stamp(points[i]) === L.stamp(marker)) { return false; } + } + } + } + + return true; + } + + function processGuide(guide) { + if ((guide._layers !== undefined) && + (typeof guide.searchBuffer !== 'function')) { + // Guide is a layer group and has no L.LayerIndexMixin (from Leaflet.LayerIndex) + for (var id in guide._layers) { + processGuide(guide._layers[id]); + } + } + else if (typeof guide.searchBuffer === 'function') { + // Search snaplist around mouse + var nearlayers = guide.searchBuffer(latlng, this._buffer); + snaplist = snaplist.concat(nearlayers.filter(function(layer) { + return isDifferentLayer(layer); + })); + } + // Make sure the marker doesn't snap to itself or the associated polyline layer + else if (isDifferentLayer(guide)) { + snaplist.push(guide); + } + } + + for (var i=0, n = this._guides.length; i < n; i++) { + var guide = this._guides[i]; + processGuide.call(this, guide); + } + + var closest = this._findClosestLayerSnap(this._map, + snaplist, + latlng, + this.options.snapDistance, + this.options.snapVertices); + + closest = closest || {layer: null, latlng: null}; + this._updateSnap(marker, closest.layer, closest.latlng); + }, + + _findClosestLayerSnap: function (map, layers, latlng, tolerance, withVertices) { + return L.GeometryUtil.closestLayerSnap(map, layers, latlng, tolerance, withVertices); + }, + + _updateSnap: function (marker, layer, latlng) { + if (layer && latlng) { + marker._latlng = L.latLng(latlng); + marker.update(); + if (marker.snap != layer) { + marker.snap = layer; + if (marker._icon) L.DomUtil.addClass(marker._icon, 'marker-snapped'); + marker.fire('snap', {layer:layer, latlng: latlng}); + } + } + else { + if (marker.snap) { + if (marker._icon) L.DomUtil.removeClass(marker._icon, 'marker-snapped'); + marker.fire('unsnap', {layer:marker.snap}); + } + delete marker['snap']; + } + } +}); + + +if (!L.Edit) { + // Leaflet.Draw not available. + return; +} + + +L.Handler.PolylineSnap = L.Edit.Poly.extend({ + + initialize: function (map, poly, options) { + var that = this; + + L.Edit.Poly.prototype.initialize.call(this, poly, options); + this._snapper = new L.Handler.MarkerSnap(map, options); + poly.on('remove', function() { + that.disable(); + }); + }, + + addGuideLayer: function (layer) { + this._snapper.addGuideLayer(layer); + }, + + _initHandlers: function () { + this._verticesHandlers = []; + for (var i = 0; i < this.latlngs.length; i++) { + this._verticesHandlers.push(new L.Edit.PolyVerticesEditSnap(this._poly, this.latlngs[i], this.options)); + } + } +}); + +L.Edit.PolyVerticesEditSnap = L.Edit.PolyVerticesEdit.extend({ + _createMarker: function (latlng, index) { + var marker = L.Edit.PolyVerticesEdit.prototype._createMarker.call(this, latlng, index); + + // Treat middle markers differently + var isMiddle = index === undefined; + if (isMiddle) { + // Snap middle markers, only once they were touched + marker.on('dragstart', function () { + this._poly.snapediting._snapper.watchMarker(marker); + }, this); + } + else { + this._poly.snapediting._snapper.watchMarker(marker); + } + return marker; + } +}); + +L.EditToolbar.SnapEdit = L.EditToolbar.Edit.extend({ + snapOptions: { + snapDistance: 15, // in pixels + snapVertices: true + }, + + initialize: function(map, options) { + L.EditToolbar.Edit.prototype.initialize.call(this, map, options); + + if (options.snapOptions) { + L.Util.extend(this.snapOptions, options.snapOptions); + } + + if (Array.isArray(this.snapOptions.guideLayers)) { + this._guideLayers = this.snapOptions.guideLayers; + } else if (options.guideLayers instanceof L.LayerGroup) { + this._guideLayers = this.snapOptions.guideLayers.getLayers(); + } else { + this._guideLayers = []; + } + }, + + addGuideLayer: function(layer) { + var index = this._guideLayers.findIndex(function(guideLayer) { + return L.stamp(layer) === L.stamp(guideLayer); + }); + + if (index === -1) { + this._guideLayers.push(layer); + this._featureGroup.eachLayer(function(layer) { + if (layer.snapediting) { layer.snapediting._guides.push(layer); } + }); + } + }, + + removeGuideLayer: function(layer) { + var index = this._guideLayers.findIndex(function(guideLayer) { + return L.stamp(layer) === L.stamp(guideLayer); + }); + + if (index !== -1) { + this._guideLayers.splice(index, 1); + this._featureGroup.eachLayer(function(layer) { + if (layer.snapediting) { layer.snapediting._guides.splice(index, 1); } + }); + } + }, + + clearGuideLayers: function() { + this._guideLayers = []; + this._featureGroup.eachLayer(function(layer) { + if (layer.snapediting) { layer.snapediting._guides = []; } + }); + }, + + _enableLayerEdit: function(e) { + L.EditToolbar.Edit.prototype._enableLayerEdit.call(this, e); + + var layer = e.layer || e.target || e; + + if (!layer.snapediting) { + if (layer.getLatLng) { + layer.snapediting = new L.Handler.MarkerSnap(layer._map, layer, this.snapOptions); + } else { + if (layer.editing) { + layer.editing._verticesHandlers[0]._markerGroup.clearLayers(); + delete layer.editing; + } + + layer.editing = layer.snapediting = new L.Handler.PolylineSnap(layer._map, layer, this.snapOptions); + } + + for (var i = 0, n = this._guideLayers.length; i < n; i++) { + layer.snapediting.addGuideLayer(this._guideLayers[i]); + } + } + + layer.snapediting.enable(); + } +}); + +L.Draw.Feature.SnapMixin = { + _snap_initialize: function () { + this.on('enabled', this._snap_on_enabled, this); + this.on('disabled', this._snap_on_disabled, this); + }, + + _snap_on_enabled: function () { + if (!this.options.guideLayers) { + return; + } + + if (!this._mouseMarker) { + this._map.on('layeradd', this._snap_on_enabled, this); + return; + }else{ + this._map.off('layeradd', this._snap_on_enabled, this); + } + + if (!this._snapper) { + this._snapper = new L.Handler.MarkerSnap(this._map); + if (this.options.snapDistance) { + this._snapper.options.snapDistance = this.options.snapDistance; + } + if (this.options.snapVertices) { + this._snapper.options.snapVertices = this.options.snapVertices; + } + } + + for (var i=0, n=this.options.guideLayers.length; i<n; i++) + this._snapper.addGuideLayer(this.options.guideLayers[i]); + + var marker = this._mouseMarker; + + this._snapper.watchMarker(marker); + + // Show marker when (snap for user feedback) + var icon = marker.options.icon; + marker.on('snap', function (e) { + marker.setIcon(this.options.icon); + marker.setOpacity(1); + }, this) + .on('unsnap', function (e) { + marker.setIcon(icon); + marker.setOpacity(0); + }, this); + + marker.on('click', this._snap_on_click, this); + }, + + _snap_on_click: function (e) { + if (this._markers) { + var markerCount = this._markers.length, + marker = this._markers[markerCount - 1]; + if (this._mouseMarker.snap) { + if(e){ + // update the feature being drawn to reflect the snapped location: + marker.setLatLng(e.target._latlng); + if(this._poly){ + var polyPointsCount = this._poly._latlngs.length; + this._poly._latlngs[polyPointsCount - 1] = e.target._latlng; + this._poly.redraw(); + } + } + + L.DomUtil.addClass(marker._icon, 'marker-snapped'); + } + } + }, + + _snap_on_disabled: function () { + delete this._snapper; + }, +}; + +L.Draw.Feature.include(L.Draw.Feature.SnapMixin); +L.Draw.Feature.addInitHook('_snap_initialize'); + +})(); diff --git a/public/libs/proj4js.min.js b/public/libs/proj4js.min.js new file mode 100644 index 0000000000000000000000000000000000000000..96b63ed220d9cbb27d4bbeda6f38b5f9868284a9 --- /dev/null +++ b/public/libs/proj4js.min.js @@ -0,0 +1 @@ +!function(t,s){"object"==typeof exports&&"undefined"!=typeof module?module.exports=s():"function"==typeof define&&define.amd?define(s):t.proj4=s()}(this,function(){"use strict";function d(t,s){if(t[s])return t[s];for(var i,a=Object.keys(t),h=s.toLowerCase().replace($,""),e=-1;++e<a.length;)if((i=a[e]).toLowerCase().replace($,"")===h)return t[i]}function a(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=st}function h(t,s,i){Array.isArray(s)&&(i.unshift(s),s=null);var a=s?{}:t,a=i.reduce(function(t,s){return e(s,t),t},a);s&&(t[s]=a)}function e(t,s){if(Array.isArray(t)){var i,a=t.shift();if("PARAMETER"===a&&(a=t.shift()),1===t.length)return Array.isArray(t[0])?(s[a]={},void e(t[0],s[a])):void(s[a]=t[0]);if(t.length)if("TOWGS84"!==a){if("AXIS"===a)return a in s||(s[a]=[]),void s[a].push(t);switch(Array.isArray(a)||(s[a]={}),a){case"UNIT":case"PRIMEM":case"VERT_DATUM":return s[a]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&e(t[2],s[a]));case"SPHEROID":case"ELLIPSOID":return s[a]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&e(t[3],s[a]));case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":return t[0]=["name",t[0]],void h(s,a,t);default:for(i=-1;++i<t.length;)if(!Array.isArray(t[i]))return e(t,s[a]);return h(s,a,t)}}else s[a]=t;else s[a]=!0}else s[t]=!0}function r(t){return t*rt}function n(h){function t(t){return t*(h.to_meter||1)}if("GEOGCS"===h.type?h.projName="longlat":"LOCAL_CS"===h.type?(h.projName="identity",h.local=!0):"object"==typeof h.PROJECTION?h.projName=Object.keys(h.PROJECTION)[0]:h.projName=h.PROJECTION,h.AXIS){for(var s="",i=0,a=h.AXIS.length;i<a;++i){var e=h.AXIS[i][0].toLowerCase();-1!==e.indexOf("north")?s+="n":-1!==e.indexOf("south")?s+="s":-1!==e.indexOf("east")?s+="e":-1!==e.indexOf("west")&&(s+="w")}2===s.length&&(s+="u"),3===s.length&&(h.axis=s)}h.UNIT&&(h.units=h.UNIT.name.toLowerCase(),"metre"===h.units&&(h.units="meter"),h.UNIT.convert&&("GEOGCS"===h.type?h.DATUM&&h.DATUM.SPHEROID&&(h.to_meter=h.UNIT.convert*h.DATUM.SPHEROID.a):h.to_meter=h.UNIT.convert));var n=h.GEOGCS;"GEOGCS"===h.type&&(n=h),n&&(n.DATUM?h.datumCode=n.DATUM.name.toLowerCase():h.datumCode=n.name.toLowerCase(),"d_"===h.datumCode.slice(0,2)&&(h.datumCode=h.datumCode.slice(2)),"new_zealand_geodetic_datum_1949"!==h.datumCode&&"new_zealand_1949"!==h.datumCode||(h.datumCode="nzgd49"),"wgs_1984"!==h.datumCode&&"world_geodetic_system_1984"!==h.datumCode||("Mercator_Auxiliary_Sphere"===h.PROJECTION&&(h.sphere=!0),h.datumCode="wgs84"),"_ferro"===h.datumCode.slice(-6)&&(h.datumCode=h.datumCode.slice(0,-6)),"_jakarta"===h.datumCode.slice(-8)&&(h.datumCode=h.datumCode.slice(0,-8)),~h.datumCode.indexOf("belge")&&(h.datumCode="rnb72"),n.DATUM&&n.DATUM.SPHEROID&&(h.ellps=n.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===h.ellps.toLowerCase().slice(0,13)&&(h.ellps="intl"),h.a=n.DATUM.SPHEROID.a,h.rf=parseFloat(n.DATUM.SPHEROID.rf,10)),n.DATUM&&n.DATUM.TOWGS84&&(h.datum_params=n.DATUM.TOWGS84),~h.datumCode.indexOf("osgb_1936")&&(h.datumCode="osgb36"),~h.datumCode.indexOf("osni_1952")&&(h.datumCode="osni52"),(~h.datumCode.indexOf("tm65")||~h.datumCode.indexOf("geodetic_datum_of_1965"))&&(h.datumCode="ire65"),"ch1903+"===h.datumCode&&(h.datumCode="ch1903"),~h.datumCode.indexOf("israel")&&(h.datumCode="isr93")),h.b&&!isFinite(h.b)&&(h.b=h.a),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",r],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",r],["x0","false_easting",t],["y0","false_northing",t],["long0","central_meridian",r],["lat0","latitude_of_origin",r],["lat0","standard_parallel_1",r],["lat1","standard_parallel_1",r],["lat2","standard_parallel_2",r],["azimuth","Azimuth"],["alpha","azimuth",r],["srsCode","name"]].forEach(function(t){return s=h,a=(i=t)[0],t=i[1],void(!(a in s)&&t in s&&(s[a]=s[t],3===i.length&&(s[a]=i[2](s[a]))));var s,i,a}),h.long0||!h.longc||"Albers_Conic_Equal_Area"!==h.projName&&"Lambert_Azimuthal_Equal_Area"!==h.projName||(h.long0=h.longc),h.lat_ts||!h.lat1||"Stereographic_South_Pole"!==h.projName&&"Polar Stereographic (variant B)"!==h.projName||(h.lat0=r(0<h.lat1?90:-90),h.lat_ts=h.lat1)}function o(t){var s=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?o[t]=tt(arguments[1]):o[t]=ot(arguments[1]):o[t]=i}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?o.apply(s,t):o(t)});if("string"==typeof t){if(t in o)return o[t]}else"EPSG"in t?o["EPSG:"+t.EPSG]=t:"ESRI"in t?o["ESRI:"+t.ESRI]=t:"IAU2000"in t?o["IAU2000:"+t.IAU2000]=t:console.log(t)}}function m(t){if("string"!=typeof t)return t;if(t in o)return o[t];var s;if(s=t,ft.some(function(t){return-1<s.indexOf(t)})){var i=ot(t);if(function(t){if(t=d(t,"authority")){t=d(t,"epsg");return t&&-1<dt.indexOf(t)}}(i))return o["EPSG:3857"];var a=function(t){if(t=d(t,"extension"))return d(t,"proj4")}(i);return a?tt(a):i}return"+"===t[0]?tt(t):void 0}function t(t){return t}function s(t,s){var i=xt.length;return t.names?((xt[i]=t).names.forEach(function(t){_t[t.toLowerCase()]=i}),this):(console.log(s),!0)}function p(t){if(0===t.length)return null;var s="@"===t[0];return s&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!s,grid:null,isNull:!0}:{name:t,mandatory:!s,grid:Nt[t]||null,isNull:!1}}function l(t){return t/3600*Math.PI/180}function c(t,s,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(s,i)))}function M(t,s,i){for(var a=[],h=0;h<s.nSubgrids;h++){var e=(o=i,{name:c(n=t,(r=176)+8,r+16).trim(),parent:c(n,r+24,r+24+8).trim(),lowerLatitude:n.getFloat64(r+72,o),upperLatitude:n.getFloat64(r+88,o),lowerLongitude:n.getFloat64(r+104,o),upperLongitude:n.getFloat64(r+120,o),latitudeInterval:n.getFloat64(r+136,o),longitudeInterval:n.getFloat64(r+152,o),gridNodeCount:n.getInt32(r+168,o)}),n=function(t,s,i,a){for(var h=s+176,e=[],n=0;n<i.gridNodeCount;n++){var r={latitudeShift:t.getFloat32(h+16*n,a),longitudeShift:t.getFloat32(h+16*n+4,a),latitudeAccuracy:t.getFloat32(h+16*n+8,a),longitudeAccuracy:t.getFloat32(h+16*n+12,a)};e.push(r)}return e}(t,176,e,i),r=Math.round(1+(e.upperLongitude-e.lowerLongitude)/e.longitudeInterval),o=Math.round(1+(e.upperLatitude-e.lowerLatitude)/e.latitudeInterval);a.push({ll:[l(e.lowerLongitude),l(e.lowerLatitude)],del:[l(e.longitudeInterval),l(e.latitudeInterval)],lim:[r,o],count:e.gridNodeCount,cvs:n.map(function(t){return[l(t.longitudeShift),l(t.latitudeShift)]})})}return a}function y(t,s){if(!(this instanceof y))return new y(t);s=s||function(t){if(t)throw t};var i,a,h,e,n,r,o,l,c,M,u,f=m(t);"object"==typeof f&&(i=y.projections.get(f.projName))?(!f.datumCode||"none"===f.datumCode||(r=d(wt,f.datumCode))&&(f.datum_params=f.datum_params||(r.towgs84?r.towgs84.split(","):null),f.ellps=r.ellipse,f.datumName=r.datumName||f.datumCode),f.k0=f.k0||1,f.axis=f.axis||"enu",f.ellps=f.ellps||"wgs84",f.lat1=f.lat1||f.lat0,o=f.a,l=f.b,c=f.rf,M=f.ellps,u=f.sphere,o||(o=(M=(M=d(bt,M))||vt).a,l=M.b,c=M.rf),c&&!l&&(l=(1-1/c)*o),(0===c||Math.abs(o-l)<W)&&(u=!0,l=o),e=(a={a:o,b:l,rf:c,sphere:u}).a,n=a.b,r=f.R_A,l=((M=e*e)-(o=n*n))/M,n=0,r?(M=(e*=1-l*(F+l*(U+l*Q)))*e,l=0):n=Math.sqrt(l),c={es:l,e:n,ep2:(M-o)/o},r=void 0===(u=f.nadgrids)?null:u.split(",").map(p),h=f.datum||(e=f.datumCode,l=f.datum_params,n=a.a,M=a.b,o=c.es,u=c.ep2,r=r,(h={}).datum_type=void 0===e||"none"===e?B:z,l&&(h.datum_params=l.map(parseFloat),0===h.datum_params[0]&&0===h.datum_params[1]&&0===h.datum_params[2]||(h.datum_type=G),3<h.datum_params.length&&(0===h.datum_params[3]&&0===h.datum_params[4]&&0===h.datum_params[5]&&0===h.datum_params[6]||(h.datum_type=L,h.datum_params[3]*=T,h.datum_params[4]*=T,h.datum_params[5]*=T,h.datum_params[6]=h.datum_params[6]/1e6+1))),r&&(h.datum_type=R,h.grids=r),h.a=n,h.b=M,h.es=o,h.ep2=u,h),mt(this,f),mt(this,i),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=c.es,this.e=c.e,this.ep2=c.ep2,this.datum=h,this.init(),s(null,this)):s(t)}function u(t,s,i){var a,h=t.x,e=t.y,n=t.z||0;if(e<-D&&-1.001*D<e)e=-D;else if(D<e&&e<1.001*D)e=D;else{if(e<-D)return{x:-1/0,y:-1/0,z:t.z};if(D<e)return{x:1/0,y:1/0,z:t.z}}return h>Math.PI&&(h-=2*Math.PI),a=Math.sin(e),t=Math.cos(e),e=a*a,{x:((e=i/Math.sqrt(1-s*e))+n)*t*Math.cos(h),y:(e+n)*t*Math.sin(h),z:(e*(1-s)+n)*a}}function f(t,s,i,a){var h,e,n,r,o,l,c,M,u,f,d,m=t.x,p=t.y,y=t.z||0,_=Math.sqrt(m*m+p*p),x=Math.sqrt(m*m+p*p+y*y);if(_/i<1e-12){if(f=0,x/i<1e-12)return d=-a,{x:t.x,y:t.y,z:t.z}}else f=Math.atan2(p,m);for(h=y/x,r=(e=_/x)*(1-s)*(n=1/Math.sqrt(1-s*(2-s)*e*e)),o=h*n,u=0;u++,M=s*(M=i/Math.sqrt(1-s*o*o))/(M+(d=_*r+y*o-M*(1-s*o*o))),M=(c=h*(n=1/Math.sqrt(1-M*(2-M)*e*e)))*r-(l=e*(1-M)*n)*o,r=l,o=c,1e-24<M*M&&u<30;);return{x:f,y:Math.atan(c/Math.abs(l)),z:d}}function _(t){return t===G||t===L}function x(t,s,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;for(var a={x:-i.x,y:i.y},h={x:Number.NaN,y:Number.NaN},e=[],n=0;n<t.grids.length;n++){var r=t.grids[n];if(e.push(r.name),r.isNull){h=a;break}if(null!==r.grid){var o=r.grid.subgrids[0],l=(Math.abs(o.del[1])+Math.abs(o.del[0]))/1e4,c=o.ll[0]-l,M=o.ll[1]-l,u=o.ll[0]+(o.lim[0]-1)*o.del[0]+l,l=o.ll[1]+(o.lim[1]-1)*o.del[1]+l;if(!(a.y<M||a.x<c||l<a.y||u<a.x||(h=function(t,s,i){var a={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return a;var h={x:t.x,y:t.y};h.x-=i.ll[0],h.y-=i.ll[1],h.x=pt(h.x-Math.PI)+Math.PI;var e=g(h,i);if(s){if(isNaN(e.x))return a;e.x=h.x-e.x,e.y=h.y-e.y;var n,r=9;do{if(n=g(e,i),isNaN(n.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}}while(n={x:h.x-(n.x+e.x),y:h.y-(n.y+e.y)},e.x+=n.x,e.y+=n.y,r--&&1e-12<Math.abs(n.x)&&1e-12<Math.abs(n.y));if(r<0)return console.log("Inverse grid shift iterator failed to converge."),a;a.x=pt(e.x+i.ll[0]),a.y=e.y+i.ll[1]}else isNaN(e.x)||(a.x=t.x+e.x,a.y=t.y+e.y);return a}(a,s,o),isNaN(h.x))))break}else if(r.mandatory)return console.log("Unable to find mandatory grid '"+r.name+"'"),-1}return isNaN(h.x)?(console.log("Failed to find a grid shift table for location '"+-a.x*H+" "+a.y*H+" tried: '"+e+"'"),-1):(i.x=-h.x,i.y=h.y,0)}function g(t,s){var i={x:t.x/s.del[0],y:t.y/s.del[1]},a=Math.floor(i.x),h=Math.floor(i.y),e=i.x-+a,n=i.y-+h,r={x:Number.NaN,y:Number.NaN};if(a<0||a>=s.lim[0])return r;if(h<0||h>=s.lim[1])return r;f=h*s.lim[0]+a;var o=s.cvs[f][0],l=s.cvs[f][1];f++;var c=s.cvs[f][0],M=s.cvs[f][1];f+=s.lim[0];var u=s.cvs[f][0],t=s.cvs[f][1];f--;var i=s.cvs[f][0],h=s.cvs[f][1],a=e*n,s=e*(1-n),f=(1-e)*(1-n),n=(1-e)*n;return r.x=f*o+s*c+n*i+a*u,r.y=f*l+s*M+n*h+a*t,r}function i(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function b(t,s,i){var a,h;if(Array.isArray(i)&&(i=St(i)),kt(i),t.datum&&s.datum&&(h=s,((a=t).datum.datum_type===G||a.datum.datum_type===L)&&"WGS84"!==h.datumCode||(h.datum.datum_type===G||h.datum.datum_type===L)&&"WGS84"!==a.datumCode)&&(i=b(t,a=new y("WGS84"),i),t=a),"enu"!==t.axis&&(i=Pt(t,!1,i)),"longlat"===t.projName)i={x:i.x*X,y:i.y*X,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=Ct(t.datum,s.datum,i))return s.from_greenwich&&(i={x:i.x-s.from_greenwich,y:i.y,z:i.z||0}),"longlat"===s.projName?i={x:i.x*H,y:i.y*H,z:i.z||0}:(i=s.forward(i),s.to_meter&&(i={x:i.x/s.to_meter,y:i.y/s.to_meter,z:i.z||0})),"enu"!==s.axis?Pt(s,!0,i):i}function v(s,i,a){var h,t;return Array.isArray(a)?(t=b(s,i,a)||{x:NaN,y:NaN},2<a.length?void 0!==s.name&&"geocent"===s.name||void 0!==i.name&&"geocent"===i.name?("number"==typeof t.z?[t.x,t.y,t.z]:[t.x,t.y,a[2]]).concat(a.splice(3)):[t.x,t.y].concat(a.splice(2)):[t.x,t.y]):(h=b(s,i,a),2===(t=Object.keys(a)).length||t.forEach(function(t){if(void 0!==s.name&&"geocent"===s.name||void 0!==i.name&&"geocent"===i.name){if("x"===t||"y"===t||"z"===t)return}else if("x"===t||"y"===t)return;h[t]=a[t]}),h)}function w(t){return t instanceof y?t:t.oProj||y(t)}function N(s,i,t){s=w(s);var a=!1;return void 0===i?(i=s,s=Et,a=!0):void 0===i.x&&!Array.isArray(i)||(t=i,i=s,s=Et,a=!0),i=w(i),t?v(s,i,t):(t={forward:function(t){return v(s,i,t)},inverse:function(t){return v(i,s,t)}},a&&(t.oProj=i),t)}function C(t,s){return s=s||5,i=function(t){var s,i,a=t.lat,h=t.lon,e=S(a),n=S(h);i=Math.floor((h+180)/6)+1,180===h&&(i=60),56<=a&&a<64&&3<=h&&h<12&&(i=32),72<=a&&a<84&&(0<=h&&h<9?i=31:9<=h&&h<21?i=33:21<=h&&h<33?i=35:33<=h&&h<42&&(i=37)),r=S(6*(i-1)-180+3),s=6378137/Math.sqrt(1-.00669438*Math.sin(e)*Math.sin(e)),t=Math.tan(e)*Math.tan(e),h=.006739496752268451*Math.cos(e)*Math.cos(e);var r=.9996*s*((n=Math.cos(e)*(n-r))+(1-t+h)*n*n*n/6+(5-18*t+t*t+72*h-.39089081163157013)*n*n*n*n*n/120)+5e5,n=.9996*(6378137*(.9983242984503243*e-.002514607064228144*Math.sin(2*e)+2639046602129982e-21*Math.sin(4*e)-3.418046101696858e-9*Math.sin(6*e))+s*Math.tan(e)*(n*n/2+(5-t+9*h+4*h*h)*n*n*n*n/24+(61-58*t+t*t+600*h-2.2240339282485886)*n*n*n*n*n*n/720));return a<0&&(n+=1e7),{northing:Math.round(n),easting:Math.round(r),zoneNumber:i,zoneLetter:function(t){var s="Z";return t<=84&&72<=t?s="X":t<72&&64<=t?s="W":t<64&&56<=t?s="V":t<56&&48<=t?s="U":t<48&&40<=t?s="T":t<40&&32<=t?s="S":t<32&&24<=t?s="R":t<24&&16<=t?s="Q":t<16&&8<=t?s="P":t<8&&0<=t?s="N":t<0&&-8<=t?s="M":t<-8&&-16<=t?s="L":t<-16&&-24<=t?s="K":t<-24&&-32<=t?s="J":t<-32&&-40<=t?s="H":t<-40&&-48<=t?s="G":t<-48&&-56<=t?s="F":t<-56&&-64<=t?s="E":t<-64&&-72<=t?s="D":t<-72&&-80<=t&&(s="C"),s}(a)}}({lat:t[1],lon:t[0]}),a=s,t="00000"+i.easting,s="00000"+i.northing,i.zoneNumber+i.zoneLetter+function(t,s,i){i=I(i);return function(t,s,i){var a=i-1,h=qt.charCodeAt(a),i=At.charCodeAt(a),a=h+t-1,t=i+s,s=!1;return Rt<a&&(a=a-Rt+Ot-1,s=!0),(a===jt||h<jt&&jt<a||(jt<a||h<jt)&&s)&&a++,(a===Gt||h<Gt&&Gt<a||(Gt<a||h<Gt)&&s)&&++a===jt&&a++,Rt<a&&(a=a-Rt+Ot-1),s=Lt<t&&(t=t-Lt+Ot-1,!0),(t===jt||i<jt&&jt<t||(jt<t||i<jt)&&s)&&t++,(t===Gt||i<Gt&&Gt<t||(Gt<t||i<Gt)&&s)&&++t===jt&&t++,Lt<t&&(t=t-Lt+Ot-1),String.fromCharCode(a)+String.fromCharCode(t)}(Math.floor(t/1e5),Math.floor(s/1e5)%20,i)}(i.easting,i.northing,i.zoneNumber)+t.substr(t.length-5,a)+s.substr(s.length-5,a);var i,a}function P(t){t=E(q(t.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat]:[(t.left+t.right)/2,(t.top+t.bottom)/2]}function S(t){return t*(Math.PI/180)}function k(t){return t/Math.PI*180}function E(t){var s=t.northing,i=t.easting,a=t.zoneLetter,h=t.zoneNumber;if(h<0||60<h)return null;var e=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),n=i-5e5,r=s;a<"N"&&(r-=1e7),i=6*(h-1)-180+3,a=(s=r/.9996/6367449.145945056)+(3*e/2-27*e*e*e/32)*Math.sin(2*s)+(21*e*e/16-55*e*e*e*e/32)*Math.sin(4*s)+151*e*e*e/96*Math.sin(6*s),h=6378137/Math.sqrt(1-.00669438*Math.sin(a)*Math.sin(a)),r=Math.tan(a)*Math.tan(a),e=.006739496752268451*Math.cos(a)*Math.cos(a),s=6335439.32722994/Math.pow(1-.00669438*Math.sin(a)*Math.sin(a),1.5),n=n/(.9996*h);s=k(s=a-h*Math.tan(a)/s*(n*n/2-(5+3*r+10*e-4*e*e-.06065547077041606)*n*n*n*n/24+(61+90*r+298*e+45*r*r-1.6983531815716497-3*e*e)*n*n*n*n*n*n/720)),a=i+k(a=(n-(1+2*r+e)*n*n*n/6+(5-2*e+28*r-3*e*e+.05391597401814761+24*r*r)*n*n*n*n*n/120)/Math.cos(a));return t.accuracy?{top:(t=E({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber})).lat,right:t.lon,bottom:s,left:a}:{lat:s,lon:a}}function I(t){t%=It;return 0===t&&(t=It),t}function q(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var s,i=t.length,a=null,h="",e=0;!/[A-Z]/.test(s=t.charAt(e));){if(2<=e)throw"MGRSPoint bad conversion from: "+t;h+=s,e++}var n=parseInt(h,10);if(0===e||i<e+3)throw"MGRSPoint bad conversion from: "+t;var r=t.charAt(e++);if(r<="A"||"B"===r||"Y"===r||"Z"<=r||"I"===r||"O"===r)throw"MGRSPoint zone letter "+r+" not handled: "+t;a=t.substring(e,e+=2);for(var o=I(n),l=function(t,s){for(var i=qt.charCodeAt(s-1),a=1e5,h=!1;i!==t.charCodeAt(0);){if(++i===jt&&i++,i===Gt&&i++,Rt<i){if(h)throw"Bad character: "+t;i=Ot,h=!0}a+=1e5}return a}(a.charAt(0),o),c=function(t,s){if("V"<t)throw"MGRSPoint given invalid Northing "+t;for(var i=At.charCodeAt(s-1),a=0,h=!1;i!==t.charCodeAt(0);){if(++i===jt&&i++,i===Gt&&i++,Lt<i){if(h)throw"Bad character: "+t;i=Ot,h=!0}a+=1e5}return a}(a.charAt(1),o);c<function(t){var s;switch(t){case"C":s=11e5;break;case"D":s=2e6;break;case"E":s=28e5;break;case"F":s=37e5;break;case"G":s=46e5;break;case"H":s=55e5;break;case"J":s=64e5;break;case"K":s=73e5;break;case"L":s=82e5;break;case"M":s=91e5;break;case"N":s=0;break;case"P":s=8e5;break;case"Q":s=17e5;break;case"R":s=26e5;break;case"S":s=35e5;break;case"T":s=44e5;break;case"U":s=53e5;break;case"V":s=62e5;break;case"W":s=7e6;break;case"X":s=79e5;break;default:s=-1}if(0<=s)return s;throw"Invalid zone letter: "+t}(r);)c+=2e6;var M=i-e;if(M%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var u,a=M/2,o=0,i=0;return 0<a&&(u=1e5/Math.pow(10,a),M=t.substring(e,e+a),o=parseFloat(M)*u,a=t.substring(e+a),i=parseFloat(a)*u),{easting:o+l,northing:i+c,zoneLetter:r,zoneNumber:n,accuracy:u}}function A(t,s,i){if(!(this instanceof A))return new A(t,s,i);var a;Array.isArray(t)?(this.x=t[0],this.y=t[1],this.z=t[2]||0):"object"==typeof t?(this.x=t.x,this.y=t.y,this.z=t.z||0):"string"==typeof t&&void 0===s?(a=t.split(","),this.x=parseFloat(a[0],10),this.y=parseFloat(a[1],10),this.z=parseFloat(a[2],10)||0):(this.x=t,this.y=s,this.z=i||0),console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}function O(t,s,i,a){var h;return t<W?(a.value=zs,h=0):(h=Math.atan2(s,i),Math.abs(h)<=J?a.value=zs:J<h&&h<=D+J?(a.value=Bs,h-=D):D+J<h||h<=-(D+J)?(a.value=Ts,h=0<=h?h-V:h+V):(a.value=Ds,h+=D)),h}function j(t,s){s=t+s;return s<-V?s+=K:+V<s&&(s-=K),s}var G=1,L=2,R=3,z=4,B=5,T=484813681109536e-20,D=Math.PI/2,F=.16666666666666666,U=.04722222222222222,Q=.022156084656084655,W=1e-10,X=.017453292519943295,H=57.29577951308232,J=Math.PI/4,K=2*Math.PI,V=3.14159265359,Z={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Y={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},$=/[\s_\-\/\(\)]/g,tt=function(t){var s,i,a,h={},e=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,s){s=s.split("=");return s.push(!0),t[s[0].toLowerCase()]=s[1],t},{}),n={proj:"projName",datum:"datumCode",rf:function(t){h.rf=parseFloat(t)},lat_0:function(t){h.lat0=t*X},lat_1:function(t){h.lat1=t*X},lat_2:function(t){h.lat2=t*X},lat_ts:function(t){h.lat_ts=t*X},lon_0:function(t){h.long0=t*X},lon_1:function(t){h.long1=t*X},lon_2:function(t){h.long2=t*X},alpha:function(t){h.alpha=parseFloat(t)*X},gamma:function(t){h.rectified_grid_angle=parseFloat(t)},lonc:function(t){h.longc=t*X},x_0:function(t){h.x0=parseFloat(t)},y_0:function(t){h.y0=parseFloat(t)},k_0:function(t){h.k0=parseFloat(t)},k:function(t){h.k0=parseFloat(t)},a:function(t){h.a=parseFloat(t)},b:function(t){h.b=parseFloat(t)},r_a:function(){h.R_A=!0},zone:function(t){h.zone=parseInt(t,10)},south:function(){h.utmSouth=!0},towgs84:function(t){h.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){h.to_meter=parseFloat(t)},units:function(t){h.units=t;t=d(Y,t);t&&(h.to_meter=t.to_meter)},from_greenwich:function(t){h.from_greenwich=t*X},pm:function(t){var s=d(Z,t);h.from_greenwich=(s||parseFloat(t))*X},nadgrids:function(t){"@null"===t?h.datumCode="none":h.nadgrids=t},axis:function(t){3===t.length&&-1!=="ewnsud".indexOf(t.substr(0,1))&&-1!=="ewnsud".indexOf(t.substr(1,1))&&-1!=="ewnsud".indexOf(t.substr(2,1))&&(h.axis=t)},approx:function(){h.approx=!0}};for(s in e)i=e[s],s in n?"function"==typeof(a=n[s])?a(i):h[a]=i:h[s]=i;return"string"==typeof h.datumCode&&"WGS84"!==h.datumCode&&(h.datumCode=h.datumCode.toLowerCase()),h},st=1,it=/\s/,at=/[A-Za-z]/,ht=/[A-Za-z84]/,et=/[,\]]/,nt=/[\d\.E\-\+]/;a.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;it.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case st:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},a.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(et.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},a.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=st)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=st,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},a.prototype.number=function(t){if(!nt.test(t)){if(et.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},a.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},a.prototype.keyword=function(t){if(ht.test(t))this.word+=t;else{if("["===t){var s=[];return s.push(this.word),this.level++,null===this.root?this.root=s:this.currentObject.push(s),this.stack.push(this.currentObject),this.currentObject=s,void(this.state=st)}if(!et.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},a.prototype.neutral=function(t){if(at.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(nt.test(t))return this.word=t,void(this.state=3);if(!et.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},a.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var rt=.017453292519943295,ot=function(t){var s=new a(t).output(),i=s.shift(),t=s.shift();s.unshift(["name",t]),s.unshift(["type",i]);i={};return e(s,i),n(i),i};(Js=o)("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),Js("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),Js("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),Js.WGS84=Js["EPSG:4326"],Js["EPSG:3785"]=Js["EPSG:3857"],Js.GOOGLE=Js["EPSG:3857"],Js["EPSG:900913"]=Js["EPSG:3857"],Js["EPSG:102113"]=Js["EPSG:3857"];function lt(t,s,i){return s*=t,i/Math.sqrt(1-s*s)}function ct(t){return t<0?-1:1}function Mt(t,s,i){return i*=t,t*=.5,i=Math.pow((1-i)/(1+i),t),Math.tan(.5*(D-s))/i}function ut(t,s){for(var i,a=.5*t,h=D-2*Math.atan(s),e=0;e<=15;e++)if(i=t*Math.sin(h),h+=i=D-2*Math.atan(s*Math.pow((1-i)/(1+i),a))-h,Math.abs(i)<=1e-10)return h;return-9999}var ft=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"],dt=["3857","900913","3785","102113"],mt=function(t,s){var i,a;if(t=t||{},!s)return t;for(a in s)void 0!==(i=s[a])&&(t[a]=i);return t},pt=function(t){return Math.abs(t)<=V?t:t-ct(t)*K},yt=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=lt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var s,i,a=t.x,h=t.y;return 90<h*H&&h*H<-90&&180<a*H&&a*H<-180||Math.abs(Math.abs(h)-D)<=W?null:(i=this.sphere?(s=this.x0+this.a*this.k0*pt(a-this.long0),this.y0+this.a*this.k0*Math.log(Math.tan(J+.5*h))):(i=Math.sin(h),i=Mt(this.e,h,i),s=this.x0+this.a*this.k0*pt(a-this.long0),this.y0-this.a*this.k0*Math.log(i)),t.x=s,t.y=i,t)},inverse:function(t){var s,i=t.x-this.x0,a=t.y-this.y0;if(this.sphere)s=D-2*Math.atan(Math.exp(-a/(this.a*this.k0)));else{a=Math.exp(-a/(this.a*this.k0));if(-9999===(s=ut(this.e,a)))return null}return i=pt(this.long0+i/(this.a*this.k0)),t.x=i,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{init:function(){},forward:t,inverse:t,names:["longlat","identity"]}],_t={},xt=[],gt={start:function(){yt.forEach(s)},add:s,get:function(t){if(!t)return!1;t=t.toLowerCase();return void 0!==_t[t]&&xt[_t[t]]?xt[_t[t]]:void 0}},bt={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"}},vt=bt.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};bt.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};var wt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},Nt={};y.projections=gt,y.projections.start();var Ct=function(t,s,i){if(r=s,(n=t).datum_type===r.datum_type&&!(n.a!==r.a||5e-11<Math.abs(n.es-r.es))&&(n.datum_type===G?n.datum_params[0]===r.datum_params[0]&&n.datum_params[1]===r.datum_params[1]&&n.datum_params[2]===r.datum_params[2]:n.datum_type!==L||n.datum_params[0]===r.datum_params[0]&&n.datum_params[1]===r.datum_params[1]&&n.datum_params[2]===r.datum_params[2]&&n.datum_params[3]===r.datum_params[3]&&n.datum_params[4]===r.datum_params[4]&&n.datum_params[5]===r.datum_params[5]&&n.datum_params[6]===r.datum_params[6]))return i;if(t.datum_type===B||s.datum_type===B)return i;var a=t.a,h=t.es;if(t.datum_type===R){if(0!==x(t,!1,i))return;a=6378137,h=.0066943799901413165}var e=s.a,n=s.b,r=s.es;return s.datum_type===R&&(e=6378137,n=6356752.314,r=.0066943799901413165),h!==r||a!==e||_(t.datum_type)||_(s.datum_type)?(i=u(i,h,a),_(t.datum_type)&&(i=function(t,s,i){if(s===G)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(s===L){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],s=i[5],i=i[6];return{x:i*(t.x-s*t.y+r*t.z)+a,y:i*(s*t.x+t.y-n*t.z)+h,z:i*(-r*t.x+n*t.y+t.z)+e}}}(i,t.datum_type,t.datum_params)),_(s.datum_type)&&(i=function(t,s,i){if(s===G)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(s===L){var a=i[0],h=i[1],e=i[2],n=i[3],r=i[4],s=i[5],i=i[6],a=(t.x-a)/i,h=(t.y-h)/i,i=(t.z-e)/i;return{x:a+s*h-r*i,y:-s*a+h+n*i,z:r*a-n*h+i}}}(i,s.datum_type,s.datum_params)),i=f(i,r,e,n),s.datum_type!==R||0===x(s,!0,i)?i:void 0):i},Pt=function(t,s,i){for(var a,h,e=i.x,n=i.y,r=i.z||0,o={},l=0;l<3;l++)if(!s||2!==l||void 0!==i.z)switch(h=0===l?(a=e,-1!=="ew".indexOf(t.axis[l])?"x":"y"):1===l?(a=n,-1!=="ns".indexOf(t.axis[l])?"y":"x"):(a=r,"z"),t.axis[l]){case"e":o[h]=a;break;case"w":o[h]=-a;break;case"n":o[h]=a;break;case"s":o[h]=-a;break;case"u":void 0!==i[h]&&(o.z=a);break;case"d":void 0!==i[h]&&(o.z=-a);break;default:return null}return o},St=function(t){var s={x:t[0],y:t[1]};return 2<t.length&&(s.z=t[2]),3<t.length&&(s.m=t[3]),s},kt=function(t){i(t.x),i(t.y)},Et=y("WGS84"),It=6,qt="AJSAJS",At="AFAFAF",Ot=65,jt=73,Gt=79,Lt=86,Rt=90,zt={forward:C,inverse:function(t){t=E(q(t.toUpperCase()));return t.lat&&t.lon?[t.lon,t.lat,t.lon,t.lat]:[t.left,t.bottom,t.right,t.top]},toPoint:P};A.fromMGRS=function(t){return new A(P(t))},A.prototype.toMGRS=function(t){return C([this.x,this.y],t)};function Bt(t){var s=[];s[0]=1-t*(.25+t*(.046875+t*(.01953125+t*es))),s[1]=t*(.75-t*(.046875+t*(.01953125+t*es)));var i=t*t;return s[2]=i*(.46875-t*(.013020833333333334+.007120768229166667*t)),i*=t,s[3]=i*(.3645833333333333-.005696614583333333*t),s[4]=i*t*.3076171875,s}function Tt(t,s,i,a){return i*=s,s*=s,a[0]*t-i*(a[1]+s*(a[2]+s*(a[3]+s*a[4])))}function Dt(t,s,i){for(var a=1/(1-s),h=t,e=20;e;--e){var n=Math.sin(h),r=1-s*n*n;if(h-=r=(Tt(h,n,Math.cos(h),i)-t)*(r*Math.sqrt(r))*a,Math.abs(r)<W)return h}return h}function Ft(t){return((t=Math.exp(t))-1/t)/2}function Ut(t,s){t=Math.abs(t),s=Math.abs(s);var i=Math.max(t,s),s=Math.min(t,s)/(i||1);return i*Math.sqrt(1+Math.pow(s,2))}function Qt(t){var s,i,a,h=Math.abs(t);return s=h*(1+h/(Ut(1,h)+1)),h=0==(a=(i=1+s)-1)?s:s*Math.log(i)/a,t<0?-h:h}function Wt(t,s){for(var i,a=2*Math.cos(2*s),h=t.length-1,e=t[h],n=0;0<=--h;)i=a*e-n+t[h],n=e,e=i;return s+i*Math.sin(2*s)}function Xt(t,s,i){for(var a,h,e=Math.sin(s),n=Math.cos(s),s=Ft(i),i=function(t){t=Math.exp(t);return(t+1/t)/2}(i),r=2*n*i,o=-2*e*s,l=t.length-1,c=t[l],M=0,u=0,f=0;0<=--l;)a=u,h=M,c=r*(u=c)-a-o*(M=f)+t[l],f=o*u-h+r*M;return[(r=e*i)*c-(o=n*s)*f,r*f+o*c]}function Ht(t,s){return Math.pow((1-t)/(1+t),s)}function Jt(t,s,i,a,h){return t*h-s*Math.sin(2*h)+i*Math.sin(4*h)-a*Math.sin(6*h)}function Kt(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function Vt(t){return.375*t*(1+.25*t*(1+.46875*t))}function Zt(t){return.05859375*t*t*(1+.75*t)}function Yt(t){return t*t*t*(35/3072)}function $t(t,s,i){return i*=s,t/Math.sqrt(1-i*i)}function ts(t){return Math.abs(t)<D?t:t-ct(t)*Math.PI}function ss(t,s,i,a,h){for(var e,n=t/s,r=0;r<15;r++)if(n+=e=(t-(s*n-i*Math.sin(2*n)+a*Math.sin(4*n)-h*Math.sin(6*n)))/(s-2*i*Math.cos(2*n)+4*a*Math.cos(4*n)-6*h*Math.cos(6*n)),Math.abs(e)<=1e-10)return n;return NaN}function is(t,s){var i;return 1e-7<t?(1-t*t)*(s/(1-(i=t*s)*i)-.5/t*Math.log((1-i)/(1+i))):2*s}function as(t){return 1<Math.abs(t)&&(t=1<t?1:-1),Math.asin(t)}function hs(t,s){return t[0]+s*(t[1]+s*(t[2]+s*t[3]))}var es=.01068115234375,ns={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Bt(this.es),this.ml0=Tt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var s=t.x,i=t.y,a=pt(s-this.long0),h=Math.sin(i),e=Math.cos(i);if(this.es){var n=e*a,r=Math.pow(n,2),o=this.ep2*Math.pow(e,2),l=Math.pow(o,2),s=Math.abs(e)>W?Math.tan(i):0,c=Math.pow(s,2),M=Math.pow(c,2),u=1-this.es*Math.pow(h,2);n/=Math.sqrt(u);s=Tt(i,h,e,this.en),u=this.a*(this.k0*n*(1+r/6*(1-c+o+r/20*(5-18*c+M+14*o-58*c*o+r/42*(61+179*M-M*c-479*c)))))+this.x0,M=this.a*(this.k0*(s-this.ml0+h*a*n/2*(1+r/12*(5-c+9*o+4*l+r/30*(61+M-58*c+270*o-330*c*o+r/56*(1385+543*M-M*c-3111*c))))))+this.y0}else{c=e*Math.sin(a);if(Math.abs(Math.abs(c)-1)<W)return 93;if(u=.5*this.a*this.k0*Math.log((1+c)/(1-c))+this.x0,M=e*Math.cos(a)/Math.sqrt(1-Math.pow(c,2)),1<=(c=Math.abs(M))){if(W<c-1)return 93;M=0}else M=Math.acos(M);i<0&&(M=-M),M=this.a*this.k0*(M-this.lat0)+this.y0}return t.x=u,t.y=M,t},inverse:function(t){var s,i,a,h,e,n,r,o,l,c,M=(t.x-this.x0)*(1/this.a),u=(t.y-this.y0)*(1/this.a);return c=this.es?(n=this.ml0+u/this.k0,s=Dt(n,this.es,this.en),Math.abs(s)<D?(r=Math.sin(s),i=Math.cos(s),o=Math.abs(i)>W?Math.tan(s):0,a=this.ep2*Math.pow(i,2),l=Math.pow(a,2),h=Math.pow(o,2),e=Math.pow(h,2),n=1-this.es*Math.pow(r,2),r=M*Math.sqrt(n)/this.k0,l=s-(n*=o)*(o=Math.pow(r,2))/(1-this.es)*.5*(1-o/12*(5+3*h-9*a*h+a-4*l-o/30*(61+90*h-252*a*h+45*e+46*a-o/56*(1385+3633*h+4095*e+1574*e*h)))),pt(this.long0+r*(1-o/6*(1+2*h+a-o/20*(5+28*h+24*e+8*a*h+6*a-o/42*(61+662*h+1320*e+720*e*h))))/i)):(l=D*ct(u),0)):(M=.5*((c=Math.exp(M/this.k0))-1/c),c=this.lat0+u/this.k0,c=Math.cos(c),n=Math.sqrt((1-Math.pow(c,2))/(1+Math.pow(M,2))),l=Math.asin(n),u<0&&(l=-l),0==M&&0===c?0:pt(Math.atan2(M,c)+this.long0)),t.x=c,t.y=l,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]},rs={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ns.init.apply(this),this.forward=ns.forward,this.inverse=ns.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),s=t/(2-t),t=s;this.cgb[0]=s*(2+s*(-2/3+s*(s*(116/45+s*(26/45+-2854/675*s))-2))),this.cbg[0]=s*(s*(2/3+s*(4/3+s*(-82/45+s*(32/45+4642/4725*s))))-2),t*=s,this.cgb[1]=t*(7/3+s*(s*(-227/45+s*(2704/315+2323/945*s))-1.6)),this.cbg[1]=t*(5/3+s*(-16/15+s*(-13/9+s*(904/315+-1522/945*s)))),t*=s,this.cgb[2]=t*(56/15+s*(-136/35+s*(-1262/105+73814/2835*s))),this.cbg[2]=t*(-26/15+s*(34/21+s*(1.6+-12686/2835*s))),t*=s,this.cgb[3]=t*(4279/630+s*(-332/35+-399572/14175*s)),this.cbg[3]=t*(1237/630+s*(-24832/14175*s-2.4)),t*=s,this.cgb[4]=t*(4174/315+-144838/6237*s),this.cbg[4]=t*(-734/315+109598/31185*s),t*=s,this.cgb[5]=601676/22275*t,this.cbg[5]=444337/155925*t,t=Math.pow(s,2),this.Qn=this.k0/(1+s)*(1+t*(.25+t*(1/64+t/256))),this.utg[0]=s*(s*(2/3+s*(-37/96+s*(1/360+s*(81/512+-96199/604800*s))))-.5),this.gtu[0]=s*(.5+s*(-2/3+s*(5/16+s*(41/180+s*(-127/288+7891/37800*s))))),this.utg[1]=t*(-1/48+s*(-1/15+s*(437/1440+s*(-46/105+1118711/3870720*s)))),this.gtu[1]=t*(13/48+s*(s*(557/1440+s*(281/630+-1983433/1935360*s))-.6)),t*=s,this.utg[2]=t*(-17/480+s*(37/840+s*(209/4480+-5569/90720*s))),this.gtu[2]=t*(61/240+s*(-103/140+s*(15061/26880+167603/181440*s))),t*=s,this.utg[3]=t*(-4397/161280+s*(11/504+830251/7257600*s)),this.gtu[3]=t*(49561/161280+s*(-179/168+6601661/7257600*s)),t*=s,this.utg[4]=t*(-4583/161280+108847/3991680*s),this.gtu[4]=t*(34729/80640+-3418889/1995840*s),t*=s,this.utg[5]=-.03233083094085698*t,this.gtu[5]=.6650675310896665*t;t=Wt(this.cbg,this.lat0);this.Zb=-this.Qn*(t+function(t,s){for(var i,a=2*Math.cos(s),h=t.length-1,e=t[h],n=0;0<=--h;)i=a*e-n+t[h],n=e,e=i;return Math.sin(s)*i}(this.gtu,2*t))},forward:function(t){var s=pt(t.x-this.long0),i=t.y,i=Wt(this.cbg,i),a=Math.sin(i),h=Math.cos(i),e=Math.sin(s),n=Math.cos(s);i=Math.atan2(a,n*h),s=Math.atan2(e*h,Ut(a,h*n)),s=Qt(Math.tan(s));var r,n=Xt(this.gtu,2*i,2*s);return i+=n[0],s+=n[1],i=Math.abs(s)<=2.623395162778?(r=this.a*(this.Qn*s)+this.x0,this.a*(this.Qn*i+this.Zb)+this.y0):r=1/0,t.x=r,t.y=i,t},inverse:function(t){var s,i,a,h,e=(t.x-this.x0)*(1/this.a),n=(t.y-this.y0)*(1/this.a);return n=(n-this.Zb)/this.Qn,e/=this.Qn,n=Math.abs(e)<=2.623395162778?(n+=(a=Xt(this.utg,2*n,2*e))[0],e+=a[1],e=Math.atan(Ft(e)),s=Math.sin(n),h=Math.cos(n),i=Math.sin(e),a=Math.cos(e),n=Math.atan2(s*a,Ut(i,a*h)),e=Math.atan2(i,a*h),h=pt(e+this.long0),Wt(this.cgb,n)):h=1/0,t.x=h,t.y=n,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"]},os={init:function(){var t=function(t,s){if(void 0===t){if((t=Math.floor(30*(pt(s)+Math.PI)/Math.PI)+1)<0)return 0;if(60<t)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*X,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,rs.init.apply(this),this.forward=rs.forward,this.inverse=rs.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"},ls={init:function(){var t=Math.sin(this.lat0),s=Math.cos(this.lat0);s*=s,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*s*s/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+J)/(Math.pow(Math.tan(.5*this.lat0+J),this.C)*Ht(this.e*t,this.ratexp))},forward:function(t){var s=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+J),this.C)*Ht(this.e*Math.sin(i),this.ratexp))-D,t.x=this.C*s,t},inverse:function(t){for(var s=t.x/this.C,i=t.y,a=Math.pow(Math.tan(.5*i+J)/this.K,1/this.C),h=20;0<h&&(i=2*Math.atan(a*Ht(this.e*Math.sin(t.y),-.5*this.e))-D,!(Math.abs(i-t.y)<1e-14));--h)t.y=i;return h?(t.x=s,t.y=i,t):null},names:["gauss"]},cs={init:function(){ls.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var s,i,a,h;return t.x=pt(t.x-this.long0),ls.forward.apply(this,[t]),s=Math.sin(t.y),i=Math.cos(t.y),a=Math.cos(t.x),h=this.k0*this.R2/(1+this.sinc0*s+this.cosc0*i*a),t.x=h*i*Math.sin(t.x),t.y=h*(this.cosc0*s-this.sinc0*i*a),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var s,i,a,h;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,h=(s=Math.sqrt(t.x*t.x+t.y*t.y))?(a=2*Math.atan2(s,this.R2),h=Math.sin(a),i=Math.cos(a),a=Math.asin(i*this.sinc0+t.y*h*this.cosc0/s),Math.atan2(t.x*h,s*this.cosc0*i-t.y*this.sinc0*h)):(a=this.phic0,0),t.x=h,t.y=a,ls.inverse.apply(this,[t]),t.x=pt(t.x+this.long0),t},names:["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]},Ms={init:function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=W&&(this.k0=.5*(1+ct(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=W&&(0<this.lat0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=W&&(this.k0=.5*this.cons*lt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Mt(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=lt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-D,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var s,i,a=t.x,h=t.y,e=Math.sin(h),n=Math.cos(h),r=pt(a-this.long0);return Math.abs(Math.abs(a-this.long0)-Math.PI)<=W&&Math.abs(h+this.lat0)<=W?(t.x=NaN,t.y=NaN):this.sphere?(s=2*this.k0/(1+this.sinlat0*e+this.coslat0*n*Math.cos(r)),t.x=this.a*s*n*Math.sin(r)+this.x0,t.y=this.a*s*(this.coslat0*e-this.sinlat0*n*Math.cos(r))+this.y0):(i=2*Math.atan(this.ssfn_(h,e,this.e))-D,n=Math.cos(i),i=Math.sin(i),Math.abs(this.coslat0)<=W?(e=Mt(this.e,h*this.con,this.con*e),e=2*this.a*this.k0*e/this.cons,t.x=this.x0+e*Math.sin(a-this.long0),t.y=this.y0-this.con*e*Math.cos(a-this.long0)):(Math.abs(this.sinlat0)<W?(s=2*this.a*this.k0/(1+n*Math.cos(r)),t.y=s*i):(s=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*n*Math.cos(r))),t.y=s*(this.cosX0*i-this.sinX0*n*Math.cos(r))+this.y0),t.x=s*n*Math.sin(r)+this.x0)),t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var h=2*Math.atan(a/(2*this.a*this.k0)),e=this.long0,n=this.lat0;return a<=W||(n=Math.asin(Math.cos(h)*this.sinlat0+t.y*Math.sin(h)*this.coslat0/a),e=pt(Math.abs(this.coslat0)<W?0<this.lat0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(h),a*this.coslat0*Math.cos(h)-t.y*this.sinlat0*Math.sin(h)))),t.x=e,t.y=n,t}if(Math.abs(this.coslat0)<=W){if(a<=W)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,s=a*this.cons/(2*this.a*this.k0),n=this.con*ut(this.e,s),e=this.con*pt(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(a*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,a<=W?i=this.X0:(i=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/a),e=pt(this.long0+Math.atan2(t.x*Math.sin(s),a*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),n=-1*ut(this.e,Math.tan(.5*(D+i)));return t.x=e,t.y=n,t},names:["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],ssfn_:function(t,s,i){return s*=i,Math.tan(.5*(D+t))*Math.pow((1-s)/(1+s),.5*i)}},us={init:function(){var t=this.lat0;this.lambda0=this.long0;var s=Math.sin(t),i=this.a,a=1/this.rf,h=2*a-Math.pow(a,2),a=this.e=Math.sqrt(h);this.R=this.k0*i*Math.sqrt(1-h)/(1-h*Math.pow(s,2)),this.alpha=Math.sqrt(1+h/(1-h)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(s/this.alpha);h=Math.log(Math.tan(Math.PI/4+this.b0/2)),t=Math.log(Math.tan(Math.PI/4+t/2)),s=Math.log((1+a*s)/(1-a*s));this.K=h-this.alpha*t+this.alpha*a/2*s},forward:function(t){var s=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),a=-this.alpha*(s+i)+this.K,s=2*(Math.atan(Math.exp(a))-Math.PI/4),i=this.alpha*(t.x-this.lambda0),a=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(i))),i=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(i));return t.y=this.R/2*Math.log((1+Math.sin(i))/(1-Math.sin(i)))+this.y0,t.x=this.R*a+this.x0,t},inverse:function(t){for(var s,i=t.x-this.x0,a=t.y-this.y0,i=i/this.R,a=2*(Math.atan(Math.exp(a/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(a)+Math.sin(this.b0)*Math.cos(a)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(a))),a=this.lambda0+a/this.alpha,e=h,n=-1e3,r=0;1e-7<Math.abs(e-n);){if(20<++r)return;s=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(e))/2)),n=e,e=2*Math.atan(Math.exp(s))-Math.PI/2}return t.x=a,t.y=e,t},names:["somerc"]},fs=1e-7,ds={init:function(){var t,s,i,a,h,e=0,n=0,r=0,o=0,l=0,c=0,M=0;this.no_off=(h="object"==typeof(m=this).PROJECTION?Object.keys(m.PROJECTION)[0]:m.PROJECTION,"no_uoff"in m||"no_off"in m||-1!==["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"].indexOf(h)),this.no_rot="no_rot"in this;var u=!1;"alpha"in this&&(u=!0);var f=!1;if("rectified_grid_angle"in this&&(f=!0),u&&(M=this.alpha),f&&(e=this.rectified_grid_angle*X),u||f)n=this.longc;else if(r=this.long1,l=this.lat1,o=this.long2,c=this.lat2,Math.abs(l-c)<=fs||(t=Math.abs(l))<=fs||Math.abs(t-D)<=fs||Math.abs(Math.abs(this.lat0)-D)<=fs||Math.abs(Math.abs(c)-D)<=fs)throw new Error;var d=1-this.es,m=Math.sqrt(d);Math.abs(this.lat0)>W?(h=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*h*h,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/d),this.A=this.B*this.k0*m/t,(i=(s=this.B*m/(i*Math.sqrt(t)))*s-1)<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=s,this.E*=Math.pow(Mt(this.e,this.lat0,h),this.B)):(this.B=1/m,this.A=this.k0,this.E=s=i=1),u||f?(u?(a=Math.asin(Math.sin(M)/s),f||(e=M)):(a=e,M=Math.asin(s*Math.sin(a))),this.lam0=n-Math.asin(.5*(i-1/i)*Math.tan(a))/this.B):(f=Math.pow(Mt(this.e,l,Math.sin(l)),this.B),n=Math.pow(Mt(this.e,c,Math.sin(c)),this.B),i=this.E/f,l=(n-f)/(n+f),c=((c=this.E*this.E)-n*f)/(c+n*f),(t=r-o)<-Math.pi?o-=K:t>Math.pi&&(o+=K),this.lam0=pt(.5*(r+o)-Math.atan(c*Math.tan(.5*this.B*(r-o))/l)/this.B),a=Math.atan(2*Math.sin(this.B*pt(r-this.lam0))/(i-1/i)),e=M=Math.asin(s*Math.sin(a))),this.singam=Math.sin(a),this.cosgam=Math.cos(a),this.sinrot=Math.sin(e),this.cosrot=Math.cos(e),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(s*s-1)/Math.cos(M))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*a,this.v_pole_n=this.ArB*Math.log(Math.tan(J-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(J+i))},forward:function(t){var s,i,a,h,e={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-D)>W){if(s=.5*((i=this.E/Math.pow(Mt(this.e,t.y,Math.sin(t.y)),this.B))-(a=1/i)),h=.5*(i+a),i=Math.sin(this.B*t.x),h=(s*this.singam-i*this.cosgam)/h,Math.abs(Math.abs(h)-1)<W)throw new Error;h=.5*this.ArB*Math.log((1-h)/(1+h)),a=Math.cos(this.B*t.x),a=Math.abs(a)<fs?this.A*t.x:this.ArB*Math.atan2(s*this.cosgam+i*this.singam,a)}else h=0<t.y?this.v_pole_n:this.v_pole_s,a=this.ArB*t.y;return this.no_rot?(e.x=a,e.y=h):(a-=this.u_0,e.x=h*this.cosrot+a*this.sinrot,e.y=a*this.cosrot-h*this.sinrot),e.x=this.a*e.x+this.x0,e.y=this.a*e.y+this.y0,e},inverse:function(t){var s,i,a,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),s=this.no_rot?(a=t.y,t.x):(a=t.x*this.cosrot-t.y*this.sinrot,t.y*this.cosrot+t.x*this.sinrot+this.u_0),t=.5*((i=Math.exp(-this.BrA*a))-1/i),a=.5*(i+1/i),a=((i=Math.sin(this.BrA*s))*this.cosgam+t*this.singam)/a,Math.abs(Math.abs(a)-1)<W)h.x=0,h.y=a<0?-D:D;else{if(h.y=this.E/Math.sqrt((1+a)/(1-a)),h.y=ut(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(t*this.cosgam-i*this.singam,Math.cos(this.BrA*s))}return h.x+=this.lam0,h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},ms={init:function(){var t,s,i,a,h,e;this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,Math.abs(this.lat1+this.lat2)<W||(h=this.b/this.a,this.e=Math.sqrt(1-h*h),t=Math.sin(this.lat1),a=Math.cos(this.lat1),s=lt(this.e,t,a),i=Mt(this.e,this.lat1,t),e=Math.sin(this.lat2),h=Math.cos(this.lat2),a=lt(this.e,e,h),h=Mt(this.e,this.lat2,e),e=Mt(this.e,this.lat0,Math.sin(this.lat0)),Math.abs(this.lat1-this.lat2)>W?this.ns=Math.log(s/a)/Math.log(i/h):this.ns=t,isNaN(this.ns)&&(this.ns=t),this.f0=s/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(e,this.ns),this.title||(this.title="Lambert Conformal Conic"))},forward:function(t){var s=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=W&&(i=ct(i)*(D-2*W));var a,h=Math.abs(Math.abs(i)-D);if(W<h)a=Mt(this.e,i,Math.sin(i)),a=this.a*this.f0*Math.pow(a,this.ns);else{if(i*this.ns<=0)return null;a=0}s=this.ns*pt(s-this.long0);return t.x=this.k0*(a*Math.sin(s))+this.x0,t.y=this.k0*(this.rh-a*Math.cos(s))+this.y0,t},inverse:function(t){var s,i,a=(t.x-this.x0)/this.k0,h=this.rh-(t.y-this.y0)/this.k0,e=0<this.ns?(s=Math.sqrt(a*a+h*h),1):(s=-Math.sqrt(a*a+h*h),-1),n=0;if(0!==s&&(n=Math.atan2(e*a,e*h)),0!==s||0<this.ns){if(e=1/this.ns,i=Math.pow(s/(this.a*this.f0),e),-9999===(i=ut(this.e,i)))return null}else i=-D;return n=pt(n/this.ns+this.long0),t.x=n,t.y=i,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"]},ps={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var s=t.x,i=t.y,a=pt(s-this.long0),s=Math.pow((1+this.e*Math.sin(i))/(1-this.e*Math.sin(i)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(i/2+this.s45),this.alfa)/s)-this.s45),s=-a*this.alfa,a=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(s)),s=Math.asin(Math.cos(i)*Math.sin(s)/Math.cos(a)),s=this.n*s,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(a/2+this.s45),this.n);return t.y=a*Math.cos(s),t.x=a*Math.sin(s),this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var s,i,a,h,e=t.x;t.x=t.y,t.y=e,this.czech||(t.y*=-1,t.x*=-1),i=Math.sqrt(t.x*t.x+t.y*t.y),e=Math.atan2(t.y,t.x)/Math.sin(this.s0),i=2*(Math.atan(Math.pow(this.ro0/i,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),s=Math.asin(Math.cos(this.ad)*Math.sin(i)-Math.sin(this.ad)*Math.cos(i)*Math.cos(e)),e=Math.asin(Math.cos(i)*Math.sin(e)/Math.cos(s)),t.x=this.long0-e/this.alfa,a=s,h=0;for(var n=0;t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(s/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(h=1),a=t.y,n+=1,0===h&&n<15;);return 15<=n?null:t},names:["Krovak","krovak"]},ys={init:function(){this.sphere||(this.e0=Kt(this.es),this.e1=Vt(this.es),this.e2=Zt(this.es),this.e3=Yt(this.es),this.ml0=this.a*Jt(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,r=pt(r-this.long0);return n=this.sphere?(e=this.a*Math.asin(Math.cos(o)*Math.sin(r)),this.a*(Math.atan2(Math.tan(o),Math.cos(r))-this.lat0)):(s=Math.sin(o),i=Math.cos(o),a=$t(this.a,this.e,s),h=Math.tan(o)*Math.tan(o),e=a*(r=r*Math.cos(o))*(1-(n=r*r)*h*(1/6-(8-h+8*(r=this.es*i*i/(1-this.es)))*n/120)),this.a*Jt(this.e0,this.e1,this.e2,this.e3,o)-this.ml0+a*s/i*n*(.5+(5-h+6*r)*n/24)),t.x=e+this.x0,t.y=n+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s=t.x/this.a,i=t.y/this.a;if(this.sphere)var a=i+this.lat0,h=Math.asin(Math.sin(a)*Math.cos(s)),e=Math.atan2(Math.tan(s),Math.cos(a));else{var n=this.ml0/this.a+i,r=ss(n,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(r)-D)<=W)return t.x=this.long0,t.y=D,i<0&&(t.y*=-1),t;var o=$t(this.a,this.e,Math.sin(r)),a=o*o*o/this.a/this.a*(1-this.es),n=Math.pow(Math.tan(r),2),i=s*this.a/o,s=i*i;h=r-o*Math.tan(r)/a*i*i*(.5-(1+3*n)*i*i/24),e=i*(1-s*(n/3+(1+3*n)*n*s/15))/Math.cos(r)}return t.x=pt(e+this.long0),t.y=ts(h),t},names:["Cassini","Cassini_Soldner","cass"]},_s={init:function(){var t,s,i=Math.abs(this.lat0);if(Math.abs(i-D)<W?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(i)<W?this.mode=this.EQUIT:this.mode=this.OBLIQ,0<this.es)switch(this.qp=is(this.e,1),this.mmf=.5/(1-this.es),this.apa=(t=this.es,(s=[])[0]=.3333333333333333*t,i=t*t,s[0]+=.17222222222222222*i,s[1]=.06388888888888888*i,i*=t,s[0]+=.10257936507936508*i,s[1]+=.0664021164021164*i,s[2]=.016415012942191543*i,s),this.mode){case this.N_POLE:case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),s=Math.sin(this.lat0),this.sinb1=is(this.e,s)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*s*s)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var s,i,a,h,e,n,r,o=t.x,l=t.y,o=pt(o-this.long0);if(this.sphere){if(h=Math.sin(l),r=Math.cos(l),a=Math.cos(o),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+r*a:1+this.sinph0*h+this.cosph0*r*a)<=W)return null;s=(i=Math.sqrt(2/i))*r*Math.sin(o),i*=this.mode===this.EQUIT?h:this.cosph0*h-this.sinph0*r*a}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(a=-a),Math.abs(l+this.lat0)<W)return null;i=J-.5*l,s=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(o),i*=a}}else{switch(r=n=e=0,a=Math.cos(o),o=Math.sin(o),h=Math.sin(l),h=is(this.e,h),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(e=h/this.qp,n=Math.sqrt(1-e*e)),this.mode){case this.OBLIQ:r=1+this.sinb1*e+this.cosb1*n*a;break;case this.EQUIT:r=1+n*a;break;case this.N_POLE:r=D+l,h=this.qp-h;break;case this.S_POLE:r=l-D,h=this.qp+h}if(Math.abs(r)<W)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:r=Math.sqrt(2/r),i=this.mode===this.OBLIQ?this.ymf*r*(this.cosb1*e-this.sinb1*n*a):(r=Math.sqrt(2/(1+n*a)))*e*this.ymf,s=this.xmf*r*n*o;break;case this.N_POLE:case this.S_POLE:0<=h?(s=(r=Math.sqrt(h))*o,i=a*(this.mode===this.S_POLE?r:-r)):s=i=0}}return t.x=this.a*s+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s,i,a,h,e=t.x/this.a,n=t.y/this.a;if(this.sphere){var r=0,o=0,l=Math.sqrt(e*e+n*n);if(1<(i=.5*l))return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(o=Math.sin(i),r=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(l)<=W?0:Math.asin(n*o/l),e*=o,n=r*l;break;case this.OBLIQ:i=Math.abs(l)<=W?this.lat0:Math.asin(r*this.sinph0+n*o*this.cosph0/l),e*=o*this.cosph0,n=(r-Math.sin(i)*this.sinph0)*l;break;case this.N_POLE:n=-n,i=D-i;break;case this.S_POLE:i-=D}s=0!==n||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(e,n):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,n*=this.dd,(o=Math.sqrt(e*e+n*n))<W)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*o/this.rq),l=Math.cos(r),e*=r=Math.sin(r),n=this.mode===this.OBLIQ?(h=l*this.sinb1+n*r*this.cosb1/o,a=this.qp*h,o*this.cosb1*l-n*this.sinb1*r):(h=n*r/o,a=this.qp*h,o*l)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),!(a=e*e+n*n))return t.x=this.long0,t.y=this.lat0,t;h=1-a/this.qp,this.mode===this.S_POLE&&(h=-h)}s=Math.atan2(e,n),e=Math.asin(h),n=this.apa,h=e+e,i=e+n[0]*Math.sin(h)+n[1]*Math.sin(h+h)+n[2]*Math.sin(h+h+h)}return t.x=pt(this.long0+s),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4},xs={init:function(){Math.abs(this.lat1+this.lat2)<W||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=lt(this.e3,this.sin_po,this.cos_po),this.qs1=is(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=lt(this.e3,this.sin_po,this.cos_po),this.qs2=is(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=is(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>W?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var s=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var a=is(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*a)/this.ns0,a=this.ns0*pt(s-this.long0),s=i*Math.sin(a)+this.x0,a=this.rh-i*Math.cos(a)+this.y0;return t.x=s,t.y=a,t},inverse:function(t){var s,i,a,h;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,i=0<=this.ns0?(s=Math.sqrt(t.x*t.x+t.y*t.y),1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),-1),(a=0)!==s&&(a=Math.atan2(i*t.x,i*t.y)),i=s*this.ns0/this.a,h=this.sphere?Math.asin((this.c-i*i)/(2*this.ns0)):(h=(this.c-i*i)/this.ns0,this.phi1z(this.e3,h)),a=pt(a/this.ns0+this.long0),t.x=a,t.y=h,t},names:["Albers_Conic_Equal_Area","Albers","aea"],phi1z:function(t,s){var i,a,h,e=as(.5*s);if(t<W)return e;for(var n=t*t,r=1;r<=25;r++)if(e+=h=.5*(a=1-(h=t*(i=Math.sin(e)))*h)*a/Math.cos(e)*(s/(1-n)-i/a+.5/t*Math.log((1-h)/(1+h))),Math.abs(h)<=1e-7)return e;return null}},gs={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var s,i=t.x,a=t.y,h=pt(i-this.long0),e=Math.sin(a),n=Math.cos(a),i=Math.cos(h),i=0<(a=this.sin_p14*e+this.cos_p14*n*i)||Math.abs(a)<=W?(s=this.x0+ +this.a*n*Math.sin(h)/a,this.y0+ +this.a*(this.cos_p14*e-this.sin_p14*n*i)/a):(s=this.x0+this.infinity_dist*n*Math.sin(h),this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*i));return t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=(s=Math.sqrt(t.x*t.x+t.y*t.y))?(h=Math.atan2(s,this.rc),a=Math.sin(h),i=Math.cos(h),h=as(i*this.sin_p14+t.y*a*this.cos_p14/s),a=Math.atan2(t.x*a,s*this.cos_p14*i-t.y*this.sin_p14*a),pt(this.long0+a)):(h=this.phic0,0),t.x=a,t.y=h,t},names:["gnom"]},bs={init:function(){this.sphere||(this.k0=lt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var s,i,a=t.x,h=t.y,a=pt(a-this.long0);return i=this.sphere?(s=this.x0+this.a*a*Math.cos(this.lat_ts),this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts)):(i=is(this.e,Math.sin(h)),s=this.x0+this.a*this.k0*a,this.y0+this.a*i*.5/this.k0),t.x=s,t.y=i,t},inverse:function(t){var s,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(s=pt(this.long0+t.x/this.a/Math.cos(this.lat_ts)),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=function(t,s){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(s)-i)<1e-6)return s<0?-1*D:D;for(var a,h,e,n=Math.asin(.5*s),r=0;r<30;r++)if(a=Math.sin(n),h=Math.cos(n),e=t*a,n+=e=Math.pow(1-e*e,2)/(2*h)*(s/(1-t*t)-a/(1-e*e)+.5/t*Math.log((1-e)/(1+e))),Math.abs(e)<=1e-10)return n;return NaN}(this.e,2*t.y*this.k0/this.a),s=pt(this.long0+t.x/(this.a*this.k0))),t.x=s,t.y=i,t},names:["cea"]},vs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var s=t.x,i=t.y,s=pt(s-this.long0),i=ts(i-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*i,t},inverse:function(t){var s=t.x,i=t.y;return t.x=pt(this.long0+(s-this.x0)/(this.a*this.rc)),t.y=ts(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","eqc"]},ws={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Kt(this.es),this.e1=Vt(this.es),this.e2=Zt(this.es),this.e3=Yt(this.es),this.ml0=this.a*Jt(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var s,i=t.x,a=t.y,h=pt(i-this.long0),i=h*Math.sin(a);return i=this.sphere?Math.abs(a)<=W?(s=this.a*h,-1*this.a*this.lat0):(s=this.a*Math.sin(i)/Math.tan(a),this.a*(ts(a-this.lat0)+(1-Math.cos(i))/Math.tan(a))):Math.abs(a)<=W?(s=this.a*h,-1*this.ml0):(s=(h=$t(this.a,this.e,Math.sin(a))/Math.tan(a))*Math.sin(i),this.a*Jt(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+h*(1-Math.cos(i))),t.x=s+this.x0,t.y=i+this.y0,t},inverse:function(t){var s,i,a,h,e,n,r=t.x-this.x0,o=t.y-this.y0;if(this.sphere)if(Math.abs(o+this.a*this.lat0)<=W)s=pt(r/this.a+this.long0),i=0;else{for(var l,c=this.lat0+o/this.a,M=r*r/this.a/this.a+c*c,u=c,f=20;f;--f)if(u+=a=-1*(c*(u*(l=Math.tan(u))+1)-u-.5*(u*u+M)*l)/((u-c)/l-1),Math.abs(a)<=W){i=u;break}s=pt(this.long0+Math.asin(r*Math.tan(u)/this.a)/Math.sin(i))}else if(Math.abs(o+this.ml0)<=W)i=0,s=pt(this.long0+r/this.a);else{for(c=(this.ml0+o)/this.a,M=r*r/this.a/this.a+c*c,u=c,f=20;f;--f)if(n=this.e*Math.sin(u),h=Math.sqrt(1-n*n)*Math.tan(u),e=this.a*Jt(this.e0,this.e1,this.e2,this.e3,u),n=this.e0-2*this.e1*Math.cos(2*u)+4*this.e2*Math.cos(4*u)-6*this.e3*Math.cos(6*u),u-=a=(c*(h*(e=e/this.a)+1)-e-.5*h*(e*e+M))/(this.es*Math.sin(2*u)*(e*e+M-2*c*e)/(4*h)+(c-e)*(h*n-2/Math.sin(2*u))-n),Math.abs(a)<=W){i=u;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),s=pt(this.long0+Math.asin(r*h/this.a)/Math.sin(i))}return t.x=s,t.y=i,t},names:["Polyconic","poly"]},Ns={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){for(var s=t.x,i=t.y-this.lat0,s=s-this.long0,a=i/T*1e-5,s=s,h=1,e=0,n=1;n<=10;n++)h*=a,e+=this.A[n]*h;var r,o=e,l=s,c=1,M=0,u=0,f=0;for(n=1;n<=6;n++)r=M*o+c*l,c=c*o-M*l,M=r,u=u+this.B_re[n]*c-this.B_im[n]*M,f=f+this.B_im[n]*c+this.B_re[n]*M;return t.x=f*this.a+this.x0,t.y=u*this.a+this.y0,t},inverse:function(t){var s,i=t.x,a=t.y,i=i-this.x0,h=(a-this.y0)/this.a,e=i/this.a,n=1,r=0,o=0,l=0;for(p=1;p<=6;p++)s=r*h+n*e,n=n*h-r*e,r=s,o=o+this.C_re[p]*n-this.C_im[p]*r,l=l+this.C_im[p]*n+this.C_re[p]*r;for(var c=0;c<this.iterations;c++){for(var M,u=o,f=l,d=h,m=e,p=2;p<=6;p++)M=f*o+u*l,u=u*o-f*l,f=M,d+=(p-1)*(this.B_re[p]*u-this.B_im[p]*f),m+=(p-1)*(this.B_im[p]*u+this.B_re[p]*f);u=1,f=0;var y=this.B_re[1],_=this.B_im[1];for(p=2;p<=6;p++)M=f*o+u*l,u=u*o-f*l,f=M,y+=p*(this.B_re[p]*u-this.B_im[p]*f),_+=p*(this.B_im[p]*u+this.B_re[p]*f);var x=y*y+_*_,o=(d*y+m*_)/x,l=(m*y-d*_)/x}var g=o,a=l,b=1,v=0;for(p=1;p<=9;p++)b*=g,v+=this.D[p]*b;i=this.lat0+v*T*1e5,a=this.long0+a;return t.x=a,t.y=i,t},names:["New_Zealand_Map_Grid","nzmg"]},Cs={init:function(){},forward:function(t){var s=t.x,i=t.y,s=pt(s-this.long0),s=this.x0+this.a*s,i=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=s,t.y=i,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var s=pt(this.long0+t.x/this.a),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=s,t.y=i,t},names:["Miller_Cylindrical","mill"]},Ps={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Bt(this.es)},forward:function(t){var s=t.x,i=t.y,s=pt(s-this.long0);if(this.sphere){if(this.m)for(var a=this.n*Math.sin(i),h=20;h;--h){var e=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=e,Math.abs(e)<W)break}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;l=this.a*this.C_x*s*(this.m+Math.cos(i)),o=this.a*this.C_y*i}else var n=Math.sin(i),r=Math.cos(i),o=this.a*Tt(i,n,r,this.en),l=this.a*s*r/Math.sqrt(1-this.es*n*n);return t.x=l,t.y=o,t},inverse:function(t){var s,i,a,h;return t.x-=this.x0,a=t.x/this.a,t.y-=this.y0,s=t.y/this.a,this.sphere?(s/=this.C_y,a/=this.C_x*(this.m+Math.cos(s)),this.m?s=as((this.m*s+Math.sin(s))/this.n):1!==this.n&&(s=as(Math.sin(s)/this.n)),a=pt(a+this.long0),s=ts(s)):(s=Dt(t.y/this.a,this.es,this.en),(h=Math.abs(s))<D?(h=Math.sin(s),i=this.long0+t.x*Math.sqrt(1-this.es*h*h)/(this.a*Math.cos(s)),a=pt(i)):h-W<D&&(a=this.long0)),t.x=a,t.y=s,t},names:["Sinusoidal","sinu"]},Ss={init:function(){},forward:function(t){for(var s=t.x,i=t.y,s=pt(s-this.long0),a=i,h=Math.PI*Math.sin(i);;){var e=-(a+Math.sin(a)-h)/(1+Math.cos(a));if(a+=e,Math.abs(e)<W)break}a/=2,Math.PI/2-Math.abs(i)<W&&(s=0);i=.900316316158*this.a*s*Math.cos(a)+this.x0,s=1.4142135623731*this.a*Math.sin(a)+this.y0;return t.x=i,t.y=s,t},inverse:function(t){var s;t.x-=this.x0,t.y-=this.y0,a=t.y/(1.4142135623731*this.a),.999999999999<Math.abs(a)&&(a=.999999999999),s=Math.asin(a);var i=pt(this.long0+t.x/(.900316316158*this.a*Math.cos(s)));i<-Math.PI&&(i=-Math.PI),i>Math.PI&&(i=Math.PI),a=(2*s+Math.sin(2*s))/Math.PI,1<Math.abs(a)&&(a=1);var a=Math.asin(a);return t.x=i,t.y=a,t},names:["Mollweide","moll"]},ks={init:function(){Math.abs(this.lat1+this.lat2)<W||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Kt(this.es),this.e1=Vt(this.es),this.e2=Zt(this.es),this.e3=Yt(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=lt(this.e,this.sinphi,this.cosphi),this.ml1=Jt(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<W?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=lt(this.e,this.sinphi,this.cosphi),this.ml2=Jt(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Jt(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var s=t.x,i=t.y;i=this.sphere?this.a*(this.g-i):(a=Jt(this.e0,this.e1,this.e2,this.e3,i),this.a*(this.g-a));var a=this.ns*pt(s-this.long0),s=this.x0+i*Math.sin(a),a=this.y0+this.rh-i*Math.cos(a);return t.x=s,t.y=a,t},inverse:function(t){var s;t.x-=this.x0,t.y=this.rh-t.y+this.y0,s=0<=this.ns?(a=Math.sqrt(t.x*t.x+t.y*t.y),1):(a=-Math.sqrt(t.x*t.x+t.y*t.y),-1);var i=0;if(0!==a&&(i=Math.atan2(s*t.x,s*t.y)),this.sphere)return e=pt(this.long0+i/this.ns),h=ts(this.g-a/this.a),t.x=e,t.y=h,t;var a=this.g-a/this.a,h=ss(a,this.e0,this.e1,this.e2,this.e3),e=pt(this.long0+i/this.ns);return t.x=e,t.y=h,t},names:["Equidistant_Conic","eqdc"]},Es={init:function(){this.R=this.a},forward:function(t){var s,i=t.x,a=t.y,h=pt(i-this.long0);Math.abs(a)<=W&&(s=this.x0+this.R*h,c=this.y0);var e=as(2*Math.abs(a/Math.PI));(Math.abs(h)<=W||Math.abs(Math.abs(a)-D)<=W)&&(s=this.x0,c=0<=a?this.y0+Math.PI*this.R*Math.tan(.5*e):this.y0+Math.PI*this.R*-Math.tan(.5*e));var n=.5*Math.abs(Math.PI/h-h/Math.PI),r=n*n,o=Math.sin(e),l=Math.cos(e),i=l/(o+l-1),e=i*i,l=i*(2/o-1),o=l*l,e=Math.PI*this.R*(n*(i-o)+Math.sqrt(r*(i-o)*(i-o)-(o+r)*(e-o)))/(o+r);h<0&&(e=-e),s=this.x0+e;var i=r+i,e=Math.PI*this.R*(l*i-n*Math.sqrt((o+r)*(1+r)-i*i))/(o+r),c=0<=a?this.y0+e:this.y0-e;return t.x=s,t.y=c,t},inverse:function(t){var s,i,a,h,e,n,r;return t.x-=this.x0,t.y-=this.y0,r=Math.PI*this.R,a=(s=t.x/r)*s+(i=t.y/r)*i,r=3*(i*i/(e=-2*(n=-Math.abs(i)*(1+a))+1+2*i*i+a*a)+(2*(h=n-2*i*i+s*s)*h*h/e/e/e-9*n*h/e/e)/27)/(n=(n-h*h/3/e)/e)/(n=2*Math.sqrt(-n/3)),1<Math.abs(r)&&(r=0<=r?1:-1),r=Math.acos(r)/3,e=0<=t.y?(-n*Math.cos(r+Math.PI/3)-h/3/e)*Math.PI:-(-n*Math.cos(r+Math.PI/3)-h/3/e)*Math.PI,s=Math.abs(s)<W?this.long0:pt(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(s*s-i*i)+a*a))/2/s),t.x=s,t.y=e,t},names:["Van_der_Grinten_I","VanDerGrinten","vandg"]},Is={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},forward:function(t){var s,i,a,h,e,n,r=t.x,o=t.y,l=Math.sin(t.y),c=Math.cos(t.y),M=pt(r-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=W?(t.x=this.x0+this.a*(D-o)*Math.sin(M),t.y=this.y0-this.a*(D-o)*Math.cos(M)):Math.abs(this.sin_p12+1)<=W?(t.x=this.x0+this.a*(D+o)*Math.sin(M),t.y=this.y0+this.a*(D+o)*Math.cos(M)):(e=this.sin_p12*l+this.cos_p12*c*Math.cos(M),h=(a=Math.acos(e))?a/Math.sin(a):1,t.x=this.x0+this.a*h*c*Math.sin(M),t.y=this.y0+this.a*h*(this.cos_p12*l-this.sin_p12*c*Math.cos(M))):(s=Kt(this.es),r=Vt(this.es),e=Zt(this.es),h=Yt(this.es),Math.abs(this.sin_p12-1)<=W?(i=this.a*Jt(s,r,e,h,D),n=this.a*Jt(s,r,e,h,o),t.x=this.x0+(i-n)*Math.sin(M),t.y=this.y0-(i-n)*Math.cos(M)):Math.abs(this.sin_p12+1)<=W?(i=this.a*Jt(s,r,e,h,D),n=this.a*Jt(s,r,e,h,o),t.x=this.x0+(i+n)*Math.sin(M),t.y=this.y0+(i+n)*Math.cos(M)):(o=l/c,i=$t(this.a,this.e,this.sin_p12),n=$t(this.a,this.e,l),l=Math.atan((1-this.es)*o+this.es*i*this.sin_p12/(n*c)),n=0===(o=Math.atan2(Math.sin(M),this.cos_p12*Math.tan(l)-this.sin_p12*Math.cos(M)))?Math.asin(this.cos_p12*Math.sin(l)-this.sin_p12*Math.cos(l)):Math.abs(Math.abs(o)-Math.PI)<=W?-Math.asin(this.cos_p12*Math.sin(l)-this.sin_p12*Math.cos(l)):Math.asin(Math.sin(M)*Math.cos(l)/Math.sin(o)),c=this.e*this.sin_p12/Math.sqrt(1-this.es),a=i*n*(1-(M=n*n)*(i=(l=this.e*this.cos_p12*Math.cos(o)/Math.sqrt(1-this.es))*l)*(1-i)/6+(M=M*n)/8*(l=c*l)*(1-2*i)+(M=M*n)/120*(i*(4-7*i)-3*c*c*(1-7*i))-M*n/48*l),t.x=this.x0+a*Math.sin(o),t.y=this.y0+a*Math.cos(o))),t},inverse:function(t){var s,i,a,h,e,n,r,o;return t.x-=this.x0,t.y-=this.y0,this.sphere?(s=Math.sqrt(t.x*t.x+t.y*t.y))>2*D*this.a?void 0:(r=s/this.a,o=Math.sin(r),n=Math.cos(r),i=this.long0,Math.abs(s)<=W?a=this.lat0:(a=as(n*this.sin_p12+t.y*o*this.cos_p12/s),e=Math.abs(this.lat0)-D,i=pt(Math.abs(e)<=W?0<=this.lat0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*o,s*this.cos_p12*n-t.y*this.sin_p12*o))),t.x=i,t.y=a,t):(r=Kt(this.es),e=Vt(this.es),n=Zt(this.es),o=Yt(this.es),Math.abs(this.sin_p12-1)<=W?(h=this.a*Jt(r,e,n,o,D),s=Math.sqrt(t.x*t.x+t.y*t.y),a=ss((h-s)/this.a,r,e,n,o),i=pt(this.long0+Math.atan2(t.x,-1*t.y))):Math.abs(this.sin_p12+1)<=W?(h=this.a*Jt(r,e,n,o,D),s=Math.sqrt(t.x*t.x+t.y*t.y),a=ss((s-h)/this.a,r,e,n,o),i=pt(this.long0+Math.atan2(t.x,t.y))):(s=Math.sqrt(t.x*t.x+t.y*t.y),h=Math.atan2(t.x,t.y),r=$t(this.a,this.e,this.sin_p12),e=Math.cos(h),o=-(n=this.e*this.cos_p12*e)*n/(1-this.es),n=3*this.es*(1-o)*this.sin_p12*this.cos_p12*e/(1-this.es),r=1-o*(o=(r=s/r)-o*(1+o)*Math.pow(r,3)/6-n*(1+3*o)*Math.pow(r,4)/24)*o/2-r*o*o*o/6,e=Math.asin(this.sin_p12*Math.cos(o)+this.cos_p12*Math.sin(o)*e),i=pt(this.long0+Math.asin(Math.sin(h)*Math.sin(o)/Math.cos(e))),o=Math.sin(e),a=Math.atan2((o-this.es*r*this.sin_p12)*Math.tan(e),o*(1-this.es))),t.x=i,t.y=a,t)},names:["Azimuthal_Equidistant","aeqd"]},qs={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)},forward:function(t){var s,i,a=t.x,h=t.y,e=pt(a-this.long0),n=Math.sin(h),r=Math.cos(h),a=Math.cos(e);return(0<(h=this.sin_p14*n+this.cos_p14*r*a)||Math.abs(h)<=W)&&(s=+this.a*r*Math.sin(e),i=this.y0+ +this.a*(this.cos_p14*n-this.sin_p14*r*a)),t.x=s,t.y=i,t},inverse:function(t){var s,i,a,h,e,n;return t.x-=this.x0,t.y-=this.y0,s=Math.sqrt(t.x*t.x+t.y*t.y),h=as(s/this.a),i=Math.sin(h),a=Math.cos(h),e=this.long0,Math.abs(s)<=W?n=this.lat0:(n=as(a*this.sin_p14+t.y*i*this.cos_p14/s),h=Math.abs(this.lat0)-D,e=Math.abs(h)<=W?pt(0<=this.lat0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y)):pt(this.long0+Math.atan2(t.x*i,s*this.cos_p14*a-t.y*this.sin_p14*i))),t.x=e,t.y=n,t},names:["ortho"]},As=1,Os=2,js=3,Gs=4,Ls=5,Rs=6,zs=1,Bs=2,Ts=3,Ds=4,Fs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=D-J/2?this.face=Ls:this.lat0<=-(D-J/2)?this.face=Rs:Math.abs(this.long0)<=J?this.face=As:Math.abs(this.long0)<=D+J?this.face=0<this.long0?Os:Gs:this.face=js,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var s,i,a,h,e,n,r,o={x:0,y:0},l={value:0};return t.x-=this.long0,r=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,s=t.x,this.face===Ls?(i=D-r,a=J<=s&&s<=D+J?(l.value=zs,s-D):D+J<s||s<=-(D+J)?(l.value=Bs,0<s?s-V:s+V):-(D+J)<s&&s<=-J?(l.value=Ts,s+D):(l.value=Ds,s)):this.face===Rs?(i=D+r,a=J<=s&&s<=D+J?(l.value=zs,D-s):s<J&&-J<=s?(l.value=Bs,-s):s<-J&&-(D+J)<=s?(l.value=Ts,-s-D):(l.value=Ds,0<s?V-s:-s-V)):(this.face===Os?s=j(s,+D):this.face===js?s=j(s,+V):this.face===Gs&&(s=j(s,-D)),e=Math.sin(r),n=Math.cos(r),r=Math.sin(s),h=n*Math.cos(s),r=n*r,e=e,this.face===As?a=O(i=Math.acos(h),e,r,l):this.face===Os?a=O(i=Math.acos(r),e,-h,l):this.face===js?a=O(i=Math.acos(-h),e,-r,l):this.face===Gs?a=O(i=Math.acos(-r),e,h,l):(i=a=0,l.value=zs)),h=Math.atan(12/V*(a+Math.acos(Math.sin(a)*Math.cos(J))-D)),a=Math.sqrt((1-Math.cos(i))/(Math.cos(h)*Math.cos(h))/(1-Math.cos(Math.atan(1/Math.cos(a))))),l.value===Bs?h+=D:l.value===Ts?h+=V:l.value===Ds&&(h+=1.5*V),o.x=a*Math.cos(h),o.y=a*Math.sin(h),o.x=o.x*this.a+this.x0,o.y=o.y*this.a+this.y0,t.x=o.x,t.y=o.y,t},inverse:function(t){var s,i,a,h,e,n,r,o={lam:0,phi:0},l={value:0};return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),s=Math.atan2(t.y,t.x),0<=t.x&&t.x>=Math.abs(t.y)?l.value=zs:0<=t.y&&t.y>=Math.abs(t.x)?(l.value=Bs,s-=D):t.x<0&&-t.x>=Math.abs(t.y)?(l.value=Ts,s=s<0?s+V:s-V):(l.value=Ds,s+=D),e=V/12*Math.tan(s),h=Math.sin(e)/(Math.cos(e)-1/Math.sqrt(2)),h=Math.atan(h),(i=1-(s=Math.cos(s))*s*(i=Math.tan(i))*i*(1-Math.cos(Math.atan(1/Math.cos(h)))))<-1?i=-1:1<i&&(i=1),this.face===Ls?(a=Math.acos(i),o.phi=D-a,l.value===zs?o.lam=h+D:l.value===Bs?o.lam=h<0?h+V:h-V:l.value===Ts?o.lam=h-D:o.lam=h):this.face===Rs?(a=Math.acos(i),o.phi=a-D,l.value===zs?o.lam=D-h:l.value===Bs?o.lam=-h:l.value===Ts?o.lam=-h-D:o.lam=h<0?-h-V:V-h):(e=(r=i)*r,n=1<=(e+=(h=1<=e?0:Math.sqrt(1-e)*Math.sin(h))*h)?0:Math.sqrt(1-e),l.value===Bs?(e=n,n=-h,h=e):l.value===Ts?(n=-n,h=-h):l.value===Ds&&(e=n,n=h,h=-e),this.face===Os?(e=r,r=-n,n=e):this.face===js?(r=-r,n=-n):this.face===Gs&&(e=r,r=n,n=-e),o.phi=Math.acos(-h)-D,o.lam=Math.atan2(n,r),this.face===Os?o.lam=j(o.lam,-D):this.face===js?o.lam=j(o.lam,-V):this.face===Gs&&(o.lam=j(o.lam,+D))),0!==this.es&&(n=o.phi<0?1:0,r=Math.tan(o.phi),r=this.b/Math.sqrt(r*r+this.one_minus_f_squared),o.phi=Math.atan(Math.sqrt(this.a*this.a-r*r)/(this.one_minus_f*r)),n&&(o.phi=-o.phi)),o.lam+=this.long0,t.x=o.lam,t.y=o.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},Us=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Qs=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Ws=H/5,Xs=1/Ws,Hs={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var s=pt(t.x-this.long0),i=Math.abs(t.y),a=Math.floor(i*Ws);a<0?a=0:18<=a&&(a=17);i={x:hs(Us[a],i=H*(i-Xs*a))*s,y:hs(Qs[a],i)};return t.y<0&&(i.y=-i.y),i.x=i.x*this.a*.8487+this.x0,i.y=i.y*this.a*1.3523+this.y0,i},inverse:function(t){var i={x:(t.x-this.x0)/(.8487*this.a),y:Math.abs(t.y-this.y0)/(1.3523*this.a)};if(1<=i.y)i.x/=Us[18][0],i.y=t.y<0?-D:D;else{var s=Math.floor(18*i.y);for(s<0?s=0:18<=s&&(s=17);;)if(Qs[s][0]>i.y)--s;else{if(!(Qs[s+1][0]<=i.y))break;++s}var a=Qs[s],h=function(t,s,i,a){for(var h=s;a;--a){var e=t(h);if(h-=e,Math.abs(e)<i)break}return h}(function(t){return(hs(a,t)-i.y)/(s=t,(t=a)[1]+s*(2*t[2]+3*s*t[3]));var s},h=5*(i.y-a[0])/(Qs[s+1][0]-a[0]),W,100);i.x/=hs(Us[s],h),i.y=(5*s+h)*X,t.y<0&&(i.y=-i.y)}return i.x=pt(i.x+this.long0),i},names:["Robinson","robin"]},Js={init:function(){this.name="geocent"},forward:function(t){return u(t,this.es,this.a)},inverse:function(t){return f(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Ks=0,Vs=1,Zs=2,Ys=3,$s={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},gt={init:function(){if(Object.keys($s).forEach(function(t){if(void 0===this[t])this[t]=$s[t].def;else{if($s[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);$s[t].num&&(this[t]=parseFloat(this[t]))}$s[t].degrees&&(this[t]=this[t]*X)}.bind(this)),Math.abs(Math.abs(this.lat0)-D)<W?this.mode=this.lat0<0?Vs:Ks:Math.abs(this.lat0)<W?this.mode=Zs:(this.mode=Ys,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||1e10<this.pn1)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,s=this.azi;this.cg=Math.cos(s),this.sg=Math.sin(s),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var s,i,a=Math.sin(t.y),h=Math.cos(t.y),e=Math.cos(t.x);switch(this.mode){case Ys:i=this.sinph0*a+this.cosph0*h*e;break;case Zs:i=h*e;break;case Vs:i=-a;break;case Ks:i=a}switch(s=(i=this.pn1/(this.p-i))*h*Math.sin(t.x),this.mode){case Ys:i*=this.cosph0*a-this.sinph0*h*e;break;case Zs:i*=a;break;case Ks:i*=-h*e;break;case Vs:i*=h*e}return e=1/((h=i*this.cg+s*this.sg)*this.sw*this.h1+this.cw),s=(s*this.cg-i*this.sg)*this.cw*e,i=h*e,t.x=s*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var s={x:t.x,y:t.y},i=1/(this.pn1-t.y*this.sw),a=this.pn1*t.x*i,h=this.pn1*t.y*this.cw*i;t.x=a*this.cg+h*this.sg,t.y=h*this.cg-a*this.sg;i=Ut(t.x,t.y);if(Math.abs(i)<W)s.x=0,s.y=t.y;else{h=1-i*i*this.pfact;switch(h=(this.p-Math.sqrt(h))/(this.pn1/i+i/this.pn1),a=Math.sqrt(1-h*h),this.mode){case Ys:s.y=Math.asin(a*this.sinph0+t.y*h*this.cosph0/i),t.y=(a-this.sinph0*Math.sin(s.y))*i,t.x*=h*this.cosph0;break;case Zs:s.y=Math.asin(t.y*h/i),t.y=a*i,t.x*=h;break;case Ks:s.y=Math.asin(a),t.y=-t.y;break;case Vs:s.y=-Math.asin(a)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]};return N.defaultDatum="WGS84",N.Proj=y,N.WGS84=new N.Proj("WGS84"),N.Point=A,N.toPoint=St,N.defs=o,N.nadgrid=function(t,s){var i,a=new DataView(s),h=11!==(i=a).getInt32(8,!1)&&(11!==i.getInt32(8,!0)&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0),s=(s=h,{nFields:(i=a).getInt32(8,s),nSubgridFields:i.getInt32(24,s),nSubgrids:i.getInt32(40,s),shiftType:c(i,56,64).trim(),fromSemiMajorAxis:i.getFloat64(120,s),fromSemiMinorAxis:i.getFloat64(136,s),toSemiMajorAxis:i.getFloat64(152,s),toSemiMinorAxis:i.getFloat64(168,s)});1<s.nSubgrids&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");h={header:s,subgrids:M(a,s,h)};return Nt[t]=h},N.transform=b,N.mgrs=zt,N.version="2.7.2",(zt=N).Proj.projections.add(ns),zt.Proj.projections.add(rs),zt.Proj.projections.add(os),zt.Proj.projections.add(cs),zt.Proj.projections.add(Ms),zt.Proj.projections.add(us),zt.Proj.projections.add(ds),zt.Proj.projections.add(ms),zt.Proj.projections.add(ps),zt.Proj.projections.add(ys),zt.Proj.projections.add(_s),zt.Proj.projections.add(xs),zt.Proj.projections.add(gs),zt.Proj.projections.add(bs),zt.Proj.projections.add(vs),zt.Proj.projections.add(ws),zt.Proj.projections.add(Ns),zt.Proj.projections.add(Cs),zt.Proj.projections.add(Ps),zt.Proj.projections.add(Ss),zt.Proj.projections.add(ks),zt.Proj.projections.add(Es),zt.Proj.projections.add(Is),zt.Proj.projections.add(qs),zt.Proj.projections.add(Fs),zt.Proj.projections.add(Hs),zt.Proj.projections.add(Js),zt.Proj.projections.add(gt),N}); \ No newline at end of file diff --git a/public/libs/spectrum.css b/public/libs/spectrum.css new file mode 100644 index 0000000000000000000000000000000000000000..6a83b72501beed9ca83b36e432e7047f1d3012be --- /dev/null +++ b/public/libs/spectrum.css @@ -0,0 +1,519 @@ +/*** +Spectrum Colorpicker v1.3.4 +https://github.com/bgrins/spectrum +Author: Brian Grinstead +License: MIT +***/ + +.sp-container { + position:absolute; + top:0; + left:0; + display:inline-block; + *display: inline; + *zoom: 1; + /* https://github.com/bgrins/spectrum/issues/40 */ + z-index: 9999994; + overflow: hidden; +} +.sp-container.sp-flat { + position: relative; +} + +/* Fix for * { box-sizing: border-box; } */ +.sp-container, +.sp-container * { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ +.sp-top { + position:relative; + width: 100%; + display:inline-block; +} +.sp-top-inner { + position:absolute; + top:0; + left:0; + bottom:0; + right:0; +} +.sp-color { + position: absolute; + top:0; + left:0; + bottom:0; + right:20%; +} +.sp-hue { + position: absolute; + top:0; + right:0; + bottom:0; + left:84%; + height: 100%; +} + +.sp-clear-enabled .sp-hue { + top:33px; + height: 77.5%; +} + +.sp-fill { + padding-top: 80%; +} +.sp-sat, .sp-val { + position: absolute; + top:0; + left:0; + right:0; + bottom:0; +} + +.sp-alpha-enabled .sp-top { + margin-bottom: 18px; +} +.sp-alpha-enabled .sp-alpha { + display: block; +} +.sp-alpha-handle { + position:absolute; + top:-4px; + bottom: -4px; + width: 6px; + left: 50%; + cursor: pointer; + border: 1px solid black; + background: white; + opacity: .8; +} +.sp-alpha { + display: none; + position: absolute; + bottom: -14px; + right: 0; + left: 0; + height: 8px; +} +.sp-alpha-inner { + border: solid 1px #333; +} + +.sp-clear { + display: none; +} + +.sp-clear.sp-clear-display { + background-position: center; +} + +.sp-clear-enabled .sp-clear { + display: block; + position:absolute; + top:0px; + right:0; + bottom:0; + left:84%; + height: 28px; +} + +/* Don't allow text selection */ +.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { + -webkit-user-select:none; + -moz-user-select: -moz-none; + -o-user-select:none; + user-select: none; +} + +.sp-container.sp-input-disabled .sp-input-container { + display: none; +} +.sp-container.sp-buttons-disabled .sp-button-container { + display: none; +} +.sp-palette-only .sp-picker-container { + display: none; +} +.sp-palette-disabled .sp-palette-container { + display: none; +} + +.sp-initial-disabled .sp-initial { + display: none; +} + + +/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ +.sp-sat { + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; + filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); +} +.sp-val { + background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; + filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); +} + +.sp-hue { + background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); + background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); +} + +/* IE filters do not support multiple color stops. + Generate 6 divs, line them up, and do two color gradients for each. + Yes, really. + */ +.sp-1 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); +} +.sp-2 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); +} +.sp-3 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); +} +.sp-4 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); +} +.sp-5 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); +} +.sp-6 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); +} + +.sp-hidden { + display: none !important; +} + +/* Clearfix hack */ +.sp-cf:before, .sp-cf:after { content: ""; display: table; } +.sp-cf:after { clear: both; } +.sp-cf { *zoom: 1; } + +/* Mobile devices, make hue slider bigger so it is easier to slide */ +@media (max-device-width: 480px) { + .sp-color { right: 40%; } + .sp-hue { left: 63%; } + .sp-fill { padding-top: 60%; } +} +.sp-dragger { + border-radius: 5px; + height: 5px; + width: 5px; + border: 1px solid #fff; + background: #000; + cursor: pointer; + position:absolute; + top:0; + left: 0; +} +.sp-slider { + position: absolute; + top:0; + cursor:pointer; + height: 3px; + left: -1px; + right: -1px; + border: 1px solid #000; + background: white; + opacity: .8; +} + +/* +Theme authors: +Here are the basic themeable display options (colors, fonts, global widths). +See http://bgrins.github.io/spectrum/themes/ for instructions. +*/ + +.sp-container { + border-radius: 0; + background-color: #ECECEC; + border: solid 1px #f0c49B; + padding: 0; +} +.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear +{ + font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.sp-top +{ + margin-bottom: 3px; +} +.sp-color, .sp-hue, .sp-clear +{ + border: solid 1px #666; +} + +/* Input */ +.sp-input-container { + float:right; + width: 100px; + margin-bottom: 4px; +} +.sp-initial-disabled .sp-input-container { + width: 100%; +} +.sp-input { + font-size: 12px !important; + border: 1px inset; + padding: 4px 5px; + margin: 0; + width: 100%; + background:transparent; + border-radius: 3px; + color: #222; +} +.sp-input:focus { + border: 1px solid orange; +} +.sp-input.sp-validation-error +{ + border: 1px solid red; + background: #fdd; +} +.sp-picker-container , .sp-palette-container +{ + float:left; + position: relative; + padding: 10px; + padding-bottom: 300px; + margin-bottom: -290px; +} +.sp-picker-container +{ + width: 172px; + border-left: solid 1px #fff; +} + +/* Palettes */ +.sp-palette-container +{ + border-right: solid 1px #ccc; +} + +.sp-palette .sp-thumb-el { + display: block; + position:relative; + float:left; + width: 24px; + height: 15px; + margin: 3px; + cursor: pointer; + border:solid 2px transparent; +} +.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { + border-color: orange; +} +.sp-thumb-el +{ + position:relative; +} + +/* Initial */ +.sp-initial +{ + float: left; + border: solid 1px #333; +} +.sp-initial span { + width: 30px; + height: 25px; + border:none; + display:block; + float:left; + margin:0; +} + +.sp-initial .sp-clear-display { + background-position: center; +} + +/* Buttons */ +.sp-button-container { + float: right; +} + +/* Replacer (the little preview div that shows up instead of the <input>) */ +.sp-replacer { + margin:0; + overflow:hidden; + cursor:pointer; + padding: 4px; + display:inline-block; + *zoom: 1; + *display: inline; + border: solid 1px #91765d; + background: #eee; + color: #333; + vertical-align: middle; +} +.sp-replacer:hover, .sp-replacer.sp-active { + border-color: #F0C49B; + color: #111; +} +.sp-replacer.sp-disabled { + cursor:default; + border-color: silver; + color: silver; +} +.sp-dd { + padding: 2px 0; + height: 16px; + line-height: 16px; + float:left; + font-size:10px; +} +.sp-preview +{ + position:relative; + width:25px; + height: 20px; + border: solid 1px #222; + margin-right: 5px; + float:left; + z-index: 0; +} + +.sp-palette +{ + *width: 220px; + max-width: 220px; +} +.sp-palette .sp-thumb-el +{ + width:16px; + height: 16px; + margin:2px 1px; + border: solid 1px #d0d0d0; +} + +.sp-container +{ + padding-bottom:0; +} + + +/* Buttons: http://hellohappy.org/css3-buttons/ */ +.sp-container button { + background-color: #eeeeee; + background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); + background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); + background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); + background-image: -o-linear-gradient(top, #eeeeee, #cccccc); + background-image: linear-gradient(to bottom, #eeeeee, #cccccc); + border: 1px solid #ccc; + border-bottom: 1px solid #bbb; + border-radius: 3px; + color: #333; + font-size: 14px; + line-height: 1; + padding: 5px 4px; + text-align: center; + text-shadow: 0 1px 0 #eee; + vertical-align: middle; +} +.sp-container button:hover { + background-color: #dddddd; + background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); + background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); + border: 1px solid #bbb; + border-bottom: 1px solid #999; + cursor: pointer; + text-shadow: 0 1px 0 #ddd; +} +.sp-container button:active { + border: 1px solid #aaa; + border-bottom: 1px solid #888; + -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; +} +.sp-cancel +{ + font-size: 11px; + color: #d93f3f !important; + margin:0; + padding:2px; + margin-right: 5px; + vertical-align: middle; + text-decoration:none; + +} +.sp-cancel:hover +{ + color: #d93f3f !important; + text-decoration: underline; +} + + +.sp-palette span:hover, .sp-palette span.sp-thumb-active +{ + border-color: #000; +} + +.sp-preview, .sp-alpha, .sp-thumb-el +{ + position:relative; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); +} +.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner +{ + display:block; + position:absolute; + top:0;left:0;bottom:0;right:0; +} + +.sp-palette .sp-thumb-inner +{ + background-position: 50% 50%; + background-repeat: no-repeat; +} + +.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); +} + +.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); +} + +.sp-clear-display { + background-repeat:no-repeat; + background-position: center; + background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==); +} diff --git a/public/libs/spectrum.js b/public/libs/spectrum.js new file mode 100644 index 0000000000000000000000000000000000000000..8ced40aedb4bf058754a847dd964c68d530b85b8 --- /dev/null +++ b/public/libs/spectrum.js @@ -0,0 +1,2080 @@ +// Spectrum Colorpicker v1.3.4 +// https://github.com/bgrins/spectrum +// Author: Brian Grinstead +// License: MIT + +(function (window, $, undefined) { + var defaultOpts = { + + // Callbacks + beforeShow: noop, + move: noop, + change: noop, + show: noop, + hide: noop, + + // Options + color: false, + flat: false, + showInput: false, + allowEmpty: false, + showButtons: true, + clickoutFiresChange: false, + showInitial: false, + showPalette: false, + showPaletteOnly: false, + showSelectionPalette: true, + localStorageKey: false, + appendTo: "body", + maxSelectionSize: 7, + cancelText: "cancel", + chooseText: "choose", + clearText: "Clear Color Selection", + preferredFormat: false, + className: "", // Deprecated - use containerClassName and replacerClassName instead. + containerClassName: "", + replacerClassName: "", + showAlpha: false, + theme: "sp-light", + palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]], + selectionPalette: [], + disabled: false + }, + spectrums = [], + IE = !!/msie/i.exec( window.navigator.userAgent ), + rgbaSupport = (function() { + function contains( str, substr ) { + return !!~('' + str).indexOf(substr); + } + + var elem = document.createElement('div'); + var style = elem.style; + style.cssText = 'background-color:rgba(0,0,0,.5)'; + return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla'); + })(), + inputTypeColorSupport = (function() { + var colorInput = $("<input type='color' value='!' />")[0]; + return colorInput.type === "color" && colorInput.value !== "!"; + })(), + replaceInput = [ + "<div class='sp-replacer'>", + "<div class='sp-preview'><div class='sp-preview-inner'></div></div>", + "<div class='sp-dd'>▼</div>", + "</div>" + ].join(''), + markup = (function () { + + // IE does not support gradients with multiple stops, so we need to simulate + // that for the rainbow slider with 8 divs that each have a single gradient + var gradientFix = ""; + if (IE) { + for (var i = 1; i <= 6; i++) { + gradientFix += "<div class='sp-" + i + "'></div>"; + } + } + + return [ + "<div class='sp-container sp-hidden'>", + "<div class='sp-palette-container'>", + "<div class='sp-palette sp-thumb sp-cf'></div>", + "</div>", + "<div class='sp-picker-container'>", + "<div class='sp-top sp-cf'>", + "<div class='sp-fill'></div>", + "<div class='sp-top-inner'>", + "<div class='sp-color'>", + "<div class='sp-sat'>", + "<div class='sp-val'>", + "<div class='sp-dragger'></div>", + "</div>", + "</div>", + "</div>", + "<div class='sp-clear sp-clear-display'>", + "</div>", + "<div class='sp-hue'>", + "<div class='sp-slider'></div>", + gradientFix, + "</div>", + "</div>", + "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>", + "</div>", + "<div class='sp-input-container sp-cf'>", + "<input class='sp-input' type='text' spellcheck='false' />", + "</div>", + "<div class='sp-initial sp-thumb sp-cf'></div>", + "<div class='sp-button-container sp-cf'>", + "<a class='sp-cancel' href='#'></a>", + "<button type='button' class='sp-choose'></button>", + "</div>", + "</div>", + "</div>" + ].join(""); + })(); + + function paletteTemplate (p, color, className, tooltipFormat) { + var html = []; + for (var i = 0; i < p.length; i++) { + var current = p[i]; + if(current) { + var tiny = tinycolor(current); + var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light"; + c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : ""; + + var formattedString = tiny.toString(tooltipFormat || "rgb"); + var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter(); + html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>'); + } else { + var cls = 'sp-clear-display'; + html.push('<span title="No Color Selected" data-color="" style="background-color:transparent;" class="' + cls + '"></span>'); + } + } + return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>"; + } + + function hideAll() { + for (var i = 0; i < spectrums.length; i++) { + if (spectrums[i]) { + spectrums[i].hide(); + } + } + } + + function instanceOptions(o, callbackContext) { + var opts = $.extend({}, defaultOpts, o); + opts.callbacks = { + 'move': bind(opts.move, callbackContext), + 'change': bind(opts.change, callbackContext), + 'show': bind(opts.show, callbackContext), + 'hide': bind(opts.hide, callbackContext), + 'beforeShow': bind(opts.beforeShow, callbackContext) + }; + + return opts; + } + + function spectrum(element, o) { + + var opts = instanceOptions(o, element), + flat = opts.flat, + showSelectionPalette = opts.showSelectionPalette, + localStorageKey = opts.localStorageKey, + theme = opts.theme, + callbacks = opts.callbacks, + resize = throttle(reflow, 10), + visible = false, + dragWidth = 0, + dragHeight = 0, + dragHelperHeight = 0, + slideHeight = 0, + slideWidth = 0, + alphaWidth = 0, + alphaSlideHelperWidth = 0, + slideHelperHeight = 0, + currentHue = 0, + currentSaturation = 0, + currentValue = 0, + currentAlpha = 1, + palette = [], + paletteArray = [], + paletteLookup = {}, + selectionPalette = opts.selectionPalette.slice(0), + maxSelectionSize = opts.maxSelectionSize, + draggingClass = "sp-dragging", + shiftMovementDirection = null; + + var doc = element.ownerDocument, + body = doc.body, + boundElement = $(element), + disabled = false, + container = $(markup, doc).addClass(theme), + dragger = container.find(".sp-color"), + dragHelper = container.find(".sp-dragger"), + slider = container.find(".sp-hue"), + slideHelper = container.find(".sp-slider"), + alphaSliderInner = container.find(".sp-alpha-inner"), + alphaSlider = container.find(".sp-alpha"), + alphaSlideHelper = container.find(".sp-alpha-handle"), + textInput = container.find(".sp-input"), + paletteContainer = container.find(".sp-palette"), + initialColorContainer = container.find(".sp-initial"), + cancelButton = container.find(".sp-cancel"), + clearButton = container.find(".sp-clear"), + chooseButton = container.find(".sp-choose"), + isInput = boundElement.is("input"), + isInputTypeColor = isInput && inputTypeColorSupport && boundElement.attr("type") === "color", + shouldReplace = isInput && !flat, + replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]), + offsetElement = (shouldReplace) ? replacer : boundElement, + previewElement = replacer.find(".sp-preview-inner"), + initialColor = opts.color || (isInput && boundElement.val()), + colorOnShow = false, + preferredFormat = opts.preferredFormat, + currentPreferredFormat = preferredFormat, + clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange, + isEmpty = !initialColor, + allowEmpty = opts.allowEmpty && !isInputTypeColor; + + function applyOptions() { + + if (opts.showPaletteOnly) { + opts.showPalette = true; + } + + if (opts.palette) { + palette = opts.palette.slice(0); + paletteArray = $.isArray(palette[0]) ? palette : [palette]; + paletteLookup = {}; + for (var i = 0; i < paletteArray.length; i++) { + for (var j = 0; j < paletteArray[i].length; j++) { + var rgb = tinycolor(paletteArray[i][j]).toRgbString(); + paletteLookup[rgb] = true; + } + } + } + + container.toggleClass("sp-flat", flat); + container.toggleClass("sp-input-disabled", !opts.showInput); + container.toggleClass("sp-alpha-enabled", opts.showAlpha); + container.toggleClass("sp-clear-enabled", allowEmpty); + container.toggleClass("sp-buttons-disabled", !opts.showButtons); + container.toggleClass("sp-palette-disabled", !opts.showPalette); + container.toggleClass("sp-palette-only", opts.showPaletteOnly); + container.toggleClass("sp-initial-disabled", !opts.showInitial); + container.addClass(opts.className).addClass(opts.containerClassName); + + reflow(); + } + + function initialize() { + + if (IE) { + container.find("*:not(input)").attr("unselectable", "on"); + } + + applyOptions(); + + if (shouldReplace) { + boundElement.after(replacer).hide(); + } + + if (!allowEmpty) { + clearButton.hide(); + } + + if (flat) { + boundElement.after(container).hide(); + } + else { + + var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo); + if (appendTo.length !== 1) { + appendTo = $("body"); + } + + appendTo.append(container); + } + + updateSelectionPaletteFromStorage(); + + offsetElement.bind("click.spectrum touchstart.spectrum", function (e) { + if (!disabled) { + toggle(); + } + + e.stopPropagation(); + + if (!$(e.target).is("input")) { + e.preventDefault(); + } + }); + + if(boundElement.is(":disabled") || (opts.disabled === true)) { + disable(); + } + + // Prevent clicks from bubbling up to document. This would cause it to be hidden. + container.click(stopPropagation); + + // Handle user typed input + textInput.change(setFromTextInput); + textInput.bind("paste", function () { + setTimeout(setFromTextInput, 1); + }); + textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } }); + + cancelButton.text(opts.cancelText); + cancelButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + hide("cancel"); + }); + + clearButton.attr("title", opts.clearText); + clearButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + isEmpty = true; + move(); + + if(flat) { + //for the flat style, this is a change event + updateOriginalInput(true); + } + }); + + chooseButton.text(opts.chooseText); + chooseButton.bind("click.spectrum", function (e) { + e.stopPropagation(); + e.preventDefault(); + + if (isValid()) { + updateOriginalInput(true); + hide(); + } + }); + + draggable(alphaSlider, function (dragX, dragY, e) { + currentAlpha = (dragX / alphaWidth); + isEmpty = false; + if (e.shiftKey) { + currentAlpha = Math.round(currentAlpha * 10) / 10; + } + + move(); + }, dragStart, dragStop); + + draggable(slider, function (dragX, dragY) { + currentHue = parseFloat(dragY / slideHeight); + isEmpty = false; + if (!opts.showAlpha) { + currentAlpha = 1; + } + move(); + }, dragStart, dragStop); + + draggable(dragger, function (dragX, dragY, e) { + + // shift+drag should snap the movement to either the x or y axis. + if (!e.shiftKey) { + shiftMovementDirection = null; + } + else if (!shiftMovementDirection) { + var oldDragX = currentSaturation * dragWidth; + var oldDragY = dragHeight - (currentValue * dragHeight); + var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY); + + shiftMovementDirection = furtherFromX ? "x" : "y"; + } + + var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x"; + var setValue = !shiftMovementDirection || shiftMovementDirection === "y"; + + if (setSaturation) { + currentSaturation = parseFloat(dragX / dragWidth); + } + if (setValue) { + currentValue = parseFloat((dragHeight - dragY) / dragHeight); + } + + isEmpty = false; + if (!opts.showAlpha) { + currentAlpha = 1; + } + + move(); + + }, dragStart, dragStop); + + if (!!initialColor) { + set(initialColor); + + // In case color was black - update the preview UI and set the format + // since the set function will not run (default color is black). + updateUI(); + currentPreferredFormat = preferredFormat || tinycolor(initialColor).format; + + addColorToSelectionPalette(initialColor); + } + else { + updateUI(); + } + + if (flat) { + show(); + } + + function palletElementClick(e) { + if (e.data && e.data.ignore) { + set($(this).data("color")); + move(); + } + else { + set($(this).data("color")); + move(); + updateOriginalInput(true); + hide(); + } + + return false; + } + + var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum"; + paletteContainer.delegate(".sp-thumb-el", paletteEvent, palletElementClick); + initialColorContainer.delegate(".sp-thumb-el:nth-child(1)", paletteEvent, { ignore: true }, palletElementClick); + } + + function updateSelectionPaletteFromStorage() { + + if (localStorageKey && window.localStorage) { + + // Migrate old palettes over to new format. May want to remove this eventually. + try { + var oldPalette = window.localStorage[localStorageKey].split(",#"); + if (oldPalette.length > 1) { + delete window.localStorage[localStorageKey]; + $.each(oldPalette, function(i, c) { + addColorToSelectionPalette(c); + }); + } + } + catch(e) { } + + try { + selectionPalette = window.localStorage[localStorageKey].split(";"); + } + catch (e) { } + } + } + + function addColorToSelectionPalette(color) { + if (showSelectionPalette) { + var rgb = tinycolor(color).toRgbString(); + if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) { + selectionPalette.push(rgb); + while(selectionPalette.length > maxSelectionSize) { + selectionPalette.shift(); + } + } + + if (localStorageKey && window.localStorage) { + try { + window.localStorage[localStorageKey] = selectionPalette.join(";"); + } + catch(e) { } + } + } + } + + function getUniqueSelectionPalette() { + var unique = []; + if (opts.showPalette) { + for (i = 0; i < selectionPalette.length; i++) { + var rgb = tinycolor(selectionPalette[i]).toRgbString(); + + if (!paletteLookup[rgb]) { + unique.push(selectionPalette[i]); + } + } + } + + return unique.reverse().slice(0, opts.maxSelectionSize); + } + + function drawPalette() { + + var currentColor = get(); + + var html = $.map(paletteArray, function (palette, i) { + return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts.preferredFormat); + }); + + updateSelectionPaletteFromStorage(); + + if (selectionPalette) { + html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts.preferredFormat)); + } + + paletteContainer.html(html.join("")); + } + + function drawInitial() { + if (opts.showInitial) { + var initial = colorOnShow; + var current = get(); + initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts.preferredFormat)); + } + } + + function dragStart() { + if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) { + reflow(); + } + container.addClass(draggingClass); + shiftMovementDirection = null; + boundElement.trigger('dragstart.spectrum', [ get() ]); + } + + function dragStop() { + container.removeClass(draggingClass); + boundElement.trigger('dragstop.spectrum', [ get() ]); + } + + function setFromTextInput() { + + var value = textInput.val(); + + if ((value === null || value === "") && allowEmpty) { + set(null); + updateOriginalInput(true); + } + else { + var tiny = tinycolor(value); + if (tiny.ok) { + set(tiny); + updateOriginalInput(true); + } + else { + textInput.addClass("sp-validation-error"); + } + } + } + + function toggle() { + if (visible) { + hide(); + } + else { + show(); + } + } + + function show() { + var event = $.Event('beforeShow.spectrum'); + + if (visible) { + reflow(); + return; + } + + boundElement.trigger(event, [ get() ]); + + if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) { + return; + } + + hideAll(); + visible = true; + + $(doc).bind("click.spectrum", hide); + $(window).bind("resize.spectrum", resize); + replacer.addClass("sp-active"); + container.removeClass("sp-hidden"); + + reflow(); + updateUI(); + + colorOnShow = get(); + + drawInitial(); + callbacks.show(colorOnShow); + boundElement.trigger('show.spectrum', [ colorOnShow ]); + } + + function hide(e) { + + // Return on right click + if (e && e.type == "click" && e.button == 2) { return; } + + // Return if hiding is unnecessary + if (!visible || flat) { return; } + visible = false; + + $(doc).unbind("click.spectrum", hide); + $(window).unbind("resize.spectrum", resize); + + replacer.removeClass("sp-active"); + container.addClass("sp-hidden"); + + var colorHasChanged = !tinycolor.equals(get(), colorOnShow); + + if (colorHasChanged) { + if (clickoutFiresChange && e !== "cancel") { + updateOriginalInput(true); + } + else { + revert(); + } + } + + callbacks.hide(get()); + boundElement.trigger('hide.spectrum', [ get() ]); + } + + function revert() { + set(colorOnShow, true); + } + + function set(color, ignoreFormatChange) { + if (tinycolor.equals(color, get())) { + // Update UI just in case a validation error needs + // to be cleared. + updateUI(); + return; + } + + var newColor, newHsv; + if (!color && allowEmpty) { + isEmpty = true; + } else { + isEmpty = false; + newColor = tinycolor(color); + newHsv = newColor.toHsv(); + + currentHue = (newHsv.h % 360) / 360; + currentSaturation = newHsv.s; + currentValue = newHsv.v; + currentAlpha = newHsv.a; + } + updateUI(); + + if (newColor && newColor.ok && !ignoreFormatChange) { + currentPreferredFormat = preferredFormat || newColor.format; + } + } + + function get(opts) { + opts = opts || { }; + + if (allowEmpty && isEmpty) { + return null; + } + + return tinycolor.fromRatio({ + h: currentHue, + s: currentSaturation, + v: currentValue, + a: Math.round(currentAlpha * 100) / 100 + }, { format: opts.format || currentPreferredFormat }); + } + + function isValid() { + return !textInput.hasClass("sp-validation-error"); + } + + function move() { + updateUI(); + + callbacks.move(get()); + boundElement.trigger('move.spectrum', [ get() ]); + } + + function updateUI() { + + textInput.removeClass("sp-validation-error"); + + updateHelperLocations(); + + // Update dragger background color (gradients take care of saturation and value). + var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 }); + dragger.css("background-color", flatColor.toHexString()); + + // Get a format that alpha will be included in (hex and names ignore alpha) + var format = currentPreferredFormat; + if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) { + if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") { + format = "rgb"; + } + } + + var realColor = get({ format: format }), + displayColor = ''; + + //reset background info for preview element + previewElement.removeClass("sp-clear-display"); + previewElement.css('background-color', 'transparent'); + + if (!realColor && allowEmpty) { + // Update the replaced elements background with icon indicating no color selection + previewElement.addClass("sp-clear-display"); + } + else { + var realHex = realColor.toHexString(), + realRgb = realColor.toRgbString(); + + // Update the replaced elements background color (with actual selected color) + if (rgbaSupport || realColor.alpha === 1) { + previewElement.css("background-color", realRgb); + } + else { + previewElement.css("background-color", "transparent"); + previewElement.css("filter", realColor.toFilter()); + } + + if (opts.showAlpha) { + var rgb = realColor.toRgb(); + rgb.a = 0; + var realAlpha = tinycolor(rgb).toRgbString(); + var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")"; + + if (IE) { + alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex)); + } + else { + alphaSliderInner.css("background", "-webkit-" + gradient); + alphaSliderInner.css("background", "-moz-" + gradient); + alphaSliderInner.css("background", "-ms-" + gradient); + // Use current syntax gradient on unprefixed property. + alphaSliderInner.css("background", + "linear-gradient(to right, " + realAlpha + ", " + realHex + ")"); + } + } + + displayColor = realColor.toString(format); + } + + // Update the text entry input as it changes happen + if (opts.showInput) { + textInput.val(displayColor); + } + + if (opts.showPalette) { + drawPalette(); + } + + drawInitial(); + } + + function updateHelperLocations() { + var s = currentSaturation; + var v = currentValue; + + if(allowEmpty && isEmpty) { + //if selected color is empty, hide the helpers + alphaSlideHelper.hide(); + slideHelper.hide(); + dragHelper.hide(); + } + else { + //make sure helpers are visible + alphaSlideHelper.show(); + slideHelper.show(); + dragHelper.show(); + + // Where to show the little circle in that displays your current selected color + var dragX = s * dragWidth; + var dragY = dragHeight - (v * dragHeight); + dragX = Math.max( + -dragHelperHeight, + Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight) + ); + dragY = Math.max( + -dragHelperHeight, + Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight) + ); + dragHelper.css({ + "top": dragY + "px", + "left": dragX + "px" + }); + + var alphaX = currentAlpha * alphaWidth; + alphaSlideHelper.css({ + "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px" + }); + + // Where to show the bar that displays your current selected hue + var slideY = (currentHue) * slideHeight; + slideHelper.css({ + "top": (slideY - slideHelperHeight) + "px" + }); + } + } + + function updateOriginalInput(fireCallback) { + var color = get(), + displayColor = '', + hasChanged = !tinycolor.equals(color, colorOnShow); + + if (color) { + displayColor = color.toString(currentPreferredFormat); + // Update the selection palette with the current color + addColorToSelectionPalette(color); + } + + if (isInput) { + boundElement.val(displayColor); + } + + colorOnShow = color; + + if (fireCallback && hasChanged) { + callbacks.change(color); + boundElement.trigger('change', [ color ]); + } + } + + function reflow() { + dragWidth = dragger.width(); + dragHeight = dragger.height(); + dragHelperHeight = dragHelper.height(); + slideWidth = slider.width(); + slideHeight = slider.height(); + slideHelperHeight = slideHelper.height(); + alphaWidth = alphaSlider.width(); + alphaSlideHelperWidth = alphaSlideHelper.width(); + + if (!flat) { + container.css("position", "absolute"); + container.offset(getOffset(container, offsetElement)); + } + + updateHelperLocations(); + + if (opts.showPalette) { + drawPalette(); + } + + boundElement.trigger('reflow.spectrum'); + } + + function destroy() { + boundElement.show(); + offsetElement.unbind("click.spectrum touchstart.spectrum"); + container.remove(); + replacer.remove(); + spectrums[spect.id] = null; + } + + function option(optionName, optionValue) { + if (optionName === undefined) { + return $.extend({}, opts); + } + if (optionValue === undefined) { + return opts[optionName]; + } + + opts[optionName] = optionValue; + applyOptions(); + } + + function enable() { + disabled = false; + boundElement.attr("disabled", false); + offsetElement.removeClass("sp-disabled"); + } + + function disable() { + hide(); + disabled = true; + boundElement.attr("disabled", true); + offsetElement.addClass("sp-disabled"); + } + + initialize(); + + var spect = { + show: show, + hide: hide, + toggle: toggle, + reflow: reflow, + option: option, + enable: enable, + disable: disable, + set: function (c) { + set(c); + updateOriginalInput(); + }, + get: get, + destroy: destroy, + container: container + }; + + spect.id = spectrums.push(spect) - 1; + + return spect; + } + + /** + * checkOffset - get the offset below/above and left/right element depending on screen position + * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js + */ + function getOffset(picker, input) { + var extraY = 0; + var dpWidth = picker.outerWidth(); + var dpHeight = picker.outerHeight(); + var inputHeight = input.outerHeight(); + var doc = picker[0].ownerDocument; + var docElem = doc.documentElement; + var viewWidth = docElem.clientWidth + $(doc).scrollLeft(); + var viewHeight = docElem.clientHeight + $(doc).scrollTop(); + var offset = input.offset(); + offset.top += inputHeight; + + offset.left -= + Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + + offset.top -= + Math.min(offset.top, ((offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight - extraY) : extraY)); + + return offset; + } + + /** + * noop - do nothing + */ + function noop() { + + } + + /** + * stopPropagation - makes the code only doing this a little easier to read in line + */ + function stopPropagation(e) { + e.stopPropagation(); + } + + /** + * Create a function bound to a given object + * Thanks to underscore.js + */ + function bind(func, obj) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 2); + return function () { + return func.apply(obj, args.concat(slice.call(arguments))); + }; + } + + /** + * Lightweight drag helper. Handles containment within the element, so that + * when dragging, the x is within [0,element.width] and y is within [0,element.height] + */ + function draggable(element, onmove, onstart, onstop) { + onmove = onmove || function () { }; + onstart = onstart || function () { }; + onstop = onstop || function () { }; + var doc = element.ownerDocument || document; + var dragging = false; + var offset = {}; + var maxHeight = 0; + var maxWidth = 0; + var hasTouch = ('ontouchstart' in window); + + var duringDragEvents = {}; + duringDragEvents["selectstart"] = prevent; + duringDragEvents["dragstart"] = prevent; + duringDragEvents["touchmove mousemove"] = move; + duringDragEvents["touchend mouseup"] = stop; + + function prevent(e) { + if (e.stopPropagation) { + e.stopPropagation(); + } + if (e.preventDefault) { + e.preventDefault(); + } + e.returnValue = false; + } + + function move(e) { + if (dragging) { + // Mouseup happened outside of window + if (IE && document.documentMode < 9 && !e.button) { + return stop(); + } + + var touches = e.originalEvent.touches; + var pageX = touches ? touches[0].pageX : e.pageX; + var pageY = touches ? touches[0].pageY : e.pageY; + + var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth)); + var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight)); + + if (hasTouch) { + // Stop scrolling in iOS + prevent(e); + } + + onmove.apply(element, [dragX, dragY, e]); + } + } + + function start(e) { + var rightclick = (e.which) ? (e.which == 3) : (e.button == 2); + var touches = e.originalEvent.touches; + + if (!rightclick && !dragging) { + if (onstart.apply(element, arguments) !== false) { + dragging = true; + maxHeight = $(element).height(); + maxWidth = $(element).width(); + offset = $(element).offset(); + + $(doc).bind(duringDragEvents); + $(doc.body).addClass("sp-dragging"); + + if (!hasTouch) { + move(e); + } + + prevent(e); + } + } + } + + function stop() { + if (dragging) { + $(doc).unbind(duringDragEvents); + $(doc.body).removeClass("sp-dragging"); + onstop.apply(element, arguments); + } + dragging = false; + } + + $(element).bind("touchstart mousedown", start); + } + + function throttle(func, wait, debounce) { + var timeout; + return function () { + var context = this, args = arguments; + var throttler = function () { + timeout = null; + func.apply(context, args); + }; + if (debounce) clearTimeout(timeout); + if (debounce || !timeout) timeout = setTimeout(throttler, wait); + }; + } + + function log(){/* jshint -W021 */if(window.console){if(Function.prototype.bind)log=Function.prototype.bind.call(console.log,console);else log=function(){Function.prototype.apply.call(console.log,console,arguments);};log.apply(this,arguments);}} + + /** + * Define a jQuery plugin + */ + var dataID = "spectrum.id"; + $.fn.spectrum = function (opts, extra) { + + if (typeof opts == "string") { + + var returnValue = this; + var args = Array.prototype.slice.call( arguments, 1 ); + + this.each(function () { + var spect = spectrums[$(this).data(dataID)]; + if (spect) { + var method = spect[opts]; + if (!method) { + throw new Error( "Spectrum: no such method: '" + opts + "'" ); + } + + if (opts == "get") { + returnValue = spect.get(); + } + else if (opts == "container") { + returnValue = spect.container; + } + else if (opts == "option") { + returnValue = spect.option.apply(spect, args); + } + else if (opts == "destroy") { + spect.destroy(); + $(this).removeData(dataID); + } + else { + method.apply(spect, args); + } + } + }); + + return returnValue; + } + + // Initializing a new instance of spectrum + return this.spectrum("destroy").each(function () { + var options = $.extend({}, opts, $(this).data()); + var spect = spectrum(this, options); + $(this).data(dataID, spect.id); + }); + }; + + $.fn.spectrum.load = true; + $.fn.spectrum.loadOpts = {}; + $.fn.spectrum.draggable = draggable; + $.fn.spectrum.defaults = defaultOpts; + + $.spectrum = { }; + $.spectrum.localization = { }; + $.spectrum.palettes = { }; + + $.fn.spectrum.processNativeColorInputs = function () { + if (!inputTypeColorSupport) { + $("input[type=color]").spectrum({ + preferredFormat: "hex6" + }); + } + }; + + // TinyColor v0.9.17 + // https://github.com/bgrins/TinyColor + // 2013-08-10, Brian Grinstead, MIT License + + (function() { + + var trimLeft = /^[\s,#]+/, + trimRight = /\s+$/, + tinyCounter = 0, + math = Math, + mathRound = math.round, + mathMin = math.min, + mathMax = math.max, + mathRandom = math.random; + + function tinycolor (color, opts) { + + color = (color) ? color : ''; + opts = opts || { }; + + // If input is already a tinycolor, return itself + if (typeof color == "object" && color.hasOwnProperty("_tc_id")) { + return color; + } + + var rgb = inputToRGB(color); + var r = rgb.r, + g = rgb.g, + b = rgb.b, + a = rgb.a, + roundA = mathRound(100*a) / 100, + format = opts.format || rgb.format; + + // Don't let the range of [0,255] come back in [0,1]. + // Potentially lose a little bit of precision here, but will fix issues where + // .5 gets interpreted as half of the total, instead of half of 1 + // If it was supposed to be 128, this was already taken care of by `inputToRgb` + if (r < 1) { r = mathRound(r); } + if (g < 1) { g = mathRound(g); } + if (b < 1) { b = mathRound(b); } + + return { + ok: rgb.ok, + format: format, + _tc_id: tinyCounter++, + alpha: a, + getAlpha: function() { + return a; + }, + setAlpha: function(value) { + a = boundAlpha(value); + roundA = mathRound(100*a) / 100; + }, + toHsv: function() { + var hsv = rgbToHsv(r, g, b); + return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: a }; + }, + toHsvString: function() { + var hsv = rgbToHsv(r, g, b); + var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100); + return (a == 1) ? + "hsv(" + h + ", " + s + "%, " + v + "%)" : + "hsva(" + h + ", " + s + "%, " + v + "%, "+ roundA + ")"; + }, + toHsl: function() { + var hsl = rgbToHsl(r, g, b); + return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: a }; + }, + toHslString: function() { + var hsl = rgbToHsl(r, g, b); + var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100); + return (a == 1) ? + "hsl(" + h + ", " + s + "%, " + l + "%)" : + "hsla(" + h + ", " + s + "%, " + l + "%, "+ roundA + ")"; + }, + toHex: function(allow3Char) { + return rgbToHex(r, g, b, allow3Char); + }, + toHexString: function(allow3Char) { + return '#' + this.toHex(allow3Char); + }, + toHex8: function() { + return rgbaToHex(r, g, b, a); + }, + toHex8String: function() { + return '#' + this.toHex8(); + }, + toRgb: function() { + return { r: mathRound(r), g: mathRound(g), b: mathRound(b), a: a }; + }, + toRgbString: function() { + return (a == 1) ? + "rgb(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ")" : + "rgba(" + mathRound(r) + ", " + mathRound(g) + ", " + mathRound(b) + ", " + roundA + ")"; + }, + toPercentageRgb: function() { + return { r: mathRound(bound01(r, 255) * 100) + "%", g: mathRound(bound01(g, 255) * 100) + "%", b: mathRound(bound01(b, 255) * 100) + "%", a: a }; + }, + toPercentageRgbString: function() { + return (a == 1) ? + "rgb(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%)" : + "rgba(" + mathRound(bound01(r, 255) * 100) + "%, " + mathRound(bound01(g, 255) * 100) + "%, " + mathRound(bound01(b, 255) * 100) + "%, " + roundA + ")"; + }, + toName: function() { + if (a === 0) { + return "transparent"; + } + + return hexNames[rgbToHex(r, g, b, true)] || false; + }, + toFilter: function(secondColor) { + var hex8String = '#' + rgbaToHex(r, g, b, a); + var secondHex8String = hex8String; + var gradientType = opts && opts.gradientType ? "GradientType = 1, " : ""; + + if (secondColor) { + var s = tinycolor(secondColor); + secondHex8String = s.toHex8String(); + } + + return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")"; + }, + toString: function(format) { + var formatSet = !!format; + format = format || this.format; + + var formattedString = false; + var hasAlphaAndFormatNotSet = !formatSet && a < 1 && a > 0; + var formatWithAlpha = hasAlphaAndFormatNotSet && (format === "hex" || format === "hex6" || format === "hex3" || format === "name"); + + if (format === "rgb") { + formattedString = this.toRgbString(); + } + if (format === "prgb") { + formattedString = this.toPercentageRgbString(); + } + if (format === "hex" || format === "hex6") { + formattedString = this.toHexString(); + } + if (format === "hex3") { + formattedString = this.toHexString(true); + } + if (format === "hex8") { + formattedString = this.toHex8String(); + } + if (format === "name") { + formattedString = this.toName(); + } + if (format === "hsl") { + formattedString = this.toHslString(); + } + if (format === "hsv") { + formattedString = this.toHsvString(); + } + + if (formatWithAlpha) { + return this.toRgbString(); + } + + return formattedString || this.toHexString(); + } + }; + } + + // If input is an object, force 1 into "1.0" to handle ratios properly + // String input requires "1.0" as input, so 1 will be treated as 1 + tinycolor.fromRatio = function(color, opts) { + if (typeof color == "object") { + var newColor = {}; + for (var i in color) { + if (color.hasOwnProperty(i)) { + if (i === "a") { + newColor[i] = color[i]; + } + else { + newColor[i] = convertToPercentage(color[i]); + } + } + } + color = newColor; + } + + return tinycolor(color, opts); + }; + + // Given a string or object, convert that input to RGB + // Possible string inputs: + // + // "red" + // "#f00" or "f00" + // "#ff0000" or "ff0000" + // "#ff000000" or "ff000000" + // "rgb 255 0 0" or "rgb (255, 0, 0)" + // "rgb 1.0 0 0" or "rgb (1, 0, 0)" + // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1" + // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1" + // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%" + // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1" + // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%" + // + function inputToRGB(color) { + + var rgb = { r: 0, g: 0, b: 0 }; + var a = 1; + var ok = false; + var format = false; + + if (typeof color == "string") { + color = stringInputToObject(color); + } + + if (typeof color == "object") { + if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) { + rgb = rgbToRgb(color.r, color.g, color.b); + ok = true; + format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb"; + } + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) { + color.s = convertToPercentage(color.s); + color.v = convertToPercentage(color.v); + rgb = hsvToRgb(color.h, color.s, color.v); + ok = true; + format = "hsv"; + } + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) { + color.s = convertToPercentage(color.s); + color.l = convertToPercentage(color.l); + rgb = hslToRgb(color.h, color.s, color.l); + ok = true; + format = "hsl"; + } + + if (color.hasOwnProperty("a")) { + a = color.a; + } + } + + a = boundAlpha(a); + + return { + ok: ok, + format: color.format || format, + r: mathMin(255, mathMax(rgb.r, 0)), + g: mathMin(255, mathMax(rgb.g, 0)), + b: mathMin(255, mathMax(rgb.b, 0)), + a: a + }; + } + + + // Conversion Functions + // -------------------- + + // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from: + // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript> + + // `rgbToRgb` + // Handle bounds / percentage checking to conform to CSS color spec + // <http://www.w3.org/TR/css3-color/> + // *Assumes:* r, g, b in [0, 255] or [0, 1] + // *Returns:* { r, g, b } in [0, 255] + function rgbToRgb(r, g, b){ + return { + r: bound01(r, 255) * 255, + g: bound01(g, 255) * 255, + b: bound01(b, 255) * 255 + }; + } + + // `rgbToHsl` + // Converts an RGB color value to HSL. + // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1] + // *Returns:* { h, s, l } in [0,1] + function rgbToHsl(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, l = (max + min) / 2; + + if(max == min) { + h = s = 0; // achromatic + } + else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + + h /= 6; + } + + return { h: h, s: s, l: l }; + } + + // `hslToRgb` + // Converts an HSL color value to RGB. + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100] + // *Returns:* { r, g, b } in the set [0, 255] + function hslToRgb(h, s, l) { + var r, g, b; + + h = bound01(h, 360); + s = bound01(s, 100); + l = bound01(l, 100); + + function hue2rgb(p, q, t) { + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + if(s === 0) { + r = g = b = l; // achromatic + } + else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return { r: r * 255, g: g * 255, b: b * 255 }; + } + + // `rgbToHsv` + // Converts an RGB color value to HSV + // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1] + // *Returns:* { h, s, v } in [0,1] + function rgbToHsv(r, g, b) { + + r = bound01(r, 255); + g = bound01(g, 255); + b = bound01(b, 255); + + var max = mathMax(r, g, b), min = mathMin(r, g, b); + var h, s, v = max; + + var d = max - min; + s = max === 0 ? 0 : d / max; + + if(max == min) { + h = 0; // achromatic + } + else { + switch(max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + return { h: h, s: s, v: v }; + } + + // `hsvToRgb` + // Converts an HSV color value to RGB. + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100] + // *Returns:* { r, g, b } in the set [0, 255] + function hsvToRgb(h, s, v) { + + h = bound01(h, 360) * 6; + s = bound01(s, 100); + v = bound01(v, 100); + + var i = math.floor(h), + f = h - i, + p = v * (1 - s), + q = v * (1 - f * s), + t = v * (1 - (1 - f) * s), + mod = i % 6, + r = [v, q, p, p, t, v][mod], + g = [t, v, v, q, p, p][mod], + b = [p, p, t, v, v, q][mod]; + + return { r: r * 255, g: g * 255, b: b * 255 }; + } + + // `rgbToHex` + // Converts an RGB color to hex + // Assumes r, g, and b are contained in the set [0, 255] + // Returns a 3 or 6 character hex + function rgbToHex(r, g, b, allow3Char) { + + var hex = [ + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + // Return a 3 character hex if possible + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) { + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0); + } + + return hex.join(""); + } + // `rgbaToHex` + // Converts an RGBA color plus alpha transparency to hex + // Assumes r, g, b and a are contained in the set [0, 255] + // Returns an 8 character hex + function rgbaToHex(r, g, b, a) { + + var hex = [ + pad2(convertDecimalToHex(a)), + pad2(mathRound(r).toString(16)), + pad2(mathRound(g).toString(16)), + pad2(mathRound(b).toString(16)) + ]; + + return hex.join(""); + } + + // `equals` + // Can be called with any tinycolor input + tinycolor.equals = function (color1, color2) { + if (!color1 || !color2) { return false; } + return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString(); + }; + tinycolor.random = function() { + return tinycolor.fromRatio({ + r: mathRandom(), + g: mathRandom(), + b: mathRandom() + }); + }; + + + // Modification Functions + // ---------------------- + // Thanks to less.js for some of the basics here + // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js> + + tinycolor.desaturate = function (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s -= amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); + }; + tinycolor.saturate = function (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.s += amount / 100; + hsl.s = clamp01(hsl.s); + return tinycolor(hsl); + }; + tinycolor.greyscale = function(color) { + return tinycolor.desaturate(color, 100); + }; + tinycolor.lighten = function(color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l += amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); + }; + tinycolor.darken = function (color, amount) { + amount = (amount === 0) ? 0 : (amount || 10); + var hsl = tinycolor(color).toHsl(); + hsl.l -= amount / 100; + hsl.l = clamp01(hsl.l); + return tinycolor(hsl); + }; + tinycolor.complement = function(color) { + var hsl = tinycolor(color).toHsl(); + hsl.h = (hsl.h + 180) % 360; + return tinycolor(hsl); + }; + + + // Combination Functions + // --------------------- + // Thanks to jQuery xColor for some of the ideas behind these + // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js> + + tinycolor.triad = function(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l }) + ]; + }; + tinycolor.tetrad = function(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }), + tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l }) + ]; + }; + tinycolor.splitcomplement = function(color) { + var hsl = tinycolor(color).toHsl(); + var h = hsl.h; + return [ + tinycolor(color), + tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}), + tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l}) + ]; + }; + tinycolor.analogous = function(color, results, slices) { + results = results || 6; + slices = slices || 30; + + var hsl = tinycolor(color).toHsl(); + var part = 360 / slices; + var ret = [tinycolor(color)]; + + for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) { + hsl.h = (hsl.h + part) % 360; + ret.push(tinycolor(hsl)); + } + return ret; + }; + tinycolor.monochromatic = function(color, results) { + results = results || 6; + var hsv = tinycolor(color).toHsv(); + var h = hsv.h, s = hsv.s, v = hsv.v; + var ret = []; + var modification = 1 / results; + + while (results--) { + ret.push(tinycolor({ h: h, s: s, v: v})); + v = (v + modification) % 1; + } + + return ret; + }; + + + // Readability Functions + // --------------------- + // <http://www.w3.org/TR/AERT#color-contrast> + + // `readability` + // Analyze the 2 colors and returns an object with the following properties: + // `brightness`: difference in brightness between the two colors + // `color`: difference in color/hue between the two colors + tinycolor.readability = function(color1, color2) { + var a = tinycolor(color1).toRgb(); + var b = tinycolor(color2).toRgb(); + var brightnessA = (a.r * 299 + a.g * 587 + a.b * 114) / 1000; + var brightnessB = (b.r * 299 + b.g * 587 + b.b * 114) / 1000; + var colorDiff = ( + Math.max(a.r, b.r) - Math.min(a.r, b.r) + + Math.max(a.g, b.g) - Math.min(a.g, b.g) + + Math.max(a.b, b.b) - Math.min(a.b, b.b) + ); + + return { + brightness: Math.abs(brightnessA - brightnessB), + color: colorDiff + }; + }; + + // `readable` + // http://www.w3.org/TR/AERT#color-contrast + // Ensure that foreground and background color combinations provide sufficient contrast. + // *Example* + // tinycolor.readable("#000", "#111") => false + tinycolor.readable = function(color1, color2) { + var readability = tinycolor.readability(color1, color2); + return readability.brightness > 125 && readability.color > 500; + }; + + // `mostReadable` + // Given a base color and a list of possible foreground or background + // colors for that base, returns the most readable color. + // *Example* + // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000" + tinycolor.mostReadable = function(baseColor, colorList) { + var bestColor = null; + var bestScore = 0; + var bestIsReadable = false; + for (var i=0; i < colorList.length; i++) { + + // We normalize both around the "acceptable" breaking point, + // but rank brightness constrast higher than hue. + + var readability = tinycolor.readability(baseColor, colorList[i]); + var readable = readability.brightness > 125 && readability.color > 500; + var score = 3 * (readability.brightness / 125) + (readability.color / 500); + + if ((readable && ! bestIsReadable) || + (readable && bestIsReadable && score > bestScore) || + ((! readable) && (! bestIsReadable) && score > bestScore)) { + bestIsReadable = readable; + bestScore = score; + bestColor = tinycolor(colorList[i]); + } + } + return bestColor; + }; + + + // Big List of Colors + // ------------------ + // <http://www.w3.org/TR/css3-color/#svg-color> + var names = tinycolor.names = { + aliceblue: "f0f8ff", + antiquewhite: "faebd7", + aqua: "0ff", + aquamarine: "7fffd4", + azure: "f0ffff", + beige: "f5f5dc", + bisque: "ffe4c4", + black: "000", + blanchedalmond: "ffebcd", + blue: "00f", + blueviolet: "8a2be2", + brown: "a52a2a", + burlywood: "deb887", + burntsienna: "ea7e5d", + cadetblue: "5f9ea0", + chartreuse: "7fff00", + chocolate: "d2691e", + coral: "ff7f50", + cornflowerblue: "6495ed", + cornsilk: "fff8dc", + crimson: "dc143c", + cyan: "0ff", + darkblue: "00008b", + darkcyan: "008b8b", + darkgoldenrod: "b8860b", + darkgray: "a9a9a9", + darkgreen: "006400", + darkgrey: "a9a9a9", + darkkhaki: "bdb76b", + darkmagenta: "8b008b", + darkolivegreen: "556b2f", + darkorange: "ff8c00", + darkorchid: "9932cc", + darkred: "8b0000", + darksalmon: "e9967a", + darkseagreen: "8fbc8f", + darkslateblue: "483d8b", + darkslategray: "2f4f4f", + darkslategrey: "2f4f4f", + darkturquoise: "00ced1", + darkviolet: "9400d3", + deeppink: "ff1493", + deepskyblue: "00bfff", + dimgray: "696969", + dimgrey: "696969", + dodgerblue: "1e90ff", + firebrick: "b22222", + floralwhite: "fffaf0", + forestgreen: "228b22", + fuchsia: "f0f", + gainsboro: "dcdcdc", + ghostwhite: "f8f8ff", + gold: "ffd700", + goldenrod: "daa520", + gray: "808080", + green: "008000", + greenyellow: "adff2f", + grey: "808080", + honeydew: "f0fff0", + hotpink: "ff69b4", + indianred: "cd5c5c", + indigo: "4b0082", + ivory: "fffff0", + khaki: "f0e68c", + lavender: "e6e6fa", + lavenderblush: "fff0f5", + lawngreen: "7cfc00", + lemonchiffon: "fffacd", + lightblue: "add8e6", + lightcoral: "f08080", + lightcyan: "e0ffff", + lightgoldenrodyellow: "fafad2", + lightgray: "d3d3d3", + lightgreen: "90ee90", + lightgrey: "d3d3d3", + lightpink: "ffb6c1", + lightsalmon: "ffa07a", + lightseagreen: "20b2aa", + lightskyblue: "87cefa", + lightslategray: "789", + lightslategrey: "789", + lightsteelblue: "b0c4de", + lightyellow: "ffffe0", + lime: "0f0", + limegreen: "32cd32", + linen: "faf0e6", + magenta: "f0f", + maroon: "800000", + mediumaquamarine: "66cdaa", + mediumblue: "0000cd", + mediumorchid: "ba55d3", + mediumpurple: "9370db", + mediumseagreen: "3cb371", + mediumslateblue: "7b68ee", + mediumspringgreen: "00fa9a", + mediumturquoise: "48d1cc", + mediumvioletred: "c71585", + midnightblue: "191970", + mintcream: "f5fffa", + mistyrose: "ffe4e1", + moccasin: "ffe4b5", + navajowhite: "ffdead", + navy: "000080", + oldlace: "fdf5e6", + olive: "808000", + olivedrab: "6b8e23", + orange: "ffa500", + orangered: "ff4500", + orchid: "da70d6", + palegoldenrod: "eee8aa", + palegreen: "98fb98", + paleturquoise: "afeeee", + palevioletred: "db7093", + papayawhip: "ffefd5", + peachpuff: "ffdab9", + peru: "cd853f", + pink: "ffc0cb", + plum: "dda0dd", + powderblue: "b0e0e6", + purple: "800080", + red: "f00", + rosybrown: "bc8f8f", + royalblue: "4169e1", + saddlebrown: "8b4513", + salmon: "fa8072", + sandybrown: "f4a460", + seagreen: "2e8b57", + seashell: "fff5ee", + sienna: "a0522d", + silver: "c0c0c0", + skyblue: "87ceeb", + slateblue: "6a5acd", + slategray: "708090", + slategrey: "708090", + snow: "fffafa", + springgreen: "00ff7f", + steelblue: "4682b4", + tan: "d2b48c", + teal: "008080", + thistle: "d8bfd8", + tomato: "ff6347", + turquoise: "40e0d0", + violet: "ee82ee", + wheat: "f5deb3", + white: "fff", + whitesmoke: "f5f5f5", + yellow: "ff0", + yellowgreen: "9acd32" + }; + + // Make it easy to access colors via `hexNames[hex]` + var hexNames = tinycolor.hexNames = flip(names); + + + // Utilities + // --------- + + // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }` + function flip(o) { + var flipped = { }; + for (var i in o) { + if (o.hasOwnProperty(i)) { + flipped[o[i]] = i; + } + } + return flipped; + } + + // Return a valid alpha value [0,1] with all invalid values being set to 1 + function boundAlpha(a) { + a = parseFloat(a); + + if (isNaN(a) || a < 0 || a > 1) { + a = 1; + } + + return a; + } + + // Take input from [0, n] and return it as [0, 1] + function bound01(n, max) { + if (isOnePointZero(n)) { n = "100%"; } + + var processPercent = isPercentage(n); + n = mathMin(max, mathMax(0, parseFloat(n))); + + // Automatically convert percentage into number + if (processPercent) { + n = parseInt(n * max, 10) / 100; + } + + // Handle floating point rounding errors + if ((math.abs(n - max) < 0.000001)) { + return 1; + } + + // Convert into [0, 1] range if it isn't already + return (n % max) / parseFloat(max); + } + + // Force a number between 0 and 1 + function clamp01(val) { + return mathMin(1, mathMax(0, val)); + } + + // Parse a base-16 hex value into a base-10 integer + function parseIntFromHex(val) { + return parseInt(val, 16); + } + + // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1 + // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0> + function isOnePointZero(n) { + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1; + } + + // Check to see if string passed in is a percentage + function isPercentage(n) { + return typeof n === "string" && n.indexOf('%') != -1; + } + + // Force a hex value to have 2 characters + function pad2(c) { + return c.length == 1 ? '0' + c : '' + c; + } + + // Replace a decimal with it's percentage value + function convertToPercentage(n) { + if (n <= 1) { + n = (n * 100) + "%"; + } + + return n; + } + + // Converts a decimal to a hex value + function convertDecimalToHex(d) { + return Math.round(parseFloat(d) * 255).toString(16); + } + // Converts a hex value to a decimal + function convertHexToDecimal(h) { + return (parseIntFromHex(h) / 255); + } + + var matchers = (function() { + + // <http://www.w3.org/TR/css3-values/#integers> + var CSS_INTEGER = "[-\\+]?\\d+%?"; + + // <http://www.w3.org/TR/css3-values/#number-value> + var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?"; + + // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome. + var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")"; + + // Actual matching. + // Parentheses and commas are optional, but not required. + // Whitespace can take the place of commas or opening paren + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?"; + + return { + rgb: new RegExp("rgb" + PERMISSIVE_MATCH3), + rgba: new RegExp("rgba" + PERMISSIVE_MATCH4), + hsl: new RegExp("hsl" + PERMISSIVE_MATCH3), + hsla: new RegExp("hsla" + PERMISSIVE_MATCH4), + hsv: new RegExp("hsv" + PERMISSIVE_MATCH3), + hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, + hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, + hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/ + }; + })(); + + // `stringInputToObject` + // Permissive string parsing. Take in a number of formats, and output an object + // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}` + function stringInputToObject(color) { + + color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase(); + var named = false; + if (names[color]) { + color = names[color]; + named = true; + } + else if (color == 'transparent') { + return { r: 0, g: 0, b: 0, a: 0, format: "name" }; + } + + // Try to match string input using regular expressions. + // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360] + // Just return an object and let the conversion functions handle that. + // This way the result will be the same whether the tinycolor is initialized with string or object. + var match; + if ((match = matchers.rgb.exec(color))) { + return { r: match[1], g: match[2], b: match[3] }; + } + if ((match = matchers.rgba.exec(color))) { + return { r: match[1], g: match[2], b: match[3], a: match[4] }; + } + if ((match = matchers.hsl.exec(color))) { + return { h: match[1], s: match[2], l: match[3] }; + } + if ((match = matchers.hsla.exec(color))) { + return { h: match[1], s: match[2], l: match[3], a: match[4] }; + } + if ((match = matchers.hsv.exec(color))) { + return { h: match[1], s: match[2], v: match[3] }; + } + if ((match = matchers.hex8.exec(color))) { + return { + a: convertHexToDecimal(match[1]), + r: parseIntFromHex(match[2]), + g: parseIntFromHex(match[3]), + b: parseIntFromHex(match[4]), + format: named ? "name" : "hex8" + }; + } + if ((match = matchers.hex6.exec(color))) { + return { + r: parseIntFromHex(match[1]), + g: parseIntFromHex(match[2]), + b: parseIntFromHex(match[3]), + format: named ? "name" : "hex" + }; + } + if ((match = matchers.hex3.exec(color))) { + return { + r: parseIntFromHex(match[1] + '' + match[1]), + g: parseIntFromHex(match[2] + '' + match[2]), + b: parseIntFromHex(match[3] + '' + match[3]), + format: named ? "name" : "hex" + }; + } + + return false; + } + + // Expose tinycolor to window, does not need to run in non-browser context. + window.tinycolor = tinycolor; + + })(); + + + $(function () { + if ($.fn.spectrum.load) { + $.fn.spectrum.processNativeColorInputs(); + } + }); + +})(window, jQuery); diff --git a/public/main.js b/public/main.js deleted file mode 100644 index 53ac5cc329cbe0674551f4bbcd38bacc4ea10323..0000000000000000000000000000000000000000 --- a/public/main.js +++ /dev/null @@ -1 +0,0 @@ -let portal=function(){let e=(e,t,l={},a=null)=>{let i=document.createElement(e);for(cls of t)i.classList.add(cls);return Object.keys(l).forEach(e=>{i.setAttribute(e,l[e])}),a&&(i.innerText=a),i},t={title:()=>{document.title=settings.pageTitle},hftLogo:()=>{let t=document.querySelector("#logo"),l=e("a",[],{href:"https://hft-stuttgart.de",title:"hft-stuttgart.de"}),a=e("img",[],{src:`${BASE_URL}/assets/images/hft_logo.svg`});l.appendChild(a),t.appendChild(l)},legal:()=>{let t=document.querySelector(".legal"),l=e("div",["legal-text-container"]),a=e("div",["legal-text"],{},"Hochschule für Technik Stuttgart"),i=e("a",["legal-text"],{href:"https://www.hft-stuttgart.de/impressum"},"Impressum"),o=e("a",["legal-text"],{href:"https://www.hft-stuttgart.de/datenschutz"},"Datenschutz"),r=e("div",["top"],{}),p=e("a",[],{href:"#header",title:"Top"}),n=e("img",[],{src:`${BASE_URL}/assets/images/top.png`});p.appendChild(n),r.appendChild(p),l.appendChild(a),l.appendChild(i),l.appendChild(o),t.appendChild(l),t.appendChild(r)}};Object.keys(t).forEach(e=>{t[e]()});let l=t=>{let l=e("div",["participant-social"]);for(i of t){let t=e("a",["social"],{title:i.agent,href:i.profile}),a=e("img",[],{src:i.icon});t.appendChild(a),l.appendChild(t)}return l},a={projectLogo:()=>{let t=e("img",[],{src:settings.projectLogo});document.querySelector("#projectlogo").append(t)},projectName:()=>{document.querySelector("#projectname").innerHTML=settings.projectName},menu:()=>{let t=document.createElement("ul");for(m of settings.menu){let l=document.createElement("li"),a=e("a",[],{href:m.link},m.menuText);l.appendChild(a),t.appendChild(l)}let l=document.querySelector("nav");l.appendChild(t);let a=document.querySelector(".hamburger");a.style.display="flex";let i=document.querySelector("header");a.addEventListener("click",()=>{a.classList.toggle("slide-hamburger"),l.classList.toggle("slide-nav"),i.classList.toggle("overflow-visible")})},participants:()=>{let t=document.querySelector(".footer"),a=e("ul",["footer-participants-container"]);for(p of settings.participants){let t=e("li",["participant"]),i=e("div",["participant-avatar"]),o=e("img",[],{src:p.avatar}),r=e("div",[],{},p.name),n=e("div",[],{},p.email);i.appendChild(o),t.appendChild(i),t.appendChild(r),t.appendChild(n),t.appendChild(l(p.social)),a.appendChild(t)}t.appendChild(a)},footerLogos:()=>{let t=document.querySelector(".footer"),l=e("ul",["footer-logo-container"]);for(fl of settings.footerLogos){let t=e("li",["footer-logo"]),a=e("a",[],{title:fl.title,href:fl.href}),i=e("img",[],{src:fl.logo});a.appendChild(i),t.appendChild(a),l.appendChild(t)}t.appendChild(l)}};for(swt of settings.switches)swt.state==ON&&a[swt.name]()}(); \ No newline at end of file diff --git a/public/settings.js b/public/settings.js deleted file mode 100644 index c6bf5587c8964e6e3c24d3a1ac3777b707bd7618..0000000000000000000000000000000000000000 --- a/public/settings.js +++ /dev/null @@ -1,146 +0,0 @@ -/* -███████╗██╗███╗ ██╗ ██████╗ ███████╗██████╗ ██╗ ██╗███████╗ ██████╗ -██╔â•â•â•â•â•██║████╗ ██║██╔â•â•â•â•╠██╔â•â•â•â•â•██╔â•â•██╗ ██║ ██║██╔â•â•â•â•â•██╔â•â•â•â•â• -█████╗ ██║██╔██╗ ██║██║ ███╗█████╗ ██████╔╠██║ █╗ ██║█████╗ ██║ ███╗ -██╔â•â•╠██║██║╚██╗██║██║ ██║██╔â•â•╠██╔â•â•██╗ ██║███╗██║██╔â•â•╠██║ ██║ -██║ ██║██║ ╚████║╚██████╔â•███████╗██║ ██║ ╚███╔███╔â•███████╗╚██████╔╠-╚â•╠╚â•â•╚â•╠╚â•â•â•╠╚â•â•â•â•â•╠╚â•â•â•â•â•â•â•╚â•╠╚â•╠╚â•â•â•╚â•â•╠╚â•â•â•â•â•â•╠╚â•â•â•â•â•â• -*/ - -const BASE_URL = `${window.location.origin}/${window.location.pathname.split('/').filter((e, i)=>{return i>0 & i<4}).join('/')}`; -const ON = true; -const OFF = false; -const EMPTY_LINK = "javascript:undefined"; -const DEFAULT = { - social: { - twitter: { - icon: `${BASE_URL}/assets/images/twitter.png`, - profile: "https://twitter.com/InnolabM4" - }, - facebook: { - icon: `${BASE_URL}/assets/images/facebook.png`, - profile: "https://www.facebook.com/HfTStuttgart" - }, - linkedin: { - icon: `${BASE_URL}/assets/images/linkedin.png`, - profile: "https://www.linkedin.com/school/hochschule-f%C3%BCr-technik-stuttgart-%E2%80%93-university-of-applied-sciences" - }, - webpage: { - icon: `${BASE_URL}/assets/images/webpage.png`, - profile: "https://www.hft-stuttgart.de" - } - }, - avatar: `${BASE_URL}/assets/images/avatar.png` -}; - -/* -███████╗███████╗████████╗████████╗██╗███╗ ██╗ ██████╗ ███████╗ -██╔â•â•â•â•â•██╔â•â•â•â•â•╚â•â•██╔â•â•â•╚â•â•██╔â•â•â•██║████╗ ██║██╔â•â•â•â•╠██╔â•â•â•â•â• -███████╗█████╗ ██║ ██║ ██║██╔██╗ ██║██║ ███╗███████╗ -╚â•â•â•â•██║██╔â•â•╠██║ ██║ ██║██║╚██╗██║██║ ██║╚â•â•â•â•██║ -███████║███████╗ ██║ ██║ ██║██║ ╚████║╚██████╔â•███████║ -╚â•â•â•â•â•â•â•╚â•â•â•â•â•â•╠╚â•╠╚â•╠╚â•â•╚â•╠╚â•â•â•╠╚â•â•â•â•â•╠╚â•â•â•â•â•â•â• -*/ - -let settings = { - - pageTitle: "M4_LAB Page Title", - - switches: [ - { - name: "projectLogo", - state: ON - }, - { - name: "projectName", - state: ON - }, - { - name: "participants", - state: ON - }, - { - name: "footerLogos", - state: ON - } - ], - - projectLogo: `${BASE_URL}/assets/logos/M4_LAB_tr.png`, - - projectName: "M4_LAB Page Demo", - - participants: [ - { - name: "John Doe", - avatar: DEFAULT.avatar, - email: "john.doe@lalaland.com", - social: [ - { - agent: "twitter", - icon: DEFAULT.social.twitter.icon, - profile: DEFAULT.social.twitter.profile - }, - { - agent: "facebook", - icon: DEFAULT.social.facebook.icon, - profile: DEFAULT.social.facebook.profile - }, - { - agent: "linkedin", - icon: DEFAULT.social.linkedin.icon, - profile: DEFAULT.social.linkedin.profile - }, - { - agent: "webpage", - icon: DEFAULT.social.webpage.icon, - profile: "https://johndoe.com" - } - ] - }, - { - name: "Charlotte Doe", - avatar: `${BASE_URL}/assets/images/charlotte.jpg`, - email: "charlotte.doe@lalaland.com", - social: [ - { - agent: "twitter", - icon: DEFAULT.social.twitter.icon, - profile: DEFAULT.social.twitter.profile - }, - { - agent: "facebook", - icon: DEFAULT.social.facebook.icon, - profile: DEFAULT.social.facebook.profile - }, - { - agent: "linkedin", - icon: DEFAULT.social.linkedin.icon, - profile: DEFAULT.social.linkedin.profile - } - ] - } - ], - - footerLogos: [ - { - logo: `${BASE_URL}/assets/logos/Logo_M4_LAB.jpg`, - href: EMPTY_LINK, - title: "M4_LAB" - }, - { - logo: `${BASE_URL}/assets/logos/logo1.png`, - href: "http://www.innovative-hochschule.de", - title: "Innovative Hochschule" - }, - { - logo: `${BASE_URL}/assets/logos/logo2.png`, - href: "https://www.bmbf.de", - title: "Bundesministerium für Bildung und Forschung" - }, - { - logo: `${BASE_URL}/assets/logos/logo3.png`, - href: "https://www.gwk-bonn.de", - title: "Die Gemeinsame Wissenschaftskonferenz" - } - ] -}; \ No newline at end of file diff --git a/public/src/Control.Draw.js b/public/src/Control.Draw.js new file mode 100644 index 0000000000000000000000000000000000000000..3a1858b0aeeeb51064bb8eed0e7df362911c5170 --- /dev/null +++ b/public/src/Control.Draw.js @@ -0,0 +1,118 @@ +/** + * @class L.Control.Draw + * @aka L.Draw + */ +L.Control.Draw = L.Control.extend({ + + // Options + options: { + position: 'topleft', + draw: {}, + edit: false + }, + + // @method initialize(): void + // Initializes draw control, toolbars from the options + initialize: function (options) { + if (L.version < '0.7') { + throw new Error('Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/'); + } + + L.Control.prototype.initialize.call(this, options); + + var toolbar; + + this._toolbars = {}; + + // Initialize toolbars + if (L.DrawToolbar && this.options.draw) { + toolbar = new L.DrawToolbar(this.options.draw); + + this._toolbars[L.DrawToolbar.TYPE] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[L.DrawToolbar.TYPE].on('enable', this._toolbarEnabled, this); + } + + if (L.EditToolbar && this.options.edit) { + toolbar = new L.EditToolbar(this.options.edit); + + this._toolbars[L.EditToolbar.TYPE] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[L.EditToolbar.TYPE].on('enable', this._toolbarEnabled, this); + } + L.toolbar = this; //set global var for editing the toolbar + }, + + // @method onAdd(): container + // Adds the toolbar container to the map + onAdd: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw'), + addedTopClass = false, + topClassName = 'leaflet-draw-toolbar-top', + toolbarContainer; + + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + toolbarContainer = this._toolbars[toolbarId].addToolbar(map); + + if (toolbarContainer) { + // Add class to the first toolbar to remove the margin + if (!addedTopClass) { + if (!L.DomUtil.hasClass(toolbarContainer, topClassName)) { + L.DomUtil.addClass(toolbarContainer.childNodes[0], topClassName); + } + addedTopClass = true; + } + + container.appendChild(toolbarContainer); + } + } + } + + return container; + }, + + // @method onRemove(): void + // Removes the toolbars from the map toolbar container + onRemove: function () { + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + this._toolbars[toolbarId].removeToolbar(); + } + } + }, + + // @method setDrawingOptions(options): void + // Sets options to all toolbar instances + setDrawingOptions: function (options) { + for (var toolbarId in this._toolbars) { + if (this._toolbars[toolbarId] instanceof L.DrawToolbar) { + this._toolbars[toolbarId].setOptions(options); + } + } + }, + + _toolbarEnabled: function (e) { + var enabledToolbar = e.target; + + for (var toolbarId in this._toolbars) { + if (this._toolbars[toolbarId] !== enabledToolbar) { + this._toolbars[toolbarId].disable(); + } + } + } +}); + +L.Map.mergeOptions({ + drawControlTooltips: true, + drawControl: false +}); + +L.Map.addInitHook(function () { + if (this.options.drawControl) { + this.drawControl = new L.Control.Draw(); + this.addControl(this.drawControl); + } +}); diff --git a/public/src/Leaflet.Draw.Event.js b/public/src/Leaflet.Draw.Event.js new file mode 100644 index 0000000000000000000000000000000000000000..5b0b582cff860d45e27ee559b647f96e1e0ad0f3 --- /dev/null +++ b/public/src/Leaflet.Draw.Event.js @@ -0,0 +1,177 @@ +/** + * ### Events + * Once you have successfully added the Leaflet.draw plugin to your map you will want to respond to the different + * actions users can initiate. The following events will be triggered on the map: + * + * @class L.Draw.Event + * @aka Draw.Event + * + * Use `L.Draw.Event.EVENTNAME` constants to ensure events are correct. + * + * @example + * ```js + * map.on(L.Draw.Event.CREATED; function (e) { + * var type = e.layerType, + * layer = e.layer; + * + * if (type === 'marker') { + * // Do marker specific actions + * } + * + * // Do whatever else you need to. (save to db; add to map etc) + * map.addLayer(layer); + *}); + * ``` + */ +L.Draw.Event = {}; +/** + * @event draw:created: PolyLine; Polygon; Rectangle; Circle; Marker | String + * + * Layer that was just created. + * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker` + * Triggered when a new vector or marker has been created. + * + */ +L.Draw.Event.CREATED = 'draw:created'; + +/** + * @event draw:edited: LayerGroup + * + * List of all layers just edited on the map. + * + * + * Triggered when layers in the FeatureGroup; initialised with the plugin; have been edited and saved. + * + * @example + * ```js + * map.on('draw:edited', function (e) { + * var layers = e.layers; + * layers.eachLayer(function (layer) { + * //do whatever you want; most likely save back to db + * }); + * }); + * ``` + */ +L.Draw.Event.EDITED = 'draw:edited'; + +/** + * @event draw:deleted: LayerGroup + * + * List of all layers just removed from the map. + * + * Triggered when layers have been removed (and saved) from the FeatureGroup. + */ +L.Draw.Event.DELETED = 'draw:deleted'; + +/** + * @event draw:drawstart: String + * + * The type of layer this is. One of:`polyline`; `polygon`; `rectangle`; `circle`; `marker` + * + * Triggered when the user has chosen to draw a particular vector or marker. + */ +L.Draw.Event.DRAWSTART = 'draw:drawstart'; + +/** + * @event draw:drawstop: String + * + * The type of layer this is. One of: `polyline`; `polygon`; `rectangle`; `circle`; `marker` + * + * Triggered when the user has finished a particular vector or marker. + */ + +L.Draw.Event.DRAWSTOP = 'draw:drawstop'; + +/** + * @event draw:drawvertex: LayerGroup + * + * List of all layers just being added from the map. + * + * Triggered when a vertex is created on a polyline or polygon. + */ +L.Draw.Event.DRAWVERTEX = 'draw:drawvertex'; + +/** + * @event draw:editstart: String + * + * The type of edit this is. One of: `edit` + * + * Triggered when the user starts edit mode by clicking the edit tool button. + */ + +L.Draw.Event.EDITSTART = 'draw:editstart'; + +/** + * @event draw:editmove: ILayer + * + * Layer that was just moved. + * + * Triggered as the user moves a rectangle; circle or marker. + */ +L.Draw.Event.EDITMOVE = 'draw:editmove'; + +/** + * @event draw:editresize: ILayer + * + * Layer that was just moved. + * + * Triggered as the user resizes a rectangle or circle. + */ +L.Draw.Event.EDITRESIZE = 'draw:editresize'; + +/** + * @event draw:editvertex: LayerGroup + * + * List of all layers just being edited from the map. + * + * Triggered when a vertex is edited on a polyline or polygon. + */ +L.Draw.Event.EDITVERTEX = 'draw:editvertex'; + +/** + * @event draw:editstop: String + * + * The type of edit this is. One of: `edit` + * + * Triggered when the user has finshed editing (edit mode) and saves edits. + */ +L.Draw.Event.EDITSTOP = 'draw:editstop'; + +/** + * @event draw:deletestart: String + * + * The type of edit this is. One of: `remove` + * + * Triggered when the user starts remove mode by clicking the remove tool button. + */ +L.Draw.Event.DELETESTART = 'draw:deletestart'; + +/** + * @event draw:deletestop: String + * + * The type of edit this is. One of: `remove` + * + * Triggered when the user has finished removing shapes (remove mode) and saves. + */ +L.Draw.Event.DELETESTOP = 'draw:deletestop'; + +/** + * @event draw:toolbaropened: String + * + * Triggered when a toolbar is opened. + */ +L.Draw.Event.TOOLBAROPENED = 'draw:toolbaropened'; + +/** + * @event draw:toolbarclosed: String + * + * Triggered when a toolbar is closed. + */ +L.Draw.Event.TOOLBARCLOSED = 'draw:toolbarclosed'; + +/** + * @event draw:markercontext: String + * + * Triggered when a marker is right clicked. + */ +L.Draw.Event.MARKERCONTEXT = 'draw:markercontext'; \ No newline at end of file diff --git a/public/src/Leaflet.draw.js b/public/src/Leaflet.draw.js new file mode 100644 index 0000000000000000000000000000000000000000..89b66e7fc6072f6bce48f15877ddec6b8f6199e1 --- /dev/null +++ b/public/src/Leaflet.draw.js @@ -0,0 +1,189 @@ +/** + * Leaflet.draw assumes that you have already included the Leaflet library. + */ +L.drawVersion = '0.4.2'; +/** + * @class L.Draw + * @aka Draw + * + * + * To add the draw toolbar set the option drawControl: true in the map options. + * + * @example + * ```js + * var map = L.map('map', {drawControl: true}).setView([51.505, -0.09], 13); + * + * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + * attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' + * }).addTo(map); + * ``` + * + * ### Adding the edit toolbar + * To use the edit toolbar you must initialise the Leaflet.draw control and manually add it to the map. + * + * ```js + * var map = L.map('map').setView([51.505, -0.09], 13); + * + * L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + * attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' + * }).addTo(map); + * + * // FeatureGroup is to store editable layers + * var drawnItems = new L.FeatureGroup(); + * map.addLayer(drawnItems); + * + * var drawControl = new L.Control.Draw({ + * edit: { + * featureGroup: drawnItems + * } + * }); + * map.addControl(drawControl); + * ``` + * + * The key here is the featureGroup option. This tells the plugin which FeatureGroup contains the layers that + * should be editable. The featureGroup can contain 0 or more features with geometry types Point, LineString, and Polygon. + * Leaflet.draw does not work with multigeometry features such as MultiPoint, MultiLineString, MultiPolygon, + * or GeometryCollection. If you need to add multigeometry features to the draw plugin, convert them to a + * FeatureCollection of non-multigeometries (Points, LineStrings, or Polygons). + */ +L.Draw = {}; + +/** + * @class L.drawLocal + * @aka L.drawLocal + * + * The core toolbar class of the API — it is used to create the toolbar ui + * + * @example + * ```js + * var modifiedDraw = L.drawLocal.extend({ + * draw: { + * toolbar: { + * buttons: { + * polygon: 'Draw an awesome polygon' + * } + * } + * } + * }); + * ``` + * + * The default state for the control is the draw toolbar just below the zoom control. + * This will allow map users to draw vectors and markers. + * **Please note the edit toolbar is not enabled by default.** + */ +L.drawLocal = { + // format: { + // numeric: { + // delimiters: { + // thousands: ',', + // decimal: '.' + // } + // } + // }, + draw: { + toolbar: { + // #TODO: this should be reorganized where actions are nested in actions + // ex: actions.undo or actions.cancel + actions: { + title: 'Cancel drawing', + text: 'Cancel' + }, + finish: { + title: 'Finish drawing', + text: 'Finish' + }, + undo: { + title: 'Delete last point drawn', + text: 'Delete last point' + }, + buttons: { + polyline: 'Draw a polyline', + polygon: 'Draw a polygon', + rectangle: 'Draw a rectangle', + circle: 'Draw a circle', + marker: 'Draw a marker', + circlemarker: 'Draw a circlemarker' + } + }, + handlers: { + circle: { + tooltip: { + start: 'Click and drag to draw circle.' + }, + radius: 'Radius' + }, + circlemarker: { + tooltip: { + start: 'Click map to place circle marker.' + } + }, + marker: { + tooltip: { + start: 'Click map to place marker.' + } + }, + polygon: { + tooltip: { + start: 'Click to start drawing shape.', + cont: 'Click to continue drawing shape.', + end: 'Click first point to close this shape.' + } + }, + polyline: { + error: '<strong>Error:</strong> shape edges cannot cross!', + tooltip: { + start: 'Click to start drawing line.', + cont: 'Click to continue drawing line.', + end: 'Click last point to finish line.' + } + }, + rectangle: { + tooltip: { + start: 'Click and drag to draw rectangle.' + } + }, + simpleshape: { + tooltip: { + end: 'Release mouse to finish drawing.' + } + } + } + }, + edit: { + toolbar: { + actions: { + save: { + title: 'Save changes', + text: 'Save' + }, + cancel: { + title: 'Cancel editing, discards all changes', + text: 'Cancel' + }, + clearAll: { + title: 'Clear all layers', + text: 'Clear All' + } + }, + buttons: { + edit: 'Edit layers', + editDisabled: 'No layers to edit', + remove: 'Delete layers', + removeDisabled: 'No layers to delete' + } + }, + handlers: { + edit: { + tooltip: { + text: 'Drag handles or markers to edit features.', + subtext: 'Click cancel to undo changes.' + } + }, + remove: { + tooltip: { + text: 'Click on a feature to remove.' + } + } + } + } +}; diff --git a/public/src/Toolbar.js b/public/src/Toolbar.js new file mode 100644 index 0000000000000000000000000000000000000000..f06504b9a1c488bf749be54fbc0e7015756f4e9b --- /dev/null +++ b/public/src/Toolbar.js @@ -0,0 +1,334 @@ +/** + * @class L.Draw.Toolbar + * @aka Toolbar + * + * The toolbar class of the API — it is used to create the ui + * This will be depreciated + * + * @example + * + * ```js + * var toolbar = L.Toolbar(); + * toolbar.addToolbar(map); + * ``` + * + * ### Disabling a toolbar + * + * If you do not want a particular toolbar in your app you can turn it off by setting the toolbar to false. + * + * ```js + * var drawControl = new L.Control.Draw({ + * draw: false, + * edit: { + * featureGroup: editableLayers + * } + * }); + * ``` + * + * ### Disabling a toolbar item + * + * If you want to turn off a particular toolbar item, set it to false. The following disables drawing polygons and + * markers. It also turns off the ability to edit layers. + * + * ```js + * var drawControl = new L.Control.Draw({ + * draw: { + * polygon: false, + * marker: false + * }, + * edit: { + * featureGroup: editableLayers, + * edit: false + * } + * }); + * ``` + */ +L.Toolbar = L.Class.extend({ + // @section Methods for modifying the toolbar + + // @method initialize(options): void + // Toolbar constructor + initialize: function (options) { + L.setOptions(this, options); + + this._modes = {}; + this._actionButtons = []; + this._activeMode = null; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.Toolbar.include(L.Evented.prototype); + } else { + L.Toolbar.include(L.Mixin.Events); + } + }, + + // @method enabled(): boolean + // Gets a true/false of whether the toolbar is enabled + enabled: function () { + return this._activeMode !== null; + }, + + // @method disable(): void + // Disables the toolbar + disable: function () { + if (!this.enabled()) { + return; + } + + this._activeMode.handler.disable(); + }, + + // @method addToolbar(map): L.DomUtil + // Adds the toolbar to the map and returns the toolbar dom element + addToolbar: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw-section'), + buttonIndex = 0, + buttonClassPrefix = this._toolbarClass || '', + modeHandlers = this.getModeHandlers(map), + i; + + this._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar'); + this._map = map; + + for (i = 0; i < modeHandlers.length; i++) { + if (modeHandlers[i].enabled) { + this._initModeHandler( + modeHandlers[i].handler, + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + modeHandlers[i].title + ); + } + } + + // if no buttons were added, do not add the toolbar + if (!buttonIndex) { + return; + } + + // Save button index of the last button, -1 as we would have ++ after the last button + this._lastButtonIndex = --buttonIndex; + + // Create empty actions part of the toolbar + this._actionsContainer = L.DomUtil.create('ul', 'leaflet-draw-actions'); + + // Add draw and cancel containers to the control container + container.appendChild(this._toolbarContainer); + container.appendChild(this._actionsContainer); + + return container; + }, + + // @method removeToolbar(): void + // Removes the toolbar and drops the handler event listeners + removeToolbar: function () { + // Dispose each handler + for (var handlerId in this._modes) { + if (this._modes.hasOwnProperty(handlerId)) { + // Unbind handler button + this._disposeButton( + this._modes[handlerId].button, + this._modes[handlerId].handler.enable, + this._modes[handlerId].handler + ); + + // Make sure is disabled + this._modes[handlerId].handler.disable(); + + // Unbind handler + this._modes[handlerId].handler + .off('enabled', this._handlerActivated, this) + .off('disabled', this._handlerDeactivated, this); + } + } + this._modes = {}; + + // Dispose the actions toolbar + for (var i = 0, l = this._actionButtons.length; i < l; i++) { + this._disposeButton( + this._actionButtons[i].button, + this._actionButtons[i].callback, + this + ); + } + this._actionButtons = []; + this._actionsContainer = null; + }, + + _initModeHandler: function (handler, container, buttonIndex, classNamePredix, buttonTitle) { + var type = handler.type; + + this._modes[type] = {}; + + this._modes[type].handler = handler; + + this._modes[type].button = this._createButton({ + type: type, + title: buttonTitle, + className: classNamePredix + '-' + type, + container: container, + callback: this._modes[type].handler.enable, + context: this._modes[type].handler + }); + + this._modes[type].buttonIndex = buttonIndex; + + this._modes[type].handler + .on('enabled', this._handlerActivated, this) + .on('disabled', this._handlerDeactivated, this); + }, + + /* Detect iOS based on browser User Agent, based on: + * http://stackoverflow.com/a/9039885 */ + _detectIOS: function () { + var iOS = (/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream); + return iOS; + }, + + _createButton: function (options) { + + var link = L.DomUtil.create('a', options.className || '', options.container); + // Screen reader tag + var sr = L.DomUtil.create('span', 'sr-only', options.container); + + link.href = '#'; + link.appendChild(sr); + + if (options.title) { + link.title = options.title; + sr.innerHTML = options.title; + } + + if (options.text) { + link.innerHTML = options.text; + sr.innerHTML = options.text; + } + + /* iOS does not use click events */ + var buttonEvent = this._detectIOS() ? 'touchstart' : 'click'; + + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'mousedown', L.DomEvent.stopPropagation) + .on(link, 'dblclick', L.DomEvent.stopPropagation) + .on(link, 'touchstart', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, buttonEvent, options.callback, options.context); + + return link; + }, + + _disposeButton: function (button, callback) { + /* iOS does not use click events */ + var buttonEvent = this._detectIOS() ? 'touchstart' : 'click'; + + L.DomEvent + .off(button, 'click', L.DomEvent.stopPropagation) + .off(button, 'mousedown', L.DomEvent.stopPropagation) + .off(button, 'dblclick', L.DomEvent.stopPropagation) + .off(button, 'touchstart', L.DomEvent.stopPropagation) + .off(button, 'click', L.DomEvent.preventDefault) + .off(button, buttonEvent, callback); + }, + + _handlerActivated: function (e) { + // Disable active mode (if present) + this.disable(); + + // Cache new active feature + this._activeMode = this._modes[e.handler]; + + L.DomUtil.addClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._showActionsToolbar(); + + this.fire('enable'); + }, + + _handlerDeactivated: function () { + this._hideActionsToolbar(); + + L.DomUtil.removeClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._activeMode = null; + + this.fire('disable'); + }, + + _createActions: function (handler) { + var container = this._actionsContainer, + buttons = this.getActions(handler), + l = buttons.length, + li, di, dl, button; + + // Dispose the actions toolbar (todo: dispose only not used buttons) + for (di = 0, dl = this._actionButtons.length; di < dl; di++) { + this._disposeButton(this._actionButtons[di].button, this._actionButtons[di].callback); + } + this._actionButtons = []; + + // Remove all old buttons + while (container.firstChild) { + container.removeChild(container.firstChild); + } + + for (var i = 0; i < l; i++) { + if ('enabled' in buttons[i] && !buttons[i].enabled) { + continue; + } + + li = L.DomUtil.create('li', '', container); + + button = this._createButton({ + title: buttons[i].title, + text: buttons[i].text, + container: li, + callback: buttons[i].callback, + context: buttons[i].context + }); + + this._actionButtons.push({ + button: button, + callback: buttons[i].callback + }); + } + }, + + _showActionsToolbar: function () { + var buttonIndex = this._activeMode.buttonIndex, + lastButtonIndex = this._lastButtonIndex, + toolbarPosition = this._activeMode.button.offsetTop - 1; + + // Recreate action buttons on every click + this._createActions(this._activeMode.handler); + + // Correctly position the cancel button + this._actionsContainer.style.top = toolbarPosition + 'px'; + + if (buttonIndex === 0) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-top'); + } + + if (buttonIndex === lastButtonIndex) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + } + + this._actionsContainer.style.display = 'block'; + this._map.fire(L.Draw.Event.TOOLBAROPENED); + }, + + _hideActionsToolbar: function () { + this._actionsContainer.style.display = 'none'; + + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-top'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + this._map.fire(L.Draw.Event.TOOLBARCLOSED); + } +}); diff --git a/public/src/Tooltip.js b/public/src/Tooltip.js new file mode 100644 index 0000000000000000000000000000000000000000..dae0f5f66fb172faacae6c3e33163b63056e620d --- /dev/null +++ b/public/src/Tooltip.js @@ -0,0 +1,118 @@ +L.Draw = L.Draw || {}; +/** + * @class L.Draw.Tooltip + * @aka Tooltip + * + * The tooltip class — it is used to display the tooltip while drawing + * This will be depreciated + * + * @example + * + * ```js + * var tooltip = L.Draw.Tooltip(); + * ``` + * + */ +L.Draw.Tooltip = L.Class.extend({ + + // @section Methods for modifying draw state + + // @method initialize(map): void + // Tooltip constructor + initialize: function (map) { + this._map = map; + this._popupPane = map._panes.popupPane; + this._visible = false; + + this._container = map.options.drawControlTooltips ? + L.DomUtil.create('div', 'leaflet-draw-tooltip', this._popupPane) : null; + this._singleLineLabel = false; + + this._map.on('mouseout', this._onMouseOut, this); + }, + + // @method dispose(): void + // Remove Tooltip DOM and unbind events + dispose: function () { + this._map.off('mouseout', this._onMouseOut, this); + + if (this._container) { + this._popupPane.removeChild(this._container); + this._container = null; + } + }, + + // @method updateContent(labelText): this + // Changes the tooltip text to string in function call + updateContent: function (labelText) { + if (!this._container) { + return this; + } + labelText.subtext = labelText.subtext || ''; + + // update the vertical position (only if changed) + if (labelText.subtext.length === 0 && !this._singleLineLabel) { + L.DomUtil.addClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = true; + } + else if (labelText.subtext.length > 0 && this._singleLineLabel) { + L.DomUtil.removeClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = false; + } + + this._container.innerHTML = + (labelText.subtext.length > 0 ? + '<span class="leaflet-draw-tooltip-subtext">' + labelText.subtext + '</span>' + '<br />' : '') + + '<span>' + labelText.text + '</span>'; + + if (!labelText.text && !labelText.subtext) { + this._visible = false; + this._container.style.visibility = 'hidden'; + } else { + this._visible = true; + this._container.style.visibility = 'inherit'; + } + + return this; + }, + + // @method updatePosition(latlng): this + // Changes the location of the tooltip + updatePosition: function (latlng) { + var pos = this._map.latLngToLayerPoint(latlng), + tooltipContainer = this._container; + + if (this._container) { + if (this._visible) { + tooltipContainer.style.visibility = 'inherit'; + } + L.DomUtil.setPosition(tooltipContainer, pos); + } + + return this; + }, + + // @method showAsError(): this + // Applies error class to tooltip + showAsError: function () { + if (this._container) { + L.DomUtil.addClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + }, + + // @method removeError(): this + // Removes the error class from the tooltip + removeError: function () { + if (this._container) { + L.DomUtil.removeClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + }, + + _onMouseOut: function () { + if (this._container) { + this._container.style.visibility = 'hidden'; + } + } +}); diff --git a/public/src/copyright.js b/public/src/copyright.js new file mode 100644 index 0000000000000000000000000000000000000000..06502f2aea7a173c03d96ff65115539cea7a9104 --- /dev/null +++ b/public/src/copyright.js @@ -0,0 +1,7 @@ +/* + Leaflet.draw {VERSION}, a plugin that adds drawing and editing tools to Leaflet powered maps. + (c) 2012-2017, Jacob Toye, Jon West, Smartrak, Leaflet + + https://github.com/Leaflet/Leaflet.draw + http://leafletjs.com + */ diff --git a/public/src/draw/DrawToolbar.js b/public/src/draw/DrawToolbar.js new file mode 100644 index 0000000000000000000000000000000000000000..2ce4b369d38680169d0c1e71d566c8643afbf9b6 --- /dev/null +++ b/public/src/draw/DrawToolbar.js @@ -0,0 +1,110 @@ +/** + * @class L.DrawToolbar + * @aka Toolbar + */ +L.DrawToolbar = L.Toolbar.extend({ + + statics: { + TYPE: 'draw' + }, + + options: { + polyline: {}, + polygon: {}, + rectangle: {}, + circle: {}, + marker: {}, + circlemarker: {} + }, + + // @method initialize(): void + initialize: function (options) { + // Ensure that the options are merged correctly since L.extend is only shallow + for (var type in this.options) { + if (this.options.hasOwnProperty(type)) { + if (options[type]) { + options[type] = L.extend({}, this.options[type], options[type]); + } + } + } + + this._toolbarClass = 'leaflet-draw-draw'; + L.Toolbar.prototype.initialize.call(this, options); + }, + + // @method getModeHandlers(): object + // Get mode handlers information + getModeHandlers: function (map) { + return [ + { + enabled: this.options.polyline, + handler: new L.Draw.Polyline(map, this.options.polyline), + title: L.drawLocal.draw.toolbar.buttons.polyline + }, + { + enabled: this.options.polygon, + handler: new L.Draw.Polygon(map, this.options.polygon), + title: L.drawLocal.draw.toolbar.buttons.polygon + }, + { + enabled: this.options.rectangle, + handler: new L.Draw.Rectangle(map, this.options.rectangle), + title: L.drawLocal.draw.toolbar.buttons.rectangle + }, + { + enabled: this.options.circle, + handler: new L.Draw.Circle(map, this.options.circle), + title: L.drawLocal.draw.toolbar.buttons.circle + }, + { + enabled: this.options.marker, + handler: new L.Draw.Marker(map, this.options.marker), + title: L.drawLocal.draw.toolbar.buttons.marker + }, + { + enabled: this.options.circlemarker, + handler: new L.Draw.CircleMarker(map, this.options.circlemarker), + title: L.drawLocal.draw.toolbar.buttons.circlemarker + } + ]; + }, + + // @method getActions(): object + // Get action information + getActions: function (handler) { + return [ + { + enabled: handler.completeShape, + title: L.drawLocal.draw.toolbar.finish.title, + text: L.drawLocal.draw.toolbar.finish.text, + callback: handler.completeShape, + context: handler + }, + { + enabled: handler.deleteLastVertex, + title: L.drawLocal.draw.toolbar.undo.title, + text: L.drawLocal.draw.toolbar.undo.text, + callback: handler.deleteLastVertex, + context: handler + }, + { + title: L.drawLocal.draw.toolbar.actions.title, + text: L.drawLocal.draw.toolbar.actions.text, + callback: this.disable, + context: this + } + ]; + }, + + // @method setOptions(): void + // Sets the options to the toolbar + setOptions: function (options) { + L.setOptions(this, options); + + for (var type in this._modes) { + if (this._modes.hasOwnProperty(type) && options.hasOwnProperty(type)) { + this._modes[type].handler.setOptions(options[type]); + } + } + } +}); diff --git a/public/src/draw/handler/Draw.Circle.js b/public/src/draw/handler/Draw.Circle.js new file mode 100644 index 0000000000000000000000000000000000000000..8ac46ff424c849956863e30cf62b766bd3bb0ee9 --- /dev/null +++ b/public/src/draw/handler/Draw.Circle.js @@ -0,0 +1,83 @@ +/** + * @class L.Draw.Circle + * @aka Draw.Circle + * @inherits L.Draw.SimpleShape + */ +L.Draw.Circle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'circle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + showRadius: true, + metric: true, // Whether to use the metric measurement system or imperial + feet: true, // When not metric, use feet instead of yards for display + nautic: false // When not metric, not feet use nautic mile for display + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Circle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.circle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + _drawShape: function (latlng) { + // Calculate the distance based on the version + if (L.GeometryUtil.isVersion07x()) { + var distance = this._startLatLng.distanceTo(latlng); + } else { + var distance = this._map.distance(this._startLatLng, latlng); + } + + if (!this._shape) { + this._shape = new L.Circle(this._startLatLng, distance, this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setRadius(distance); + } + }, + + _fireCreatedEvent: function () { + var circle = new L.Circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, circle); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng, + showRadius = this.options.showRadius, + useMetric = this.options.metric, + radius; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._drawShape(latlng); + + // Get the new radius (rounded to 1 dp) + radius = this._shape.getRadius().toFixed(1); + + var subtext = ''; + if (showRadius) { + subtext = L.drawLocal.draw.handlers.circle.radius + ': ' + + L.GeometryUtil.readableDistance(radius, useMetric, this.options.feet, this.options.nautic); + } + this._tooltip.updateContent({ + text: this._endLabelText, + subtext: subtext + }); + } + } +}); diff --git a/public/src/draw/handler/Draw.CircleMarker.js b/public/src/draw/handler/Draw.CircleMarker.js new file mode 100644 index 0000000000000000000000000000000000000000..a63b98e30cb83f936e0cc15774baa659f7d46f2d --- /dev/null +++ b/public/src/draw/handler/Draw.CircleMarker.js @@ -0,0 +1,42 @@ +/** + * @class L.Draw.CircleMarker + * @aka Draw.CircleMarker + * @inherits L.Draw.Marker + */ +L.Draw.CircleMarker = L.Draw.Marker.extend({ + statics: { + TYPE: 'circlemarker' + }, + + options: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true, + zIndexOffset: 2000 // This should be > than the highest z-index any markers + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.CircleMarker.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.circlemarker.tooltip.start; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + + _fireCreatedEvent: function () { + var circleMarker = new L.CircleMarker(this._marker.getLatLng(), this.options); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, circleMarker); + }, + + _createMarker: function (latlng) { + return new L.CircleMarker(latlng, this.options); + } +}); diff --git a/public/src/draw/handler/Draw.Feature.js b/public/src/draw/handler/Draw.Feature.js new file mode 100644 index 0000000000000000000000000000000000000000..6474cb41a45a430b62613403acd4f59840cd4c53 --- /dev/null +++ b/public/src/draw/handler/Draw.Feature.js @@ -0,0 +1,104 @@ +L.Draw = L.Draw || {}; + +/** + * @class L.Draw.Feature + * @aka Draw.Feature + */ +L.Draw.Feature = L.Handler.extend({ + + // @method initialize(): void + initialize: function (map, options) { + this._map = map; + this._container = map._container; + this._overlayPane = map._panes.overlayPane; + this._popupPane = map._panes.popupPane; + + // Merge default shapeOptions options with custom shapeOptions + if (options && options.shapeOptions) { + options.shapeOptions = L.Util.extend({}, this.options.shapeOptions, options.shapeOptions); + } + L.setOptions(this, options); + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.Draw.Feature.include(L.Evented.prototype); + } else { + L.Draw.Feature.include(L.Mixin.Events); + } + }, + + // @method enable(): void + // Enables this handler + enable: function () { + if (this._enabled) { + return; + } + + L.Handler.prototype.enable.call(this); + + this.fire('enabled', {handler: this.type}); + + this._map.fire(L.Draw.Event.DRAWSTART, {layerType: this.type}); + }, + + // @method disable(): void + disable: function () { + if (!this._enabled) { + return; + } + + L.Handler.prototype.disable.call(this); + + this._map.fire(L.Draw.Event.DRAWSTOP, {layerType: this.type}); + + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add's event listeners to this handler + addHooks: function () { + var map = this._map; + + if (map) { + L.DomUtil.disableTextSelection(); + + map.getContainer().focus(); + + this._tooltip = new L.Draw.Tooltip(this._map); + + L.DomEvent.on(this._container, 'keyup', this._cancelDrawing, this); + } + }, + + // @method removeHooks(): void + // Removes event listeners from this handler + removeHooks: function () { + if (this._map) { + L.DomUtil.enableTextSelection(); + + this._tooltip.dispose(); + this._tooltip = null; + + L.DomEvent.off(this._container, 'keyup', this._cancelDrawing, this); + } + }, + + // @method setOptions(object): void + // Sets new options to this handler + setOptions: function (options) { + L.setOptions(this, options); + }, + + _fireCreatedEvent: function (layer) { + this._map.fire(L.Draw.Event.CREATED, {layer: layer, layerType: this.type}); + }, + + // Cancel drawing when the escape key is pressed + _cancelDrawing: function (e) { + if (e.keyCode === 27) { + this._map.fire('draw:canceled', {layerType: this.type}); + this.disable(); + } + } +}); diff --git a/public/src/draw/handler/Draw.Marker.js b/public/src/draw/handler/Draw.Marker.js new file mode 100644 index 0000000000000000000000000000000000000000..7af9b09d6ecdf0b99e8d0948158bdf0cfc9733f7 --- /dev/null +++ b/public/src/draw/handler/Draw.Marker.js @@ -0,0 +1,127 @@ +/** + * @class L.Draw.Marker + * @aka Draw.Marker + * @inherits L.Draw.Feature + */ +L.Draw.Marker = L.Draw.Feature.extend({ + statics: { + TYPE: 'marker' + }, + + options: { + icon: new L.Icon.Default(), + repeatMode: false, + zIndexOffset: 2000 // This should be > than the highest z-index any markers + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Marker.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.marker.tooltip.start; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + + if (this._map) { + this._tooltip.updateContent({text: this._initialLabelText}); + + // Same mouseMarker as in Draw.Polyline + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('click', this._onClick, this) + .addTo(this._map); + + this._map.on('mousemove', this._onMouseMove, this); + this._map.on('click', this._onTouch, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + if (this._map) { + this._map + .off('click', this._onClick, this) + .off('click', this._onTouch, this); + if (this._marker) { + this._marker.off('click', this._onClick, this); + this._map + .removeLayer(this._marker); + delete this._marker; + } + + this._mouseMarker.off('click', this._onClick, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + this._mouseMarker.setLatLng(latlng); + + if (!this._marker) { + this._marker = this._createMarker(latlng); + // Bind to both marker and map to make sure we get the click event. + this._marker.on('click', this._onClick, this); + this._map + .on('click', this._onClick, this) + .addLayer(this._marker); + } + else { + latlng = this._mouseMarker.getLatLng(); + this._marker.setLatLng(latlng); + } + }, + + _createMarker: function (latlng) { + return new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset + }); + }, + + _onClick: function () { + this._fireCreatedEvent(); + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + _onTouch: function (e) { + // called on click & tap, only really does any thing on tap + this._onMouseMove(e); // creates & places marker + this._onClick(); // permanently places marker & ends interaction + }, + + _fireCreatedEvent: function () { + var marker = new L.Marker.Touch(this._marker.getLatLng(), {icon: this.options.icon}); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, marker); + } +}); diff --git a/public/src/draw/handler/Draw.Polygon.js b/public/src/draw/handler/Draw.Polygon.js new file mode 100644 index 0000000000000000000000000000000000000000..fcdf5d4d829fd65c8a48a1615ff54ee67cc85a9d --- /dev/null +++ b/public/src/draw/handler/Draw.Polygon.js @@ -0,0 +1,129 @@ +/** + * @class L.Draw.Polygon + * @aka Draw.Polygon + * @inherits L.Draw.Polyline + */ +L.Draw.Polygon = L.Draw.Polyline.extend({ + statics: { + TYPE: 'polygon' + }, + + Poly: L.Polygon, + + options: { + showArea: false, + showLength: false, + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + // Whether to use the metric measurement system (truthy) or not (falsy). + // Also defines the units to use for the metric system as an array of + // strings (e.g. `['ha', 'm']`). + metric: true, + feet: true, // When not metric, to use feet instead of yards for display. + nautic: false, // When not metric, not feet use nautic mile for display + // Defines the precision for each type of unit (e.g. {km: 2, ft: 0} + precision: {} + }, + + // @method initialize(): void + initialize: function (map, options) { + L.Draw.Polyline.prototype.initialize.call(this, map, options); + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polygon.TYPE; + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + + // The first marker should have a click handler to close the polygon + if (markerCount === 1) { + this._markers[0].on('click', this._finishShape, this); + } + + // Add and update the double click handler + if (markerCount > 2) { + this._markers[markerCount - 1].on('dblclick', this._finishShape, this); + // Only need to remove handler if has been added before + if (markerCount > 3) { + this._markers[markerCount - 2].off('dblclick', this._finishShape, this); + } + } + }, + + _getTooltipText: function () { + var text, subtext; + + if (this._markers.length === 0) { + text = L.drawLocal.draw.handlers.polygon.tooltip.start; + } else if (this._markers.length < 3) { + text = L.drawLocal.draw.handlers.polygon.tooltip.cont; + subtext = this._getMeasurementString(); + } else { + text = L.drawLocal.draw.handlers.polygon.tooltip.end; + subtext = this._getMeasurementString(); + } + + return { + text: text, + subtext: subtext + }; + }, + + _getMeasurementString: function () { + var area = this._area, + measurementString = ''; + + + if (!area && !this.options.showLength) { + return null; + } + + if (this.options.showLength) { + measurementString = L.Draw.Polyline.prototype._getMeasurementString.call(this); + } + + if (area) { + measurementString += '<br>' + L.GeometryUtil.readableArea(area, this.options.metric, this.options.precision); + } + + return measurementString; + }, + + _shapeIsValid: function () { + return this._markers.length >= 3; + }, + + _vertexChanged: function (latlng, added) { + var latLngs; + + // Check to see if we should show the area + if (!this.options.allowIntersection && this.options.showArea) { + latLngs = this._poly.getLatLngs(); + + this._area = L.GeometryUtil.geodesicArea(latLngs); + } + + L.Draw.Polyline.prototype._vertexChanged.call(this, latlng, added); + }, + + _cleanUpShape: function () { + var markerCount = this._markers.length; + + if (markerCount > 0) { + this._markers[0].off('click', this._finishShape, this); + + if (markerCount > 2) { + this._markers[markerCount - 1].off('dblclick', this._finishShape, this); + } + } + } +}); diff --git a/public/src/draw/handler/Draw.Polyline.js b/public/src/draw/handler/Draw.Polyline.js new file mode 100644 index 0000000000000000000000000000000000000000..929fb7e9db6c5d936f4b481db5a19643b6643f10 --- /dev/null +++ b/public/src/draw/handler/Draw.Polyline.js @@ -0,0 +1,592 @@ +/** + * @class L.Draw.Polyline + * @aka Draw.Polyline + * @inherits L.Draw.Feature + */ +L.Draw.Polyline = L.Draw.Feature.extend({ + statics: { + TYPE: 'polyline' + }, + + Poly: L.Polyline, + + options: { + allowIntersection: true, + repeatMode: false, + drawError: { + color: '#b00b00', + timeout: 2500 + }, + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }), + touchIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon' + }), + guidelineDistance: 20, + maxGuideLineLength: 4000, + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: false, + clickable: true + }, + metric: true, // Whether to use the metric measurement system or imperial + feet: true, // When not metric, to use feet instead of yards for display. + nautic: false, // When not metric, not feet use nautic mile for display + showLength: true, // Whether to display distance in the tooltip + zIndexOffset: 2000, // This should be > than the highest z-index any map layers + factor: 1, // To change distance calculation + maxPoints: 0 // Once this number of points are placed, finish shape + }, + + // @method initialize(): void + initialize: function (map, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.icon = this.options.touchIcon; + } + + // Need to set this here to ensure the correct message is used. + this.options.drawError.message = L.drawLocal.draw.handlers.polyline.error; + + // Merge default drawError options with custom options + if (options && options.drawError) { + options.drawError = L.Util.extend({}, this.options.drawError, options.drawError); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polyline.TYPE; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._markers = []; + + this._markerGroup = new L.LayerGroup(); + this._map.addLayer(this._markerGroup); + + this._poly = new L.Polyline([], this.options.shapeOptions); + + this._tooltip.updateContent(this._getTooltipText()); + + // Make a transparent marker that will used to catch click events. These click + // events will create the vertices. We need to do this so we can ensure that + // we can create vertices over other map layers (markers, vector layers). We + // also do not want to trigger any click handlers of objects we are clicking on + // while drawing. + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('mouseout', this._onMouseOut, this) + .on('mousemove', this._onMouseMove, this) // Necessary to prevent 0.8 stutter + .on('mousedown', this._onMouseDown, this) + .on('mouseup', this._onMouseUp, this) // Necessary for 0.8 compatibility + .addTo(this._map); + + this._map + .on('mouseup', this._onMouseUp, this) // Necessary for 0.7 compatibility + .on('mousemove', this._onMouseMove, this) + .on('zoomlevelschange', this._onZoomEnd, this) + .on('touchstart', this._onTouch, this) + .on('zoomend', this._onZoomEnd, this); + + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + this._clearHideErrorTimeout(); + + this._cleanUpShape(); + + // remove markers from map + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + + this._map.removeLayer(this._poly); + delete this._poly; + + this._mouseMarker + .off('mousedown', this._onMouseDown, this) + .off('mouseout', this._onMouseOut, this) + .off('mouseup', this._onMouseUp, this) + .off('mousemove', this._onMouseMove, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + // clean up DOM + this._clearGuides(); + + this._map + .off('mouseup', this._onMouseUp, this) + .off('mousemove', this._onMouseMove, this) + .off('zoomlevelschange', this._onZoomEnd, this) + .off('zoomend', this._onZoomEnd, this) + .off('touchstart', this._onTouch, this) + .off('click', this._onTouch, this); + }, + + // @method deleteLastVertex(): void + // Remove the last vertex from the polyline, removes polyline from map if only one point exists. + deleteLastVertex: function () { + if (this._markers.length <= 1) { + return; + } + + var lastMarker = this._markers.pop(), + poly = this._poly, + // Replaces .spliceLatLngs() + latlngs = poly.getLatLngs(), + latlng = latlngs.splice(-1, 1)[0]; + this._poly.setLatLngs(latlngs); + + this._markerGroup.removeLayer(lastMarker); + + if (poly.getLatLngs().length < 2) { + this._map.removeLayer(poly); + } + + this._vertexChanged(latlng, false); + }, + + // @method addVertex(): void + // Add a vertex to the end of the polyline + addVertex: function (latlng) { + var markersLength = this._markers.length; + // markersLength must be greater than or equal to 2 before intersections can occur + if (markersLength >= 2 && !this.options.allowIntersection && this._poly.newLatLngIntersects(latlng)) { + this._showErrorTooltip(); + return; + } + else if (this._errorShown) { + this._hideErrorTooltip(); + } + + this._markers.push(this._createMarker(latlng)); + + this._poly.addLatLng(latlng); + + if (this._poly.getLatLngs().length === 2) { + this._map.addLayer(this._poly); + } + + this._vertexChanged(latlng, true); + }, + + // @method completeShape(): void + // Closes the polyline between the first and last points + completeShape: function () { + if (this._markers.length <= 1 || !this._shapeIsValid()) { + return; + } + + this._fireCreatedEvent(); + this.disable(); + + if (this.options.repeatMode) { + this.enable(); + } + }, + + _finishShape: function () { + var latlngs = this._poly._defaultShape ? this._poly._defaultShape() : this._poly.getLatLngs(); + var intersects = this._poly.newLatLngIntersects(latlngs[latlngs.length - 1]); + + if ((!this.options.allowIntersection && intersects) || !this._shapeIsValid()) { + this._showErrorTooltip(); + return; + } + + this._fireCreatedEvent(); + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + // Called to verify the shape is valid when the user tries to finish it + // Return false if the shape is not valid + _shapeIsValid: function () { + return true; + }, + + _onZoomEnd: function () { + if (this._markers !== null) { + this._updateGuide(); + } + }, + + _onMouseMove: function (e) { + var newPos = this._map.mouseEventToLayerPoint(e.originalEvent); + var latlng = this._map.layerPointToLatLng(newPos); + + // Save latlng + // should this be moved to _updateGuide() ? + this._currentLatLng = latlng; + + this._updateTooltip(latlng); + + // Update the guide line + this._updateGuide(newPos); + + // Update the mouse marker position + this._mouseMarker.setLatLng(latlng); + + L.DomEvent.preventDefault(e.originalEvent); + }, + + _vertexChanged: function (latlng, added) { + this._map.fire(L.Draw.Event.DRAWVERTEX, {layers: this._markerGroup}); + this._updateFinishHandler(); + + this._updateRunningMeasure(latlng, added); + + this._clearGuides(); + + this._updateTooltip(); + }, + + _onMouseDown: function (e) { + if (!this._clickHandled && !this._touchHandled && !this._disableMarkers) { + this._onMouseMove(e); + this._clickHandled = true; + this._disableNewMarkers(); + var originalEvent = e.originalEvent; + var clientX = originalEvent.clientX; + var clientY = originalEvent.clientY; + this._startPoint.call(this, clientX, clientY); + } + }, + + _startPoint: function (clientX, clientY) { + this._mouseDownOrigin = L.point(clientX, clientY); + }, + + _onMouseUp: function (e) { + var originalEvent = e.originalEvent; + var clientX = originalEvent.clientX; + var clientY = originalEvent.clientY; + this._endPoint.call(this, clientX, clientY, e); + this._clickHandled = null; + }, + + _endPoint: function (clientX, clientY, e) { + if (this._mouseDownOrigin) { + var dragCheckDistance = L.point(clientX, clientY) + .distanceTo(this._mouseDownOrigin); + var lastPtDistance = this._calculateFinishDistance(e.latlng); + if (this.options.maxPoints > 1 && this.options.maxPoints == this._markers.length + 1) { + this.addVertex(e.latlng); + this._finishShape(); + } else if (lastPtDistance < 10 && L.Browser.touch) { + this._finishShape(); + } else if (Math.abs(dragCheckDistance) < 9 * (window.devicePixelRatio || 1)) { + this.addVertex(e.latlng); + } + this._enableNewMarkers(); // after a short pause, enable new markers + } + this._mouseDownOrigin = null; + }, + + // ontouch prevented by clickHandled flag because some browsers fire both click/touch events, + // causing unwanted behavior + _onTouch: function (e) { + var originalEvent = e.originalEvent; + var clientX; + var clientY; + if (originalEvent.touches && originalEvent.touches[0] && !this._clickHandled && !this._touchHandled && !this._disableMarkers) { + clientX = originalEvent.touches[0].clientX; + clientY = originalEvent.touches[0].clientY; + this._disableNewMarkers(); + this._touchHandled = true; + this._startPoint.call(this, clientX, clientY); + this._endPoint.call(this, clientX, clientY, e); + this._touchHandled = null; + } + this._clickHandled = null; + }, + + _onMouseOut: function () { + if (this._tooltip) { + this._tooltip._onMouseOut.call(this._tooltip); + } + }, + + // calculate if we are currently within close enough distance + // of the closing point (first point for shapes, last point for lines) + // this is semi-ugly code but the only reliable way i found to get the job done + // note: calculating point.distanceTo between mouseDownOrigin and last marker did NOT work + _calculateFinishDistance: function (potentialLatLng) { + var lastPtDistance; + if (this._markers.length > 0) { + var finishMarker; + if (this.type === L.Draw.Polyline.TYPE) { + finishMarker = this._markers[this._markers.length - 1]; + } else if (this.type === L.Draw.Polygon.TYPE) { + finishMarker = this._markers[0]; + } else { + return Infinity; + } + var lastMarkerPoint = this._map.latLngToContainerPoint(finishMarker.getLatLng()), + potentialMarker = new L.Marker(potentialLatLng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset * 2 + }); + var potentialMarkerPint = this._map.latLngToContainerPoint(potentialMarker.getLatLng()); + lastPtDistance = lastMarkerPoint.distanceTo(potentialMarkerPint); + } else { + lastPtDistance = Infinity; + } + return lastPtDistance; + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + // The last marker should have a click handler to close the polyline + if (markerCount > 1) { + this._markers[markerCount - 1].on('click', this._finishShape, this); + } + + // Remove the old marker click handler (as only the last point should close the polyline) + if (markerCount > 2) { + this._markers[markerCount - 2].off('click', this._finishShape, this); + } + }, + + _createMarker: function (latlng) { + var marker = new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset * 2 + }); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _updateGuide: function (newPos) { + var markerCount = this._markers ? this._markers.length : 0; + + if (markerCount > 0) { + newPos = newPos || this._map.latLngToLayerPoint(this._currentLatLng); + + // draw the guide line + this._clearGuides(); + this._drawGuide( + this._map.latLngToLayerPoint(this._markers[markerCount - 1].getLatLng()), + newPos + ); + } + }, + + _updateTooltip: function (latLng) { + var text = this._getTooltipText(); + + if (latLng) { + this._tooltip.updatePosition(latLng); + } + + if (!this._errorShown) { + this._tooltip.updateContent(text); + } + }, + + _drawGuide: function (pointA, pointB) { + var length = Math.floor(Math.sqrt(Math.pow((pointB.x - pointA.x), 2) + Math.pow((pointB.y - pointA.y), 2))), + guidelineDistance = this.options.guidelineDistance, + maxGuideLineLength = this.options.maxGuideLineLength, + // Only draw a guideline with a max length + i = length > maxGuideLineLength ? length - maxGuideLineLength : guidelineDistance, + fraction, + dashPoint, + dash; + + //create the guides container if we haven't yet + if (!this._guidesContainer) { + this._guidesContainer = L.DomUtil.create('div', 'leaflet-draw-guides', this._overlayPane); + } + + //draw a dash every GuildeLineDistance + for (; i < length; i += this.options.guidelineDistance) { + //work out fraction along line we are + fraction = i / length; + + //calculate new x,y point + dashPoint = { + x: Math.floor((pointA.x * (1 - fraction)) + (fraction * pointB.x)), + y: Math.floor((pointA.y * (1 - fraction)) + (fraction * pointB.y)) + }; + + //add guide dash to guide container + dash = L.DomUtil.create('div', 'leaflet-draw-guide-dash', this._guidesContainer); + dash.style.backgroundColor = + !this._errorShown ? this.options.shapeOptions.color : this.options.drawError.color; + + L.DomUtil.setPosition(dash, dashPoint); + } + }, + + _updateGuideColor: function (color) { + if (this._guidesContainer) { + for (var i = 0, l = this._guidesContainer.childNodes.length; i < l; i++) { + this._guidesContainer.childNodes[i].style.backgroundColor = color; + } + } + }, + + // removes all child elements (guide dashes) from the guides container + _clearGuides: function () { + if (this._guidesContainer) { + while (this._guidesContainer.firstChild) { + this._guidesContainer.removeChild(this._guidesContainer.firstChild); + } + } + }, + + _getTooltipText: function () { + var showLength = this.options.showLength, + labelText, distanceStr; + if (this._markers.length === 0) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.start + }; + } else { + distanceStr = showLength ? this._getMeasurementString() : ''; + + if (this._markers.length === 1) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.cont, + subtext: distanceStr + }; + } else { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.end, + subtext: distanceStr + }; + } + } + return labelText; + }, + + _updateRunningMeasure: function (latlng, added) { + var markersLength = this._markers.length, + previousMarkerIndex, distance; + + if (this._markers.length === 1) { + this._measurementRunningTotal = 0; + } else { + previousMarkerIndex = markersLength - (added ? 2 : 1); + + // Calculate the distance based on the version + if (L.GeometryUtil.isVersion07x()) { + distance = latlng.distanceTo(this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1); + } else { + distance = this._map.distance(latlng, this._markers[previousMarkerIndex].getLatLng()) * (this.options.factor || 1); + } + + this._measurementRunningTotal += distance * (added ? 1 : -1); + } + }, + + _getMeasurementString: function () { + var currentLatLng = this._currentLatLng, + previousLatLng = this._markers[this._markers.length - 1].getLatLng(), + distance; + + // Calculate the distance from the last fixed point to the mouse position based on the version + if (L.GeometryUtil.isVersion07x()) { + distance = previousLatLng && currentLatLng && currentLatLng.distanceTo ? this._measurementRunningTotal + currentLatLng.distanceTo(previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0; + } else { + distance = previousLatLng && currentLatLng ? this._measurementRunningTotal + this._map.distance(currentLatLng, previousLatLng) * (this.options.factor || 1) : this._measurementRunningTotal || 0; + } + + return L.GeometryUtil.readableDistance(distance, this.options.metric, this.options.feet, this.options.nautic, this.options.precision); + }, + + _showErrorTooltip: function () { + this._errorShown = true; + + // Update tooltip + this._tooltip + .showAsError() + .updateContent({text: this.options.drawError.message}); + + // Update shape + this._updateGuideColor(this.options.drawError.color); + this._poly.setStyle({color: this.options.drawError.color}); + + // Hide the error after 2 seconds + this._clearHideErrorTimeout(); + this._hideErrorTimeout = setTimeout(L.Util.bind(this._hideErrorTooltip, this), this.options.drawError.timeout); + }, + + _hideErrorTooltip: function () { + this._errorShown = false; + + this._clearHideErrorTimeout(); + + // Revert tooltip + this._tooltip + .removeError() + .updateContent(this._getTooltipText()); + + // Revert shape + this._updateGuideColor(this.options.shapeOptions.color); + this._poly.setStyle({color: this.options.shapeOptions.color}); + }, + + _clearHideErrorTimeout: function () { + if (this._hideErrorTimeout) { + clearTimeout(this._hideErrorTimeout); + this._hideErrorTimeout = null; + } + }, + + // disable new markers temporarily; + // this is to prevent duplicated touch/click events in some browsers + _disableNewMarkers: function () { + this._disableMarkers = true; + }, + + // see _disableNewMarkers + _enableNewMarkers: function () { + setTimeout(function () { + this._disableMarkers = false; + }.bind(this), 50); + }, + + _cleanUpShape: function () { + if (this._markers.length > 1) { + this._markers[this._markers.length - 1].off('click', this._finishShape, this); + } + }, + + _fireCreatedEvent: function () { + var poly = new this.Poly(this._poly.getLatLngs(), this.options.shapeOptions); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, poly); + } +}); diff --git a/public/src/draw/handler/Draw.Rectangle.js b/public/src/draw/handler/Draw.Rectangle.js new file mode 100644 index 0000000000000000000000000000000000000000..cec11ee0117e796692e08a0e7ef35af88ba19bff --- /dev/null +++ b/public/src/draw/handler/Draw.Rectangle.js @@ -0,0 +1,98 @@ +/** + * @class L.Draw.Rectangle + * @aka Draw.Rectangle + * @inherits L.Draw.SimpleShape + */ +L.Draw.Rectangle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'rectangle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#3388ff', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + showArea: true, //Whether to show the area in the tooltip + metric: true // Whether to use the metric measurement system or imperial + }, + + // @method initialize(): void + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Rectangle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.rectangle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + // @method disable(): void + disable: function () { + if (!this._enabled) { + return; + } + + this._isCurrentlyTwoClickDrawing = false; + L.Draw.SimpleShape.prototype.disable.call(this); + }, + + _onMouseUp: function (e) { + if (!this._shape && !this._isCurrentlyTwoClickDrawing) { + this._isCurrentlyTwoClickDrawing = true; + return; + } + + // Make sure closing click is on map + if (this._isCurrentlyTwoClickDrawing && !_hasAncestor(e.target, 'leaflet-pane')) { + return; + } + + L.Draw.SimpleShape.prototype._onMouseUp.call(this); + }, + + _drawShape: function (latlng) { + if (!this._shape) { + this._shape = new L.Rectangle(new L.LatLngBounds(this._startLatLng, latlng), this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setBounds(new L.LatLngBounds(this._startLatLng, latlng)); + } + }, + + _fireCreatedEvent: function () { + var rectangle = new L.Rectangle(this._shape.getBounds(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, rectangle); + }, + + _getTooltipText: function () { + var tooltipText = L.Draw.SimpleShape.prototype._getTooltipText.call(this), + shape = this._shape, + showArea = this.options.showArea, + latLngs, area, subtext; + + if (shape) { + latLngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs(); + area = L.GeometryUtil.geodesicArea(latLngs); + subtext = showArea ? L.GeometryUtil.readableArea(area, this.options.metric) : ''; + } + + return { + text: tooltipText.text, + subtext: subtext + }; + } +}); + +function _hasAncestor(el, cls) { + while ((el = el.parentElement) && !el.classList.contains(cls)) { + ; + } + return el; +} diff --git a/public/src/draw/handler/Draw.SimpleShape.js b/public/src/draw/handler/Draw.SimpleShape.js new file mode 100644 index 0000000000000000000000000000000000000000..75a3cb69fb04d16e5e00ba6a90c6437de47ca87b --- /dev/null +++ b/public/src/draw/handler/Draw.SimpleShape.js @@ -0,0 +1,119 @@ +L.SimpleShape = {}; +/** + * @class L.Draw.SimpleShape + * @aka Draw.SimpleShape + * @inherits L.Draw.Feature + */ +L.Draw.SimpleShape = L.Draw.Feature.extend({ + options: { + repeatMode: false + }, + + // @method initialize(): void + initialize: function (map, options) { + this._endLabelText = L.drawLocal.draw.handlers.simpleshape.tooltip.end; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._mapDraggable = this._map.dragging.enabled(); + + if (this._mapDraggable) { + this._map.dragging.disable(); + } + + //TODO refactor: move cursor to styles + this._container.style.cursor = 'crosshair'; + + this._tooltip.updateContent({text: this._initialLabelText}); + + this._map + .on('mousedown', this._onMouseDown, this) + .on('mousemove', this._onMouseMove, this) + .on('touchstart', this._onMouseDown, this) + .on('touchmove', this._onMouseMove, this); + + // we should prevent default, otherwise default behavior (scrolling) will fire, + // and that will cause document.touchend to fire and will stop the drawing + // (circle, rectangle) in touch mode. + // (update): we have to send passive now to prevent scroll, because by default it is {passive: true} now, which means, + // handler can't event.preventDefault + // check the news https://developers.google.com/web/updates/2016/06/passive-event-listeners + document.addEventListener('touchstart', L.DomEvent.preventDefault, {passive: false}); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + if (this._map) { + if (this._mapDraggable) { + this._map.dragging.enable(); + } + + //TODO refactor: move cursor to styles + this._container.style.cursor = ''; + + this._map + .off('mousedown', this._onMouseDown, this) + .off('mousemove', this._onMouseMove, this) + .off('touchstart', this._onMouseDown, this) + .off('touchmove', this._onMouseMove, this); + + L.DomEvent.off(document, 'mouseup', this._onMouseUp, this); + L.DomEvent.off(document, 'touchend', this._onMouseUp, this); + + document.removeEventListener('touchstart', L.DomEvent.preventDefault); + + // If the box element doesn't exist they must not have moved the mouse, so don't need to destroy/return + if (this._shape) { + this._map.removeLayer(this._shape); + delete this._shape; + } + } + this._isDrawing = false; + }, + + _getTooltipText: function () { + return { + text: this._endLabelText + }; + }, + + _onMouseDown: function (e) { + this._isDrawing = true; + this._startLatLng = e.latlng; + + L.DomEvent + .on(document, 'mouseup', this._onMouseUp, this) + .on(document, 'touchend', this._onMouseUp, this) + .preventDefault(e.originalEvent); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._tooltip.updateContent(this._getTooltipText()); + this._drawShape(latlng); + } + }, + + _onMouseUp: function () { + if (this._shape) { + this._fireCreatedEvent(); + } + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + } +}); diff --git a/public/src/edit/EditToolbar.js b/public/src/edit/EditToolbar.js new file mode 100644 index 0000000000000000000000000000000000000000..b46666838462ecd93a0a2c277afa829a65a8cbfa --- /dev/null +++ b/public/src/edit/EditToolbar.js @@ -0,0 +1,194 @@ +/*L.Map.mergeOptions({ + editControl: true + });*/ +/** + * @class L.EditToolbar + * @aka EditToolbar + */ +L.EditToolbar = L.Toolbar.extend({ + statics: { + TYPE: 'edit' + }, + + options: { + edit: { + selectedPathOptions: { + dashArray: '10, 10', + + fill: true, + fillColor: '#fe57a1', + fillOpacity: 0.1, + + // Whether to user the existing layers color + maintainColor: false + } + }, + remove: {}, + poly: null, + featureGroup: null /* REQUIRED! TODO: perhaps if not set then all layers on the map are selectable? */ + }, + + // @method intialize(): void + initialize: function (options) { + // Need to set this manually since null is an acceptable value here + if (options.edit) { + if (typeof options.edit.selectedPathOptions === 'undefined') { + options.edit.selectedPathOptions = this.options.edit.selectedPathOptions; + } + options.edit.selectedPathOptions = L.extend({}, this.options.edit.selectedPathOptions, options.edit.selectedPathOptions); + } + + if (options.remove) { + options.remove = L.extend({}, this.options.remove, options.remove); + } + + if (options.poly) { + options.poly = L.extend({}, this.options.poly, options.poly); + } + + this._toolbarClass = 'leaflet-draw-edit'; + L.Toolbar.prototype.initialize.call(this, options); + + this._selectedFeatureCount = 0; + }, + + // @method getModeHandlers(): object + // Get mode handlers information + getModeHandlers: function (map) { + var featureGroup = this.options.featureGroup; + return [ + { + enabled: this.options.edit, + handler: new L.EditToolbar.Edit(map, { + featureGroup: featureGroup, + selectedPathOptions: this.options.edit.selectedPathOptions, + poly: this.options.poly + }), + title: L.drawLocal.edit.toolbar.buttons.edit + }, + { + enabled: this.options.remove, + handler: new L.EditToolbar.Delete(map, { + featureGroup: featureGroup + }), + title: L.drawLocal.edit.toolbar.buttons.remove + } + ]; + }, + + // @method getActions(): object + // Get actions information + getActions: function (handler) { + var actions = [ + { + title: L.drawLocal.edit.toolbar.actions.save.title, + text: L.drawLocal.edit.toolbar.actions.save.text, + callback: this._save, + context: this + }, + { + title: L.drawLocal.edit.toolbar.actions.cancel.title, + text: L.drawLocal.edit.toolbar.actions.cancel.text, + callback: this.disable, + context: this + } + ]; + + if (handler.removeAllLayers) { + actions.push({ + title: L.drawLocal.edit.toolbar.actions.clearAll.title, + text: L.drawLocal.edit.toolbar.actions.clearAll.text, + callback: this._clearAllLayers, + context: this + }); + } + + return actions; + }, + + // @method addToolbar(map): L.DomUtil + // Adds the toolbar to the map + addToolbar: function (map) { + var container = L.Toolbar.prototype.addToolbar.call(this, map); + + this._checkDisabled(); + + this.options.featureGroup.on('layeradd layerremove', this._checkDisabled, this); + + return container; + }, + + // @method removeToolbar(): void + // Removes the toolbar from the map + removeToolbar: function () { + this.options.featureGroup.off('layeradd layerremove', this._checkDisabled, this); + + L.Toolbar.prototype.removeToolbar.call(this); + }, + + // @method disable(): void + // Disables the toolbar + disable: function () { + if (!this.enabled()) { + return; + } + + this._activeMode.handler.revertLayers(); + + L.Toolbar.prototype.disable.call(this); + }, + + _save: function () { + this._activeMode.handler.save(); + if (this._activeMode) { + this._activeMode.handler.disable(); + } + }, + + _clearAllLayers: function () { + this._activeMode.handler.removeAllLayers(); + if (this._activeMode) { + this._activeMode.handler.disable(); + } + }, + + _checkDisabled: function () { + var featureGroup = this.options.featureGroup, + hasLayers = featureGroup.getLayers().length !== 0, + button; + + if (this.options.edit) { + button = this._modes[L.EditToolbar.Edit.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.edit + : L.drawLocal.edit.toolbar.buttons.editDisabled + ); + } + + if (this.options.remove) { + button = this._modes[L.EditToolbar.Delete.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.remove + : L.drawLocal.edit.toolbar.buttons.removeDisabled + ); + } + } +}); diff --git a/public/src/edit/handler/Edit.Circle.js b/public/src/edit/handler/Edit.Circle.js new file mode 100644 index 0000000000000000000000000000000000000000..9a14f5224b90c13e0c1c069c7cda2a86c7a8b343 --- /dev/null +++ b/public/src/edit/handler/Edit.Circle.js @@ -0,0 +1,57 @@ +L.Edit = L.Edit || {}; +/** + * @class L.Edit.Circle + * @aka Edit.Circle + * @inherits L.Edit.CircleMarker + */ +L.Edit.Circle = L.Edit.CircleMarker.extend({ + + _createResizeMarker: function () { + var center = this._shape.getLatLng(), + resizemarkerPoint = this._getResizeMarkerPoint(center); + + this._resizeMarkers = []; + this._resizeMarkers.push(this._createMarker(resizemarkerPoint, this.options.resizeIcon)); + }, + + _getResizeMarkerPoint: function (latlng) { + // From L.shape.getBounds() + var delta = this._shape._radius * Math.cos(Math.PI / 4), + point = this._map.project(latlng); + return this._map.unproject([point.x + delta, point.y - delta]); + }, + + _resize: function (latlng) { + var moveLatLng = this._moveMarker.getLatLng(); + + // Calculate the radius based on the version + if (L.GeometryUtil.isVersion07x()) { + radius = moveLatLng.distanceTo(latlng); + } else { + radius = this._map.distance(moveLatLng, latlng); + } + this._shape.setRadius(radius); + + if (this._map.editTooltip) { + this._map._editTooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.subtext + '<br />' + L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.draw.handlers.circle.radius + ': ' + + L.GeometryUtil.readableDistance(radius, true, this.options.feet, this.options.nautic) + }); + } + + this._shape.setRadius(radius); + + this._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape}); + } +}); + +L.Circle.addInitHook(function () { + if (L.Edit.Circle) { + this.editing = new L.Edit.Circle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); diff --git a/public/src/edit/handler/Edit.CircleMarker.js b/public/src/edit/handler/Edit.CircleMarker.js new file mode 100644 index 0000000000000000000000000000000000000000..4f76415080c0fc64480d002ecc4638aa5780b748 --- /dev/null +++ b/public/src/edit/handler/Edit.CircleMarker.js @@ -0,0 +1,53 @@ +L.Edit = L.Edit || {}; +/** + * @class L.Edit.CircleMarker + * @aka Edit.Circle + * @inherits L.Edit.SimpleShape + */ +L.Edit.CircleMarker = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var center = this._shape.getLatLng(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + // To avoid an undefined check in L.Edit.SimpleShape.removeHooks + this._resizeMarkers = []; + }, + + _move: function (latlng) { + if (this._resizeMarkers.length) { + var resizemarkerPoint = this._getResizeMarkerPoint(latlng); + // Move the resize marker + this._resizeMarkers[0].setLatLng(resizemarkerPoint); + } + + // Move the circle + this._shape.setLatLng(latlng); + + this._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape}); + }, +}); + +L.CircleMarker.addInitHook(function () { + if (L.Edit.CircleMarker) { + this.editing = new L.Edit.CircleMarker(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); diff --git a/public/src/edit/handler/Edit.Marker.js b/public/src/edit/handler/Edit.Marker.js new file mode 100644 index 0000000000000000000000000000000000000000..ce9aa5d3eb04894068f3cef9b3a855c16e625c35 --- /dev/null +++ b/public/src/edit/handler/Edit.Marker.js @@ -0,0 +1,84 @@ +L.Edit = L.Edit || {}; + +/** + * @class L.Edit.Marker + * @aka Edit.Marker + */ +L.Edit.Marker = L.Handler.extend({ + // @method initialize(): void + initialize: function (marker, options) { + this._marker = marker; + L.setOptions(this, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var marker = this._marker; + + marker.dragging.enable(); + marker.on('dragend', this._onDragEnd, marker); + this._toggleMarkerHighlight(); + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + var marker = this._marker; + + marker.dragging.disable(); + marker.off('dragend', this._onDragEnd, marker); + this._toggleMarkerHighlight(); + }, + + _onDragEnd: function (e) { + var layer = e.target; + layer.edited = true; + this._map.fire(L.Draw.Event.EDITMOVE, {layer: layer}); + }, + + _toggleMarkerHighlight: function () { + var icon = this._marker._icon; + + // Don't do anything if this layer is a marker but doesn't have an icon. Markers + // should usually have icons. If using Leaflet.draw with Leaflet.markercluster there + // is a chance that a marker doesn't. + if (!icon) { + return; + } + + // This is quite naughty, but I don't see another way of doing it. (short of setting a new icon) + icon.style.display = 'none'; + + if (L.DomUtil.hasClass(icon, 'leaflet-edit-marker-selected')) { + L.DomUtil.removeClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, -4); + + } else { + L.DomUtil.addClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, 4); + } + + icon.style.display = ''; + }, + + _offsetMarker: function (icon, offset) { + var iconMarginTop = parseInt(icon.style.marginTop, 10) - offset, + iconMarginLeft = parseInt(icon.style.marginLeft, 10) - offset; + + icon.style.marginTop = iconMarginTop + 'px'; + icon.style.marginLeft = iconMarginLeft + 'px'; + } +}); + +L.Marker.addInitHook(function () { + if (L.Edit.Marker) { + this.editing = new L.Edit.Marker(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); diff --git a/public/src/edit/handler/Edit.Poly.js b/public/src/edit/handler/Edit.Poly.js new file mode 100644 index 0000000000000000000000000000000000000000..4d8bd3872b3316d13064e128094844709bf45c31 --- /dev/null +++ b/public/src/edit/handler/Edit.Poly.js @@ -0,0 +1,520 @@ +L.Edit = L.Edit || {}; + +/** + * @class L.Edit.Polyline + * @aka L.Edit.Poly + * @aka Edit.Poly + */ +L.Edit.Poly = L.Handler.extend({ + // @method initialize(): void + initialize: function (poly) { + + this.latlngs = [poly._latlngs]; + if (poly._holes) { + this.latlngs = this.latlngs.concat(poly._holes); + } + + this._poly = poly; + + this._poly.on('revert-edited', this._updateLatLngs, this); + }, + + // Compatibility method to normalize Poly* objects + // between 0.7.x and 1.0+ + _defaultShape: function () { + if (!L.Polyline._flat) { + return this._poly._latlngs; + } + return L.Polyline._flat(this._poly._latlngs) ? this._poly._latlngs : this._poly._latlngs[0]; + }, + + _eachVertexHandler: function (callback) { + for (var i = 0; i < this._verticesHandlers.length; i++) { + callback(this._verticesHandlers[i]); + } + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + this._initHandlers(); + this._eachVertexHandler(function (handler) { + handler.addHooks(); + }); + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + this._eachVertexHandler(function (handler) { + handler.removeHooks(); + }); + }, + + // @method updateMarkers(): void + // Fire an update for each vertex handler + updateMarkers: function () { + this._eachVertexHandler(function (handler) { + handler.updateMarkers(); + }); + }, + + _initHandlers: function () { + this._verticesHandlers = []; + for (var i = 0; i < this.latlngs.length; i++) { + this._verticesHandlers.push(new L.Edit.PolyVerticesEdit(this._poly, this.latlngs[i], this._poly.options.poly)); + } + }, + + _updateLatLngs: function (e) { + this.latlngs = [e.layer._latlngs]; + if (e.layer._holes) { + this.latlngs = this.latlngs.concat(e.layer._holes); + } + } + +}); + +/** + * @class L.Edit.PolyVerticesEdit + * @aka Edit.PolyVerticesEdit + */ +L.Edit.PolyVerticesEdit = L.Handler.extend({ + options: { + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }), + touchIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-touch-icon' + }), + drawError: { + color: '#b00b00', + timeout: 1000 + } + + + }, + + // @method intialize(): void + initialize: function (poly, latlngs, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.icon = this.options.touchIcon; + } + this._poly = poly; + + if (options && options.drawError) { + options.drawError = L.Util.extend({}, this.options.drawError, options.drawError); + } + + this._latlngs = latlngs; + + L.setOptions(this, options); + }, + + // Compatibility method to normalize Poly* objects + // between 0.7.x and 1.0+ + _defaultShape: function () { + if (!L.Polyline._flat) { + return this._latlngs; + } + return L.Polyline._flat(this._latlngs) ? this._latlngs : this._latlngs[0]; + }, + + // @method addHooks(): void + // Add listener hooks to this handler. + addHooks: function () { + var poly = this._poly; + var path = poly._path; + + if (!(poly instanceof L.Polygon)) { + poly.options.fill = false; + if (poly.options.editing) { + poly.options.editing.fill = false; + } + } + + if (path) { + if (poly.options.editing && poly.options.editing.className) { + if (poly.options.original.className) { + poly.options.original.className.split(' ').forEach(function (className) { + L.DomUtil.removeClass(path, className); + }); + } + poly.options.editing.className.split(' ').forEach(function (className) { + L.DomUtil.addClass(path, className); + }); + } + } + + poly.setStyle(poly.options.editing); + + if (this._poly._map) { + + this._map = this._poly._map; // Set map + + if (!this._markerGroup) { + this._initMarkers(); + } + this._poly._map.addLayer(this._markerGroup); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler. + removeHooks: function () { + var poly = this._poly; + var path = poly._path; + + if (path) { + if (poly.options.editing && poly.options.editing.className) { + poly.options.editing.className.split(' ').forEach(function (className) { + L.DomUtil.removeClass(path, className); + }); + if (poly.options.original.className) { + poly.options.original.className.split(' ').forEach(function (className) { + L.DomUtil.addClass(path, className); + }); + } + } + } + + poly.setStyle(poly.options.original); + + if (poly._map) { + poly._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + } + }, + + // @method updateMarkers(): void + // Clear markers and update their location + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + this._markers = []; + + var latlngs = this._defaultShape(), + i, j, len, marker; + + for (i = 0, len = latlngs.length; i < len; i++) { + + marker = this._createMarker(latlngs[i], i); + marker.on('click', this._onMarkerClick, this); + marker.on('contextmenu', this._onContextMenu, this); + this._markers.push(marker); + } + + var markerLeft, markerRight; + + for (i = 0, j = len - 1; i < len; j = i++) { + if (i === 0 && !(L.Polygon && (this._poly instanceof L.Polygon))) { + continue; + } + + markerLeft = this._markers[j]; + markerRight = this._markers[i]; + + this._createMiddleMarker(markerLeft, markerRight); + this._updatePrevNext(markerLeft, markerRight); + } + }, + + _createMarker: function (latlng, index) { + // Extending L.Marker in TouchEvents.js to include touch. + var marker = new L.Marker.Touch(latlng, { + draggable: true, + icon: this.options.icon, + }); + + marker._origLatLng = latlng; + marker._index = index; + + marker + .on('dragstart', this._onMarkerDragStart, this) + .on('drag', this._onMarkerDrag, this) + .on('dragend', this._fireEdit, this) + .on('touchmove', this._onTouchMove, this) + .on('touchend', this._fireEdit, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('MSPointerUp', this._fireEdit, this); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _onMarkerDragStart: function () { + this._poly.fire('editstart'); + }, + + _spliceLatLngs: function () { + var latlngs = this._defaultShape(); + var removed = [].splice.apply(latlngs, arguments); + this._poly._convertLatLngs(latlngs, true); + this._poly.redraw(); + return removed; + }, + + _removeMarker: function (marker) { + var i = marker._index; + + this._markerGroup.removeLayer(marker); + this._markers.splice(i, 1); + this._spliceLatLngs(i, 1); + this._updateIndexes(i, -1); + + marker + .off('dragstart', this._onMarkerDragStart, this) + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._fireEdit, this) + .off('touchmove', this._onMarkerDrag, this) + .off('touchend', this._fireEdit, this) + .off('click', this._onMarkerClick, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('MSPointerUp', this._fireEdit, this); + }, + + _fireEdit: function () { + this._poly.edited = true; + this._poly.fire('edit'); + this._poly._map.fire(L.Draw.Event.EDITVERTEX, {layers: this._markerGroup, poly: this._poly}); + }, + + _onMarkerDrag: function (e) { + var marker = e.target; + var poly = this._poly; + + var oldOrigLatLng = L.LatLngUtil.cloneLatLng(marker._origLatLng); + L.extend(marker._origLatLng, marker._latlng); + if (poly.options.poly) { + var tooltip = poly._map._editTooltip; // Access the tooltip + + // If we don't allow intersections and the polygon intersects + if (!poly.options.poly.allowIntersection && poly.intersects()) { + L.extend(marker._origLatLng, oldOrigLatLng); + marker.setLatLng(oldOrigLatLng); + var originalColor = poly.options.color; + poly.setStyle({color: this.options.drawError.color}); + if (tooltip) { + tooltip.updateContent({ + text: L.drawLocal.draw.handlers.polyline.error + }); + } + + // Reset everything back to normal after a second + setTimeout(function () { + poly.setStyle({color: originalColor}); + if (tooltip) { + tooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + } + }, 1000); + } + } + + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + + //refresh the bounds when draging + this._poly._bounds._southWest = L.latLng(Infinity, Infinity); + this._poly._bounds._northEast = L.latLng(-Infinity, -Infinity); + var latlngs = this._poly.getLatLngs(); + this._poly._convertLatLngs(latlngs, true); + this._poly.redraw(); + this._poly.fire('editdrag'); + }, + + _onMarkerClick: function (e) { + + var minPoints = L.Polygon && (this._poly instanceof L.Polygon) ? 4 : 3, + marker = e.target; + + // If removing this point would create an invalid polyline/polygon don't remove + if (this._defaultShape().length < minPoints) { + return; + } + + // remove the marker + this._removeMarker(marker); + + // update prev/next links of adjacent markers + this._updatePrevNext(marker._prev, marker._next); + + // remove ghost markers near the removed marker + if (marker._middleLeft) { + this._markerGroup.removeLayer(marker._middleLeft); + } + if (marker._middleRight) { + this._markerGroup.removeLayer(marker._middleRight); + } + + // create a ghost marker in place of the removed one + if (marker._prev && marker._next) { + this._createMiddleMarker(marker._prev, marker._next); + + } else if (!marker._prev) { + marker._next._middleLeft = null; + + } else if (!marker._next) { + marker._prev._middleRight = null; + } + + this._fireEdit(); + }, + + _onContextMenu: function (e) { + var marker = e.target; + var poly = this._poly; + this._poly._map.fire(L.Draw.Event.MARKERCONTEXT, {marker: marker, layers: this._markerGroup, poly: this._poly}); + L.DomEvent.stopPropagation; + }, + + _onTouchMove: function (e) { + + var layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]), + latlng = this._map.layerPointToLatLng(layerPoint), + marker = e.target; + + L.extend(marker._origLatLng, latlng); + + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + + this._poly.redraw(); + this.updateMarkers(); + }, + + _updateIndexes: function (index, delta) { + this._markerGroup.eachLayer(function (marker) { + if (marker._index > index) { + marker._index += delta; + } + }); + }, + + _createMiddleMarker: function (marker1, marker2) { + var latlng = this._getMiddleLatLng(marker1, marker2), + marker = this._createMarker(latlng), + onClick, + onDragStart, + onDragEnd; + + marker.setOpacity(0.6); + + marker1._middleRight = marker2._middleLeft = marker; + + onDragStart = function () { + marker.off('touchmove', onDragStart, this); + var i = marker2._index; + + marker._index = i; + + marker + .off('click', onClick, this) + .on('click', this._onMarkerClick, this); + + latlng.lat = marker.getLatLng().lat; + latlng.lng = marker.getLatLng().lng; + this._spliceLatLngs(i, 0, latlng); + this._markers.splice(i, 0, marker); + + marker.setOpacity(1); + + this._updateIndexes(i, 1); + marker2._index++; + this._updatePrevNext(marker1, marker); + this._updatePrevNext(marker, marker2); + + this._poly.fire('editstart'); + }; + + onDragEnd = function () { + marker.off('dragstart', onDragStart, this); + marker.off('dragend', onDragEnd, this); + marker.off('touchmove', onDragStart, this); + + this._createMiddleMarker(marker1, marker); + this._createMiddleMarker(marker, marker2); + }; + + onClick = function () { + onDragStart.call(this); + onDragEnd.call(this); + this._fireEdit(); + }; + + marker + .on('click', onClick, this) + .on('dragstart', onDragStart, this) + .on('dragend', onDragEnd, this) + .on('touchmove', onDragStart, this); + + this._markerGroup.addLayer(marker); + }, + + _updatePrevNext: function (marker1, marker2) { + if (marker1) { + marker1._next = marker2; + } + if (marker2) { + marker2._prev = marker1; + } + }, + + _getMiddleLatLng: function (marker1, marker2) { + var map = this._poly._map, + p1 = map.project(marker1.getLatLng()), + p2 = map.project(marker2.getLatLng()); + + return map.unproject(p1._add(p2)._divideBy(2)); + } +}); + +L.Polyline.addInitHook(function () { + + // Check to see if handler has already been initialized. This is to support versions of Leaflet that still have L.Handler.PolyEdit + if (this.editing) { + return; + } + + if (L.Edit.Poly) { + + this.editing = new L.Edit.Poly(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); diff --git a/public/src/edit/handler/Edit.Rectangle.js b/public/src/edit/handler/Edit.Rectangle.js new file mode 100644 index 0000000000000000000000000000000000000000..3d42d75268e4cc2e2b95f8f7ec8d50ddcd385faa --- /dev/null +++ b/public/src/edit/handler/Edit.Rectangle.js @@ -0,0 +1,125 @@ +L.Edit = L.Edit || {}; +/** + * @class L.Edit.Rectangle + * @aka Edit.Rectangle + * @inherits L.Edit.SimpleShape + */ +L.Edit.Rectangle = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var bounds = this._shape.getBounds(), + center = bounds.getCenter(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + var corners = this._getCorners(); + + this._resizeMarkers = []; + + for (var i = 0, l = corners.length; i < l; i++) { + this._resizeMarkers.push(this._createMarker(corners[i], this.options.resizeIcon)); + // Monkey in the corner index as we will need to know this for dragging + this._resizeMarkers[i]._cornerIndex = i; + } + }, + + _onMarkerDragStart: function (e) { + L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e); + + // Save a reference to the opposite point + var corners = this._getCorners(), + marker = e.target, + currentCornerIndex = marker._cornerIndex; + + this._oppositeCorner = corners[(currentCornerIndex + 2) % 4]; + + this._toggleCornerMarkers(0, currentCornerIndex); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target, + bounds, center; + + // Reset move marker position to the center + if (marker === this._moveMarker) { + bounds = this._shape.getBounds(); + center = bounds.getCenter(); + + marker.setLatLng(center); + } + + this._toggleCornerMarkers(1); + + this._repositionCornerMarkers(); + + L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this, e); + }, + + _move: function (newCenter) { + var latlngs = this._shape._defaultShape ? this._shape._defaultShape() : this._shape.getLatLngs(), + bounds = this._shape.getBounds(), + center = bounds.getCenter(), + offset, newLatLngs = []; + + // Offset the latlngs to the new center + for (var i = 0, l = latlngs.length; i < l; i++) { + offset = [latlngs[i].lat - center.lat, latlngs[i].lng - center.lng]; + newLatLngs.push([newCenter.lat + offset[0], newCenter.lng + offset[1]]); + } + + this._shape.setLatLngs(newLatLngs); + + // Reposition the resize markers + this._repositionCornerMarkers(); + + this._map.fire(L.Draw.Event.EDITMOVE, {layer: this._shape}); + }, + + _resize: function (latlng) { + var bounds; + + // Update the shape based on the current position of this corner and the opposite point + this._shape.setBounds(L.latLngBounds(latlng, this._oppositeCorner)); + + // Reposition the move marker + bounds = this._shape.getBounds(); + this._moveMarker.setLatLng(bounds.getCenter()); + + this._map.fire(L.Draw.Event.EDITRESIZE, {layer: this._shape}); + }, + + _getCorners: function () { + var bounds = this._shape.getBounds(), + nw = bounds.getNorthWest(), + ne = bounds.getNorthEast(), + se = bounds.getSouthEast(), + sw = bounds.getSouthWest(); + + return [nw, ne, se, sw]; + }, + + _toggleCornerMarkers: function (opacity) { + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setOpacity(opacity); + } + }, + + _repositionCornerMarkers: function () { + var corners = this._getCorners(); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setLatLng(corners[i]); + } + } +}); + +L.Rectangle.addInitHook(function () { + if (L.Edit.Rectangle) { + this.editing = new L.Edit.Rectangle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); diff --git a/public/src/edit/handler/Edit.SimpleShape.js b/public/src/edit/handler/Edit.SimpleShape.js new file mode 100644 index 0000000000000000000000000000000000000000..6c879b209de680c67cfeb7302f7132d31a427a6d --- /dev/null +++ b/public/src/edit/handler/Edit.SimpleShape.js @@ -0,0 +1,229 @@ +L.Edit = L.Edit || {}; +/** + * @class L.Edit.SimpleShape + * @aka Edit.SimpleShape + */ +L.Edit.SimpleShape = L.Handler.extend({ + options: { + moveIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move' + }), + resizeIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize' + }), + touchMoveIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move leaflet-touch-icon' + }), + touchResizeIcon: new L.DivIcon({ + iconSize: new L.Point(20, 20), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize leaflet-touch-icon' + }), + }, + + // @method intialize(): void + initialize: function (shape, options) { + // if touch, switch to touch icon + if (L.Browser.touch) { + this.options.moveIcon = this.options.touchMoveIcon; + this.options.resizeIcon = this.options.touchResizeIcon; + } + + this._shape = shape; + L.Util.setOptions(this, options); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var shape = this._shape; + if (this._shape._map) { + this._map = this._shape._map; + shape.setStyle(shape.options.editing); + + if (shape._map) { + this._map = shape._map; + if (!this._markerGroup) { + this._initMarkers(); + } + this._map.addLayer(this._markerGroup); + } + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + var shape = this._shape; + + shape.setStyle(shape.options.original); + + if (shape._map) { + this._unbindMarker(this._moveMarker); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._unbindMarker(this._resizeMarkers[i]); + } + this._resizeMarkers = null; + + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + } + + this._map = null; + }, + + // @method updateMarkers(): void + // Remove the edit markers from this layer + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + + // Create center marker + this._createMoveMarker(); + + // Create edge marker + this._createResizeMarker(); + }, + + _createMoveMarker: function () { + // Children override + }, + + _createResizeMarker: function () { + // Children override + }, + + _createMarker: function (latlng, icon) { + // Extending L.Marker in TouchEvents.js to include touch. + var marker = new L.Marker.Touch(latlng, { + draggable: true, + icon: icon, + zIndexOffset: 10 + }); + + this._bindMarker(marker); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _bindMarker: function (marker) { + marker + .on('dragstart', this._onMarkerDragStart, this) + .on('drag', this._onMarkerDrag, this) + .on('dragend', this._onMarkerDragEnd, this) + .on('touchstart', this._onTouchStart, this) + .on('touchmove', this._onTouchMove, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('touchend', this._onTouchEnd, this) + .on('MSPointerUp', this._onTouchEnd, this); + }, + + _unbindMarker: function (marker) { + marker + .off('dragstart', this._onMarkerDragStart, this) + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._onMarkerDragEnd, this) + .off('touchstart', this._onTouchStart, this) + .off('touchmove', this._onTouchMove, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('touchend', this._onTouchEnd, this) + .off('MSPointerUp', this._onTouchEnd, this); + }, + + _onMarkerDragStart: function (e) { + var marker = e.target; + marker.setOpacity(0); + + this._shape.fire('editstart'); + }, + + _fireEdit: function () { + this._shape.edited = true; + this._shape.fire('edit'); + }, + + _onMarkerDrag: function (e) { + var marker = e.target, + latlng = marker.getLatLng(); + + if (marker === this._moveMarker) { + this._move(latlng); + } else { + this._resize(latlng); + } + + this._shape.redraw(); + this._shape.fire('editdrag'); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target; + marker.setOpacity(1); + + this._fireEdit(); + }, + + _onTouchStart: function (e) { + L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e); + + if (typeof(this._getCorners) === 'function') { + // Save a reference to the opposite point + var corners = this._getCorners(), + marker = e.target, + currentCornerIndex = marker._cornerIndex; + + marker.setOpacity(0); + + // Copyed from Edit.Rectangle.js line 23 _onMarkerDragStart() + // Latlng is null otherwise. + this._oppositeCorner = corners[(currentCornerIndex + 2) % 4]; + this._toggleCornerMarkers(0, currentCornerIndex); + } + + this._shape.fire('editstart'); + }, + + _onTouchMove: function (e) { + var layerPoint = this._map.mouseEventToLayerPoint(e.originalEvent.touches[0]), + latlng = this._map.layerPointToLatLng(layerPoint), + marker = e.target; + + if (marker === this._moveMarker) { + this._move(latlng); + } else { + this._resize(latlng); + } + + this._shape.redraw(); + + // prevent touchcancel in IOS + // e.preventDefault(); + return false; + }, + + _onTouchEnd: function (e) { + var marker = e.target; + marker.setOpacity(1); + this.updateMarkers(); + this._fireEdit(); + }, + + _move: function () { + // Children override + }, + + _resize: function () { + // Children override + } +}); diff --git a/public/src/edit/handler/EditToolbar.Delete.js b/public/src/edit/handler/EditToolbar.Delete.js new file mode 100644 index 0000000000000000000000000000000000000000..3660752e4d63730c6a43f7ce00c5d597a5f08690 --- /dev/null +++ b/public/src/edit/handler/EditToolbar.Delete.js @@ -0,0 +1,161 @@ +/** + * @class L.EditToolbar.Delete + * @aka EditToolbar.Delete + */ +L.EditToolbar.Delete = L.Handler.extend({ + statics: { + TYPE: 'remove' // not delete as delete is reserved in js + }, + + // @method intialize(): void + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + L.Util.setOptions(this, options); + + // Store the selectable layer group for ease of access + this._deletableLayers = this.options.featureGroup; + + if (!(this._deletableLayers instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Delete.TYPE; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.EditToolbar.Delete.include(L.Evented.prototype); + } else { + L.EditToolbar.Delete.include(L.Mixin.Events); + } + + }, + + // @method enable(): void + // Enable the delete toolbar + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + this.fire('enabled', {handler: this.type}); + + this._map.fire(L.Draw.Event.DELETESTART, {handler: this.type}); + + L.Handler.prototype.enable.call(this); + + this._deletableLayers + .on('layeradd', this._enableLayerDelete, this) + .on('layerremove', this._disableLayerDelete, this); + }, + + // @method disable(): void + // Disable the delete toolbar + disable: function () { + if (!this._enabled) { + return; + } + + this._deletableLayers + .off('layeradd', this._enableLayerDelete, this) + .off('layerremove', this._disableLayerDelete, this); + + L.Handler.prototype.disable.call(this); + + this._map.fire(L.Draw.Event.DELETESTOP, {handler: this.type}); + + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add listener hooks to this handler + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._deletableLayers.eachLayer(this._enableLayerDelete, this); + this._deletedLayers = new L.LayerGroup(); + + this._tooltip = new L.Draw.Tooltip(this._map); + this._tooltip.updateContent({text: L.drawLocal.edit.handlers.remove.tooltip.text}); + + this._map.on('mousemove', this._onMouseMove, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks from this handler + removeHooks: function () { + if (this._map) { + this._deletableLayers.eachLayer(this._disableLayerDelete, this); + this._deletedLayers = null; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + // @method revertLayers(): void + // Revert the deleted layers back to their prior state. + revertLayers: function () { + // Iterate of the deleted layers and add them back into the featureGroup + this._deletedLayers.eachLayer(function (layer) { + this._deletableLayers.addLayer(layer); + layer.fire('revert-deleted', {layer: layer}); + }, this); + }, + + // @method save(): void + // Save deleted layers + save: function () { + this._map.fire(L.Draw.Event.DELETED, {layers: this._deletedLayers}); + }, + + // @method removeAllLayers(): void + // Remove all delateable layers + removeAllLayers: function () { + // Iterate of the delateable layers and add remove them + this._deletableLayers.eachLayer(function (layer) { + this._removeLayer({layer: layer}); + }, this); + this.save(); + }, + + _enableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.on('click', this._removeLayer, this); + }, + + _disableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.off('click', this._removeLayer, this); + + // Remove from the deleted layers so we can't accidentally revert if the user presses cancel + this._deletedLayers.removeLayer(layer); + }, + + _removeLayer: function (e) { + var layer = e.layer || e.target || e; + + this._deletableLayers.removeLayer(layer); + + this._deletedLayers.addLayer(layer); + + layer.fire('deleted'); + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _hasAvailableLayers: function () { + return this._deletableLayers.getLayers().length !== 0; + } +}); diff --git a/public/src/edit/handler/EditToolbar.Edit.js b/public/src/edit/handler/EditToolbar.Edit.js new file mode 100644 index 0000000000000000000000000000000000000000..c85d4874c0d92e1f87bb11a0a22aed9196683398 --- /dev/null +++ b/public/src/edit/handler/EditToolbar.Edit.js @@ -0,0 +1,290 @@ +/** + * @class L.EditToolbar.Edit + * @aka EditToolbar.Edit + */ +L.EditToolbar.Edit = L.Handler.extend({ + statics: { + TYPE: 'edit' + }, + + // @method intialize(): void + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + L.setOptions(this, options); + + // Store the selectable layer group for ease of access + this._featureGroup = options.featureGroup; + + if (!(this._featureGroup instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + this._uneditedLayerProps = {}; + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Edit.TYPE; + + var version = L.version.split('.'); + //If Version is >= 1.2.0 + if (parseInt(version[0], 10) === 1 && parseInt(version[1], 10) >= 2) { + L.EditToolbar.Edit.include(L.Evented.prototype); + } else { + L.EditToolbar.Edit.include(L.Mixin.Events); + } + }, + + // @method enable(): void + // Enable the edit toolbar + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + this.fire('enabled', {handler: this.type}); + //this disable other handlers + + this._map.fire(L.Draw.Event.EDITSTART, {handler: this.type}); + //allow drawLayer to be updated before beginning edition. + + L.Handler.prototype.enable.call(this); + this._featureGroup + .on('layeradd', this._enableLayerEdit, this) + .on('layerremove', this._disableLayerEdit, this); + }, + + // @method disable(): void + // Disable the edit toolbar + disable: function () { + if (!this._enabled) { + return; + } + this._featureGroup + .off('layeradd', this._enableLayerEdit, this) + .off('layerremove', this._disableLayerEdit, this); + L.Handler.prototype.disable.call(this); + this._map.fire(L.Draw.Event.EDITSTOP, {handler: this.type}); + this.fire('disabled', {handler: this.type}); + }, + + // @method addHooks(): void + // Add listener hooks for this handler + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._featureGroup.eachLayer(this._enableLayerEdit, this); + + this._tooltip = new L.Draw.Tooltip(this._map); + this._tooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + + // Quickly access the tooltip to update for intersection checking + map._editTooltip = this._tooltip; + + this._updateTooltip(); + + this._map + .on('mousemove', this._onMouseMove, this) + .on('touchmove', this._onMouseMove, this) + .on('MSPointerMove', this._onMouseMove, this) + .on(L.Draw.Event.EDITVERTEX, this._updateTooltip, this); + } + }, + + // @method removeHooks(): void + // Remove listener hooks for this handler + removeHooks: function () { + if (this._map) { + // Clean up selected layers. + this._featureGroup.eachLayer(this._disableLayerEdit, this); + + // Clear the backups of the original layers + this._uneditedLayerProps = {}; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map + .off('mousemove', this._onMouseMove, this) + .off('touchmove', this._onMouseMove, this) + .off('MSPointerMove', this._onMouseMove, this) + .off(L.Draw.Event.EDITVERTEX, this._updateTooltip, this); + } + }, + + // @method revertLayers(): void + // Revert each layer's geometry changes + revertLayers: function () { + this._featureGroup.eachLayer(function (layer) { + this._revertLayer(layer); + }, this); + }, + + // @method save(): void + // Save the layer geometries + save: function () { + var editedLayers = new L.LayerGroup(); + this._featureGroup.eachLayer(function (layer) { + if (layer.edited) { + editedLayers.addLayer(layer); + layer.edited = false; + } + }); + this._map.fire(L.Draw.Event.EDITED, {layers: editedLayers}); + }, + + _backupLayer: function (layer) { + var id = L.Util.stamp(layer); + + if (!this._uneditedLayerProps[id]) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + this._uneditedLayerProps[id] = { + latlngs: L.LatLngUtil.cloneLatLngs(layer.getLatLngs()) + }; + } else if (layer instanceof L.Circle) { + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()), + radius: layer.getRadius() + }; + } else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()) + }; + } + } + }, + + _getTooltipText: function () { + return ({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + }, + + _updateTooltip: function () { + this._tooltip.updateContent(this._getTooltipText()); + }, + + _revertLayer: function (layer) { + var id = L.Util.stamp(layer); + layer.edited = false; + if (this._uneditedLayerProps.hasOwnProperty(id)) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + layer.setLatLngs(this._uneditedLayerProps[id].latlngs); + } else if (layer instanceof L.Circle) { + layer.setLatLng(this._uneditedLayerProps[id].latlng); + layer.setRadius(this._uneditedLayerProps[id].radius); + } else if (layer instanceof L.Marker || layer instanceof L.CircleMarker) { // Marker or CircleMarker + layer.setLatLng(this._uneditedLayerProps[id].latlng); + } + + layer.fire('revert-edited', {layer: layer}); + } + }, + + _enableLayerEdit: function (e) { + var layer = e.layer || e.target || e, + pathOptions, poly; + + // Back up this layer (if haven't before) + this._backupLayer(layer); + + if (this.options.poly) { + poly = L.Util.extend({}, this.options.poly); + layer.options.poly = poly; + } + + // Set different style for editing mode + if (this.options.selectedPathOptions) { + pathOptions = L.Util.extend({}, this.options.selectedPathOptions); + + // Use the existing color of the layer + if (pathOptions.maintainColor) { + pathOptions.color = layer.options.color; + pathOptions.fillColor = layer.options.fillColor; + } + + layer.options.original = L.extend({}, layer.options); + layer.options.editing = pathOptions; + + } + + if (layer instanceof L.Marker) { + if (layer.editing) { + layer.editing.enable(); + } + layer.dragging.enable(); + layer + .on('dragend', this._onMarkerDragEnd) + // #TODO: remove when leaflet finally fixes their draggable so it's touch friendly again. + .on('touchmove', this._onTouchMove, this) + .on('MSPointerMove', this._onTouchMove, this) + .on('touchend', this._onMarkerDragEnd, this) + .on('MSPointerUp', this._onMarkerDragEnd, this); + } else { + layer.editing.enable(); + } + }, + + _disableLayerEdit: function (e) { + var layer = e.layer || e.target || e; + + layer.edited = false; + if (layer.editing) { + layer.editing.disable(); + } + + delete layer.options.editing; + delete layer.options.original; + // Reset layer styles to that of before select + if (this._selectedPathOptions) { + if (layer instanceof L.Marker) { + this._toggleMarkerHighlight(layer); + } else { + // reset the layer style to what is was before being selected + layer.setStyle(layer.options.previousOptions); + // remove the cached options for the layer object + delete layer.options.previousOptions; + } + } + + if (layer instanceof L.Marker) { + layer.dragging.disable(); + layer + .off('dragend', this._onMarkerDragEnd, this) + .off('touchmove', this._onTouchMove, this) + .off('MSPointerMove', this._onTouchMove, this) + .off('touchend', this._onMarkerDragEnd, this) + .off('MSPointerUp', this._onMarkerDragEnd, this); + } else { + layer.editing.disable(); + } + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _onMarkerDragEnd: function (e) { + var layer = e.target; + layer.edited = true; + this._map.fire(L.Draw.Event.EDITMOVE, {layer: layer}); + }, + + _onTouchMove: function (e) { + var touchEvent = e.originalEvent.changedTouches[0], + layerPoint = this._map.mouseEventToLayerPoint(touchEvent), + latlng = this._map.layerPointToLatLng(layerPoint); + e.target.setLatLng(latlng); + }, + + _hasAvailableLayers: function () { + return this._featureGroup.getLayers().length !== 0; + } +}); diff --git a/public/src/ext/GeometryUtil.js b/public/src/ext/GeometryUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..5a95cfaf33fb6fbb6b5dc2b30ce8d35217193918 --- /dev/null +++ b/public/src/ext/GeometryUtil.js @@ -0,0 +1,165 @@ +(function () { + + var defaultPrecision = { + km: 2, + ha: 2, + m: 0, + mi: 2, + ac: 2, + yd: 0, + ft: 0, + nm: 2 + }; + + + /** + * @class L.GeometryUtil + * @aka GeometryUtil + */ + L.GeometryUtil = L.extend(L.GeometryUtil || {}, { + // Ported from the OpenLayers implementation. See https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Geometry/LinearRing.js#L270 + + // @method geodesicArea(): number + geodesicArea: function (latLngs) { + var pointsCount = latLngs.length, + area = 0.0, + d2r = Math.PI / 180, + p1, p2; + + if (pointsCount > 2) { + for (var i = 0; i < pointsCount; i++) { + p1 = latLngs[i]; + p2 = latLngs[(i + 1) % pointsCount]; + area += ((p2.lng - p1.lng) * d2r) * + (2 + Math.sin(p1.lat * d2r) + Math.sin(p2.lat * d2r)); + } + area = area * 6378137.0 * 6378137.0 / 2.0; + } + + return Math.abs(area); + }, + + // @method formattedNumber(n, precision): string + // Returns n in specified number format (if defined) and precision + formattedNumber: function (n, precision) { + var formatted = parseFloat(n).toFixed(precision), + format = L.drawLocal.format && L.drawLocal.format.numeric, + delimiters = format && format.delimiters, + thousands = delimiters && delimiters.thousands, + decimal = delimiters && delimiters.decimal; + + if (thousands || decimal) { + var splitValue = formatted.split('.'); + formatted = thousands ? splitValue[0].replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + thousands) : splitValue[0]; + decimal = decimal || '.'; + if (splitValue.length > 1) { + formatted = formatted + decimal + splitValue[1]; + } + } + + return formatted; + }, + + // @method readableArea(area, isMetric, precision): string + // Returns a readable area string in yards or metric. + // The value will be rounded as defined by the precision option object. + readableArea: function (area, isMetric, precision) { + var areaStr, + units, + precision = L.Util.extend({}, defaultPrecision, precision); + + if (isMetric) { + units = ['ha', 'm']; + type = typeof isMetric; + if (type === 'string') { + units = [isMetric]; + } else if (type !== 'boolean') { + units = isMetric; + } + + if (area >= 1000000 && units.indexOf('km') !== -1) { + areaStr = L.GeometryUtil.formattedNumber(area * 0.000001, precision['km']) + ' km²'; + } else if (area >= 10000 && units.indexOf('ha') !== -1) { + areaStr = L.GeometryUtil.formattedNumber(area * 0.0001, precision['ha']) + ' ha'; + } else { + areaStr = L.GeometryUtil.formattedNumber(area, precision['m']) + ' m²'; + } + } else { + area /= 0.836127; // Square yards in 1 meter + + if (area >= 3097600) { //3097600 square yards in 1 square mile + areaStr = L.GeometryUtil.formattedNumber(area / 3097600, precision['mi']) + ' mi²'; + } else if (area >= 4840) { //4840 square yards in 1 acre + areaStr = L.GeometryUtil.formattedNumber(area / 4840, precision['ac']) + ' acres'; + } else { + areaStr = L.GeometryUtil.formattedNumber(area, precision['yd']) + ' yd²'; + } + } + + return areaStr; + }, + + // @method readableDistance(distance, units): string + // Converts a metric distance to one of [ feet, nauticalMile, metric or yards ] string + // + // @alternative + // @method readableDistance(distance, isMetric, useFeet, isNauticalMile, precision): string + // Converts metric distance to distance string. + // The value will be rounded as defined by the precision option object. + readableDistance: function (distance, isMetric, isFeet, isNauticalMile, precision) { + var distanceStr, + units, + precision = L.Util.extend({}, defaultPrecision, precision); + + if (isMetric) { + units = typeof isMetric == 'string' ? isMetric : 'metric'; + } else if (isFeet) { + units = 'feet'; + } else if (isNauticalMile) { + units = 'nauticalMile'; + } else { + units = 'yards'; + } + + switch (units) { + case 'metric': + // show metres when distance is < 1km, then show km + if (distance > 1000) { + distanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['km']) + ' km'; + } else { + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['m']) + ' m'; + } + break; + case 'feet': + distance *= 1.09361 * 3; + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['ft']) + ' ft'; + + break; + case 'nauticalMile': + distance *= 0.53996; + distanceStr = L.GeometryUtil.formattedNumber(distance / 1000, precision['nm']) + ' nm'; + break; + case 'yards': + default: + distance *= 1.09361; + + if (distance > 1760) { + distanceStr = L.GeometryUtil.formattedNumber(distance / 1760, precision['mi']) + ' miles'; + } else { + distanceStr = L.GeometryUtil.formattedNumber(distance, precision['yd']) + ' yd'; + } + break; + } + return distanceStr; + }, + + // @method isVersion07x(): boolean + // Returns true if the Leaflet version is 0.7.x, false otherwise. + isVersion07x: function () { + var version = L.version.split('.'); + //If Version is == 0.7.* + return parseInt(version[0], 10) === 0 && parseInt(version[1], 10) === 7; + }, + }); + +})(); diff --git a/public/src/ext/LatLngUtil.js b/public/src/ext/LatLngUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..aad9f1a30c071824d88b8a3d890977d36c580a15 --- /dev/null +++ b/public/src/ext/LatLngUtil.js @@ -0,0 +1,28 @@ +/** + * @class L.LatLngUtil + * @aka LatLngUtil + */ +L.LatLngUtil = { + // Clones a LatLngs[], returns [][] + + // @method cloneLatLngs(LatLngs[]): L.LatLngs[] + // Clone the latLng point or points or nested points and return an array with those points + cloneLatLngs: function (latlngs) { + var clone = []; + for (var i = 0, l = latlngs.length; i < l; i++) { + // Check for nested array (Polyline/Polygon) + if (Array.isArray(latlngs[i])) { + clone.push(L.LatLngUtil.cloneLatLngs(latlngs[i])); + } else { + clone.push(this.cloneLatLng(latlngs[i])); + } + } + return clone; + }, + + // @method cloneLatLng(LatLng): L.LatLng + // Clone the latLng and return a new LatLng object. + cloneLatLng: function (latlng) { + return L.latLng(latlng.lat, latlng.lng); + } +}; diff --git a/public/src/ext/LineUtil.Intersect.js b/public/src/ext/LineUtil.Intersect.js new file mode 100644 index 0000000000000000000000000000000000000000..50ee3af9c42680d2f8a7b77786e7c4067afe6080 --- /dev/null +++ b/public/src/ext/LineUtil.Intersect.js @@ -0,0 +1,22 @@ +/** + * @class L.LineUtil + * @aka Util + * @aka L.Utils + */ +L.Util.extend(L.LineUtil, { + + // @method segmentsIntersect(): boolean + // Checks to see if two line segments intersect. Does not handle degenerate cases. + // http://compgeom.cs.uiuc.edu/~jeffe/teaching/373/notes/x06-sweepline.pdf + segmentsIntersect: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2, /*Point*/ p3) { + return this._checkCounterclockwise(p, p2, p3) !== + this._checkCounterclockwise(p1, p2, p3) && + this._checkCounterclockwise(p, p1, p2) !== + this._checkCounterclockwise(p, p1, p3); + }, + + // check to see if points are in counterclockwise order + _checkCounterclockwise: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) { + return (p2.y - p.y) * (p1.x - p.x) > (p1.y - p.y) * (p2.x - p.x); + } +}); diff --git a/public/src/ext/Polygon.Intersect.js b/public/src/ext/Polygon.Intersect.js new file mode 100644 index 0000000000000000000000000000000000000000..a4716e4d47d6946a2aef67df2b9202919258bb10 --- /dev/null +++ b/public/src/ext/Polygon.Intersect.js @@ -0,0 +1,33 @@ +/** + * @class L.Polygon + * @aka Polygon + */ +L.Polygon.include({ + + // @method intersects(): boolean + // Checks a polygon for any intersecting line segments. Ignores holes. + intersects: function () { + var polylineIntersects, + points = this._getProjectedPoints(), + len, firstPoint, lastPoint, maxIndex; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + polylineIntersects = L.Polyline.prototype.intersects.call(this); + + // If already found an intersection don't need to check for any more. + if (polylineIntersects) { + return true; + } + + len = points.length; + firstPoint = points[0]; + lastPoint = points[len - 1]; + maxIndex = len - 2; + + // Check the line segment between last and first point. Don't need to check the first line segment (minIndex = 1) + return this._lineSegmentsIntersectsRange(lastPoint, firstPoint, maxIndex, 1); + } +}); diff --git a/public/src/ext/Polyline.Intersect.js b/public/src/ext/Polyline.Intersect.js new file mode 100644 index 0000000000000000000000000000000000000000..2f5cfabf9da5980833b2feb2f9d6bdd8190613fc --- /dev/null +++ b/public/src/ext/Polyline.Intersect.js @@ -0,0 +1,106 @@ +/** + * @class L.Polyline + * @aka Polyline + */ +L.Polyline.include({ + + // @method intersects(): boolean + // Check to see if this polyline has any linesegments that intersect. + // NOTE: does not support detecting intersection for degenerate cases. + intersects: function () { + var points = this._getProjectedPoints(), + len = points ? points.length : 0, + i, p, p1; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + for (i = len - 1; i >= 3; i--) { + p = points[i - 1]; + p1 = points[i]; + + + if (this._lineSegmentsIntersectsRange(p, p1, i - 2)) { + return true; + } + } + + return false; + }, + + // @method newLatLngIntersects(): boolean + // Check for intersection if new latlng was added to this polyline. + // NOTE: does not support detecting intersection for degenerate cases. + newLatLngIntersects: function (latlng, skipFirst) { + // Cannot check a polyline for intersecting lats/lngs when not added to the map + if (!this._map) { + return false; + } + + return this.newPointIntersects(this._map.latLngToLayerPoint(latlng), skipFirst); + }, + + // @method newPointIntersects(): boolean + // Check for intersection if new point was added to this polyline. + // newPoint must be a layer point. + // NOTE: does not support detecting intersection for degenerate cases. + newPointIntersects: function (newPoint, skipFirst) { + var points = this._getProjectedPoints(), + len = points ? points.length : 0, + lastPoint = points ? points[len - 1] : null, + // The previous previous line segment. Previous line segment doesn't need testing. + maxIndex = len - 2; + + if (this._tooFewPointsForIntersection(1)) { + return false; + } + + return this._lineSegmentsIntersectsRange(lastPoint, newPoint, maxIndex, skipFirst ? 1 : 0); + }, + + // Polylines with 2 sides can only intersect in cases where points are collinear (we don't support detecting these). + // Cannot have intersection when < 3 line segments (< 4 points) + _tooFewPointsForIntersection: function (extraPoints) { + var points = this._getProjectedPoints(), + len = points ? points.length : 0; + // Increment length by extraPoints if present + len += extraPoints || 0; + + return !points || len <= 3; + }, + + // Checks a line segment intersections with any line segments before its predecessor. + // Don't need to check the predecessor as will never intersect. + _lineSegmentsIntersectsRange: function (p, p1, maxIndex, minIndex) { + var points = this._getProjectedPoints(), + p2, p3; + + minIndex = minIndex || 0; + + // Check all previous line segments (beside the immediately previous) for intersections + for (var j = maxIndex; j > minIndex; j--) { + p2 = points[j - 1]; + p3 = points[j]; + + if (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) { + return true; + } + } + + return false; + }, + + _getProjectedPoints: function () { + if (!this._defaultShape) { + return this._originalPoints; + } + var points = [], + _shape = this._defaultShape(); + + for (var i = 0; i < _shape.length; i++) { + points.push(this._map.latLngToLayerPoint(_shape[i])); + } + return points; + } +}); diff --git a/public/src/ext/TouchEvents.js b/public/src/ext/TouchEvents.js new file mode 100644 index 0000000000000000000000000000000000000000..7de169838cae7112e401c571072e07dfee278ee2 --- /dev/null +++ b/public/src/ext/TouchEvents.js @@ -0,0 +1,272 @@ +L.Map.mergeOptions({ + touchExtend: true +}); + +/** + * @class L.Map.TouchExtend + * @aka TouchExtend + */ +L.Map.TouchExtend = L.Handler.extend({ + + // @method initialize(): void + // Sets TouchExtend private accessor variables + initialize: function (map) { + this._map = map; + this._container = map._container; + this._pane = map._panes.overlayPane; + }, + + // @method addHooks(): void + // Adds dom listener events to the map container + addHooks: function () { + L.DomEvent.on(this._container, 'touchstart', this._onTouchStart, this); + L.DomEvent.on(this._container, 'touchend', this._onTouchEnd, this); + L.DomEvent.on(this._container, 'touchmove', this._onTouchMove, this); + if (this._detectIE()) { + L.DomEvent.on(this._container, 'MSPointerDown', this._onTouchStart, this); + L.DomEvent.on(this._container, 'MSPointerUp', this._onTouchEnd, this); + L.DomEvent.on(this._container, 'MSPointerMove', this._onTouchMove, this); + L.DomEvent.on(this._container, 'MSPointerCancel', this._onTouchCancel, this); + + } else { + L.DomEvent.on(this._container, 'touchcancel', this._onTouchCancel, this); + L.DomEvent.on(this._container, 'touchleave', this._onTouchLeave, this); + } + }, + + // @method removeHooks(): void + // Removes dom listener events from the map container + removeHooks: function () { + L.DomEvent.off(this._container, 'touchstart', this._onTouchStart, this); + L.DomEvent.off(this._container, 'touchend', this._onTouchEnd, this); + L.DomEvent.off(this._container, 'touchmove', this._onTouchMove, this); + if (this._detectIE()) { + L.DomEvent.off(this._container, 'MSPointerDown', this._onTouchStart, this); + L.DomEvent.off(this._container, 'MSPointerUp', this._onTouchEnd, this); + L.DomEvent.off(this._container, 'MSPointerMove', this._onTouchMove, this); + L.DomEvent.off(this._container, 'MSPointerCancel', this._onTouchCancel, this); + } else { + L.DomEvent.off(this._container, 'touchcancel', this._onTouchCancel, this); + L.DomEvent.off(this._container, 'touchleave', this._onTouchLeave, this); + } + }, + + _touchEvent: function (e, type) { + // #TODO: fix the pageX error that is do a bug in Android where a single touch triggers two click events + // _filterClick is what leaflet uses as a workaround. + // This is a problem with more things than just android. Another problem is touchEnd has no touches in + // its touch list. + var touchEvent = {}; + if (typeof e.touches !== 'undefined') { + if (!e.touches.length) { + return; + } + touchEvent = e.touches[0]; + } else if (e.pointerType === 'touch') { + touchEvent = e; + if (!this._filterClick(e)) { + return; + } + } else { + return; + } + + var containerPoint = this._map.mouseEventToContainerPoint(touchEvent), + layerPoint = this._map.mouseEventToLayerPoint(touchEvent), + latlng = this._map.layerPointToLatLng(layerPoint); + + this._map.fire(type, { + latlng: latlng, + layerPoint: layerPoint, + containerPoint: containerPoint, + pageX: touchEvent.pageX, + pageY: touchEvent.pageY, + originalEvent: e + }); + }, + + /** Borrowed from Leaflet and modified for bool ops **/ + _filterClick: function (e) { + var timeStamp = (e.timeStamp || e.originalEvent.timeStamp), + elapsed = L.DomEvent._lastClick && (timeStamp - L.DomEvent._lastClick); + + // are they closer together than 500ms yet more than 100ms? + // Android typically triggers them ~300ms apart while multiple listeners + // on the same event should be triggered far faster; + // or check if click is simulated on the element, and if it is, reject any non-simulated events + if ((elapsed && elapsed > 100 && elapsed < 500) || (e.target._simulatedClick && !e._simulated)) { + L.DomEvent.stop(e); + return false; + } + L.DomEvent._lastClick = timeStamp; + return true; + }, + + _onTouchStart: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchstart'; + this._touchEvent(e, type); + + }, + + _onTouchEnd: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchend'; + this._touchEvent(e, type); + }, + + _onTouchCancel: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchcancel'; + if (this._detectIE()) { + type = 'pointercancel'; + } + this._touchEvent(e, type); + }, + + _onTouchLeave: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchleave'; + this._touchEvent(e, type); + }, + + _onTouchMove: function (e) { + if (!this._map._loaded) { + return; + } + + var type = 'touchmove'; + this._touchEvent(e, type); + }, + + _detectIE: function () { + var ua = window.navigator.userAgent; + + var msie = ua.indexOf('MSIE '); + if (msie > 0) { + // IE 10 or older => return version number + return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); + } + + var trident = ua.indexOf('Trident/'); + if (trident > 0) { + // IE 11 => return version number + var rv = ua.indexOf('rv:'); + return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); + } + + var edge = ua.indexOf('Edge/'); + if (edge > 0) { + // IE 12 => return version number + return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); + } + + // other browser + return false; + } +}); + +L.Map.addInitHook('addHandler', 'touchExtend', L.Map.TouchExtend); + + +/** + * @class L.Marker.Touch + * @aka Marker.Touch + * + * This isn't full Touch support. This is just to get markers to also support dom touch events after creation + * #TODO: find a better way of getting markers to support touch. + */ +L.Marker.Touch = L.Marker.extend({ + + _initInteraction: function () { + if (!this.addInteractiveTarget) { + // 0.7.x support + return this._initInteractionLegacy(); + } + // TODO this may need be updated to re-add touch events for 1.0+ + return L.Marker.prototype._initInteraction.apply(this); + }, + + // This is an exact copy of https://github.com/Leaflet/Leaflet/blob/v0.7/src/layer/marker/Marker.js + // with the addition of the touch events + _initInteractionLegacy: function () { + + if (!this.options.clickable) { + return; + } + + // TODO refactor into something shared with Map/Path/etc. to DRY it up + + var icon = this._icon, + events = ['dblclick', + 'mousedown', + 'mouseover', + 'mouseout', + 'contextmenu', + 'touchstart', + 'touchend', + 'touchmove']; + if (this._detectIE) { + events.concat(['MSPointerDown', + 'MSPointerUp', + 'MSPointerMove', + 'MSPointerCancel']); + } else { + events.concat(['touchcancel']); + } + + L.DomUtil.addClass(icon, 'leaflet-clickable'); + L.DomEvent.on(icon, 'click', this._onMouseClick, this); + L.DomEvent.on(icon, 'keypress', this._onKeyPress, this); + + for (var i = 0; i < events.length; i++) { + L.DomEvent.on(icon, events[i], this._fireMouseEvent, this); + } + + if (L.Handler.MarkerDrag) { + this.dragging = new L.Handler.MarkerDrag(this); + + if (this.options.draggable) { + this.dragging.enable(); + } + } + }, + + _detectIE: function () { + var ua = window.navigator.userAgent; + + var msie = ua.indexOf('MSIE '); + if (msie > 0) { + // IE 10 or older => return version number + return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); + } + + var trident = ua.indexOf('Trident/'); + if (trident > 0) { + // IE 11 => return version number + var rv = ua.indexOf('rv:'); + return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); + } + + var edge = ua.indexOf('Edge/'); + if (edge > 0) { + // IE 12 => return version number + return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); + } + + // other browser + return false; + } +}); diff --git a/public/src/images/spritesheet-2x.png b/public/src/images/spritesheet-2x.png new file mode 100644 index 0000000000000000000000000000000000000000..c45231aff86b1344333414cdfa7a2a74d38d5304 Binary files /dev/null and b/public/src/images/spritesheet-2x.png differ diff --git a/public/src/images/spritesheet.png b/public/src/images/spritesheet.png new file mode 100644 index 0000000000000000000000000000000000000000..97d71c68052d4dc47cfd05292616d63db451d1cd Binary files /dev/null and b/public/src/images/spritesheet.png differ diff --git a/public/src/images/spritesheet.svg b/public/src/images/spritesheet.svg new file mode 100644 index 0000000000000000000000000000000000000000..bb18b1daabd6794f930baf1b139a585f54bb43d4 --- /dev/null +++ b/public/src/images/spritesheet.svg @@ -0,0 +1,155 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + viewBox="0 0 600 60" + height="60" + width="600" + id="svg4225" + version="1.1" + inkscape:version="0.91 r13725" + sodipodi:docname="spritesheet.svg" + inkscape:export-filename="/home/fpuga/development/upstream/icarto.Leaflet.draw/src/images/spritesheet-2x.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <metadata + id="metadata4258"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs4256"/> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1920" + inkscape:window-height="1056" + id="namedview4254" + showgrid="false" + inkscape:zoom="1.3101852" + inkscape:cx="237.56928" + inkscape:cy="7.2419621" + inkscape:window-x="1920" + inkscape:window-y="24" + inkscape:window-maximized="1" + inkscape:current-layer="svg4225"/> + <g + id="enabled" + style="fill:#464646;fill-opacity:1"> + <g + id="polyline" + style="fill:#464646;fill-opacity:1"> + <path + d="m 18,36 0,6 6,0 0,-6 -6,0 z m 4,4 -2,0 0,-2 2,0 0,2 z" + id="path4229" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + d="m 36,18 0,6 6,0 0,-6 -6,0 z m 4,4 -2,0 0,-2 2,0 0,2 z" + id="path4231" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + d="m 23.142,39.145 -2.285,-2.29 16,-15.998 2.285,2.285 z" + id="path4233" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + </g> + <path + id="polygon" + d="M 100,24.565 97.904,39.395 83.07,42 76,28.773 86.463,18 Z" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + id="rectangle" + d="m 140,20 20,0 0,20 -20,0 z" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + id="circle" + d="m 221,30 c 0,6.078 -4.926,11 -11,11 -6.074,0 -11,-4.922 -11,-11 0,-6.074 4.926,-11 11,-11 6.074,0 11,4.926 11,11 z" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + id="marker" + d="m 270,19 c -4.971,0 -9,4.029 -9,9 0,4.971 5.001,12 9,14 4.001,-2 9,-9.029 9,-14 0,-4.971 -4.029,-9 -9,-9 z m 0,12.5 c -2.484,0 -4.5,-2.014 -4.5,-4.5 0,-2.484 2.016,-4.5 4.5,-4.5 2.485,0 4.5,2.016 4.5,4.5 0,2.486 -2.015,4.5 -4.5,4.5 z" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <g + id="edit" + style="fill:#464646;fill-opacity:1"> + <path + d="m 337,30.156 0,0.407 0,5.604 c 0,1.658 -1.344,3 -3,3 l -10,0 c -1.655,0 -3,-1.342 -3,-3 l 0,-10 c 0,-1.657 1.345,-3 3,-3 l 6.345,0 3.19,-3.17 -9.535,0 c -3.313,0 -6,2.687 -6,6 l 0,10 c 0,3.313 2.687,6 6,6 l 10,0 c 3.314,0 6,-2.687 6,-6 l 0,-8.809 -3,2.968" + id="path4240" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + d="m 338.72,24.637 -8.892,8.892 -2.828,0 0,-2.829 8.89,-8.89 z" + id="path4242" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + d="m 338.697,17.826 4,0 0,4 -4,0 z" + transform="matrix(-0.70698336,-0.70723018,0.70723018,-0.70698336,567.55917,274.78273)" + id="path4244" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + </g> + <g + id="remove" + style="fill:#464646;fill-opacity:1"> + <path + d="m 381,42 18,0 0,-18 -18,0 0,18 z m 14,-16 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z m -4,0 2,0 0,14 -2,0 0,-14 z" + id="path4247" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + <path + d="m 395,20 0,-4 -10,0 0,4 -6,0 0,2 22,0 0,-2 -6,0 z m -2,0 -6,0 0,-2 6,0 0,2 z" + id="path4249" + inkscape:connector-curvature="0" + style="fill:#464646;fill-opacity:1"/> + </g> + </g> + <g + id="disabled" + transform="translate(120,0)" + style="fill:#bbbbbb"> + <use + xlink:href="#edit" + id="edit-disabled" + x="0" + y="0" + width="100%" + height="100%"/> + <use + xlink:href="#remove" + id="remove-disabled" + x="0" + y="0" + width="100%" + height="100%"/> + </g> + <path + style="fill:none;stroke:#464646;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + id="circle-3" + d="m 581.65725,30 c 0,6.078 -4.926,11 -11,11 -6.074,0 -11,-4.922 -11,-11 0,-6.074 4.926,-11 11,-11 6.074,0 11,4.926 11,11 z" + inkscape:connector-curvature="0"/> +</svg> diff --git a/public/src/leaflet.draw.css b/public/src/leaflet.draw.css new file mode 100644 index 0000000000000000000000000000000000000000..dffca06b8909add16db04823a65018c6f3484164 --- /dev/null +++ b/public/src/leaflet.draw.css @@ -0,0 +1,325 @@ +/* ================================================================== */ +/* Toolbars +/* ================================================================== */ + +.leaflet-draw-section { + position: relative; +} + +.leaflet-draw-toolbar { + margin-top: 12px; +} + +.leaflet-draw-toolbar-top { + margin-top: 0; +} + +.leaflet-draw-toolbar-notop a:first-child { + border-top-right-radius: 0; +} + +.leaflet-draw-toolbar-nobottom a:last-child { + border-bottom-right-radius: 0; +} + +.leaflet-draw-toolbar a { + background-image: url('images/spritesheet.png'); + background-image: linear-gradient(transparent, transparent), url('images/spritesheet.svg'); + background-repeat: no-repeat; + background-size: 300px 30px; + background-clip: padding-box; +} + +.leaflet-retina .leaflet-draw-toolbar a { + background-image: url('images/spritesheet-2x.png'); + background-image: linear-gradient(transparent, transparent), url('images/spritesheet.svg'); +} + +.leaflet-draw a { + display: block; + text-align: center; + text-decoration: none; +} + +.leaflet-draw a .sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +/* ================================================================== */ +/* Toolbar actions menu +/* ================================================================== */ + +.leaflet-draw-actions { + display: none; + list-style: none; + margin: 0; + padding: 0; + position: absolute; + left: 26px; /* leaflet-draw-toolbar.left + leaflet-draw-toolbar.width */ + top: 0; + white-space: nowrap; +} + +.leaflet-touch .leaflet-draw-actions { + left: 32px; +} + +.leaflet-right .leaflet-draw-actions { + right: 26px; + left: auto; +} + +.leaflet-touch .leaflet-right .leaflet-draw-actions { + right: 32px; + left: auto; +} + +.leaflet-draw-actions li { + display: inline-block; +} + +.leaflet-draw-actions li:first-child a { + border-left: none; +} + +.leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.leaflet-right .leaflet-draw-actions li:last-child a { + -webkit-border-radius: 0; + border-radius: 0; +} + +.leaflet-right .leaflet-draw-actions li:first-child a { + -webkit-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.leaflet-draw-actions a { + background-color: #919187; + border-left: 1px solid #AAA; + color: #FFF; + font: 11px/19px "Helvetica Neue", Arial, Helvetica, sans-serif; + line-height: 28px; + text-decoration: none; + padding-left: 10px; + padding-right: 10px; + height: 28px; +} + +.leaflet-touch .leaflet-draw-actions a { + font-size: 12px; + line-height: 30px; + height: 30px; +} + +.leaflet-draw-actions-bottom { + margin-top: 0; +} + +.leaflet-draw-actions-top { + margin-top: 1px; +} + +.leaflet-draw-actions-top a, +.leaflet-draw-actions-bottom a { + height: 27px; + line-height: 27px; +} + +.leaflet-draw-actions a:hover { + background-color: #A0A098; +} + +.leaflet-draw-actions-top.leaflet-draw-actions-bottom a { + height: 26px; + line-height: 26px; +} + +/* ================================================================== */ +/* Draw toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: -2px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polyline { + background-position: 0 -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -31px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-polygon { + background-position: -29px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -62px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-rectangle { + background-position: -60px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -92px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circle { + background-position: -90px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -122px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-marker { + background-position: -120px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -273px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-draw-circlemarker { + background-position: -271px -1px; +} + +/* ================================================================== */ +/* Edit toolbar +/* ================================================================== */ + +.leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -152px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit { + background-position: -150px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -182px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove { + background-position: -180px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -212px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-edit.leaflet-disabled { + background-position: -210px -1px; +} + +.leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -242px -2px; +} + +.leaflet-touch .leaflet-draw-toolbar .leaflet-draw-edit-remove.leaflet-disabled { + background-position: -240px -2px; +} + +/* ================================================================== */ +/* Drawing styles +/* ================================================================== */ + +.leaflet-mouse-marker { + background-color: #fff; + cursor: crosshair; +} + +.leaflet-draw-tooltip { + background: rgb(54, 54, 54); + background: rgba(0, 0, 0, 0.5); + border: 1px solid transparent; + -webkit-border-radius: 4px; + border-radius: 4px; + color: #fff; + font: 12px/18px "Helvetica Neue", Arial, Helvetica, sans-serif; + margin-left: 20px; + margin-top: -21px; + padding: 4px 8px; + position: absolute; + visibility: hidden; + white-space: nowrap; + z-index: 6; +} + +.leaflet-draw-tooltip:before { + border-right: 6px solid black; + border-right-color: rgba(0, 0, 0, 0.5); + border-top: 6px solid transparent; + border-bottom: 6px solid transparent; + content: ""; + position: absolute; + top: 7px; + left: -7px; +} + +.leaflet-error-draw-tooltip { + background-color: #F2DEDE; + border: 1px solid #E6B6BD; + color: #B94A48; +} + +.leaflet-error-draw-tooltip:before { + border-right-color: #E6B6BD; +} + +.leaflet-draw-tooltip-single { + margin-top: -12px +} + +.leaflet-draw-tooltip-subtext { + color: #f8d5e4; +} + +.leaflet-draw-guide-dash { + font-size: 1%; + opacity: 0.6; + position: absolute; + width: 5px; + height: 5px; +} + +/* ================================================================== */ +/* Edit styles +/* ================================================================== */ + +.leaflet-edit-marker-selected { + background-color: rgba(254, 87, 161, 0.1); + border: 4px dashed rgba(254, 87, 161, 0.6); + -webkit-border-radius: 4px; + border-radius: 4px; + box-sizing: content-box; +} + +.leaflet-edit-move { + cursor: move; +} + +.leaflet-edit-resize { + cursor: pointer; +} + +/* ================================================================== */ +/* Old IE styles +/* ================================================================== */ + +.leaflet-oldie .leaflet-draw-toolbar { + border: 1px solid #999; +} diff --git a/public/style.css b/public/style.css new file mode 100644 index 0000000000000000000000000000000000000000..d6a7cac469594feb62ab1c9a5cb7e01fced055a9 --- /dev/null +++ b/public/style.css @@ -0,0 +1,45 @@ +/* body { + font-family: sans-serif; + margin: auto; + max-width: 1280px; + margin-left:2%; + margin-right:2%; +} */ + +.navbar { + background-color: #cc3125; + border-radius: 2px; +/* max-width: 800px; */ +} + +.navbar a { + color: #aaa; + display: inline-block; + font-size: 15px; + padding: 10px; + text-decoration: none; +} + +.navbar a:hover { + color: #ffffff; +} + +#topbar img{ + max-width:15%; + margin-right:20px; +} + +.content{ + margin-left:2%; + margin-right:2%; +} + +.header{ + font-weight: bold; +} +.news{ + background-color: #f5f5f5; + margin-bottom: 20px; + padding-top:10px; + padding-bottom: 10px; +}