bigmap-plugin 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1393 -0
- package/dist/bigmap-plugin.js +5234 -0
- package/dist/bigmap-plugin.umd.cjs +107 -0
- package/dist/index.d.ts +3063 -0
- package/dist/libs/bigemap/bigemap-gl.js +1 -0
- package/dist/libs/bigemap/bigemap.css +1 -0
- package/dist/libs/bigemap/bigemap.js +5 -0
- package/dist/libs/bigemap/bm.geometryutil.js +1 -0
- package/dist/libs/bigemap/bmgl-header.js +2 -0
- package/dist/libs/bigemap/bmgl-plot.min.js +1 -0
- package/dist/libs/bigemap/circleWave.js +34 -0
- package/dist/libs/bigemap/moveMarker.js +1 -0
- package/dist/libs/bigemap/widgets.css +1 -0
- package/dist/style.css +1 -0
- package/package.json +66 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var U=Object.defineProperty;var l=(s,t)=>U(s,"name",{value:t,configurable:!0});(function(s){s(window.BM)})(function(s){"use strict";return s.Polyline._flat=s.LineUtil.isFlat||s.Polyline._flat||function(t){return!s.Util.isArray(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"},s.GeometryUtil=s.extend(s.GeometryUtil||{},{distance:l(function(t,e,i){return t.latLngToLayerPoint(e).distanceTo(t.latLngToLayerPoint(i))},"distance"),distanceSegment:l(function(t,e,i,n){var o=t.latLngToLayerPoint(e),r=t.latLngToLayerPoint(i),f=t.latLngToLayerPoint(n);return s.LineUtil.pointToSegmentDistance(o,r,f)},"distanceSegment"),readableDistance:l(function(t,e){var i=e!=="imperial",n;return i?t>1e3?n=(t/1e3).toFixed(2)+" km":n=Math.ceil(t)+" m":(t*=1.09361,t>1760?n=(t/1760).toFixed(2)+" miles":n=Math.ceil(t)+" yd"),n},"readableDistance"),belongsSegment:l(function(t,e,i,n){n=n===void 0?.2:n;var o=e.distanceTo(i),r=e.distanceTo(t)+t.distanceTo(i)-o;return r/o<n},"belongsSegment"),length:l(function(t){var e=s.GeometryUtil.accumulatedLengths(t);return e.length>0?e[e.length-1]:0},"length"),accumulatedLengths:l(function(t){if(typeof t.getLatLngs=="function"&&(t=t.getLatLngs()),t.length===0)return[];for(var e=0,i=[0],n=0,o=t.length-1;n<o;n++)e+=t[n].distanceTo(t[n+1]),i.push(e);return i},"accumulatedLengths"),closestOnSegment:l(function(t,e,i,n){var o=t.getMaxZoom();o===1/0&&(o=t.getZoom());var r=t.project(e,o),f=t.project(i,o),a=t.project(n,o),c=s.LineUtil.closestPointOnSegment(r,f,a);return t.unproject(c,o)},"closestOnSegment"),closest:l(function(t,e,i,n){var o,r=1/0,f=null,a,c,u,g;if(e instanceof Array)if(e[0]instanceof Array&&typeof e[0][0]!="number"){for(a=0;a<e.length;a++)g=s.GeometryUtil.closest(t,e[a],i,n),g.distance<r&&(r=g.distance,f=g);return f}else if(e[0]instanceof s.LatLng||typeof e[0][0]=="number"||typeof e[0].lat=="number")e=s.polyline(e);else return f;if(!(e instanceof s.Polyline))return f;if(o=JSON.parse(JSON.stringify(e.getLatLngs().slice(0))),e instanceof s.Polygon){var h=l(function(d){if(s.Polyline._flat(d))d.push(d[0]);else for(var m=0;m<d.length;m++)h(d[m])},"addLastSegment");h(o)}if(s.Polyline._flat(o)){if(n){for(a=0,c=o.length;a<c;a++){var L=o[a];u=s.GeometryUtil.distance(t,i,L),u<r&&(r=u,f=L,f.distance=u)}return f}for(a=0,c=o.length;a<c-1;a++){var v=o[a],y=o[a+1];u=s.GeometryUtil.distanceSegment(t,i,v,y),u<=r&&(r=u,f=s.GeometryUtil.closestOnSegment(t,i,v,y),f.distance=u)}return f}else{for(a=0;a<o.length;a++)g=s.GeometryUtil.closest(t,o[a],i,n),g.distance<r&&(r=g.distance,f=g);return f}},"closest"),closestLayer:l(function(t,e,i){for(var n=1/0,o=null,r=null,f=1/0,a=0,c=e.length;a<c;a++){var u=e[a];if(u instanceof s.LayerGroup){var g=s.GeometryUtil.closestLayer(t,u.getLayers(),i);g.distance<n&&(n=g.distance,o=g)}else typeof u.getLatLng=="function"?(r=u.getLatLng(),f=s.GeometryUtil.distance(t,i,r)):(r=s.GeometryUtil.closest(t,u,i),r&&(f=r.distance)),f<n&&(n=f,o={layer:u,latlng:r,distance:f})}return o},"closestLayer"),nClosestLayers:l(function(t,e,i,n){if(n=typeof n=="number"?n:e.length,n<1||e.length<1)return null;for(var o=[],r,f,a=0,c=e.length;a<c;a++){var u=e[a];if(u instanceof s.LayerGroup){var g=s.GeometryUtil.closestLayer(t,u.getLayers(),i);o.push(g)}else typeof u.getLatLng=="function"?(f=u.getLatLng(),r=s.GeometryUtil.distance(t,i,f)):(f=s.GeometryUtil.closest(t,u,i),f&&(r=f.distance)),o.push({layer:u,latlng:f,distance:r})}return o.sort(function(h,L){return h.distance-L.distance}),o.length>n?o.slice(0,n):o},"nClosestLayers"),layersWithin:l(function(t,e,i,n){n=typeof n=="number"?n:1/0;for(var o=[],r=null,f=0,a=0,c=e.length;a<c;a++){var u=e[a];typeof u.getLatLng=="function"?(r=u.getLatLng(),f=s.GeometryUtil.distance(t,i,r)):(r=s.GeometryUtil.closest(t,u,i),r&&(f=r.distance)),r&&f<n&&o.push({layer:u,latlng:r,distance:f})}var g=o.sort(function(h,L){return h.distance-L.distance});return g},"layersWithin"),closestLayerSnap:l(function(t,e,i,n,o){n=typeof n=="number"?n:1/0,o=typeof o=="boolean"?o:!0;var r=s.GeometryUtil.closestLayer(t,e,i);if(!r||r.distance>n)return null;if(o&&typeof r.layer.getLatLngs=="function"){var f=s.GeometryUtil.closest(t,r.layer,r.latlng,!0);f.distance<n&&(r.latlng=f,r.distance=s.GeometryUtil.distance(t,f,i))}return r},"closestLayerSnap"),interpolateOnPointSegment:l(function(t,e,i){return s.point(t.x*(1-i)+i*e.x,t.y*(1-i)+i*e.y)},"interpolateOnPointSegment"),interpolateOnLine:l(function(t,e,i){e=e instanceof s.Polyline?e.getLatLngs():e;var n=e.length;if(n<2)return null;if(i=Math.max(Math.min(i,1),0),i===0)return{latLng:e[0]instanceof s.LatLng?e[0]:s.latLng(e[0]),predecessor:-1};if(i==1)return{latLng:e[e.length-1]instanceof s.LatLng?e[e.length-1]:s.latLng(e[e.length-1]),predecessor:e.length-2};var o=t.getMaxZoom();o===1/0&&(o=t.getZoom());for(var r=[],f=0,a=0;a<n;a++)r[a]=t.project(e[a],o),a>0&&(f+=r[a-1].distanceTo(r[a]));for(var c=f*i,u=0,g=0,a=0;g<c;a++){var h=r[a],L=r[a+1];u=g,g+=h.distanceTo(L)}if(h==null&&L==null)var h=r[0],L=r[1],a=1;var v=g-u!==0?(c-u)/(g-u):0,y=s.GeometryUtil.interpolateOnPointSegment(h,L,v);return{latLng:t.unproject(y,o),predecessor:a-1}},"interpolateOnLine"),locateOnLine:l(function(t,e,i){var n=e.getLatLngs();if(i.equals(n[0]))return 0;if(i.equals(n[n.length-1]))return 1;for(var o=s.GeometryUtil.closest(t,e,i,!1),r=s.GeometryUtil.accumulatedLengths(n),f=r[r.length-1],a=0,c=!1,u=0,g=n.length-1;u<g;u++){var h=n[u],L=n[u+1];if(a=r[u],s.GeometryUtil.belongsSegment(o,h,L,1e-4)){a+=h.distanceTo(o),c=!0;break}}if(!c)throw"Could not interpolate "+i.toString()+" within "+e.toString();return a/f},"locateOnLine"),reverse:l(function(t){return s.polyline(t.getLatLngs().slice(0).reverse())},"reverse"),extract:l(function(t,e,i,n){if(i>n)return s.GeometryUtil.extract(t,s.GeometryUtil.reverse(e),1-i,1-n);i=Math.max(Math.min(i,1),0),n=Math.max(Math.min(n,1),0);var o=e.getLatLngs(),r=s.GeometryUtil.interpolateOnLine(t,e,i),f=s.GeometryUtil.interpolateOnLine(t,e,n);if(i==n){var a=s.GeometryUtil.interpolateOnLine(t,e,n);return[a.latLng]}r.predecessor==-1&&(r.predecessor=0),f.predecessor==-1&&(f.predecessor=0);var c=o.slice(r.predecessor+1,f.predecessor+1);return c.unshift(r.latLng),c.push(f.latLng),c},"extract"),isBefore:l(function(t,e){if(!e)return!1;var i=t.getLatLngs(),n=e.getLatLngs();return i[i.length-1].equals(n[0])},"isBefore"),isAfter:l(function(t,e){if(!e)return!1;var i=t.getLatLngs(),n=e.getLatLngs();return i[0].equals(n[n.length-1])},"isAfter"),startsAtExtremity:l(function(t,e){if(!e)return!1;var i=t.getLatLngs(),n=e.getLatLngs(),o=i[0];return o.equals(n[0])||o.equals(n[n.length-1])},"startsAtExtremity"),computeAngle:l(function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)*180/Math.PI},"computeAngle"),computeSlope:l(function(t,e){var i=(e.y-t.y)/(e.x-t.x),n=t.y-i*t.x;return{a:i,b:n}},"computeSlope"),rotatePoint:l(function(t,e,i,n){var o=t.getMaxZoom();o===1/0&&(o=t.getZoom());var r=i*Math.PI/180,f=t.project(e,o),a=t.project(n,o),c=Math.cos(r)*(f.x-a.x)-Math.sin(r)*(f.y-a.y)+a.x,u=Math.sin(r)*(f.x-a.x)+Math.cos(r)*(f.y-a.y)+a.y;return t.unproject(new s.Point(c,u),o)},"rotatePoint"),bearing:l(function(t,e){var i=Math.PI/180,n=t.lat*i,o=e.lat*i,r=t.lng*i,f=e.lng*i,a=Math.sin(f-r)*Math.cos(o),c=Math.cos(n)*Math.sin(o)-Math.sin(n)*Math.cos(o)*Math.cos(f-r),u=(Math.atan2(a,c)*180/Math.PI+360)%360;return u>=180?u-360:u},"bearing"),destination:l(function(t,e,i){e=(e+360)%360;var n=Math.PI/180,o=180/Math.PI,r=6378137,f=t.lng*n,a=t.lat*n,c=e*n,u=Math.sin(a),g=Math.cos(a),h=Math.cos(i/r),L=Math.sin(i/r),v=Math.asin(u*h+g*L*Math.cos(c)),y=f+Math.atan2(Math.sin(c)*L*g,h-u*Math.sin(v));return y=y*o,y=y>180?y-360:y<-180?y+360:y,s.latLng([v*o,y])},"destination"),angle:l(function(t,e,i){var n=t.latLngToContainerPoint(e),o=t.latLngToContainerPoint(i),r=Math.atan2(o.y-n.y,o.x-n.x)*180/Math.PI+90;return r+=r<0?360:0,r},"angle"),destinationOnSegment:l(function(t,e,i,n){var o=s.GeometryUtil.angle(t,e,i),r=s.GeometryUtil.destination(e,o,n);return s.GeometryUtil.closestOnSegment(t,r,e,i)},"destinationOnSegment")}),s.GeometryUtil});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var r=Object.defineProperty;var d=(a,u)=>r(a,"name",{value:u,configurable:!0});(function(){"use strict";var a,u=window.location.href,s=u.lastIndexOf("/");s>0&&s<u.length-1&&(u=u.substring(s+1)),window.Sandcastle={bucket:u,declare:d(function(){},"declare"),highlight:d(function(){},"highlight"),registered:[],finishedLoading:d(function(){window.Sandcastle.reset(),a&&(window.Sandcastle.highlight(a),a(),a=void 0),document.body.className=document.body.className.replace(/(?:\s|^)sandcastle-loading(?:\s|$)/," ")},"finishedLoading"),addToggleButton:d(function(e,n,t,o){window.Sandcastle.declare(t);var c=document.createElement("input");c.checked=n,c.type="checkbox",c.style.pointerEvents="none";var i=document.createElement("label");i.appendChild(c),i.appendChild(document.createTextNode(e)),i.style.pointerEvents="none";var l=document.createElement("button");l.type="button",l.className="cesium-button",l.appendChild(i),l.onclick=function(){window.Sandcastle.reset(),window.Sandcastle.highlight(t),c.checked=!c.checked,t(c.checked)},document.getElementById(o||"toolbar").appendChild(l)},"addToggleButton"),addToolbarButton:d(function(e,n,t){window.Sandcastle.declare(n);var o=document.createElement("button");o.type="button",o.className="cesium-button",o.onclick=function(){window.Sandcastle.reset(),window.Sandcastle.highlight(n),n()},o.textContent=e,document.getElementById(t||"toolbar").appendChild(o)},"addToolbarButton"),addDefaultToolbarButton:d(function(e,n,t){window.Sandcastle.addToolbarButton(e,n,t),a=n},"addDefaultToolbarButton"),addDefaultToolbarMenu:d(function(e,n){window.Sandcastle.addToolbarMenu(e,n),a=e[0].onselect},"addDefaultToolbarMenu"),addToolbarMenu:d(function(e,n){var t=document.createElement("select");t.className="cesium-button",t.onchange=function(){window.Sandcastle.reset();var l=e[t.selectedIndex];l&&typeof l.onselect=="function"&&l.onselect()},document.getElementById(n||"toolbar").appendChild(t),!a&&typeof e[0].onselect=="function"&&(a=e[0].onselect);for(var o=0,c=e.length;o<c;++o){var i=document.createElement("option");i.textContent=e[o].text,i.value=e[o].value,t.appendChild(i)}},"addToolbarMenu"),reset:d(function(){},"reset")},window.location.protocol==="file:"&&window.confirm(`You must host this app on a web server.
|
|
2
|
+
See contributor's guide for more info?`)&&(window.location="https://github.com/CesiumGS/cesium/wiki/Contributor%27s-Guide")})();
|