website/assets/openlayers/ol.js

8 lines
639 KiB
JavaScript
Raw Permalink Normal View History

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ol=e():t.ol=e()}(window,function(){return function(t){var e={};function i(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=t,i.c=e,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)i.d(r,n,function(e){return t[e]}.bind(null,n));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=9)}([function(t,e,i){"use strict";t.exports=n,t.exports.default=n;var r=i(5);function n(t,e){if(!(this instanceof n))return new n(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,i){if(!i)return e.indexOf(t);for(var r=0;r<e.length;r++)if(i(t,e[r]))return r;return-1}function s(t,e){a(t,0,t.children.length,e,t)}function a(t,e,i,r,n){n||(n=y(null)),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(var o,s=e;s<i;s++)o=t.children[s],h(n,t.leaf?r(o):o);return n}function h(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function l(t,e){return t.minX-e.minX}function u(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function c(t){return t.maxX-t.minX+(t.maxY-t.minY)}function d(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function f(t,e){var i=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),n=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,n-i)*Math.max(0,o-r)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function g(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function y(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function v(t,e,i,n,o){for(var s,a=[e,i];a.length;)(i=a.pop())-(e=a.pop())<=n||(s=e+Math.ceil((i-e)/n/2)*n,r(t,s,e,i,o),a.push(e,s,s,i))}n.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,i=[],r=this.toBBox;if(!g(t,e))return i;for(var n,o,s,a,h=[];e;){for(n=0,o=e.children.length;n<o;n++)s=e.children[n],g(t,a=e.leaf?r(s):s)&&(e.leaf?i.push(s):_(t,a)?this._all(s,i):h.push(s));e=h.pop()}return i},collides:function(t){var e=this.data,i=this.toBBox;if(!g(t,e))return!1;for(var r,n,o,s,a=[];e;){for(r=0,n=e.children.length;r<n;r++)if(o=e.children[r],g(t,s=e.leaf?i(o):o)){if(e.leaf||_(t,s))return!0;a.push(o)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,i=t.length;e<i;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var n=this.data;this.data=r,r=n}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data=y([]),this},remove:function(t,e){if(!t)return this;for(var i,r,n,s,a=this.data,h=this.toBBox(t),l=[],u=[];a||l.length;){if(a||(a=l.pop(),r=l[l.length-1],i=u.pop(),s=!0),a.leaf&&-1!==(n=o(t,a.children,e)))return a.children.splice(n,1),l.push(a),this._condense(l),this;s||a.leaf||!_(a,h)?r?(i++,a=r.children[i],s=!1):a=null:(l.push(a),u.push(i),i=0,r=a,a
/**
* @license
* Latitude/longitude spherical geodesy formulae taken from
* http://www.movable-type.co.uk/scripts/latlong.html
* Licensed under CC-BY-3.0.
*/var Wt=6371008.8;function Kt(t,e,i){var r=i||Wt,n=Vt(t[1]),o=Vt(e[1]),s=(o-n)/2,a=Vt(e[0]-t[0])/2,h=Math.sin(s)*Math.sin(s)+Math.sin(a)*Math.sin(a)*Math.cos(n)*Math.cos(o);return 2*r*Math.atan2(Math.sqrt(h),Math.sqrt(1-h))}function Ht(t,e){for(var i=0,r=0,n=t.length;r<n-1;++r)i+=Kt(t[r],t[r+1],e);return i}function Zt(t,e){for(var i=0,r=t.length,n=t[r-1][0],o=t[r-1][1],s=0;s<r;s++){var a=t[s][0],h=t[s][1];i+=Vt(a-n)*(2+Math.sin(Vt(o))+Math.sin(Vt(h))),n=a,o=h}return i*e*e/2}function qt(t,e,i,r){var n=r||Wt,o=Vt(t[1]),s=Vt(t[0]),a=e/n,h=Math.asin(Math.sin(o)*Math.cos(a)+Math.cos(o)*Math.sin(a)*Math.cos(i));return[Bt(s+Math.atan2(Math.sin(i)*Math.sin(a)*Math.cos(o),Math.cos(a)-Math.sin(o)*Math.sin(h))),Bt(h)]}var Jt={DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Qt={};Qt[Jt.DEGREES]=2*Math.PI*6370997/360,Qt[Jt.FEET]=.3048,Qt[Jt.METERS]=1,Qt[Jt.USFEET]=1200/3937;var $t=Jt,te=function(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit};te.prototype.canWrapX=function(){return this.canWrapX_},te.prototype.getCode=function(){return this.code_},te.prototype.getExtent=function(){return this.extent_},te.prototype.getUnits=function(){return this.units_},te.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||Qt[this.units_]},te.prototype.getWorldExtent=function(){return this.worldExtent_},te.prototype.getAxisOrientation=function(){return this.axisOrientation_},te.prototype.isGlobal=function(){return this.global_},te.prototype.setGlobal=function(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)},te.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},te.prototype.setDefaultTileGrid=function(t){this.defaultTileGrid_=t},te.prototype.setExtent=function(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)},te.prototype.setWorldExtent=function(t){this.worldExtent_=t},te.prototype.setGetPointResolution=function(t){this.getPointResolutionFunc_=t},te.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_};var ee=te,ie=6378137,re=Math.PI*ie,ne=[-re,-re,re,re],oe=[-180,-85,180,85],se=function(t){function e(e){t.call(this,{code:e,units:$t.METERS,extent:ne,global:!0,worldExtent:oe,getPointResolution:function(t,e){return t/jt(e[1]/ie)}})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee),ae=[new se("EPSG:3857"),new se("EPSG:102100"),new se("EPSG:102113"),new se("EPSG:900913"),new se("urn:ogc:def:crs:EPSG:6.18:3:3857"),new se("urn:ogc:def:crs:EPSG::3857"),new se("http://www.opengis.net/gml/srs/epsg.xml#3857")];function he(t,e,i){var r=t.length,n=i>1?i:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(r));for(var s=re,a=0;a<r;a+=n){o[a]=s*t[a]/180;var h=ie*Math.log(Math.tan(Math.PI*(t[a+1]+90)/360));h>s?h=s:h<-s&&(h=-s),o[a+1]=h}return o}function le(t,e,i){var r=t.length,n=i>1?i:2,o=e;void 0===o&&(o=n>2?t.slice():new Array(r));for(var s=0;s<r;s+=n)o[s]=180*t[s]/re,o[s+1]=360*Math.atan(Math.exp(t[s+1]/ie))/Math.PI-90;return o}var ue=[-180,-90,180,90],pe=6378137*Math.PI/180,ce=function(t){function e(e,i){t.call(this,{code:e,units:$t.DEGREES,extent:ue,axisOrientation:i,global:!0,metersPerUnit:pe,worldExtent:ue})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(ee),de=[new ce("CRS:84"),new ce("EPSG:4326","neu"),new ce("urn:ogc:def:crs:EPSG::4326","neu"),new ce("urn:ogc:def:crs:EPSG:6.6:4326","neu"),new ce("urn:ogc:def:crs:OGC:1.3:CRS84"),new ce("urn:ogc:def:crs:OGC:2:84"),new ce("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new ce("urn:x-ogc:def:crs:EPSG:4326","neu")],fe={};var _e={};function ge(t,e,i){var r=t.getCode(),n=e.getCode();r in _e||(_e[r]={}),_e[r][n]=i}function ye(t,
//# sourceMappingURL=ol.js.map