-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbundle.js
12 lines (9 loc) · 3.72 KB
/
bundle.js
1
2
3
4
5
6
7
8
9
10
11
12
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
exports.linkDistance=500,exports.startLat=-47.28342,exports.startLon=167.50099,exports.brng=40.11;
},{}],2:[function(require,module,exports){
function toRad(t){return t*Math.PI/180}function toDeg(t){return 180*t/Math.PI}function sayHello(){return"hello"}var config=require("./config.js");exports.convertLinksToDistance=function(t){return t*config.linkDistance},exports.getDestinationLatLon=function(t,a,n,o){for(var r=6378137,e=6356752.3142,h=1/298.257223563,i=o,s=toRad(n),M=Math.sin(s),c=Math.cos(s),u=(1-h)*Math.tan(toRad(t)),f=1/Math.sqrt(1+u*u),g=u*f,l=(Math.atan2(u,c),f*M),D=1-l*l,v=D*(r*r-e*e)/(e*e),d=1+v/16384*(4096+v*(-768+v*(320-175*v))),q=v/1024*(256+v*(-128+v*(74-47*v))),I=i/(e*d),L=2*Math.PI;Math.abs(I-L)>1e-12;){var P=Math.cos(2*+I),R=Math.sin(I),k=Math.cos(I),p=q*R*(P+q/4*(k*(-1+2*P*P)-q/6*P*(-3+4*R*R)*(-3+4*P*P)));L=I,I=i/(e*d)+p}var x=g*R-f*k*c,b=Math.atan2(g*k+f*R*c,(1-h)*Math.sqrt(l*l+x*x)),j=Math.atan2(R*M,f*k-g*R*c),y=h/16*D*(4+h*(4-3*D)),H=j-(1-y)*h*l*(I+y*R*(P+y*k*(-1+2*P*P)));Math.atan2(l,-x);return{lat:toDeg(b),lon:a+toDeg(H)}};
},{"./config.js":1}],3:[function(require,module,exports){
function renderMap(){console.log("renderMap called"),L.mapbox.accessToken="pk.eyJ1IjoiY2lpeWFuIiwiYSI6Iks0djZqb0kifQ.KDk4q7pEJOORGrH-54g0jQ";var o={type:"FeatureCollection",features:[{type:"Feature",properties:{"marker-color":"#78f440","marker-size":"small","marker-symbol":"heart",title:"Boulcott School, Lower Hutt",description:"40 links in the chain <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/NYC_Top_of_the_Rock_Pano.jpg/640px-NYC_Top_of_the_Rock_Pano.jpg' alt='Astro'>"},geometry:{type:"Point",coordinates:[175.80322265625,-41.01306578700629]}},{type:"Feature",properties:{"marker-color":"#78f440","marker-size":"small","marker-symbol":"heart",title:"Boulcott School, Lower Hutt",description:"40 links in the chain <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/NYC_Top_of_the_Rock_Pano.jpg/640px-NYC_Top_of_the_Rock_Pano.jpg' alt='Astro'>"},geometry:{type:"Point",coordinates:[175.89111328125,-39.77476948529546]}},{type:"Feature",properties:{"marker-color":"#78f440","marker-size":"small","marker-symbol":"heart",title:"Boulcott School, Lower Hutt",description:"40 links in the chain <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/NYC_Top_of_the_Rock_Pano.jpg/640px-NYC_Top_of_the_Rock_Pano.jpg' alt='Astro'>"},geometry:{type:"Point",coordinates:[175.693359375,-38.46219172306828]}},{type:"Feature",properties:{"marker-color":"#78f440","marker-size":"small","marker-symbol":"heart",title:"Boulcott School, Lower Hutt",description:"40 links in the chain <img src='https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/NYC_Top_of_the_Rock_Pano.jpg/640px-NYC_Top_of_the_Rock_Pano.jpg' alt='Astro'>"},geometry:{type:"Point",coordinates:[175.23193359375,-37.247821201554274]}}]},e=L.mapbox.map("chain-of-positivity-map","ciiyan.p2l0jh16").setView([-41.03,168.157],5),t=[],r=(L.mapbox.featureLayer(o).addTo(e).eachLayer(function(o){t.push(o.getLatLng())}),{color:"#f9e52b"});L.polyline(t,r).addTo(e)}module.exports=renderMap;
},{}],4:[function(require,module,exports){
var coords=require("./scripts/coords.js"),renderMap=require("./scripts/renderMap.js");renderMap();
},{"./scripts/coords.js":2,"./scripts/renderMap.js":3}]},{},[4]);