From 43fe32cbfb530c932a67e46e9cc8a715836108d8 Mon Sep 17 00:00:00 2001 From: dpmcmlxxvi Date: Sat, 20 May 2017 18:13:52 -0400 Subject: [PATCH] release 0.4.2 --- dist/ol3-turf.css | 2 +- dist/ol3-turf.js | 2 +- dist/ol3-turf.min.js | 2 +- docs/web/css/ol3-turf.css | 2 +- docs/web/js/ol3-turf.js | 2 +- docs/web/js/ol3-turf.min.js | 2 +- package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/ol3-turf.css b/dist/ol3-turf.css index 659b9bd..150647b 100644 --- a/dist/ol3-turf.css +++ b/dist/ol3-turf.css @@ -1,4 +1,4 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ /*csslint known-properties:false */ .ol3-turf-toolbar diff --git a/dist/ol3-turf.js b/dist/ol3-turf.js index 756c9c7..4de8a1d 100644 --- a/dist/ol3-turf.js +++ b/dist/ol3-turf.js @@ -1,4 +1,4 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ /*globals document, ol, ol3turf, window */ diff --git a/dist/ol3-turf.min.js b/dist/ol3-turf.min.js index acb5e6e..4c0d563 100644 --- a/dist/ol3-turf.min.js +++ b/dist/ol3-turf.min.js @@ -1,3 +1,3 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ window.ol3turf=window.ol3turf||{},window.ol3turf.PREFIX="ol3-turf",window.ol3turf.PROJECTION_TURF="EPSG:4326",window.ol3turf.PROJECTION_OL3="EPSG:3857",ol.control.Turf=function(t){"use strict";var e=this,o=t||{};o.ol3turf=o.ol3turf||{},void 0===o.ol3turf.controls&&(o.ol3turf.controls=ol3turf.toolbars.all()),void 0===o.ol3turf.handler&&(o.ol3turf.handler=new ol3turf.Handler(e)),void 0===o.ol3turf.style&&(o.ol3turf.style="ol3-turf-toolbar"),void 0===o.ol3turf.prefix&&(o.ol3turf.prefix=ol3turf.PREFIX),void 0===o.element&&(o.element=document.createElement("div")),""===o.element.className&&(o.element.className=o.ol3turf.style+" ol-unselectable ol-control");var r={};o.ol3turf.controls.forEach(function(t){if(void 0!==ol3turf.controls[t]){var n=ol3turf.controls[t].create(e,o.ol3turf.prefix);r[t]=n,o.element.appendChild(n.element)}}),this.ol3turf={controls:r,element:o.element,handler:o.ol3turf.handler},ol.control.Control.call(this,o)},ol.inherits(ol.control.Turf,ol.control.Control),function(t){"use strict";t.utils=t.utils||{},t.utils.extend=function(e,o){void 0!==e&&void 0!==o&&Object.keys(e).forEach(function(r){var n=e[r];if(null!==n&&"object"==typeof n)return void 0===o[r]&&(o[r]={}),void t.utils.extend(n,o[r]);o[r]=n})},t.utils.getClass=function(e,o){return"."+t.utils.getName(e,o)},t.utils.getCollection=function(t,e,o){var r=t.getFeatures();if(r.features.lengtho)throw new Error("Number of features greater than "+o);return r},t.utils.getControlInput=function(t,e,o,r){return{title:o,type:"input",attributes:{name:t,onclick:e,type:"submit",value:r}}},t.utils.getControlNumber=function(t,e,o,r,n,i,l){return{title:e,type:"input",attributes:{id:t,name:t,min:i,max:l,step:n,title:o,type:"number",value:r}}},t.utils.getControlSelect=function(t,e,o){return{title:e,type:"select",attributes:{id:t,name:t},options:o}},t.utils.getControlText=function(t,e,o){return{title:e,type:"input",attributes:{id:t,name:t,title:o,type:"text"}}},t.utils.getElement=function(e,o,r){return e+"[name='"+t.utils.getName(o,r)+"']"},t.utils.getFeatures=function(t,e,o,r){var n=[];if(e.features.forEach(function(e){t.indexOf(e.geometry.type)>-1&&n.push(e)}),n.lengthr)throw new Error("Number of '"+t+"' features greater than "+r);return n},t.utils.getFormArray=function(e,o){var r=[];return t.utils.getFormString(e,o).split(",").forEach(function(t){var e=parseFloat(t);if(Number(e)!==e)throw new Error("Invalid "+o);r.push(e)}),r},t.utils.getFormInteger=function(t,e){var o=parseInt(document.getElementById(t).value,10);if(Number(o)!==o)throw new Error("Invalid "+e);return o},t.utils.getFormNumber=function(t,e){var o=parseFloat(document.getElementById(t).value);if(Number(o)!==o)throw new Error("Invalid "+e);return o},t.utils.getFormString=function(t,e){var o=document.getElementById(t).value;if(!o||!o.trim())throw new Error("Invalid "+e);return o},t.utils.getId=function(e,o){return"#"+t.utils.getName(e,o)},t.utils.getLines=function(e,o,r){return t.utils.getFeatures(["LineString"],e,o,r)},t.utils.getName=function(e,o){void 0===o&&(o=t.PREFIX);var r=o;return e.forEach(function(t){r+="-"+t}),r},t.utils.getOptionsGeometry=function(){return[{text:"Points",attributes:{selected:"selected",value:"points"}},{text:"Polygons",attributes:{value:"polygons"}}]},t.utils.getOptionsGrids=function(){return[{text:"Hexagons",attributes:{selected:"selected",value:"hexagons"}},{text:"Triangles",attributes:{value:"triangles"}}]},t.utils.getOptionsQuality=function(){return[{text:"High",attributes:{value:"high"}},{text:"Low",attributes:{selected:"selected",value:"low"}}]},t.utils.getOptionsUnits=function(){return[{text:"degrees",attributes:{value:"degrees"}},{text:"kilometers",attributes:{selected:"selected",value:"kilometers"}},{text:"miles",attributes:{value:"miles"}},{text:"radians",attributes:{value:"radians"}}]},t.utils.getPoints=function(e,o,r){return t.utils.getFeatures(["Point"],e,o,r)},t.utils.getPolygons=function(e,o,r){return t.utils.getFeatures(["Polygon"],e,o,r)},t.utils.getPolygonsAll=function(e,o,r){return t.utils.getFeatures(["Polygon","MultiPolygon"],e,o,r)}}(ol3turf||{}),function(t){"use strict";function e(t,e,o){var r=e.right-(t.left+t.width),n=t.left+r;r<0&&n>0&&(t.left+=r-o.width/2)}function o(t,e,o){var r=e.bottom-(t.top+t.height),n=t.top+r;r<0&&n>0&&(t.top+=r-o.height/2)}function r(t){var e=t.getBoundingClientRect(),o=0,r=0;do{r+=t.offsetTop||0,o+=t.offsetLeft||0,t=t.offsetParent}while(t);return{bottom:r+e.height,height:e.height,left:o,right:o+e.width,top:r,width:e.width}}function n(t,e,o,r){var n=0,i=o.left+o.width;return n=r.left-e.left>.5*e.width?-o.width-t.width+-r.width/2:r.width/2,i+=n}function i(t,e,o,r){var n=0,i=o.bottom;return n=r.top-e.top>.5*e.height?-o.height-t.height+-r.height/2:r.height/2,i+=n}function l(t,e,o,r){o.width>o.height?t.top=i(t,e,o,r):t.left=n(t,e,o,r)}t.controls=t.controls||{};var u=function(e){var o=e||{},r=this;this.button=document.createElement("button"),this.button.addEventListener("click",this.run.bind(this),!1),this.button.addEventListener("touchstart",this.run.bind(this),!1),Object.keys(o).forEach(function(t){r.button[t]=o[t]}),this.element=document.createElement("div"),this.element.className="ol3-turf-control",this.element.appendChild(this.button),this.toolbar=null,this.form=null,this.prefix=t.PREFIX};u.prototype.action=function(){throw new Error("Control action not implemented!")},u.prototype.addFeatures=function(t){var e=this.getProjectionMap(),o=this.getProjectionTurf(),r=new ol.format.GeoJSON,n=new ol.layer.Vector({source:new ol.source.Vector({features:r.readFeatures(t,{dataProjection:o,featureProjection:e})})});this.getMap().addLayer(n)},u.prototype.getFeatures=function(){var t=this.getProjectionMap(),e=this.getProjectionTurf(),o=new ol.format.GeoJSON,r=[];return this.getSelectors().forEach(function(n){n.getFeatures().forEach(function(n){r.push(o.writeFeatureObject(n,{dataProjection:e,featureProjection:t}))})}),turf.featureCollection(r)},u.prototype.getFormPosition=function(t){var n=r(this.button),i=r(t),u=r(this.getMap().getTargetElement()),s=r(this.toolbar.ol3turf.element);return i.top=n.top,i.left=n.left,l(i,u,s,n),e(i,u,n),o(i,u,n),i.top-=u.top,i.left-=u.left,{top:i.top,left:i.left}},u.prototype.getMap=function(){return null===this.toolbar?null:this.toolbar.getMap()},u.prototype.getProjectionMap=function(){var e=t.PROJECTION_OL3,o=this.getMap().getView().getProjection();return void 0!==o&&(e=o.getCode()),e},u.prototype.getProjectionTurf=function(){return t.PROJECTION_TURF},u.prototype.getSelectors=function(){var t=[],e=this.getMap();return null===e?t:(e.getInteractions().forEach(function(e){e instanceof ol.interaction.Select&&t.push(e)}),t)},u.prototype.run=function(){try{this.action()}catch(t){this.showMessage(t.message)}},u.prototype.showForm=function(e,o){var r=this.toolbar.element.parentNode;if(null!==this.form&&(r.removeChild(this.form),this.form=null),void 0!==e){var n={style:{visibility:"hidden"}};void 0===o&&(o="ol3-turf-form"),this.form=t.form(r,o,e,n);var i=this.getFormPosition(this.form);this.form.style.left=i.left+"px",this.form.style.top=i.top+"px",this.form.style.visibility="visible"}},u.prototype.showMessage=function(e){var o=this.toolbar.ol3turf.element.parentNode,r={style:{visibility:"hidden"}},n=t.popup(e,null,o,r),i=this.getFormPosition(n);n.style.left=i.left+"px",n.style.top=i.top+"px",n.style.visibility="visible"},u.create=function(e,o,r,n,i){var l={className:t.utils.getName([r])+" "+t.utils.getName(["control","button"]),id:t.utils.getName([r],o),title:n},u=new t.Control(l);return u.prefix=o,u.toolbar=e,u.action=function(){return i(u)},u},t.Control=u}(ol3turf||{}),function(t){"use strict";t.form=function(e,o,r,n){var i=null;if(null===(i="string"==typeof e?document.getElementById(e):e))throw new Error("ol3turf.form: Parent element not found.");if(void 0===o)throw new Error("ol3turf.form: Form ID not provided.");if(void 0===r)throw new Error("ol3turf.form: Form controls not provided.");var l=document.createElement("form");l.id=o,l.className="ol3-turf-form ol-unselectable ol-control",l.setAttribute("onsubmit","return false;"),t.utils.extend(n,l);var u=document.createElement("table");return u.className="ol3-turf-form-table",r.forEach(function(e){var o=document.createElement("tr");o.className="ol3-turf-form-row";var r=document.createElement("th");r.innerHTML=e.title,r.className="ol3-turf-form-header",o.appendChild(r);var n=document.createElement("td");n.className="ol3-turf-form-data";var i=document.createElement(e.type);i.className="ol3-turf-form-input",t.utils.extend(e.attributes,i),"select"===e.type&&(i.className="ol3-turf-form-select",void 0!==e.options&&e.options.forEach(function(e){var o=document.createElement("option");o.innerHTML=e.text,o.className="ol3-turf-form-option",t.utils.extend(e.attributes,o),i.appendChild(o)})),n.appendChild(i),o.appendChild(n),u.appendChild(o)}),l.appendChild(u),i.appendChild(l),l}}(ol3turf||{}),function(t){"use strict";var e=function(t){this.toolbar=t};e.prototype.callback=function(t,e,o){var r=this.toolbar.ol3turf.controls[t];if("area"===t)r.showMessage("area = "+e+" msq");else if("bearing"===t)r.showMessage("bearing = "+e+" degrees");else if("distance"===t)r.showMessage("distance = "+e+" "+o.units);else if("inside"===t){var n="Point is";!1===e&&(n+=" not"),n+=" inside polygon.",r.showMessage(n)}else"line-distance"===t?r.showMessage("length = "+e+" "+o.units):"planepoint"===t?r.showMessage("z = "+e):r.addFeatures(e)},t.Handler=e}(ol3turf||{}),function(t){"use strict";t.popup=function(e,o,r,n){function i(){void 0!==o&&null!==o&&o(),t.popup()}var l="ol3-turf-popup",u=document.getElementById(l),s=null;if(null!==u&&null!==(s=u.parentNode)&&s.removeChild(u),void 0!==e&&null!==e){var a=document.body;void 0!==r&&null!==r&&(a=r);var c=document.createElement("div");c.className=l,c.id=l,t.utils.extend(n,c);var f=document.createElement("div");f.className="ol3-turf-popup-message",f.innerHTML=e;var g=document.createElement("button");g.className="ol3-turf-popup-button",g.innerHTML="OK",g.onclick=i,g.type="button";var m=document.createElement("div");return m.className="ol3-turf-popup-button-container",m.appendChild(g),c.appendChild(f),c.appendChild(m),a.appendChild(c),c}}}(ol3turf||{}),function(t){"use strict";var e="along",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(l,"distance"),u=t.utils.getFormString(a,"units"),s=turf.along(n,i,u);o.showForm();var c={line:n,distance:i,units:u};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"distance"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Distance","Distance along the line","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find point along line at given distance",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.area(o),n={input:o};e.toolbar.ol3turf.handler.callback("area",r,n)};t.controls.area={create:function(o,r){return t.Control.create(o,r,"area","Measure Area",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPoints(o,2,2),n=r[0],i=r[1],l=turf.bearing(n,i),u={start:n,end:i};e.toolbar.ol3turf.handler.callback("bearing",l,u)};t.controls.bearing={create:function(o,r){return t.Control.create(o,r,"bearing","Measure Bearing",e)}}}(ol3turf||{}),function(t){"use strict";var e="bezier",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(s,"resolution"),l=t.utils.getFormNumber(a,"sharpness"),u=turf.bezier(n,i,l);o.showForm();var c={line:n,resolution:i,sharpness:l};o.toolbar.ol3turf.handler.callback(e,u,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"resolution"],o.prefix),a=t.utils.getName([e,"sharpness"],o.prefix),c=[t.utils.getControlNumber(s,"Resolution","Time between points (milliseconds)","10000","any","0"),t.utils.getControlNumber(a,"Sharpness","Measure of how curvy the path should be between splines","0.85","0.01","0","1"),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create bezier curve of line",o)}}}(ol3turf||{}),function(t){"use strict";var e="buffer",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"distance"),i=t.utils.getFormString(a,"units"),u=turf.buffer(r,n,i);o.showForm();var s={feature:r,distance:n,unit:i};o.toolbar.ol3turf.handler.callback(e,u,s)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"distance"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Distance","Distance to draw the buffer","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Buffer feature by given radius",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.center(o),n={features:o};e.toolbar.ol3turf.handler.callback("center",r,n)};t.controls.center={create:function(o,r){return t.Control.create(o,r,"center","Measure Center",e)}}}(ol3turf||{}),function(t){"use strict";var e="center-of-mass",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.centerOfMass(r),i={features:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure center of mass",o)}}}(ol3turf||{}),function(t){"use strict";var e="centroid",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.centroid(r),i={features:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Centroid",o)}}}(ol3turf||{}),function(t){"use strict";var e="circle",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getPoints(r,1,1)[0],i=t.utils.getFormNumber(s,"radius"),l=t.utils.getFormNumber(a,"steps"),u=t.utils.getFormString(c,"units"),f=turf.circle(n,i,l,u);o.showForm();var g={center:n,radius:i,steps:l,units:u};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"radius"],o.prefix),a=t.utils.getName([e,"steps"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(s,"Radius","Radius of the circle","0","any","0"),t.utils.getControlNumber(a,"Steps","Number of steps around circle","3","1","3"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create circle",o)}}}(ol3turf||{}),function(t){"use strict";var e="collect",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,1/0),n=t.utils.getPoints(r,1,r.features.length-1),i=r.features.length-n.length,l=t.utils.getPolygons(r,i,i),s=t.utils.getFormString(u,"In-Property"),c=t.utils.getFormString(a,"Out-Property"),f=turf.featureCollection(l),g=turf.featureCollection(n),m=turf.collect(f,g,s,c);o.showForm();var p={polygons:f,points:g,inProperty:s,outProperty:c};o.toolbar.ol3turf.handler.callback(e,m,p)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"in","property"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"out","property"],o.prefix),c=[t.utils.getControlText(u,"In Property","Property to be nested from"),t.utils.getControlText(a,"Out Property","Property to be nested into"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Collect points within polygons",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.combine(o),n={fc:o};e.toolbar.ol3turf.handler.callback("combine",r,n)};t.controls.combine={create:function(o,r){return t.Control.create(o,r,"combine","Combine feature collection",e)}}}(ol3turf||{}),function(t){"use strict";var e="concave",o=function(o){function r(){try{var r=t.utils.getCollection(o,3,1/0),n=r.features.length,i=t.utils.getPoints(r,n,n),l=t.utils.getFormNumber(u,"Max Edge"),s=t.utils.getFormString(a,"units"),c=turf.featureCollection(i),f=turf.concave(c,l,s);o.showForm();var g={points:c,maxEdge:l,units:s};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"max","edge"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(u,"Max Edge Size","Maximum size of an edge necessary for part of the hull to become concave","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Concave Hull",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.convex(o),n={featurecollection:o};e.toolbar.ol3turf.handler.callback("convex",r,n)};t.controls.convex={create:function(o,r){return t.Control.create(o,r,"convex","Create Convex Hull",e)}}}(ol3turf||{}),function(t){"use strict";var e="destination",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getPoints(r,1,1)[0],l=t.utils.getFormNumber(u,"distance"),s=t.utils.getFormNumber(i,"bearing"),a=t.utils.getFormString(c,"units"),f=turf.destination(n,l,s,a);o.showForm();var g={from:n,distance:l,bearing:s,units:a};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"bearing"],o.prefix),l=t.utils.getName([e,"cancel"],o.prefix),u=t.utils.getName([e,"distance"],o.prefix),s=t.utils.getName([e,"form"],o.prefix),a=t.utils.getName([e,"ok"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(i,"Bearing","Bearing angle (degrees)","0","any","-180","180"),t.utils.getControlNumber(u,"Distance","Distance from the starting point","0","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(a,r,"","OK"),t.utils.getControlInput(l,n,"","Cancel")];o.showForm(f,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find destination point from given point",o)}}}(ol3turf||{}),function(t){"use strict";var e="difference",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPolygons(r,2,2),i=n[0],l=n[1],u=turf.difference(i,l),s={poly1:i,poly2:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Difference Polygon",o)}}}(ol3turf||{}),function(t){"use strict";var e="distance",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,2,2),i=n[0],l=n[1],u=t.utils.getFormString(s,"units"),a=turf.distance(i,l,u);o.showForm();var c={from:i,to:l,units:u};o.toolbar.ol3turf.handler.callback(e,a,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"units"],o.prefix),a=[t.utils.getControlSelect(s,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find distance between points",o)}}}(ol3turf||{}),function(t){"use strict";var e="envelope",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.envelope(r),i={fc:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Envelope",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.explode(o),n={geojson:o};e.toolbar.ol3turf.handler.callback("explode",r,n)};t.controls.explode={create:function(o,r){return t.Control.create(o,r,"explode","Explode feature collection",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.flip(o),n={input:o};e.toolbar.ol3turf.handler.callback("flip",r,n)};t.controls.flip={create:function(o,r){return t.Control.create(o,r,"flip","Flip features coordinates",e)}}}(ol3turf||{}),function(t){"use strict";var e="hex-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(s,"grid type"),u=t.utils.getFormString(c,"units"),a="triangles"===i,f=turf.bbox(r),g=turf.hexGrid(f,n,u,a);o.showForm();var m={bbox:f,cellSize:n,units:u,triangles:a};o.toolbar.ol3turf.handler.callback(e,g,m)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"type"],o.prefix),a=t.utils.getName([e,"ok"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlSelect(s,"Type",t.utils.getOptionsGrids()),t.utils.getControlInput(a,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Hex Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPoints(o,1,1),n=t.utils.getPolygonsAll(o,1,1),i=r[0],l=n[0],u=turf.inside(i,l),s={point:i,polygon:l};e.toolbar.ol3turf.handler.callback("inside",u,s)};t.controls.inside={create:function(o,r){return t.Control.create(o,r,"inside","Point inside polygon?",e)}}}(ol3turf||{}),function(t){"use strict";var e="intersect",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPolygonsAll(r,2,2),i=n[0],l=n[1],u=turf.intersect(i,l),s={poly1:i,poly2:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Intersection Polygon",o)}}}(ol3turf||{}),function(t){"use strict";var e="isolines",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormArray(i,"breaks"),l=t.utils.getFormNumber(a,"resolution"),u=t.utils.getFormString(c,"z"),s=turf.isolines(r,u,l,n);o.showForm();var f={points:r,z:u,resolution:l,breaks:n};o.toolbar.ol3turf.handler.callback(e,s,f)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"breaks"],o.prefix),l=t.utils.getName([e,"cancel"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"resolution"],o.prefix),c=t.utils.getName([e,"z"],o.prefix),f=[t.utils.getControlNumber(a,"Resolution","Resolution of the underlying grid","1","any","0.01"),t.utils.getControlText(c,"Z Property","Property name in points from which z-values will be pulled"),t.utils.getControlText(i,"Breaks","Comma separated list of where to draw contours"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(l,n,"","Cancel")];o.showForm(f,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create isolines",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1),r=t.utils.getPolygons(o,1,1)[0],n=turf.kinks(r);if(0===n.features.length)throw new Error("No kinks found.");var i={polygon:r};e.toolbar.ol3turf.handler.callback("kinks",n,i)};t.controls.kinks={create:function(o,r){return t.Control.create(o,r,"kinks","Create polygon self-intersections",e)}}}(ol3turf||{}),function(t){"use strict";var e="line-distance",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormString(s,"units"),i=turf.lineDistance(r,n);o.showForm();var l={line:r,units:n};o.toolbar.ol3turf.handler.callback(e,i,l)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"units"],o.prefix),a=[t.utils.getControlSelect(s,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Length",o)}}}(ol3turf||{}),function(t){"use strict";var e="line-slice-along",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(s,"start"),l=t.utils.getFormNumber(a,"stop");if(!0!==if)throw new Error("Start must be less than line length");if(l>f)throw new Error("Stop must be less than line length");var g=turf.lineSliceAlong(n,i,l,u);o.showForm();var m={line:n,start:i,stop:l,units:u};o.toolbar.ol3turf.handler.callback(e,g,m)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"start"],o.prefix),a=t.utils.getName([e,"stop"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(s,"Start","Starting distance along the line","0","any","0"),t.utils.getControlNumber(a,"Stop","Stoping distance along the line","0","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create line slice",o)}}}(ol3turf||{}),function(t){"use strict";var e="midpoint",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,2,2),i=n[0],l=n[1],u=turf.midpoint(i,l),s={from:i,to:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Midpoint",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,1/0),r=o.features.length,n=t.utils.getPoints(o,r,r),i=n[0],l=turf.featureCollection(n.slice(1)),u=turf.nearest(i,l),s={targetPoint:i,points:l};e.toolbar.ol3turf.handler.callback("nearest",u,s)};t.controls.nearest={create:function(o,r){return t.Control.create(o,r,"nearest","Find set point nearest to first point",e)}}}(ol3turf||{}),function(t){"use strict";var e="planepoint",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,1,1),i=t.utils.getPolygons(r,1,1),l=n[0],u=i[0],s=turf.planepoint(l,u),a={point:l,triangle:u};o.toolbar.ol3turf.handler.callback(e,s,a)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Triangulate a point in a plane",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.pointGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Point Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-on-line",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,1,1),i=t.utils.getLines(r,1,1)[0],l=n[0],u=turf.pointOnLine(i,l),s={line:i,point:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Project point on line",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-on-surface",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.pointOnSurface(r),i={fc:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Point on Surface",o)}}}(ol3turf||{}),function(t){"use strict";var e="random",o=function(o){function r(){try{var r=null,n=t.utils.getCollection(o,0,1/0);0!==n.features.length&&(r=turf.bbox(n));var i=t.utils.getFormInteger(l,"count"),u=t.utils.getFormInteger(s,"maximum radial length"),c=t.utils.getFormInteger(a,"number of vertices"),g=t.utils.getFormString(f,"type"),m={max_radial_length:u,num_vertices:c};null!==r&&(m.bbox=r);var p=turf.random(g,i,m);o.showForm();var h={type:g,count:i,options:m};o.toolbar.ol3turf.handler.callback(e,p,h)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"count"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"max-radial-length"],o.prefix),a=t.utils.getName([e,"num-vertices"],o.prefix),c=t.utils.getName([e,"ok"],o.prefix),f=t.utils.getName([e,"type"],o.prefix),g=[t.utils.getControlSelect(f,"Type",t.utils.getOptionsGeometry()),t.utils.getControlNumber(l,"Count","How many geometries should be generated","1","1","1"),t.utils.getControlNumber(a,"# Vertices","Used only for polygon type","10","1","3"),t.utils.getControlNumber(s,"Max Length","Maximum degrees a polygon can extent outwards from its center (degrees)","10","0.01","0","180"),t.utils.getControlInput(c,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(g,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create random data",o)}}}(ol3turf||{}),function(t){"use strict";var e="sample",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormInteger(l,"count");if(n>r.features.length)throw new Error("Feature count must be greater than sampling count.");var i=turf.sample(r,n);o.showForm();var u={featurecollection:r,num:n};o.toolbar.ol3turf.handler.callback(e,i,u)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"count"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=[t.utils.getControlNumber(l,"Count","Number of random features to sample","1","1","1"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Randomly sample features",o)}}}(ol3turf||{}),function(t){"use strict";var e="simplify",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(a,"tolerance"),i="high"===t.utils.getFormString(s,"quality"),l=turf.simplify(r,n,i);o.showForm();var u={feature:r,tolerance:n,highQuality:i};o.toolbar.ol3turf.handler.callback(e,l,u)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"quality"],o.prefix),a=t.utils.getName([e,"tolerance"],o.prefix),c=[t.utils.getControlNumber(a,"Tolerance","Simplification tolerance","1","0.01","0"),t.utils.getControlSelect(s,"Quality",t.utils.getOptionsQuality()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Simplify shape",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.bbox(o),n=turf.square(r),i=turf.bboxPolygon(n),l={bbox:r};e.toolbar.ol3turf.handler.callback("square",i,l)};t.controls.square={create:function(o,r){return t.Control.create(o,r,"square","Create Square",e)}}}(ol3turf||{}),function(t){"use strict";var e="square-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.squareGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Square Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e="tag",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,1/0),n=t.utils.getPoints(r,1,r.features.length-1),i=r.features.length-n.length,u=t.utils.getPolygons(r,i,i),s=t.utils.getFormString(l,"field"),c=t.utils.getFormString(a,"out field"),f=turf.featureCollection(u),g=turf.featureCollection(n),m=turf.tag(g,f,s,c);o.showForm();var p={points:g,polygons:f,field:s,outField:c};o.toolbar.ol3turf.handler.callback(e,m,p)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"field-property"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"out-field-property"],o.prefix),c=[t.utils.getControlText(l,"Field","Property in polygons to add to joined point features"),t.utils.getControlText(a,"Out Field","Property in points in which to store joined property from polygons"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Perform spatial join of points and polygons",o)}}}(ol3turf||{}),function(t){"use strict";var e="tin",o=function(o){function r(){try{var r=t.utils.getCollection(o,3,1/0),n=r.features.length,i=t.utils.getPoints(r,n,n);r=turf.featureCollection(i);var l=t.utils.getFormString(s,"z"),u=turf.tin(r,l),a={points:r,z:l};o.toolbar.ol3turf.handler.callback(e,u,a)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"z"],o.prefix),a=[t.utils.getControlText(s,"Z","(Optional) Property from which to pull z values"),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create TIN",o)}}}(ol3turf||{}),function(t){"use strict";var e="tesselate",o=function(o){var r=t.utils.getCollection(o,1,1),n=t.utils.getPolygons(r,1,1)[0],i=turf.tesselate(n),l={polygon:n};o.toolbar.ol3turf.handler.callback(e,i,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create tesselation",o)}}}(ol3turf||{}),function(t){"use strict";t.toolbars=t.toolbars||{},t.toolbars.aggregation=function(){return["collect"]},t.toolbars.classification=function(){return["nearest"]},t.toolbars.data=function(){return["random","sample"]},t.toolbars.grids=function(){return["hex-grid","point-grid","square-grid","triangle-grid","tesselate"]},t.toolbars.interpolation=function(){return["isolines","planepoint","tin"]},t.toolbars.joins=function(){return["inside","tag","within"]},t.toolbars.measurement=function(){return["distance","line-distance","area","bearing","center-of-mass","center","centroid","midpoint","point-on-surface","envelope","square","circle","along","destination"]},t.toolbars.misc=function(){return["combine","explode","flip","kinks","line-slice-along","point-on-line"]},t.toolbars.transformation=function(){return["bezier","buffer","concave","convex","difference","intersect","simplify","union"]},t.toolbars.all=function(){var e=[];return e.push.apply(e,t.toolbars.measurement()),e.push.apply(e,t.toolbars.transformation()),e.push.apply(e,t.toolbars.misc()),e.push.apply(e,t.toolbars.joins()),e.push.apply(e,t.toolbars.classification()),e.push.apply(e,t.toolbars.aggregation()),e.push.apply(e,t.toolbars.data()),e.push.apply(e,t.toolbars.interpolation()),e.push.apply(e,t.toolbars.grids()),e}}(ol3turf||{}),function(t){"use strict";var e="triangle-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.triangleGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Triangle Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPolygons(o,2,2),n=r[0],i=r[1],l=turf.union(n,i),u={poly1:n,poly2:i};e.toolbar.ol3turf.handler.callback("union",l,u)};t.controls.union={create:function(o,r){return t.Control.create(o,r,"union","Create Union Polygon",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,1/0),r=t.utils.getPoints(o,1,o.features.length-1),n=o.features.length-r.length,i=t.utils.getPolygons(o,n,n),l=turf.featureCollection(r),u=turf.featureCollection(i),s=turf.within(l,u);if(0===s.features.length)throw new Error("No points found within.");var a={points:l,polygons:u};e.toolbar.ol3turf.handler.callback("within",s,a)};t.controls.within={create:function(o,r){return t.Control.create(o,r,"within","Find points within polygons",e)}}}(ol3turf||{}); \ No newline at end of file diff --git a/docs/web/css/ol3-turf.css b/docs/web/css/ol3-turf.css index 659b9bd..150647b 100644 --- a/docs/web/css/ol3-turf.css +++ b/docs/web/css/ol3-turf.css @@ -1,4 +1,4 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ /*csslint known-properties:false */ .ol3-turf-toolbar diff --git a/docs/web/js/ol3-turf.js b/docs/web/js/ol3-turf.js index 756c9c7..4de8a1d 100644 --- a/docs/web/js/ol3-turf.js +++ b/docs/web/js/ol3-turf.js @@ -1,4 +1,4 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ /*globals document, ol, ol3turf, window */ diff --git a/docs/web/js/ol3-turf.min.js b/docs/web/js/ol3-turf.min.js index acb5e6e..4c0d563 100644 --- a/docs/web/js/ol3-turf.min.js +++ b/docs/web/js/ol3-turf.min.js @@ -1,3 +1,3 @@ -/* ol3-turf 0.4.1 (c) Daniel Pulido */ +/* ol3-turf 0.4.2 (c) Daniel Pulido */ window.ol3turf=window.ol3turf||{},window.ol3turf.PREFIX="ol3-turf",window.ol3turf.PROJECTION_TURF="EPSG:4326",window.ol3turf.PROJECTION_OL3="EPSG:3857",ol.control.Turf=function(t){"use strict";var e=this,o=t||{};o.ol3turf=o.ol3turf||{},void 0===o.ol3turf.controls&&(o.ol3turf.controls=ol3turf.toolbars.all()),void 0===o.ol3turf.handler&&(o.ol3turf.handler=new ol3turf.Handler(e)),void 0===o.ol3turf.style&&(o.ol3turf.style="ol3-turf-toolbar"),void 0===o.ol3turf.prefix&&(o.ol3turf.prefix=ol3turf.PREFIX),void 0===o.element&&(o.element=document.createElement("div")),""===o.element.className&&(o.element.className=o.ol3turf.style+" ol-unselectable ol-control");var r={};o.ol3turf.controls.forEach(function(t){if(void 0!==ol3turf.controls[t]){var n=ol3turf.controls[t].create(e,o.ol3turf.prefix);r[t]=n,o.element.appendChild(n.element)}}),this.ol3turf={controls:r,element:o.element,handler:o.ol3turf.handler},ol.control.Control.call(this,o)},ol.inherits(ol.control.Turf,ol.control.Control),function(t){"use strict";t.utils=t.utils||{},t.utils.extend=function(e,o){void 0!==e&&void 0!==o&&Object.keys(e).forEach(function(r){var n=e[r];if(null!==n&&"object"==typeof n)return void 0===o[r]&&(o[r]={}),void t.utils.extend(n,o[r]);o[r]=n})},t.utils.getClass=function(e,o){return"."+t.utils.getName(e,o)},t.utils.getCollection=function(t,e,o){var r=t.getFeatures();if(r.features.lengtho)throw new Error("Number of features greater than "+o);return r},t.utils.getControlInput=function(t,e,o,r){return{title:o,type:"input",attributes:{name:t,onclick:e,type:"submit",value:r}}},t.utils.getControlNumber=function(t,e,o,r,n,i,l){return{title:e,type:"input",attributes:{id:t,name:t,min:i,max:l,step:n,title:o,type:"number",value:r}}},t.utils.getControlSelect=function(t,e,o){return{title:e,type:"select",attributes:{id:t,name:t},options:o}},t.utils.getControlText=function(t,e,o){return{title:e,type:"input",attributes:{id:t,name:t,title:o,type:"text"}}},t.utils.getElement=function(e,o,r){return e+"[name='"+t.utils.getName(o,r)+"']"},t.utils.getFeatures=function(t,e,o,r){var n=[];if(e.features.forEach(function(e){t.indexOf(e.geometry.type)>-1&&n.push(e)}),n.lengthr)throw new Error("Number of '"+t+"' features greater than "+r);return n},t.utils.getFormArray=function(e,o){var r=[];return t.utils.getFormString(e,o).split(",").forEach(function(t){var e=parseFloat(t);if(Number(e)!==e)throw new Error("Invalid "+o);r.push(e)}),r},t.utils.getFormInteger=function(t,e){var o=parseInt(document.getElementById(t).value,10);if(Number(o)!==o)throw new Error("Invalid "+e);return o},t.utils.getFormNumber=function(t,e){var o=parseFloat(document.getElementById(t).value);if(Number(o)!==o)throw new Error("Invalid "+e);return o},t.utils.getFormString=function(t,e){var o=document.getElementById(t).value;if(!o||!o.trim())throw new Error("Invalid "+e);return o},t.utils.getId=function(e,o){return"#"+t.utils.getName(e,o)},t.utils.getLines=function(e,o,r){return t.utils.getFeatures(["LineString"],e,o,r)},t.utils.getName=function(e,o){void 0===o&&(o=t.PREFIX);var r=o;return e.forEach(function(t){r+="-"+t}),r},t.utils.getOptionsGeometry=function(){return[{text:"Points",attributes:{selected:"selected",value:"points"}},{text:"Polygons",attributes:{value:"polygons"}}]},t.utils.getOptionsGrids=function(){return[{text:"Hexagons",attributes:{selected:"selected",value:"hexagons"}},{text:"Triangles",attributes:{value:"triangles"}}]},t.utils.getOptionsQuality=function(){return[{text:"High",attributes:{value:"high"}},{text:"Low",attributes:{selected:"selected",value:"low"}}]},t.utils.getOptionsUnits=function(){return[{text:"degrees",attributes:{value:"degrees"}},{text:"kilometers",attributes:{selected:"selected",value:"kilometers"}},{text:"miles",attributes:{value:"miles"}},{text:"radians",attributes:{value:"radians"}}]},t.utils.getPoints=function(e,o,r){return t.utils.getFeatures(["Point"],e,o,r)},t.utils.getPolygons=function(e,o,r){return t.utils.getFeatures(["Polygon"],e,o,r)},t.utils.getPolygonsAll=function(e,o,r){return t.utils.getFeatures(["Polygon","MultiPolygon"],e,o,r)}}(ol3turf||{}),function(t){"use strict";function e(t,e,o){var r=e.right-(t.left+t.width),n=t.left+r;r<0&&n>0&&(t.left+=r-o.width/2)}function o(t,e,o){var r=e.bottom-(t.top+t.height),n=t.top+r;r<0&&n>0&&(t.top+=r-o.height/2)}function r(t){var e=t.getBoundingClientRect(),o=0,r=0;do{r+=t.offsetTop||0,o+=t.offsetLeft||0,t=t.offsetParent}while(t);return{bottom:r+e.height,height:e.height,left:o,right:o+e.width,top:r,width:e.width}}function n(t,e,o,r){var n=0,i=o.left+o.width;return n=r.left-e.left>.5*e.width?-o.width-t.width+-r.width/2:r.width/2,i+=n}function i(t,e,o,r){var n=0,i=o.bottom;return n=r.top-e.top>.5*e.height?-o.height-t.height+-r.height/2:r.height/2,i+=n}function l(t,e,o,r){o.width>o.height?t.top=i(t,e,o,r):t.left=n(t,e,o,r)}t.controls=t.controls||{};var u=function(e){var o=e||{},r=this;this.button=document.createElement("button"),this.button.addEventListener("click",this.run.bind(this),!1),this.button.addEventListener("touchstart",this.run.bind(this),!1),Object.keys(o).forEach(function(t){r.button[t]=o[t]}),this.element=document.createElement("div"),this.element.className="ol3-turf-control",this.element.appendChild(this.button),this.toolbar=null,this.form=null,this.prefix=t.PREFIX};u.prototype.action=function(){throw new Error("Control action not implemented!")},u.prototype.addFeatures=function(t){var e=this.getProjectionMap(),o=this.getProjectionTurf(),r=new ol.format.GeoJSON,n=new ol.layer.Vector({source:new ol.source.Vector({features:r.readFeatures(t,{dataProjection:o,featureProjection:e})})});this.getMap().addLayer(n)},u.prototype.getFeatures=function(){var t=this.getProjectionMap(),e=this.getProjectionTurf(),o=new ol.format.GeoJSON,r=[];return this.getSelectors().forEach(function(n){n.getFeatures().forEach(function(n){r.push(o.writeFeatureObject(n,{dataProjection:e,featureProjection:t}))})}),turf.featureCollection(r)},u.prototype.getFormPosition=function(t){var n=r(this.button),i=r(t),u=r(this.getMap().getTargetElement()),s=r(this.toolbar.ol3turf.element);return i.top=n.top,i.left=n.left,l(i,u,s,n),e(i,u,n),o(i,u,n),i.top-=u.top,i.left-=u.left,{top:i.top,left:i.left}},u.prototype.getMap=function(){return null===this.toolbar?null:this.toolbar.getMap()},u.prototype.getProjectionMap=function(){var e=t.PROJECTION_OL3,o=this.getMap().getView().getProjection();return void 0!==o&&(e=o.getCode()),e},u.prototype.getProjectionTurf=function(){return t.PROJECTION_TURF},u.prototype.getSelectors=function(){var t=[],e=this.getMap();return null===e?t:(e.getInteractions().forEach(function(e){e instanceof ol.interaction.Select&&t.push(e)}),t)},u.prototype.run=function(){try{this.action()}catch(t){this.showMessage(t.message)}},u.prototype.showForm=function(e,o){var r=this.toolbar.element.parentNode;if(null!==this.form&&(r.removeChild(this.form),this.form=null),void 0!==e){var n={style:{visibility:"hidden"}};void 0===o&&(o="ol3-turf-form"),this.form=t.form(r,o,e,n);var i=this.getFormPosition(this.form);this.form.style.left=i.left+"px",this.form.style.top=i.top+"px",this.form.style.visibility="visible"}},u.prototype.showMessage=function(e){var o=this.toolbar.ol3turf.element.parentNode,r={style:{visibility:"hidden"}},n=t.popup(e,null,o,r),i=this.getFormPosition(n);n.style.left=i.left+"px",n.style.top=i.top+"px",n.style.visibility="visible"},u.create=function(e,o,r,n,i){var l={className:t.utils.getName([r])+" "+t.utils.getName(["control","button"]),id:t.utils.getName([r],o),title:n},u=new t.Control(l);return u.prefix=o,u.toolbar=e,u.action=function(){return i(u)},u},t.Control=u}(ol3turf||{}),function(t){"use strict";t.form=function(e,o,r,n){var i=null;if(null===(i="string"==typeof e?document.getElementById(e):e))throw new Error("ol3turf.form: Parent element not found.");if(void 0===o)throw new Error("ol3turf.form: Form ID not provided.");if(void 0===r)throw new Error("ol3turf.form: Form controls not provided.");var l=document.createElement("form");l.id=o,l.className="ol3-turf-form ol-unselectable ol-control",l.setAttribute("onsubmit","return false;"),t.utils.extend(n,l);var u=document.createElement("table");return u.className="ol3-turf-form-table",r.forEach(function(e){var o=document.createElement("tr");o.className="ol3-turf-form-row";var r=document.createElement("th");r.innerHTML=e.title,r.className="ol3-turf-form-header",o.appendChild(r);var n=document.createElement("td");n.className="ol3-turf-form-data";var i=document.createElement(e.type);i.className="ol3-turf-form-input",t.utils.extend(e.attributes,i),"select"===e.type&&(i.className="ol3-turf-form-select",void 0!==e.options&&e.options.forEach(function(e){var o=document.createElement("option");o.innerHTML=e.text,o.className="ol3-turf-form-option",t.utils.extend(e.attributes,o),i.appendChild(o)})),n.appendChild(i),o.appendChild(n),u.appendChild(o)}),l.appendChild(u),i.appendChild(l),l}}(ol3turf||{}),function(t){"use strict";var e=function(t){this.toolbar=t};e.prototype.callback=function(t,e,o){var r=this.toolbar.ol3turf.controls[t];if("area"===t)r.showMessage("area = "+e+" msq");else if("bearing"===t)r.showMessage("bearing = "+e+" degrees");else if("distance"===t)r.showMessage("distance = "+e+" "+o.units);else if("inside"===t){var n="Point is";!1===e&&(n+=" not"),n+=" inside polygon.",r.showMessage(n)}else"line-distance"===t?r.showMessage("length = "+e+" "+o.units):"planepoint"===t?r.showMessage("z = "+e):r.addFeatures(e)},t.Handler=e}(ol3turf||{}),function(t){"use strict";t.popup=function(e,o,r,n){function i(){void 0!==o&&null!==o&&o(),t.popup()}var l="ol3-turf-popup",u=document.getElementById(l),s=null;if(null!==u&&null!==(s=u.parentNode)&&s.removeChild(u),void 0!==e&&null!==e){var a=document.body;void 0!==r&&null!==r&&(a=r);var c=document.createElement("div");c.className=l,c.id=l,t.utils.extend(n,c);var f=document.createElement("div");f.className="ol3-turf-popup-message",f.innerHTML=e;var g=document.createElement("button");g.className="ol3-turf-popup-button",g.innerHTML="OK",g.onclick=i,g.type="button";var m=document.createElement("div");return m.className="ol3-turf-popup-button-container",m.appendChild(g),c.appendChild(f),c.appendChild(m),a.appendChild(c),c}}}(ol3turf||{}),function(t){"use strict";var e="along",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(l,"distance"),u=t.utils.getFormString(a,"units"),s=turf.along(n,i,u);o.showForm();var c={line:n,distance:i,units:u};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"distance"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Distance","Distance along the line","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find point along line at given distance",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.area(o),n={input:o};e.toolbar.ol3turf.handler.callback("area",r,n)};t.controls.area={create:function(o,r){return t.Control.create(o,r,"area","Measure Area",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPoints(o,2,2),n=r[0],i=r[1],l=turf.bearing(n,i),u={start:n,end:i};e.toolbar.ol3turf.handler.callback("bearing",l,u)};t.controls.bearing={create:function(o,r){return t.Control.create(o,r,"bearing","Measure Bearing",e)}}}(ol3turf||{}),function(t){"use strict";var e="bezier",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(s,"resolution"),l=t.utils.getFormNumber(a,"sharpness"),u=turf.bezier(n,i,l);o.showForm();var c={line:n,resolution:i,sharpness:l};o.toolbar.ol3turf.handler.callback(e,u,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"resolution"],o.prefix),a=t.utils.getName([e,"sharpness"],o.prefix),c=[t.utils.getControlNumber(s,"Resolution","Time between points (milliseconds)","10000","any","0"),t.utils.getControlNumber(a,"Sharpness","Measure of how curvy the path should be between splines","0.85","0.01","0","1"),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create bezier curve of line",o)}}}(ol3turf||{}),function(t){"use strict";var e="buffer",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"distance"),i=t.utils.getFormString(a,"units"),u=turf.buffer(r,n,i);o.showForm();var s={feature:r,distance:n,unit:i};o.toolbar.ol3turf.handler.callback(e,u,s)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"distance"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Distance","Distance to draw the buffer","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Buffer feature by given radius",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.center(o),n={features:o};e.toolbar.ol3turf.handler.callback("center",r,n)};t.controls.center={create:function(o,r){return t.Control.create(o,r,"center","Measure Center",e)}}}(ol3turf||{}),function(t){"use strict";var e="center-of-mass",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.centerOfMass(r),i={features:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure center of mass",o)}}}(ol3turf||{}),function(t){"use strict";var e="centroid",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.centroid(r),i={features:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Centroid",o)}}}(ol3turf||{}),function(t){"use strict";var e="circle",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getPoints(r,1,1)[0],i=t.utils.getFormNumber(s,"radius"),l=t.utils.getFormNumber(a,"steps"),u=t.utils.getFormString(c,"units"),f=turf.circle(n,i,l,u);o.showForm();var g={center:n,radius:i,steps:l,units:u};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"radius"],o.prefix),a=t.utils.getName([e,"steps"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(s,"Radius","Radius of the circle","0","any","0"),t.utils.getControlNumber(a,"Steps","Number of steps around circle","3","1","3"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create circle",o)}}}(ol3turf||{}),function(t){"use strict";var e="collect",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,1/0),n=t.utils.getPoints(r,1,r.features.length-1),i=r.features.length-n.length,l=t.utils.getPolygons(r,i,i),s=t.utils.getFormString(u,"In-Property"),c=t.utils.getFormString(a,"Out-Property"),f=turf.featureCollection(l),g=turf.featureCollection(n),m=turf.collect(f,g,s,c);o.showForm();var p={polygons:f,points:g,inProperty:s,outProperty:c};o.toolbar.ol3turf.handler.callback(e,m,p)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"in","property"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"out","property"],o.prefix),c=[t.utils.getControlText(u,"In Property","Property to be nested from"),t.utils.getControlText(a,"Out Property","Property to be nested into"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Collect points within polygons",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.combine(o),n={fc:o};e.toolbar.ol3turf.handler.callback("combine",r,n)};t.controls.combine={create:function(o,r){return t.Control.create(o,r,"combine","Combine feature collection",e)}}}(ol3turf||{}),function(t){"use strict";var e="concave",o=function(o){function r(){try{var r=t.utils.getCollection(o,3,1/0),n=r.features.length,i=t.utils.getPoints(r,n,n),l=t.utils.getFormNumber(u,"Max Edge"),s=t.utils.getFormString(a,"units"),c=turf.featureCollection(i),f=turf.concave(c,l,s);o.showForm();var g={points:c,maxEdge:l,units:s};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"max","edge"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(u,"Max Edge Size","Maximum size of an edge necessary for part of the hull to become concave","0","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Concave Hull",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.convex(o),n={featurecollection:o};e.toolbar.ol3turf.handler.callback("convex",r,n)};t.controls.convex={create:function(o,r){return t.Control.create(o,r,"convex","Create Convex Hull",e)}}}(ol3turf||{}),function(t){"use strict";var e="destination",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getPoints(r,1,1)[0],l=t.utils.getFormNumber(u,"distance"),s=t.utils.getFormNumber(i,"bearing"),a=t.utils.getFormString(c,"units"),f=turf.destination(n,l,s,a);o.showForm();var g={from:n,distance:l,bearing:s,units:a};o.toolbar.ol3turf.handler.callback(e,f,g)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"bearing"],o.prefix),l=t.utils.getName([e,"cancel"],o.prefix),u=t.utils.getName([e,"distance"],o.prefix),s=t.utils.getName([e,"form"],o.prefix),a=t.utils.getName([e,"ok"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(i,"Bearing","Bearing angle (degrees)","0","any","-180","180"),t.utils.getControlNumber(u,"Distance","Distance from the starting point","0","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(a,r,"","OK"),t.utils.getControlInput(l,n,"","Cancel")];o.showForm(f,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find destination point from given point",o)}}}(ol3turf||{}),function(t){"use strict";var e="difference",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPolygons(r,2,2),i=n[0],l=n[1],u=turf.difference(i,l),s={poly1:i,poly2:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Difference Polygon",o)}}}(ol3turf||{}),function(t){"use strict";var e="distance",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,2,2),i=n[0],l=n[1],u=t.utils.getFormString(s,"units"),a=turf.distance(i,l,u);o.showForm();var c={from:i,to:l,units:u};o.toolbar.ol3turf.handler.callback(e,a,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"units"],o.prefix),a=[t.utils.getControlSelect(s,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Find distance between points",o)}}}(ol3turf||{}),function(t){"use strict";var e="envelope",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.envelope(r),i={fc:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Envelope",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.explode(o),n={geojson:o};e.toolbar.ol3turf.handler.callback("explode",r,n)};t.controls.explode={create:function(o,r){return t.Control.create(o,r,"explode","Explode feature collection",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.flip(o),n={input:o};e.toolbar.ol3turf.handler.callback("flip",r,n)};t.controls.flip={create:function(o,r){return t.Control.create(o,r,"flip","Flip features coordinates",e)}}}(ol3turf||{}),function(t){"use strict";var e="hex-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(s,"grid type"),u=t.utils.getFormString(c,"units"),a="triangles"===i,f=turf.bbox(r),g=turf.hexGrid(f,n,u,a);o.showForm();var m={bbox:f,cellSize:n,units:u,triangles:a};o.toolbar.ol3turf.handler.callback(e,g,m)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"type"],o.prefix),a=t.utils.getName([e,"ok"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlSelect(s,"Type",t.utils.getOptionsGrids()),t.utils.getControlInput(a,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Hex Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPoints(o,1,1),n=t.utils.getPolygonsAll(o,1,1),i=r[0],l=n[0],u=turf.inside(i,l),s={point:i,polygon:l};e.toolbar.ol3turf.handler.callback("inside",u,s)};t.controls.inside={create:function(o,r){return t.Control.create(o,r,"inside","Point inside polygon?",e)}}}(ol3turf||{}),function(t){"use strict";var e="intersect",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPolygonsAll(r,2,2),i=n[0],l=n[1],u=turf.intersect(i,l),s={poly1:i,poly2:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create Intersection Polygon",o)}}}(ol3turf||{}),function(t){"use strict";var e="isolines",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormArray(i,"breaks"),l=t.utils.getFormNumber(a,"resolution"),u=t.utils.getFormString(c,"z"),s=turf.isolines(r,u,l,n);o.showForm();var f={points:r,z:u,resolution:l,breaks:n};o.toolbar.ol3turf.handler.callback(e,s,f)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"breaks"],o.prefix),l=t.utils.getName([e,"cancel"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"resolution"],o.prefix),c=t.utils.getName([e,"z"],o.prefix),f=[t.utils.getControlNumber(a,"Resolution","Resolution of the underlying grid","1","any","0.01"),t.utils.getControlText(c,"Z Property","Property name in points from which z-values will be pulled"),t.utils.getControlText(i,"Breaks","Comma separated list of where to draw contours"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(l,n,"","Cancel")];o.showForm(f,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create isolines",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1),r=t.utils.getPolygons(o,1,1)[0],n=turf.kinks(r);if(0===n.features.length)throw new Error("No kinks found.");var i={polygon:r};e.toolbar.ol3turf.handler.callback("kinks",n,i)};t.controls.kinks={create:function(o,r){return t.Control.create(o,r,"kinks","Create polygon self-intersections",e)}}}(ol3turf||{}),function(t){"use strict";var e="line-distance",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormString(s,"units"),i=turf.lineDistance(r,n);o.showForm();var l={line:r,units:n};o.toolbar.ol3turf.handler.callback(e,i,l)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"units"],o.prefix),a=[t.utils.getControlSelect(s,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Length",o)}}}(ol3turf||{}),function(t){"use strict";var e="line-slice-along",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1),n=t.utils.getLines(r,1,1)[0],i=t.utils.getFormNumber(s,"start"),l=t.utils.getFormNumber(a,"stop");if(!0!==if)throw new Error("Start must be less than line length");if(l>f)throw new Error("Stop must be less than line length");var g=turf.lineSliceAlong(n,i,l,u);o.showForm();var m={line:n,start:i,stop:l,units:u};o.toolbar.ol3turf.handler.callback(e,g,m)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"start"],o.prefix),a=t.utils.getName([e,"stop"],o.prefix),c=t.utils.getName([e,"units"],o.prefix),f=[t.utils.getControlNumber(s,"Start","Starting distance along the line","0","any","0"),t.utils.getControlNumber(a,"Stop","Stoping distance along the line","0","any","0"),t.utils.getControlSelect(c,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(f,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create line slice",o)}}}(ol3turf||{}),function(t){"use strict";var e="midpoint",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,2,2),i=n[0],l=n[1],u=turf.midpoint(i,l),s={from:i,to:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Midpoint",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,1/0),r=o.features.length,n=t.utils.getPoints(o,r,r),i=n[0],l=turf.featureCollection(n.slice(1)),u=turf.nearest(i,l),s={targetPoint:i,points:l};e.toolbar.ol3turf.handler.callback("nearest",u,s)};t.controls.nearest={create:function(o,r){return t.Control.create(o,r,"nearest","Find set point nearest to first point",e)}}}(ol3turf||{}),function(t){"use strict";var e="planepoint",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,1,1),i=t.utils.getPolygons(r,1,1),l=n[0],u=i[0],s=turf.planepoint(l,u),a={point:l,triangle:u};o.toolbar.ol3turf.handler.callback(e,s,a)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Triangulate a point in a plane",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.pointGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Point Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-on-line",o=function(o){var r=t.utils.getCollection(o,2,2),n=t.utils.getPoints(r,1,1),i=t.utils.getLines(r,1,1)[0],l=n[0],u=turf.pointOnLine(i,l),s={line:i,point:l};o.toolbar.ol3turf.handler.callback(e,u,s)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Project point on line",o)}}}(ol3turf||{}),function(t){"use strict";var e="point-on-surface",o=function(o){var r=t.utils.getCollection(o,1,1/0),n=turf.pointOnSurface(r),i={fc:r};o.toolbar.ol3turf.handler.callback(e,n,i)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Measure Point on Surface",o)}}}(ol3turf||{}),function(t){"use strict";var e="random",o=function(o){function r(){try{var r=null,n=t.utils.getCollection(o,0,1/0);0!==n.features.length&&(r=turf.bbox(n));var i=t.utils.getFormInteger(l,"count"),u=t.utils.getFormInteger(s,"maximum radial length"),c=t.utils.getFormInteger(a,"number of vertices"),g=t.utils.getFormString(f,"type"),m={max_radial_length:u,num_vertices:c};null!==r&&(m.bbox=r);var p=turf.random(g,i,m);o.showForm();var h={type:g,count:i,options:m};o.toolbar.ol3turf.handler.callback(e,p,h)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"count"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"max-radial-length"],o.prefix),a=t.utils.getName([e,"num-vertices"],o.prefix),c=t.utils.getName([e,"ok"],o.prefix),f=t.utils.getName([e,"type"],o.prefix),g=[t.utils.getControlSelect(f,"Type",t.utils.getOptionsGeometry()),t.utils.getControlNumber(l,"Count","How many geometries should be generated","1","1","1"),t.utils.getControlNumber(a,"# Vertices","Used only for polygon type","10","1","3"),t.utils.getControlNumber(s,"Max Length","Maximum degrees a polygon can extent outwards from its center (degrees)","10","0.01","0","180"),t.utils.getControlInput(c,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(g,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create random data",o)}}}(ol3turf||{}),function(t){"use strict";var e="sample",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormInteger(l,"count");if(n>r.features.length)throw new Error("Feature count must be greater than sampling count.");var i=turf.sample(r,n);o.showForm();var u={featurecollection:r,num:n};o.toolbar.ol3turf.handler.callback(e,i,u)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"count"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=[t.utils.getControlNumber(l,"Count","Number of random features to sample","1","1","1"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Randomly sample features",o)}}}(ol3turf||{}),function(t){"use strict";var e="simplify",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(a,"tolerance"),i="high"===t.utils.getFormString(s,"quality"),l=turf.simplify(r,n,i);o.showForm();var u={feature:r,tolerance:n,highQuality:i};o.toolbar.ol3turf.handler.callback(e,l,u)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"quality"],o.prefix),a=t.utils.getName([e,"tolerance"],o.prefix),c=[t.utils.getControlNumber(a,"Tolerance","Simplification tolerance","1","0.01","0"),t.utils.getControlSelect(s,"Quality",t.utils.getOptionsQuality()),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Simplify shape",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,1,1/0),r=turf.bbox(o),n=turf.square(r),i=turf.bboxPolygon(n),l={bbox:r};e.toolbar.ol3turf.handler.callback("square",i,l)};t.controls.square={create:function(o,r){return t.Control.create(o,r,"square","Create Square",e)}}}(ol3turf||{}),function(t){"use strict";var e="square-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.squareGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Square Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e="tag",o=function(o){function r(){try{var r=t.utils.getCollection(o,2,1/0),n=t.utils.getPoints(r,1,r.features.length-1),i=r.features.length-n.length,u=t.utils.getPolygons(r,i,i),s=t.utils.getFormString(l,"field"),c=t.utils.getFormString(a,"out field"),f=turf.featureCollection(u),g=turf.featureCollection(n),m=turf.tag(g,f,s,c);o.showForm();var p={points:g,polygons:f,field:s,outField:c};o.toolbar.ol3turf.handler.callback(e,m,p)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"field-property"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"out-field-property"],o.prefix),c=[t.utils.getControlText(l,"Field","Property in polygons to add to joined point features"),t.utils.getControlText(a,"Out Field","Property in points in which to store joined property from polygons"),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Perform spatial join of points and polygons",o)}}}(ol3turf||{}),function(t){"use strict";var e="tin",o=function(o){function r(){try{var r=t.utils.getCollection(o,3,1/0),n=r.features.length,i=t.utils.getPoints(r,n,n);r=turf.featureCollection(i);var l=t.utils.getFormString(s,"z"),u=turf.tin(r,l),a={points:r,z:l};o.toolbar.ol3turf.handler.callback(e,u,a)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"form"],o.prefix),u=t.utils.getName([e,"ok"],o.prefix),s=t.utils.getName([e,"z"],o.prefix),a=[t.utils.getControlText(s,"Z","(Optional) Property from which to pull z values"),t.utils.getControlInput(u,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(a,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create TIN",o)}}}(ol3turf||{}),function(t){"use strict";var e="tesselate",o=function(o){var r=t.utils.getCollection(o,1,1),n=t.utils.getPolygons(r,1,1)[0],i=turf.tesselate(n),l={polygon:n};o.toolbar.ol3turf.handler.callback(e,i,l)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Create tesselation",o)}}}(ol3turf||{}),function(t){"use strict";t.toolbars=t.toolbars||{},t.toolbars.aggregation=function(){return["collect"]},t.toolbars.classification=function(){return["nearest"]},t.toolbars.data=function(){return["random","sample"]},t.toolbars.grids=function(){return["hex-grid","point-grid","square-grid","triangle-grid","tesselate"]},t.toolbars.interpolation=function(){return["isolines","planepoint","tin"]},t.toolbars.joins=function(){return["inside","tag","within"]},t.toolbars.measurement=function(){return["distance","line-distance","area","bearing","center-of-mass","center","centroid","midpoint","point-on-surface","envelope","square","circle","along","destination"]},t.toolbars.misc=function(){return["combine","explode","flip","kinks","line-slice-along","point-on-line"]},t.toolbars.transformation=function(){return["bezier","buffer","concave","convex","difference","intersect","simplify","union"]},t.toolbars.all=function(){var e=[];return e.push.apply(e,t.toolbars.measurement()),e.push.apply(e,t.toolbars.transformation()),e.push.apply(e,t.toolbars.misc()),e.push.apply(e,t.toolbars.joins()),e.push.apply(e,t.toolbars.classification()),e.push.apply(e,t.toolbars.aggregation()),e.push.apply(e,t.toolbars.data()),e.push.apply(e,t.toolbars.interpolation()),e.push.apply(e,t.toolbars.grids()),e}}(ol3turf||{}),function(t){"use strict";var e="triangle-grid",o=function(o){function r(){try{var r=t.utils.getCollection(o,1,1/0),n=t.utils.getFormNumber(l,"cell size"),i=t.utils.getFormString(a,"units"),u=turf.bbox(r),s=turf.triangleGrid(u,n,i);o.showForm();var c={bbox:u,cellSize:n,units:i};o.toolbar.ol3turf.handler.callback(e,s,c)}catch(t){o.showMessage(t)}}function n(){o.showForm()}var i=t.utils.getName([e,"cancel"],o.prefix),l=t.utils.getName([e,"cell-size"],o.prefix),u=t.utils.getName([e,"form"],o.prefix),s=t.utils.getName([e,"ok"],o.prefix),a=t.utils.getName([e,"units"],o.prefix),c=[t.utils.getControlNumber(l,"Cell Size","Dimension of cell","1","any","0"),t.utils.getControlSelect(a,"Units",t.utils.getOptionsUnits()),t.utils.getControlInput(s,r,"","OK"),t.utils.getControlInput(i,n,"","Cancel")];o.showForm(c,u)};t.controls[e]={create:function(r,n){return t.Control.create(r,n,e,"Generate Triangle Grid",o)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,2),r=t.utils.getPolygons(o,2,2),n=r[0],i=r[1],l=turf.union(n,i),u={poly1:n,poly2:i};e.toolbar.ol3turf.handler.callback("union",l,u)};t.controls.union={create:function(o,r){return t.Control.create(o,r,"union","Create Union Polygon",e)}}}(ol3turf||{}),function(t){"use strict";var e=function(e){var o=t.utils.getCollection(e,2,1/0),r=t.utils.getPoints(o,1,o.features.length-1),n=o.features.length-r.length,i=t.utils.getPolygons(o,n,n),l=turf.featureCollection(r),u=turf.featureCollection(i),s=turf.within(l,u);if(0===s.features.length)throw new Error("No points found within.");var a={points:l,polygons:u};e.toolbar.ol3turf.handler.callback("within",s,a)};t.controls.within={create:function(o,r){return t.Control.create(o,r,"within","Find points within polygons",e)}}}(ol3turf||{}); \ No newline at end of file diff --git a/package.json b/package.json index 12710ee..14e500d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ol3-turf", - "version": "0.4.1", + "version": "0.4.2", "description": "A Turf toolbar for OpenLayers 3.", "author": { "name": "Daniel Pulido",