"use strict";app.controller("MapCoordinatesCtrl",["$scope","$compile",function(o,n){function t(o,n,t){return null!=n&&(o=Math.max(o,n)),null!=t&&(o=Math.min(o,t)),o}function e(o){return o*(Math.PI/180)}function i(o){return o/(Math.PI/180)}function r(){this.pixelOrigin_=new google.maps.Point(a/2,a/2),this.pixelsPerLonDegree_=a/360,this.pixelsPerLonRadian_=a/(2*Math.PI)}var a=256;r.prototype.fromLatLngToPoint=function(o,n){var i=this,r=n||new google.maps.Point(0,0),a=i.pixelOrigin_;r.x=a.x+o.lng()*i.pixelsPerLonDegree_;var l=t(Math.sin(e(o.lat())),-.9999,.9999);return r.y=a.y+.5*Math.log((1+l)/(1-l))*-i.pixelsPerLonRadian_,r},r.prototype.fromPointToLatLng=function(o){var n=this,t=n.pixelOrigin_,e=(o.x-t.x)/n.pixelsPerLonDegree_,r=(o.y-t.y)/-n.pixelsPerLonRadian_,a=i(2*Math.atan(Math.exp(r))-Math.PI/2);return new google.maps.LatLng(a,e)},o.$on("mapInitialized",function(n,t){var e=1<