(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["mbmb_pvm_PictometryViewCone"],{"5c3a":function(t,e,o){"use strict";o.r(e);o("fb6a");var a,i,s={name:"PictometryViewCone",props:["latlng","rotationAngle","hFov"],computed:{ipa:function(){return this.$store.state.pictometry.ipa},zoom:function(){return this.$store.state.pictometry.zoom},radius:function(){var t={17:75,18:50,19:25,20:15,21:10,22:10,23:10,24:10};return t[this.zoom]}},watch:{radius:function(t){this.getViewConeLatLon()},rotationAngle:function(){this.ipa.removeShapes(this.$store.state.pictometry.shapeIds),this.getViewConeLatLon()},latlng:function(){this.ipa.removeShapes(this.$store.state.pictometry.shapeIds),this.getViewConeLatLon()}},mounted:function(){this.getViewConeLatLon()},beforeDestroy:function(){this.ipa.removeShapes(this.$store.state.pictometry.shapeIds)},methods:{getViewConeLatLon:function(){var t=this.latlng[0],e=this.latlng[1],o=6378137,a=this.radius,i=this.rotationAngle,s=180*parseFloat(this.hFov)/Math.PI,n=Math.cos((i+s/2)*Math.PI/180)*a,h=Math.sin((i+s/2)*Math.PI/180)*a,r=Math.cos((i-s/2)*Math.PI/180)*a,p=Math.sin((i-s/2)*Math.PI/180)*a,c=n/o,l=h/(o*Math.cos(Math.PI*t/180)),u=r/o,m=p/(o*Math.cos(Math.PI*t/180)),f=t+180*c/Math.PI,d=e+180*l/Math.PI,M=t+180*u/Math.PI,I=e+180*m/Math.PI,w=[{y:t,x:e,z:0},{y:f,x:d,z:0},{y:M,x:I,z:0}];this.placeViewCone(w)},placeViewCone:function(t){var e=this,o={type:this.ipa.SHAPE_TYPE.POLYGON,coordinates:t,strokeColor:"#00a0ee",strokeOpacity:.75,strokeWeight:2,fillColor:"#00a0ee",fillOpacity:.25,altitudeMode:this.ipa.ALTITUDE_MODE.RELATIVE_TO_GROUND};this.ipa.addShapes([o],(function(t){for(var o=0;o<t.length;o++)if("false"===t[o].success)alert(t[o].error);else{var a=e.$store.state.pictometry.shapeIds;a.push(t[o].shapeId);a.slice(0,-1);e.ipa.removeShapes(a.slice(0,-1))}}))}},render:function(t){}},n=s,h=o("2877"),r=Object(h["a"])(n,a,i,!1,null,null,null);e["default"]=r.exports}}]);
//# sourceMappingURL=mbmb_pvm_PictometryViewCone.eb447562.js.map