function initMapIcons(){MapIcons={House:{icon:'<svg version="1.1" id="Layer_1" width="42" height="55" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 384 512" style="enable-background:new 0 0 384 512;" xml:space="preserve"><style type="text/css">.st0{fill:#222223;}.st1{fill:#FFEA27;}<\/style><path class="st0" d="M172.3,501.7C27,291,0,269.4,0,192C0,86,86,0,192,0s192,86,192,192c0,77.4-27,99-172.3,309.7C202.2,515.4,181.8,515.4,172.3,501.7L172.3,501.7z"/><path class="st1" d="M286.8,193.8v68c0,6.3-5.1,11.4-11.4,11.4h-55c-3.1,0-5.7-2.6-5.7-5.7v-53.1c0-3.1-2.6-5.7-5.7-5.7h-34.1c-3.1,0-5.7,2.6-5.7,5.7v53.1c0,3.1-2.6,5.7-5.7,5.7h-55c-6.3,0-11.4-5.1-11.4-11.4v-68c0-1.7,0.8-3.3,2.1-4.4l89.2-73.4c2.1-1.7,5.1-1.7,7.3,0l89.2,73.4C286.1,190.5,286.8,192.1,286.8,193.8L286.8,193.8z M326.5,164.9l-39.6-32.7V66.6c0-3.1-2.6-5.7-5.7-5.7h-26.6c-3.1,0-5.7,2.6-5.7,5.7V101L206.4,66c-8.4-6.9-20.5-6.9-28.9,0l-120,98.9c-2.4,2-2.8,5.6-0.8,8l12.1,14.7c2,2.4,5.6,2.8,8,0.8l111.5-91.9c2.1-1.7,5.1-1.7,7.3,0l111.5,91.9c2.4,2,6,1.7,8-0.8l12.1-14.7C329.3,170.5,328.9,166.9,326.5,164.9z"/><\/svg>',image:_appPath+"/assets/v5/images/map/House.svg",size:{width:42,height:55},iconAnchor:new Microsoft.Maps.Point(21,53),infoWindowAnchor:new Microsoft.Maps.Point(21,53),textOffset:new Microsoft.Maps.Point(0,0)},HouseBubble:{icon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  width="71px" height="41px" style="text-align: center; font-weight: bold; font-size: 10pt; font-family:Arial, Helvetica, sans-serif;"  viewBox="0 0 66 35"><defs><linearGradient id="linear-gradient" x1="26" y1="32.5" x2="42" y2="32.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#c7c9cb" stop-opacity="0"/><stop offset="0.51" stop-color="#c7c7c7"/><stop offset="1" stop-color="#b3b3b3" stop-opacity="0"/><\/linearGradient><clipPath id="clip-path" transform="translate(3 2)"><path style="fill:none;" d="M55.07,22.24H36a.38.38,0,0,0-.33.18l-4.33,6.9a.39.39,0,0,1-.65,0l-4.39-6.9a.38.38,0,0,0-.32-.18h-20a4.16,4.16,0,0,1-4.18-4.11V5.61A4.16,4.16,0,0,1,5.93,1.5H55.07a4.16,4.16,0,0,1,4.18,4.11V18.13A4.16,4.16,0,0,1,55.07,22.24Z"/><\/clipPath><\/defs><title>small-white<\/title><g style="isolation:isolate;"><g id="Layer_1" data-name="Layer 1"><rect style="fill:url(#linear-gradient);" x="26" y="32" width="16" height="1"/><image style="opacity:0.15;mix-blend-mode:multiply;" width="65" height="35" transform="translate(1)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAAAjCAYAAADLy2cUAAAACXBIWXMAAAsSAAALEgHS3X78AAACuklEQVRoQ+2aP2sUQRiHX+8QC/80prJKAoJNqhQ2WmmXQosIip/ARpt8A0sDMV/AKqBYGItUXitWFmJlY1IZBLEIESKau/P37LzH7d7eMQvuHWQzB88Rdt8d9vntzO7tTKzf71sefc44rQaSuZWcRwKg8Jy4JC6LuQaBD174tcaGoE9bXBAL4oZYEXfE3QaABz544YdnuxCChR7AjmvigVgXL8V2g8AHL/zwxLfl/tk4oYsseMEL8Unsix8NAh+88MMTX7zxz74YK3SVdS88EH9Ft0Hggxd+eOKLdxYCQ4GbxoqFLrPvB/QbCF744Ykv3vhnX9w9uYG8sdB1uhUaPInghR+e+OJdCmHbTkcIeKYQLIWQQkghWAohhQApBEshZKQQLIWQkUKwiiGc6heo/Kv0N/FH9Co0epLABy/8Sq/S+UmVZ+KjhbSOxLGVJyf+h55VC3dQF2uvKnjggxd+eBYmVfLTa/fEc/FOfLF6p9h+WpjZ+W3hxCYF0PWaAz8m1m4V8MAHL/zwHE6v5SZaz/uOW+KR2BSvLD6BWYW3Yke8F3vil40Pouv79rx2x4+NtR8DD3zwwg9PfFujU+4EQTKMk6viptU77X5frInXYtfC1c4PjZ5v2/WaNT8m1m4Mzh8PfPDCr7D2MG71qW3TWYC5IpbFE9Gx0E0Zq4MQjn1bx2uW/ZhYu1XIL7zgV1iFKoQwEkbdS3Fn/YRuW+ian8WhDW9eh75t02vm/JhYu1UZuwQ3MYRpYMMb8KJ4KLbEVwt37SP/e8v3LXrt2JOum2hBnfgVYeVnSTy20PW/Ox3ftmS51aFZEC2oGwtjcjAsNsQHZ8OGw6Ada6dOogV1Y8XfJaviqbNquWd3rJ06iRZMAwvDguf0vLjuzFvu2T1LogXTwoPgql90Sv83MCuiBdPEho/iiY+vWfAPdXk3YpGxdPcAAAAASUVORK5CYII="/><path style="fill:#e4e4e4;" d="M55.28,22.37H36a.39.39,0,0,0-.33.18l-4.37,7a.39.39,0,0,1-.66,0l-4.43-7a.39.39,0,0,0-.33-.18H5.72A4.21,4.21,0,0,1,1.5,18.18V5.44A4.22,4.22,0,0,1,5.72,1.25H55.28A4.21,4.21,0,0,1,59.5,5.43V18.18A4.21,4.21,0,0,1,55.28,22.37Z" transform="translate(3 2)"/><path style="fill:#fff;stroke:#ccc;stroke-miterlimit:10;stroke-width:0.5px;" d="M55.28,22.37H36a.39.39,0,0,0-.33.18l-4.37,7a.39.39,0,0,1-.66,0l-4.43-7a.39.39,0,0,0-.33-.18H5.72A4.21,4.21,0,0,1,1.5,18.18V5.44A4.22,4.22,0,0,1,5.72,1.25H55.28A4.21,4.21,0,0,1,59.5,5.43V18.18A4.21,4.21,0,0,1,55.28,22.37Z" transform="translate(3 2)"/><g style="clip-path:url(#clip-path);"><rect style="fill:#ffea27;" y="1" width="9" height="24"/><text id="icon-txt"  text-anchor="middle"  x="50%" y="50%" style="fill:{color};text-align: center; font-weight: bold; font-size: 9pt; font-family: Arial, Helvetica, sans-serif;">{text}<\/text><\/g><\/g><\/g><\/svg>',image:_appPath+"/assets/v5/images/map/small-white.svg",size:{width:71,height:41},iconAnchor:new Microsoft.Maps.Point(36,41),infoWindowAnchor:new Microsoft.Maps.Point(36,41),textOffset:new Microsoft.Maps.Point(0,4)},HouseMulti:{icon:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"  width="75" height="40"  viewBox="0 0 83.96 48"><defs><linearGradient id="linear-gradient" x1="35" y1="39.5" x2="51" y2="39.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#c7c9cb" stop-opacity="0"/><stop offset="0.51" stop-color="#c7c7c7"/><stop offset="1" stop-color="#b3b3b3" stop-opacity="0"/><\/linearGradient><clipPath id="clip-path" transform="translate(5 0)"><path style="fill:none;" d="M70.17,31.07H43.06a.4.4,0,0,0-.34.18l-4.49,8a.4.4,0,0,1-.67,0l-4.55-8a.4.4,0,0,0-.34-.18H4.83A4.27,4.27,0,0,1,.5,26.88V10.14A4.28,4.28,0,0,1,4.84,6H70.17a4.27,4.27,0,0,1,4.33,4.18V26.88A4.27,4.27,0,0,1,70.17,31.07Z"/><\/clipPath><\/defs><title>multiHouse<\/title><g style="isolation:isolate;"><g id="Layer_1" data-name="Layer 1"><rect style="fill:url(#linear-gradient);" x="35" y="39" width="16" height="1"/><image style="opacity:0.15;mix-blend-mode:multiply;" width="82" height="42" transform="translate(1.96 1.96)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFMAAAArCAYAAAAEw7SsAAAACXBIWXMAAAsSAAALEgHS3X78AAADQUlEQVRoQ+2bMWsUURDHJ3cELRQLFUSrpDD6AYIWoo1JlUKFFPoJ1EJs0tloKwQtLNMqCMYiWiRpBNPHStMkjYqgghExCubu/P99s+7e3d6+DffYXdgpfs3uvJd7v53dfexMpNPpiBGG7JMiI0rDcC72LFMHNsF+cAgcBkdrDNdPD/RBL6lS00Q2dNARcBKcBzPgErhcQ7hurp8e6INe6KeRKVOc9QNgHFwEN8AD8AQs1hiunx7og17oh56aqTLFZSQDToNrOngZvAUfwecaw/XTA33QC/3QE301umSKe0buE2ecgQvgjU70C/wBrRrD9dMDfdDLgjhP9EVvI70y+YA9B+6DdfAd7II26Bj/PNAHvdAPPdEXvXXJ5C3ONxYftI/BB3FXw/cH6gi90A890Re9NXplcgvAt9czcencyjFxHaEX+qEn+qK3gTIXxWRmEcmkJ5M5JCYzICYzICYzICYzICYzICYzICYzICYzICYzICYzICYzICYzICYzIHuSad8zs8n1PTP5pZ0FJPvSng690M/AL+1RDYi1YVbfWIn7Ke4qWA0ohi52xPmhJ/rqqwFRJgvrLLJfB0tgC3yT4quTbcl3AaM433yhoAOKfA9eiPNEX/QWy1ShbEBgyl4Ad8Sl8SvwToqrm38F2+C3uAUMEtnSmG0d45s3BFHt/CW4K84Tff1vREjKjGrnx8FZcAXcAg+lmI6O5+LuiNfi7oofki60pee2NHZJx/rmH5aoq4MZSZEnJFEz75KZeBExgM+BY+CUFNtrdBXMgadgU9wjJnnLt/XYpsbM6RjfvMPS22/EjKSnrn6jLpmJDKXUMrrgeLUnwW2wCr6IK/xHMnf12KrGTOoY37wh8HbC9clMEVtkf+aouB8+DR6BDYmzM8rKDT03rbGjOeYNRWaPZqbMopF4VzEBboIVibMzysoVPTchiTdpFfAGFI24W4g9kFMSZ+eOEmXllMY0ffMViTegaFKyk218n5TlqmYl8QaUQSI72Vg6D9aUeT1Wuawk3oAySGTnOJgF95RZPVa5rCTegLIQ9/ZkZ+4YOKOMSU+3bpXwBpSJCuXm+KDSt1GuEt6AspF4r+v9P5yy8QYY+fkL+nI1ya0QrbcAAAAASUVORK5CYII="/><path style="fill:#e4e4e4;" d="M70.17,31.07H43.06a.4.4,0,0,0-.34.18l-4.49,8a.4.4,0,0,1-.67,0l-4.55-8a.4.4,0,0,0-.34-.18H4.83A4.27,4.27,0,0,1,.5,26.88V10.14A4.28,4.28,0,0,1,4.84,6H70.17a4.27,4.27,0,0,1,4.33,4.18V26.88A4.27,4.27,0,0,1,70.17,31.07Z" transform="translate(5 0)"/><g style="clip-path:url(#clip-path);"><rect style="fill:#ffea27;" y="5" width="9" height="28"/><rect style="fill:#54585a;" x="7" y="31" width="70" height="17"/><\/g><path class="cls-8" d="M49.27,11.27V1.41H43.64V5.64L38,0,22.5,15.5h2.82V31H50.68V15.5H53.5ZM37,24H34V21h3Zm0-4H34V17h3Zm5,4H39V21h3Zm0-4H39V17h3Z" transform="translate(5 0)"/><path class="cls-8" d="M67.36,19.86V14.3H64.18v2.39L61,13.5l-8.75,8.75h1.59V31H68.16V22.25h1.59ZM60.44,27H58.74V25.36h1.69Zm0-2.26H58.74V23.1h1.69ZM63.26,27H61.56V25.36h1.69Zm0-2.26H61.56V23.1h1.69Z" transform="translate(5 0)"/><path class="cls-8" d="M6.25,22.25H7.84V31H22.16V22.25h1.59L15,13.5l-3.18,3.18V14.3H8.64v5.57Zm9.31,3.11h1.69V27H15.56Zm0-2.26h1.69v1.69H15.56Zm-2.82,2.26h1.69V27H12.74Zm0-2.26h1.69v1.69H12.74Z" transform="translate(5 0)"/><\/g><\/g><\/svg>',image:_appPath+"/assets/v5/images/map/multi-house.svg",size:{width:75,height:40},iconAnchor:new Microsoft.Maps.Point(38,40),infoWindowAnchor:new Microsoft.Maps.Point(38,40),textOffset:new Microsoft.Maps.Point(0,0)},Amenity:{icon:'<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg"  width="9" height="9"  viewBox="0 0 9 9"><defs><style>.cls-1{fill:#2263dc;}.cls-2{fill:#222223;}<\/style><\/defs><title>blueSquare<\/title><rect class="cls-1" x="0.5" y="0.5" width="8" height="8"/><path class="cls-2" d="M8,1V8H1V1H8M9,0H0V9H9V0Z"/><\/svg>',image:_appPath+"/images/mapicons/bluesquare.svg",size:{width:9,height:9},iconAnchor:new Microsoft.Maps.Point(5,5),infoWindowAnchor:new Microsoft.Maps.Point(5,5),textOffset:new Microsoft.Maps.Point(0,0)},Building:{icon:'<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="9" height="19" viewBox="0 0 8.92 17.92"><defs><style>.cls-1{fill:#69c;stroke:#2a2c34;stroke-miterlimit:10;stroke-width:0.92px;}<\/style><\/defs><title>building<\/title><rect class="cls-1" x="0.46" y="0.46" width="8" height="17"/><rect x="1.96" y="2.96" width="1" height="1"/><rect x="3.96" y="2.96" width="1" height="1"/><rect x="5.96" y="2.96" width="1" height="1"/><rect x="1.96" y="5.96" width="1" height="1"/><rect x="3.96" y="5.96" width="1" height="1"/><rect x="5.96" y="5.96" width="1" height="1"/><rect x="1.96" y="8.96" width="1" height="1"/><rect x="3.96" y="8.96" width="1" height="1"/><rect x="5.96" y="8.96" width="1" height="1"/><rect x="1.96" y="11.96" width="1" height="1"/><rect x="3.96" y="11.96" width="1" height="1"/><rect x="5.96" y="11.96" width="1" height="1"/><rect x="1.96" y="14.96" width="1" height="1"/><rect x="4.96" y="14.96" width="2" height="2"/><\/svg>',image:_appPath+"/images/mapicons/building.svg",size:{width:9,height:19},iconAnchor:new Microsoft.Maps.Point(5,5),infoWindowAnchor:new Microsoft.Maps.Point(19,5),textOffset:new Microsoft.Maps.Point(0,0)},Office:{icon:'<svg width="40px" height="53px" viewBox="0 0 40 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="office-marker-combined" fill-rule="nonzero"><path d="M17.9166666,51.964844 C16.1111117,49.3424484 13.7847217,46.0299484 10.9375,42.0273437 C7.4652783,37.0585937 5.17361165,33.711589 4.0625,31.9863281 C2.46527831,29.5019531 1.38888836,27.4143875 0.833333335,25.7236328 C0.277778307,24.0328781 0,22.0833328 0,19.875 C0,16.2864578 0.90277831,12.9739578 2.70833333,9.9375 C4.51388836,6.9010422 6.94444495,4.48567655 10,2.69140625 C13.0555551,0.897135945 16.3888883,0 20,0 C23.6111117,0 26.9444449,0.897135945 30,2.69140625 C33.0555551,4.48567655 35.4861116,6.9010422 37.2916667,9.9375 C39.0972217,12.9739578 40,16.2864578 40,19.875 C40,22.0833328 39.7222217,24.0328781 39.1666667,25.7236328 C38.6111116,27.4143875 37.5347217,29.5019531 35.9375,31.9863281 C34.8263884,33.711589 32.5347217,37.0585937 29.0625,42.0273437 L22.0833333,51.964844 C21.5972217,52.6549485 20.9027783,53 20,53 C19.0972217,53 18.4027783,52.6549485 17.9166666,51.964844 Z" id="map-marker" fill="#222223"><\/path><g id="building" transform="translate(12.000000, 10.500000)" fill="#FFEA27"><path d="M15.5714286,16.875 L14.8571429,16.875 L14.8571429,0.84375 C14.8571429,0.377753906 14.4733928,0 14,0 L2,0 C1.52660715,0 1.14285715,0.377753906 1.14285715,0.84375 L1.14285715,16.875 L0.428571429,16.875 C0.191892857,16.875 0,17.0638946 0,17.296875 L0,18 L16,18 L16,17.296875 C16,17.0638946 15.8081071,16.875 15.5714286,16.875 Z M4.57142857,2.671875 C4.57142857,2.43889453 4.76332143,2.25 5,2.25 L6.42857145,2.25 C6.66525,2.25 6.85714285,2.43889453 6.85714285,2.671875 L6.85714285,4.078125 C6.85714285,4.31110547 6.66525,4.5 6.42857145,4.5 L5,4.5 C4.76332143,4.5 4.57142857,4.31110547 4.57142857,4.078125 L4.57142857,2.671875 Z M4.57142857,6.046875 C4.57142857,5.81389455 4.76332143,5.625 5,5.625 L6.42857145,5.625 C6.66525,5.625 6.85714285,5.81389455 6.85714285,6.046875 L6.85714285,7.453125 C6.85714285,7.68610545 6.66525,7.875 6.42857145,7.875 L5,7.875 C4.76332143,7.875 4.57142857,7.68610545 4.57142857,7.453125 L4.57142857,6.046875 Z M6.42857145,11.25 L5,11.25 C4.76332143,11.25 4.57142857,11.0611054 4.57142857,10.828125 L4.57142857,9.421875 C4.57142857,9.18889455 4.76332143,9 5,9 L6.42857145,9 C6.66525,9 6.85714285,9.18889455 6.85714285,9.421875 L6.85714285,10.828125 C6.85714285,11.0611054 6.66525,11.25 6.42857145,11.25 Z M9.14285715,16.875 L6.85714285,16.875 L6.85714285,13.921875 C6.85714285,13.6888946 7.0490357,13.5 7.2857143,13.5 L8.7142857,13.5 C8.9509643,13.5 9.14285715,13.6888946 9.14285715,13.921875 L9.14285715,16.875 Z M11.4285714,10.828125 C11.4285714,11.0611054 11.2366785,11.25 11,11.25 L9.57142855,11.25 C9.33475,11.25 9.14285715,11.0611054 9.14285715,10.828125 L9.14285715,9.421875 C9.14285715,9.18889455 9.33475,9 9.57142855,9 L11,9 C11.2366785,9 11.4285714,9.18889455 11.4285714,9.421875 L11.4285714,10.828125 Z M11.4285714,7.453125 C11.4285714,7.68610545 11.2366785,7.875 11,7.875 L9.57142855,7.875 C9.33475,7.875 9.14285715,7.68610545 9.14285715,7.453125 L9.14285715,6.046875 C9.14285715,5.81389455 9.33475,5.625 9.57142855,5.625 L11,5.625 C11.2366785,5.625 11.4285714,5.81389455 11.4285714,6.046875 L11.4285714,7.453125 Z M11.4285714,4.078125 C11.4285714,4.31110547 11.2366785,4.5 11,4.5 L9.57142855,4.5 C9.33475,4.5 9.14285715,4.31110547 9.14285715,4.078125 L9.14285715,2.671875 C9.14285715,2.43889453 9.33475,2.25 9.57142855,2.25 L11,2.25 C11.2366785,2.25 11.4285714,2.43889453 11.4285714,2.671875 L11.4285714,4.078125 Z" id="Shape"><\/path><\/g><\/g><\/g><\/svg>',image:_appPath+"/assets/v5/images/map/House.svg",size:{width:40,height:53},iconAnchor:new Microsoft.Maps.Point(20,52),infoWindowAnchor:new Microsoft.Maps.Point(21,53),textOffset:new Microsoft.Maps.Point(0,0)}}}function WDCGeocoder(){}function WDCMapPlace(n){this.info=n;this.polygons=null;this.init();this.onmouseover=null;this.onmouseout=null;this.onclick=null}bing8_on_ready=jQuery.Deferred();dmp_on_ready=jQuery.Deferred();bing8_resolve=function(){var t=document.getElementsByTagName("head")[0],n=document.createElement("script");n.src="https://apps.spatialstream.com/production/dashboard/8/7/0/DmpApi_BingV8.min.js";n.onload=function(){$j&&(window.$=$j);dmp_on_ready.resolve()};t.appendChild(n);initMapIcons();bing8_on_ready.resolve()},function(n,t,i,r){"use strict";function f(t,i){var o,s,r,h,f;this.element=t;this.$element=n(t);this.map=null;this.showOutlineControl=!1;this.polygonLayer=null;this.currentLayer=null;this.currentLabelLayer=null;this.current_polygons=[];this.mapMoveCallbacks=[];this.enableMapMoveCallback=!0;this.oneTimeMapMoveCallback=null;this.tooltipText=null;this.tooltip=null;this.markers={};this.places={};this.dmpIsReady=!1;this.clusterLayer=null;this.lastMouseDownPoint=null;o=this.$element.data();s={};for(r in o)o.hasOwnProperty(r)&&/^wdcmap[A-Z]+/.test(r)&&(h=r[6].toLowerCase()+r.substr(7),s[h]=o[r]);this.settings=n.extend({},e,s,i);this._defaults=e;this._name=u;f=this;jQuery.when(bing8_on_ready).then(function(){if(f.settings.location){var n=new WDCGeocoder;n.getLatLng(f.settings.location,function(n){n&&(f.settings.center=[n.latitude,n.longitude]);f.init()})}else f.init()})}var u="WDCMap",e={credentials:"",dashboard:"default",center:[39.8282,-98.5795],zoom:4,zoomRange:{min:4,max:20},disablePolygonLayersMenu:!1,mapType:null,afterInit:null,location:null,showHelp:!1,smartView:!1,backurl:null,enableParcels:!1,disableZoomOnScroll:!1,disablePanning:!1,showZoomButtons:!0};n.extend(f.prototype,{init:function(){var u=this,f={credentials:this.settings.credentials,customMapStyle:{elements:{area:{visible:!1},buildinglobal:{fillColor:"#e4e4e4",visible:!1},park:{fillColor:"#e4e4e4",visible:!1},controlledAccessHighway:{fillColor:"#FFEA27",strokeColor:"#FFEA27",labelColor:"#444444",labelOutlineColor:"#ffffff"},tollRoad:{fillColor:"#FFEA27",strokeColor:"#FFEA27",labelColor:"#444444",labelOutlineColor:"#ffffff"},highway:{fillColor:"#FFEA27",strokeColor:"#FFEA27",labelColor:"#444444",labelOutlineColor:"#ffffff"},water:{fillColor:"#7DA1C4"},medicalBuilding:{fillColor:"#e4e4e4",visible:!1},majorRoad:{fillColor:"#ffffff",strokeColor:"#FFFFFF"},education:{fillColor:"#e4e4e4",visible:!1},arterialRoad:{fillColor:"#ffffff",strokeColor:"#FFFFFF"},structure:{fillColor:"#e4e4e4",visible:!1},forest:{fillColor:"#e4e4e4",visible:!1},vegetation:{fillColor:"#e4e4e4",visible:!1},reserve:{fillColor:"#e4e4e4",visible:!1},street:{fillColor:"#ffffff",strokeColor:"#ffffff"},roadShield:{fillColor:"#ffffff"},medical:{fillColor:"#e4e4e4",visible:!1},educationBuildinglobal:{fillColor:"#e4e4e4",visible:!1},golfCourse:{fillColor:"#e4e4e4",visible:!1}},settings:{landColor:"#e4e4e4"},version:"1.0"},enableClickableLogo:!1,enableSearchLogo:!1,showCopyright:!1,showScalebar:!1,showDashboard:this.settings.dashboard=="default",disableKeyboardInput:!0,zoom:this.settings.zoom,center:new Microsoft.Maps.Location(this.settings.center[0],this.settings.center[1]),enableHighDpi:!0,disableScrollWheelZoom:this.settings.disableZoomOnScroll,minZoom:this.settings.zoomRange.min,maxZoom:this.settings.zoomRange.max,disablePanning:this.settings.disablepanning,showZoomButtons:this.settings.showzoombuttons!=r?this.settings.showzoombuttons:!0};f.mapTypeId=this.settings.mapType?this.checkMapTypeId(this.settings.mapType):this.checkMapTypeId(getCookie("searchMapType"));this.element.style.position="relative";this.map=new Microsoft.Maps.Map(this.element,f);this.setupMapEvents();this.settings.dashboard=="custom"&&this.buildCustomDashboard();f.showZoomButtons||n(".zoom-controls").hide();this.tooltip=i.createElement("div");this.tooltip.style.position="absolute";this.tooltip.style.visibility="hidden";this.tooltip.style.zIndex=1e4;this.tooltip.className="mapTooltip";this.tooltipText=i.createElement("p");this.tooltipText.className="mapTooltipText";this.tooltip.appendChild(this.tooltipText);i.body.appendChild(this.tooltip);this.settings.markers&&this.settings.markers.length>0&&this.addMarkers(this.settings.markers,this.settings.smartView);Microsoft.Maps.loadModule("Microsoft.Maps.Clustering",function(){var t=[],n,i;for(n in u.markers)for(i in u.markers[n])t.push(u.markers[n][i]);u.clusterLayer=new Microsoft.Maps.ClusterLayer(t,{clusteringEnabled:!0,clusteredPinCallback:function(n){u.setClusterOptions(n);Microsoft.Maps.Events.addHandler(n,"click",function(n){u.clusterClicked(n,u.map)})}});u.map.layers.insert(u.clusterLayer)});this.polygonLayer=new Microsoft.Maps.Layer("polygonLayer");this.showOutlineControl=!1;this.currentLayer=this.polygonLayer;this.map.layers.insert(this.polygonLayer);this.settings.places&&this.settings.places.length>0&&this.addPlaces(this.settings.places);this.settings.polygons&&this.settings.polygons.length>0?(this.loadPolygons(this.settings.polygons,!0,this.settings.afterInit),this.showOutlineControl=!0,n("#map-canvas").prepend(n("<div />",{id:"MapSearchControl","class":"form-inline"}).append(n("<label/>",{"class":"control-label"}).append("<span>Remove outline to see larger area<\/span>")).on("click",function(){var i={event:"changeMap",action:"Remove Outline","polygon-type":u.settings.polygons[0].Type,"polygon-state":u.settings.polygons[0].State};n("#mainBody").data("is-agent")==="True"&&(i.PersonID=n("#mainBody").data("agent-id"));t.dataLayer=t.dataLayer||[];t.dataLayer.push(i);Results.map.WDCMap("setOutlineControl",!1);updateSearchByMap()}))):n.isFunction(this.settings.afterInit)&&this.settings.afterInit(this.$element);(this.settings.enableParcels||!this.settings.disablePolygonLayersMenu)&&this.prepareDigimap()},prepareDigimap:function(i){var r=this;n.getJSON(_appPath+"/handlers/maplayer.ashx").done(function(n){jQuery.when(dmp_on_ready).then(function(){Dmp&&Dmp.Map&&Dmp.Map.init&&(Dmp.HostName="https://parcelstream.com/",Dmp.Map.init(r.map),Dmp.Env.Connections.SS=new Dmp.Conn.Connection("https://parcelstream.com/InitSession.aspx"),Dmp.Env.Connections.SS.init(n.key,function(){if(r.dmpIsReady=!0,r.settings.enableParcels){var n=new Dmp.Layer.TileLayer("Parcels","SS",{antiAlias:!0});n.addChild("ParcelTiles","SS.Base.Parcels/ParcelTiles","",{zIndex:3,zoomRange:{min:16,max:19}});r.map.addEntity(n);n=new Dmp.Layer.WMSLayer("Parcels","SS",{zIndex:2,antiAlias:!0});n.addChild("ParcelTiles","SS.Base.Parcels/Parcels","SS.Base.Parcels.Styles.Parcels/Default.sld.xml",{zoomRange:{min:19.5,max:20}});r.map.addEntity(n)}i&&t.setTimeout(i,500)}))})})},setupMapEvents:function(){var n=this,r=this.map,u=this.settings,i;Microsoft.Maps.Events.addHandler(r,"mousedown",function(t){n.lastMouseDownPoint=new Microsoft.Maps.Point(t.getX(),t.getY())});Microsoft.Maps.Events.addHandler(this.map,"mousemove",function(t){n.tooltip.style.left=(t.pageX-n.tooltip.offsetWidth/2+5).toString()+"px";n.tooltip.style.top=(t.pageY-n.tooltip.offsetHeight-10).toString()+"px"});Microsoft.Maps.Events.addHandler(this.map,"viewchangestart",function(){i=n.map.getBounds();n.hideMarkerPopup()});Microsoft.Maps.Events.addThrottledHandler(this.map,"viewchangeend",function(){var t=n.map.getBounds();n.clusterLayer&&n.clusterLayer.setOptions({clusteringEnabled:n.map.getZoom()<16});!i||Microsoft.Maps.Location.areEqual(i.getNorthwest(),t.getNorthwest())&&Microsoft.Maps.Location.areEqual(i.getSoutheast(),t.getSoutheast())||n.doMapMoveCallback();n.settings.dashboard=="custom"&&n.updateHeading()},500);Microsoft.Maps.Events.addHandler(this.map,"maptypechanged",function(){var t=n.getMapType();setCookie("searchMapType",n.getMapType(),null,"/")});Microsoft.Maps.Events.addHandler(this.map,"dblclick",function(){t.dataLayer=t.dataLayer||[];t.dataLayer.push({event:"pdpMapDoubleClick"})})},buildCustomDashboard:function(){var f=n("<div/>",{"class":"map-menu map-menu-layers"}).append(n("<div/>",{"class":"map-menu-title"}).append("Map Layers")).append(n("<label/>",{"class":"search"}).append(n("<input/>",{type:"radio",value:"search",name:"map-layer"}).prop("checked","checked")).append("<span>Search<\/span>")).append(n("<label/>",{"class":"county"}).append(n("<input/>",{type:"radio",value:"county",name:"map-layer"})).append("<span>County<\/span>")).append(n("<label/>",{"class":"city"}).append(n("<input/>",{type:"radio",value:"city",name:"map-layer"})).append("<span>City<\/span>")).append(n("<label/>",{"class":"neighborhood"}).append(n("<input/>",{type:"radio",value:"neighborhood",name:"map-layer"})).append("<span>Neighborhood<\/span>")).append(n("<label/>",{"class":"zip"}).append(n("<input/>",{type:"radio",value:"zip",name:"map-layer"})).append("<span>Zipcode<\/span>")).append(n("<label/>",{"class":"district"}).append(n("<input/>",{type:"radio",value:"district",name:"map-layer"})).append("<span>School District<\/span>")).append(n("<label/>",{"class":"none"}).append(n("<input/>",{type:"radio",value:"none",name:"map-layer"})).append("<span>Turn layers off<\/span>")),u=n("<div/>",{"class":"map-menu map-menu-views"}).append(n("<div/>",{"class":"map-menu-title"}).append("Map View")).append(n("<label/>",{"class":"road"}).append(n("<input/>",{type:"radio",value:Microsoft.Maps.MapTypeId.road,name:"map-view"})).append("<span>Road<\/span>").append('<span class="description">A standard road map<\/span>')).append(n("<label/>",{"class":"aerial"}).append(n("<input/>",{type:"radio",value:Microsoft.Maps.MapTypeId.aerial,name:"map-view"})).append("<span>Aerial<\/span>").append('<span class="description">A detailed look from above<\/span>')).append(n("<label/>",{"class":"birdseye"}).append(n("<input/>",{type:"radio",value:Microsoft.Maps.MapTypeId.birdseyeV2,name:"map-view"})).append("<span>Bird's Eye<\/span>").append('<span class="description">A better angle of aerial photography<\/span>').hide()),i=this.map,r=n("<div>",{"class":"map-controls"}),o=n("<div/>",{"class":"map-control-bar"}),s,h,c,l,e;this.settings.disablePolygonLayersMenu||(s=n("<a/>",{"class":"layers"}).on("click",function(n){e.dmpIsReady&&(u.toggleClass("on",!1),f.toggleClass("on"));n.stopPropagation()}).append(n("<i/>",{"class":"far fa-layer-group"})),o.append(s),h=n("<a/>",{"class":"mapView"}).on("click",function(n){f.toggleClass("on",!1);u.toggleClass("on");n.stopPropagation()}).append(n("<i/>",{"class":"far fa-road"})),o.append(h));r.append(o);n("#propertyDetail .map-container").length?(c=n("<div/>",{"class":"zoom-controls"}).append(n("<a/>",{"class":"plus","data-gtm-pdp":"plus"}).on("click",function(n){i.setView({zoom:Math.min(i.getZoom()+1,20)});n.stopPropagation();gaPdpMapZoomIn()}).append(n("<i/>",{"class":"fa fa-plus"}))).append(n("<a/>",{"class":"minus","data-gtm-pdp":"minus"}).on("click",function(n){i.setView({zoom:Math.max(i.getZoom()-1,4)});n.stopPropagation();gaPdpMapZoomOut()}).append(n("<i/>",{"class":"fa fa-minus"}))),r.append(c)):(l=n("<div/>",{"class":"zoom-controls"}).append(n("<a/>",{"class":"plus"}).on("click",function(n){i.setView({zoom:Math.min(i.getZoom()+1,20)});n.stopPropagation();gaPdpMapZoomIn()}).append(n("<i/>",{"class":"fa fa-plus"}))).append(n("<a/>",{"class":"minus"}).on("click",function(n){i.setView({zoom:Math.max(i.getZoom()-1,4)});n.stopPropagation();gaPdpMapZoomOut()}).append(n("<i/>",{"class":"fa fa-minus"}))),r.append(l));this.settings.backurl&&r.append(n("<a/>",{"class":"back",href:this.settings.backurl}));this.settings.disablePolygonLayersMenu||r.append(f);r.append(u);n(this.map.getRootElement()).append(r);e=this;f.find("input").on("change",function(){e.changeMapLayer(f.find("input:radio[name='map-layer']:checked").val())});u.find("input[value='"+i.getMapTypeId()+"']").prop("checked","checked");u.find("input").on("change",function(){var i=u.find("input:radio[name='map-view']:checked").val(),r="",f;i==="a"?r="Aerial":i==="r"&&(r="Road");f={event:"changeMap",action:"Map View","map-view":r};n("#mainBody").data("is-agent")==="True"&&(f.PersonID=n("#mainBody").data("agent-id"));t.dataLayer.push(f);e.map.setView({mapTypeId:i})})},updateHeading:function(){if(this.map.isRotationEnabled()){var t=Math.round(this.map.getHeading()/90),n;switch(t){case 1:n="east";break;case 2:n="south";break;case 3:n="west";break;default:n="north"}this.$element.find(".map-rotate").css("visibility","visible");this.$element.find(".compass").removeClass("east").removeClass("west").removeClass("north").removeClass("south").addClass(n)}else this.$element.find(".map-rotate").css("visibility","hidden"),this.$element.find(".compass").removeClass("east").removeClass("west").removeClass("south").addClass("north")},changeMapLayer:function(i){t.dataLayer=t.dataLayer||[];var r={event:"changeMap",action:"Change Layer","layer-type":i};n("#mainBody").data("is-agent")==="True"&&(r.PersonID=n("#mainBody").data("agent-id"));t.dataLayer.push(r);this.currentLayer&&(this.currentLayer==this.polygonLayer?this.map.layers.remove(this.polygonLayer):this.map.removeEntity(this.currentLayer),this.currentLayer=null);this.currentLabelLayer&&(this.map.removeEntity(this.currentLabelLayer),this.currentLabelLayer=null);switch(i){case"search":this.currentLayer=this.polygonLayer;break;case"county":this.currentLayer=new Dmp.Layer.WMSLayer("county","SS",{visibility:!0});this.currentLayer.addChild("countyB","SS.Base.County/County_DOFS","Weichert.Public.Styles/County.sld.xml",{zoomRange:{min:8,max:20}});this.currentLabelLayer=new Dmp.Layer.WMSLayer("countyL","SS",{visibility:!0});this.currentLabelLayer.addChild("countyB","SS.Base.County/County_DOFS","Weichert.Public.Styles/CountyL.sld.xml",{zoomRange:{min:8,max:20}});break;case"city":this.currentLayer=new Dmp.Layer.WMSLayer("city","SS",{visibility:!0});this.currentLayer.addChild("cityB","SS.Base.City/City_DOFS","Weichert.Public.Styles/City.sld.xml",{zoomRange:{min:10,max:20}});this.currentLabelLayer=new Dmp.Layer.WMSLayer("cityL","SS",{visibility:!0});this.currentLabelLayer.addChild("cityB","SS.Base.City/City_DOFS","Weichert.Public.Styles/CityL.sld.xml",{zoomRange:{min:12,max:20}});break;case"neighborhood":this.currentLayer=new Dmp.Layer.WMSLayer("neighborhood","SS",{visibility:!0});this.currentLayer.addChild("neighborhoodB","SS.Admin.MP.Neighborhoods/Neighborhoods","Weichert.Public.Styles/Neighborhood.sld.xml",{zoomRange:{min:12,max:20}});this.currentLayer.addChild("residentialB","Weichert.Public/ResidentialPlus","Weichert.Public.Styles/Neighborhood.sld.xml",{zoomRange:{min:12,max:20}});this.currentLabelLayer=new Dmp.Layer.WMSLayer("neighborhoodL","SS",{visibility:!0});this.currentLabelLayer.addChild("neighborhoodB","SS.Admin.MP.Neighborhoods/Neighborhoods","Weichert.Public.Styles/NeighborhoodL.sld.xml",{zoomRange:{min:15,max:20}});this.currentLabelLayer.addChild("residentialB","Weichert.Public/ResidentialPlus","Weichert.Public.Styles/NeighborhoodL.sld.xml",{zoomRange:{min:15,max:20}});break;case"zip":this.currentLayer=new Dmp.Layer.WMSLayer("zip","SS",{visibility:!0});this.currentLayer.addChild("zipB","SS.Base.PostalCode/PostalCode_DOFS","Weichert.Public.Styles/PostalCode.sld.xml",{zoomRange:{min:10,max:20}});this.currentLabelLayer=new Dmp.Layer.WMSLayer("zipL","SS",{visibility:!0});this.currentLabelLayer.addChild("zipB","SS.Base.PostalCode/PostalCode_DOFS","Weichert.Public.Styles/PostalCodeL.sld.xml",{zoomRange:{min:10,max:20}});break;case"district":this.currentLayer=new Dmp.Layer.WMSLayer("district","SS",{visibility:!0});this.currentLayer.addChild("districtB","SS.Admin.MP.SchoolDistricts/SchoolDistricts","Weichert.Public.Styles/SchoolDistricts.sld.xml",{zoomRange:{min:1,max:20}});this.currentLabelLayer=new Dmp.Layer.WMSLayer("districtL","SS",{visibility:!0});this.currentLabelLayer.addChild("districtB","SS.Admin.MP.SchoolDistricts/SchoolDistricts","Weichert.Public.Styles/SchoolDistrictsL.sld.xml",{zoomRange:{min:1,max:20}})}this.currentLayer&&(this.currentLayer==this.polygonLayer?this.map.layers.insert(this.polygonLayer):this.map.addEntity(this.currentLayer));this.currentLabelLayer&&this.map.addEntity(this.currentLabelLayer)},getPolygonsByKey:function(n,t,i,r,u){var e,f;if(!this.dmpIsReady){e=this;this.prepareDigimap(function(){e.getPolygonByKey(n,t,i,r,u)});return}f="GetByKey.aspx?";f+="&keyName="+encodeURIComponent(n);f+="&keyValue="+encodeURIComponent(t);f+="&dataSource="+i;f+="&showSchema=false";Dmp.Env.Connections.SS.getJson(f,function(n){var f=[],u,t,i;if(n&&parseInt(n.Response.Results.totalRecords)>0)if(Array.isArray(n.Response.Results.Data.Row))for(u=0;u<n.Response.Results.Data.Row.length;u++)t=n.Response.Results.Data.Row[u],i=Dmp.Core.WktTools.toShape(t.GEOMETRY),f.push({id:t.ID,shape:i});else t=n.Response.Results.Data.Row,i=Dmp.Core.WktTools.toShape(t.GEOMETRY),f.push({id:t.ID,shape:i});r(f)},u)},getColorByType:function(n){switch(n){case"county":return new Microsoft.Maps.Color(255,82,122,186);case"city":return new Microsoft.Maps.Color(255,229,115,58);case"zip":return new Microsoft.Maps.Color(255,121,104,200);case"neighborhood":return new Microsoft.Maps.Color(255,0,25,210);case"schooldistrict":return new Microsoft.Maps.Color(255,129,129,129);default:return new Microsoft.Maps.Color(255,55,55,55)}},setBestFit:function(){for(var l=this.polygonLayer.getPrimitives(),n=[],s,t,u,i,f,h,e,o,c,a,v,r=0;r<l.length;r++){if(s=l[r],t=s.getLocations(),t!=null&&t.length>0)for(u=0;u<t.length;u++)n.push(t[u]);if(i=s.getRings(),i!=null&&i.length>0)for(f=0;f<i.length;f++)for(h=i[f],e=0;e<h.length;e++)n.push(h[e])}for(o in this.markers)for(c in this.markers[o])n.push(new Microsoft.Maps.Location(this.markers[o][c].info.lat,this.markers[o][c].info.lng));n.length>0&&(a=Microsoft.Maps.LocationRect.fromLocations(n),v={bounds:a},this.map.setView(v))},clearPolygons:function(){this.polygonLayer.clear()},loadPolygons:function(t,i,r){var u=this;jQuery.ajax({type:"POST",dataType:"json",url:_appPath+"/handlers/polygon.ashx",contentType:"application/json; charset=utf-8",data:JSON.stringify(t),success:function(t){if(t.Places){var f=[];n.each(t.Places,function(t,i){var r={};r.shapes=n.map(i.EncodedPolygons,function(n){return{encoded:n}});r.id=i.Id;r.name=i.Name;r.type=i.Type.toLowerCase();r.disableHighlite=!0;f.push(r)});u.addPlaces(f);i&&u.setBestFit()}r&&r(u.$element)}})},checkMapTypeId:function(n){switch(n){case Microsoft.Maps.MapTypeId.road:case Microsoft.Maps.MapTypeId.aerial:case Microsoft.Maps.MapTypeId.birdseyeV2:return n;default:return Microsoft.Maps.MapTypeId.road}},setMapType:function(n){n=checkMapTypeId(n);n!=this.map.getMapTypeId()&&this.map.setView({mapTypeId:style})},getMapType:function(){return this.map.getMapTypeId()},addMapMoveCallback:function(n,t){this.mapMoveCallbacks.push({name:n,callback:t})},removeMapMoveCallback:function(n){for(var t=0;t<this.mapMoveCallbacks.length;t++)this.mapMoveCallbacks[t].name==n&&(this.mapMoveCallbacks.splice(t,1),t--)},doMapMoveCallback:function(){var n,i,t;if(this.enableMapMoveCallback)for(n=0;n<this.mapMoveCallbacks.length;n++)i=this.mapMoveCallbacks[n].callback,t=setTimeout(i,10);this.oneTimeMapMoveCallback&&(t=setTimeout(this.oneTimeMapMoveCallback,10))},setLocation:function(n,t,i){!i||i<=0?this.map.setView({center:new Microsoft.Maps.Location(n,t)}):this.map.setView({center:new Microsoft.Maps.Location(n,t),zoom:i})},setLocationFromText:function(n){if(n!=""){var i=n,r=new WDCGeocoder,t=this;r&&r.getLatLng(i,function(n){n?(t.hideMarkerPopup(),t.map.setView({center:n,zoom:13}),t.doMapMoveCallback()):alert("'"+i+"' is not a valid location.")})}},getMarker:function(n,t){return this.markers[t]?this.markers[t][n]:null},setMarker:function(n){this.createMarker(n);this.addPushpinToMap(marker)},createMarker:function(r){var f=new Microsoft.Maps.Pushpin(new Microsoft.Maps.Location(r.lat,r.lng),null),e={},u;return r.icon&&(MapIcons[r.icon]&&(r.icon=MapIcons[r.icon]),e.icon=r.text?r.icon.icon.replace("{text}",r.text):r.icon.icon,e.anchor=r.icon.iconAnchor),r.text&&(e.textOffset=r.icon.textOffset),e.typeName="pushpinStyle",r.z&&(e.zIndex=r.z),f.setOptions(e),r.tooltip&&(f.tooltip=r.tooltip),f.info=r,u=this,Microsoft.Maps.Events.addHandler(f,"mouseover",function(n){return u.showMouseTooltip(n.target.tooltip),u.map.getRootElement().style.cursor="pointer",!0}),Microsoft.Maps.Events.addHandler(f,"mouseout",function(){return u.hideMouseTooltip(),u.map.getRootElement().style.cursor="default",!0}),Microsoft.Maps.Events.addHandler(f,"click",function(r){if(r.target.info&&r.target.info.onclick){if(n.isFunction(r.target.info.onclick))r.target.info.onclick(u,r.target);else if(n.isFunction(t[r.target.info.onclick])){r.target.info.onclick=t[r.target.info.onclick];r.target.info.onclick(u,r.target)}}else r.target.info&&r.target.info.url?i.location=r.target.info.url:u.showMarkerPopup(r.target)}),f},isPointVisible:function(n){var t=this.map.getBounds(),i=t.getNorthwest(),r=t.getSoutheast();return i.latitude>n.latitude&&n.latitude>r.latitude&&i.longitude<n.longitude&&n.longitude<r.longitude},openMarkerWindow:function(n,t){t||(t=0);this.markers[t]&&this.markers[t][n]&&this.showMarkerPopup(this.markers[t][n])},showMarkerPopup:function(t){var o,r,i,f;if(this.hideMarkerPopup(),t.info&&t.info.desc&&t.info.desc!=""){if(o=this.map.getCenter(),r=t.getLocation(),!this.isPointVisible(r)){this.map.setView({center:r});this.enableMapMoveCallback=!1;i=this;this.oneTimeMapMoveCallback=function(){i.showMarkerPopup(t);i.oneTimeMapMoveCallback=null;i.enableMapMoveCallback=!0};return}var e=this.map.tryLocationToPixel(t.getLocation(),Microsoft.Maps.PixelReference.control),s=t.info.icon.iconAnchor.x-t.info.icon.infoWindowAnchor.x,h=t.info.icon.infoWindowAnchor.y-t.info.icon.iconAnchor.y,c=e.x+s,u=e.y+h;u<400&&(u=400);f=n("<div/>",{"class":"mapPopOverAnchor"}).css({top:u+"px",left:c+"px",position:"absolute",width:"0",height:"0"}).appendTo(this.$element);f.popover({html:!0,placement:getPlacementFunction("top",430,450),content:'<span class="close" data-dismiss="popover">&times;<\/span>'+t.info.desc,container:this.$element,sanitize:!1});f.popover("show");this.hideMouseTooltip()}},hideMarkerPopup:function(){this.$element.find(".mapPopOverAnchor").popover("destroy").remove()},clearMarkers:function(n){if(this.markers!=null)if(n){if(this.markers[n]){for(var t in this.markers[n])this.removePushpinFromMap(this.markers[n][t]);this.markers[n]={}}}else this.clearPushpinsFromMap(),this.markers={}},addPushpinToMap:function(n){if(this.clusterLayer){var t=this.clusterLayer.getPushpins();t.push(n);this.clusterLayer.setPushpins(t)}},removePushpinFromMap:function(t){if(this.clusterLayer){var i=this.clusterLayer.getPushpins();i.splice(n.inArray(t,i),1);this.clusterLayer.setPushpins(i)}},clearPushpinsFromMap:function(){this.clusterLayer&&this.clusterLayer.clear()},resizePositionMapToBestFit:function(){var t=[],n,i;for(n in this.markers)for(i in this.markers[n])t.push(new Microsoft.Maps.Location(this.markers[n][i].info.lat,this.markers[n][i].info.lng));t.length>0&&this.map.setView({bounds:Microsoft.Maps.LocationRect.fromLocations(t)})},addMarkers:function(n,t){var r,u,i,f,e,o;if(this.enableMapMoveCallback=!1,u=[],n)for(i=0;i<n.length;i++)f=this.createMarker(n[i]),e=n[i].id,r=n[i].group,r==null&&(r=0),this.markers[r]||(this.markers[r]={}),e!=null?this.markers[r][e]=f:this.markers[r].push(f),this.addPushpinToMap(f),u.push(new Microsoft.Maps.Location(n[i].lat,n[i].lng));t==!0&&u.length>0&&(this.map.setView({bounds:Microsoft.Maps.LocationRect.fromLocations(u)}),this.origLatLong=this.map.getCenter(),this.origzoom=this.map.getZoom());o=this;setTimeout(function(){o.enableMapMoveCallback=!0},1e3)},clearPlaces:function(){this.polygonLayer.clear()},addPlaces:function(n,t){var i,r,u,f;if(n)for(u=0;u<n.length;u++){for(i=new WDCMapPlace(n[u]),f=0;f<i.polygons.length;f++)r=i.polygons[f],r.setOptions({fillColor:new Microsoft.Maps.Color(0,0,0,0),strokeColor:t&&t.color?new Microsoft.Maps.Color(t.color.a,t.color.r,t.color.g,t.color.b):this.getColorByType(i.info.type),strokeThickness:3}),r.tooltip=i.info.name,t&&(i.onmouseout=t.onmouseout,i.onmouseover=t.onmouseover,i.onclick=t.onclick),this.polygonLayer.add(r);this.attachPolygonEvents(i);this.places[i.info.id]=i}},setPlaceOptions:function(n){var i,t;if(n)for(i in this.places)t=this.places[i],t.onmouseout=n.onmouseout,t.onmouseover=n.onmouseover,t.onclick=n.onclick},attachPolygonEvents:function(n){var t,i,r;if(!n.info.disableHighlite||n.onclick)for(t=this,i=0;i<n.polygons.length;i++)n.info.disableHighlite||(r=n.polygons[i],Microsoft.Maps.Events.addHandler(r,"mouseover",function(i){if(t.highlitePlace(n,!0),t.showMouseTooltip(i.target.tooltip),n.onmouseover)n.onmouseover(n);return!0}),Microsoft.Maps.Events.addHandler(r,"mouseout",function(){if(t.highlitePlace(n,!1),t.hideMouseTooltip(),n.onmouseout)n.onmouseout(n);return!0})),Microsoft.Maps.Events.addHandler(r,"click",function(i){if(n.onclick){var r=new Microsoft.Maps.Point(i.getX(),i.getY()),u=Math.sqrt(Math.pow(r.x-t.lastMouseDownPoint.x,2)+Math.pow(r.y-t.lastMouseDownPoint.y,2));if(u>5)return;n.onclick(n)}return!0})},highlitePlace:function(n,t){var i,r;if(n&&(this.places&&this.places[n]&&(n=this.places[n]),n.polygons))for(i=0;i<n.polygons.length;i++)r=n.polygons[i],t?this.map.getZoom()<15&&r.setOptions({fillColor:new Microsoft.Maps.Color(100,35,80,135)}):r.setOptions({fillColor:new Microsoft.Maps.Color(0,0,0,0)})},getMapBounds:function(n,t){var u=this.map.getBounds(),i=new Microsoft.Maps.Location(u.getSouth(),u.getWest()),r=new Microsoft.Maps.Location(u.getNorth(),u.getEast()),f=this.map.getCenter();return n!=null&&Math.abs(r.latitude-i.latitude)>n&&(i=new Microsoft.Maps.Location(f.latitude-n/2,i.longitude),r=new Microsoft.Maps.Location(f.latitude+n/2,r.longitude)),t!=null&&Math.abs(r.longitude-i.longitude)>t&&(i=new Microsoft.Maps.Location(i.latitude,f.longitude-t/2),r=new Microsoft.Maps.Location(r.latitude,f.longitude+t/2)),{sw:i,ne:r}},getBounds:function(n,t){var i=this.getMapBounds(n,t),r=i.sw,u=i.ne;return r.latitude.toString()+","+r.longitude.toString()+","+u.latitude.toString()+","+u.longitude.toString()},setOutlineControl:function(t){this.showOutlineControl=t;t?n("#MapSearchControl").fadeIn():n("#MapSearchControl").fadeOut()},getOutlineControl:function(){return this.showOutlineControl},getZoom:function(){return this.map.getZoom()},getMapInfo:function(n,t){var r=this.getMapBounds(n,t),f=this.map.getZoom(),u=this.map.getCenter(),i="sw="+r.sw.latitude.toString()+","+r.sw.longitude.toString();return i=i+"&ne="+r.ne.latitude.toString()+","+r.ne.longitude.toString(),i=i+"&c="+u.latitude.toString()+","+u.longitude.toString(),i+"&z="+f},reset:function(){this.map.setView({center:this.origLatLong,zoom:this.origzoom});this.doMapMoveCallback()},showMouseTooltip:function(n){n&&n!=""&&(this.tooltipText.innerHTML=n,this.tooltip.style.visibility="visible")},hideMouseTooltip:function(){this.tooltip.style.visibility="hidden"},setClusterOptions:function(n){var i=n.containedPushpins.length,t=Math.log(i)/Math.log(10)*5+12,r=['<svg xmlns="http://www.w3.org/2000/svg" width="',t*2+2,'" height="',t*2+2,'">',"<defs>",'<filter id="f1" height="130%">','<feGaussianBlur in="SourceAlpha" stdDeviation="2"/>','<feOffset dx="0" dy="1" result="offsetblur"/>',"<feComponentTransfer>",'<feFuncA type="linear" slope="0.2"/>',"<\/feComponentTransfer>","<feMerge>","<feMergeNode/>",'<feMergeNode in="SourceGraphic"/>',"<\/feMerge>","<\/filter>","<\/defs>","<style>",".mLabel { font: bold 12px Arial }","<\/style>",'<circle cx="',t+1,'" cy="',t,'" r="',t-2,'" fill="',"#FFEA27",'" stroke="',"#FFFFFF",'" stroke-width="2" filter="url(#f1)"/>','<text x="',t+1,'" y="',t+4,'" text-anchor="middle" fill="#000000" class="mLabel">',i,"<\/text>","<\/svg>"];n.setOptions({text:""});n.setOptions({icon:r.join(""),anchor:new Microsoft.Maps.Point(t,t),textOffset:new Microsoft.Maps.Point(0,t-8)})},clusterClicked:function(n,t){var r,i,u,f;if(n.target.containedPushpins){for(r=[],i=0,u=n.target.containedPushpins.length;i<u;i++)r.push(n.target.containedPushpins[i].getLocation());f=Microsoft.Maps.LocationRect.fromLocations(r);t.setView({bounds:f,padding:100})}}});n.fn[u]=function(t){var e=arguments,i;return t===r||typeof t=="object"?this.each(function(){n.data(this,"plugin_"+u)||n.data(this,"plugin_"+u,new f(this,t))}):typeof t=="string"&&t[0]!=="_"&&t!=="init"?(this.each(function(){var r=n.data(this,"plugin_"+u);r instanceof f&&typeof r[t]=="function"&&(i=r[t].apply(r,Array.prototype.slice.call(e,1)));t==="destroy"&&n.data(this,"plugin_"+u,null)}),i!==r?i:this):void 0}}(jQuery,window,document);var MapIcons={};$(function(){$(document).on("keydown",".MicrosoftMap button",function(n){return n.preventDefault(),!0})});WDCGeocoder.prototype.makeRequest=function(n,t){var r=this.getUniqueCallbackId(),u,i;window[r]=t;u="//dev.virtualearth.net/REST/v1/Locations/"+n+"?key="+__key+"&jsonp="+r;i=document.createElement("script");i.setAttribute("src",u);_geo=this;document.body.appendChild(i)};WDCGeocoder.prototype.getUniqueCallbackId=function(){var n;do n="wdcGeocoder_"+Math.floor(Math.random()*1e5).toString();while(window[n]);return n};WDCGeocoder.prototype.getLatLng=function(n,t){this.makeRequest(n.trim(),function(n){if(n&&n.resourceSets&&n.resourceSets.length>0&&n.resourceSets[0].resources&&n.resourceSets[0].resources.length>0){var i=new Microsoft.Maps.Location(n.resourceSets[0].resources[0].point.coordinates[0],n.resourceSets[0].resources[0].point.coordinates[1]);t(i)}else t(null)})};WDCGeocoder.prototype.getLocations=function(n,t){var i=this;this.makeRequest(n.trim(),function(n){var f=[],r,u;try{if(n&&n.resourceSets&&n.resourceSets.length>0&&n.resourceSets[0].resources&&n.resourceSets[0].resources.length>0)for(u=0;u<n.resourceSets[0].resources.length;u++){try{r=i.processLocation(n.resourceSets[0].resources[u])}catch(e){alert(e);r=null}r!=null&&f.push(r)}}catch(o){f=null}t&&t(f)})};WDCGeocoder.prototype.processLocation=function(n){var o=new Microsoft.Maps.Location(n.point.coordinates[0],n.point.coordinates[1]),s=n.confidence,i="",r="",u="",f="",e="",t=n.address.countryRegion;if(n.entityType=="Address"&&(t=="United States"||t=="US"||t=="USA"))i=n.address.addressLine,f=n.address.adminDistrict,u=n.address.locality,e=n.address.postalCode,r=n.address.formattedAddress;else return null;return{p:o,c:s,display:r,addr:i,city:u,state:f,zip:e}};WDCMapPlace.prototype.init=function(){var r,n,u,i,t;for(this.polygons=[],i=[],t=0;t<this.info.shapes.length;t++)r=this.info.shapes[t],n=this.decodePoints(r.encoded),n&&n.length>0&&i.push(n);u=new Microsoft.Maps.Polygon(i);this.polygons.push(u)};WDCMapPlace.prototype.decodePoints=function(n){var c=n.length,u=0,f=[],e=0,o=0,i,r,t,s,h;try{while(u<c){r=0;t=0;do i=n.charCodeAt(u++)-63,t|=(i&31)<<r,r+=5;while(i>=32);s=t&1?~(t>>1):t>>1;e+=s;r=0;t=0;do i=n.charCodeAt(u++)-63,t|=(i&31)<<r,r+=5;while(i>=32);h=t&1?~(t>>1):t>>1;o+=h;f.push(new Microsoft.Maps.Location(e*1e-5,o*1e-5))}}catch(l){}return f}