diff --git a/App.js b/App.js index d79da3c..2c0b130 100644 --- a/App.js +++ b/App.js @@ -17,7 +17,7 @@ import { RNCamera } from 'react-native-camera'; import RunInfo from './components/run-info'; import RunInfoNumeric from './components/run-info-num'; -import {updateAreas} from './update-map' +import {updateAreas, sendArea} from './update-map' import MapView from 'react-native-maps'; import WalkButton from "./components/new-button"; import JoinButton from "./components/join-button"; @@ -33,69 +33,84 @@ const instructions = Platform.select({ type Props = {}; let id = 0; export default class App extends Component { - // constructor(props) { - // super(props); + constructor(props) { + super(props); - // setInterval(() => { - // this.updateCaptures(); - // }, 5000); + this.state = { + activeWalk: false, + username: "", + gameNumber: "", + walkMarkers: [], + captures: [ + // new CapturedArea("fanded", [ + // {latitude: -43.5623, longitude:172.5655}, + // {latitude: -43.5623, longitude:172.5650}, + // {latitude: -43.5628, longitude:172.5650}, + // {latitude: -43.5628, longitude:172.5655} + // ], 'rgba(255,0,255, 1)', 'rgba(255,0,255, 0.2)', 53), - // let watchID = navigator.geolocation.watchPosition((position) => { - // this.setState({ - // walkMarkers: [ - // ...this.state.walkMarkers, { - // coordinate: position.coords, - // key: id++ - // } - // ] - // }); - // }, null, {enableHighAccuracy: true, timeout: 20000, distanceFilter: 15}); + new CapturedArea("samded", [ + {latitude: -43.5663, longitude:172.5615}, + {latitude: -43.5663, longitude:172.5610}, + {latitude: -43.5668, longitude:172.5610}, + {latitude: -43.5668, longitude:172.5615} + ], 'rgba(0,0,255, 1)', 'rgba(0,0,255, 0.2)', 53) + ], + watchID + }; + } - // this.state = { - // activeWalk: false, - // username: "", - // gameNumber: "", - // walkMarkers: [], - // captures: [ - // // new CapturedArea("fanded", [ - // // {latitude: -43.5623, longitude:172.5655}, - // // {latitude: -43.5623, longitude:172.5650}, - // // {latitude: -43.5628, longitude:172.5650}, - // // {latitude: -43.5628, longitude:172.5655} - // // ], 'rgba(255,0,255, 1)', 'rgba(255,0,255, 0.2)', 53), + componentDidMount() { + let watchID = navigator.geolocation.watchPosition((position) => { + console.log(this.state.activeWalk) + if(this.state.activeWalk){ + this.setState({ + walkMarkers: [ + ...this.state.walkMarkers, { + coordinate: position.coords, + key: id++ + } + ] + }); + } + // if(!this.state.activeWalk){ + // this.setState({ + // walkMarkers: [] + // }) + // } + }, null, {enableHighAccuracy: true, timeout: 20000, distanceFilter: 10}); - // new CapturedArea("samded", [ - // {latitude: -43.5663, longitude:172.5615}, - // {latitude: -43.5663, longitude:172.5610}, - // {latitude: -43.5668, longitude:172.5610}, - // {latitude: -43.5668, longitude:172.5615} - // ], 'rgba(0,0,255, 1)', 'rgba(0,0,255, 0.2)', 53) - // ], - // watchID - // }; - // } - // updateCaptures(){ - // updateAreas(this.state.gameNumber, (polygons) => { - // this.setState({ - // captures: polygons - // }) - // }) - // } - // setGameNumber(user, number){ - // this.setState({username: user, gameNumber: number}) - // } + setInterval(() => { + this.updateCaptures(); + }, 5000); + } + + updateCaptures(){ + updateAreas(this.state.gameNumber, (polygons) => { + this.setState({ + captures: polygons + }) + }) + } + setGameNumber(user, number){ + this.setState({username: user, gameNumber: number}) + } - // startWalk(){ - // this.setState({walkMarkers: [], activeWalk: true}) - // } + startWalk(){ + console.log("starting walk") + this.setState({walkMarkers: [], activeWalk: true}) + } + + stopWalk(){ + console.log("stopping walk") + sendArea(this.state.gameNumber, this.state.username, this.state.walkMarkers) + this.setState({activeWalk: false}) - // stopWalk(){ - // this.setState({activeWalk: false}) - // } + } - // componentWillUnmount() { - // navigator.geolocation.stopWatch(this.state.watchID); - // } + componentWillUnmount() { + navigator.geolocation.stopWatch(this.state.watchID); + } takePicture = async function() { if (this.camera) { const options = { quality: 0.5, base64: true }; @@ -108,82 +123,82 @@ export default class App extends Component { render() { return ( - - { - this.camera = ref; - }} - style = {styles.preview} - type={RNCamera.Constants.Type.back} - flashMode={RNCamera.Constants.FlashMode.on} - permissionDialogTitle={'Permission to use camera'} - permissionDialogMessage={'We need your permission to use your camera phone'} - onGoogleVisionBarcodesDetected={({ barcodes }) => { - console.log(barcodes) - }} - /> - - - SNAP - - - - - // - // this.addMarker((region))} - // > + // + // { + // this.camera = ref; + // }} + // style = {styles.preview} + // type={RNCamera.Constants.Type.back} + // flashMode={RNCamera.Constants.FlashMode.on} + // permissionDialogTitle={'Permission to use camera'} + // permissionDialogMessage={'We need your permission to use your camera phone'} + // onGoogleVisionBarcodesDetected={({ barcodes }) => { + // console.log(barcodes) + // }} + // /> + // + // + // SNAP + // + // + // + + - // marker.coordinate)} - // strokeWidth={5} - // /> - // {this.state.captures.map((capture, i) => { - // return - // } - // ) - // } - // - // - // {"name: " + this.state.username + "\ngame: " + this.state.gameNumber} + marker.coordinate)} + strokeWidth={5} + strokeColor={"rgb(148,0,211)"} + /> + {this.state.captures.map((capture, i) => { + return + } + ) + } + + + {"name: " + this.state.username + "\ngame: " + this.state.gameNumber} - // + - // this.roomInputModal = instance} - // join={(user, number) => this.setGameNumber(user, number)}/> - // + this.roomInputModal = instance} + join={(user, number) => this.setGameNumber(user, number)}/> + - // - // {this.startWalk()}} - // stop={() => {this.stopWalk()}} - // /> - // + + {this.startWalk()}} + stop={() => {this.stopWalk()}} + /> + - // - // this.roomInputModal.setModalVisible(true)}/> - // - // - // + + this.roomInputModal.setModalVisible(true)}/> + + + ); } } diff --git a/api/config/db.js b/api/config/db.js index dd394ad..6ba45bc 100644 --- a/api/config/db.js +++ b/api/config/db.js @@ -10,6 +10,8 @@ exports.connect = function(done){ host: 'localhost', user: 'admin_seng440', password: 'seng440', + // user: 'root', + // password: '', port: 3306, database: "admin_territory-walker", //multipleStatements: true diff --git a/api/package-lock.json b/api/package-lock.json index c6fabed..6cc5c30 100644 --- a/api/package-lock.json +++ b/api/package-lock.json @@ -9,7 +9,7 @@ "resolved": "https://registry.npmjs.org/affine-hull/-/affine-hull-1.0.0.tgz", "integrity": "sha1-dj/x040GPOt+Jy8X7k17vK+QXF0=", "requires": { - "robust-orientation": "^1.1.3" + "robust-orientation": "1.1.3" } }, "ajv": { @@ -17,10 +17,10 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" } }, "asn1": { @@ -28,7 +28,7 @@ "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", "requires": { - "safer-buffer": "~2.1.0" + "safer-buffer": "2.1.2" } }, "assert-plus": { @@ -63,7 +63,7 @@ "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", "optional": true, "requires": { - "tweetnacl": "^0.14.3" + "tweetnacl": "0.14.5" } }, "bignumber.js": { @@ -82,7 +82,7 @@ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { - "balanced-match": "^1.0.0", + "balanced-match": "1.0.0", "concat-map": "0.0.1" } }, @@ -91,10 +91,10 @@ "resolved": "https://registry.npmjs.org/bunyan/-/bunyan-1.8.12.tgz", "integrity": "sha1-8VDw9nSKvdcq6uhPBEA74u8RN5c=", "requires": { - "dtrace-provider": "~0.8", - "moment": "^2.10.6", - "mv": "~2", - "safe-json-stringify": "~1" + "dtrace-provider": "0.8.7", + "moment": "2.22.2", + "mv": "2.1.1", + "safe-json-stringify": "1.2.0" } }, "caseless": { @@ -112,7 +112,7 @@ "resolved": "http://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", "requires": { - "delayed-stream": "~1.0.0" + "delayed-stream": "1.0.0" } }, "concat-map": { @@ -126,9 +126,9 @@ "resolved": "https://registry.npmjs.org/convex-hull/-/convex-hull-1.0.3.tgz", "integrity": "sha1-IKOqbOh/St6i/30XlxyfwcZ+H/8=", "requires": { - "affine-hull": "^1.0.0", - "incremental-convex-hull": "^1.0.1", - "monotone-convex-hull-2d": "^1.0.1" + "affine-hull": "1.0.0", + "incremental-convex-hull": "1.0.1", + "monotone-convex-hull-2d": "1.0.1" } }, "core-util-is": { @@ -141,10 +141,10 @@ "resolved": "https://registry.npmjs.org/csv/-/csv-1.2.1.tgz", "integrity": "sha1-UjHt/BxxUlEuxFeBB2p6l/9SXAw=", "requires": { - "csv-generate": "^1.1.2", - "csv-parse": "^1.3.3", - "csv-stringify": "^1.1.2", - "stream-transform": "^0.2.2" + "csv-generate": "1.1.2", + "csv-parse": "1.3.3", + "csv-stringify": "1.1.2", + "stream-transform": "0.2.2" } }, "csv-generate": { @@ -162,7 +162,7 @@ "resolved": "https://registry.npmjs.org/csv-stringify/-/csv-stringify-1.1.2.tgz", "integrity": "sha1-d6QVJlgbzjOA8SsA18W7rHDIK1g=", "requires": { - "lodash.get": "~4.4.2" + "lodash.get": "4.4.2" } }, "dashdash": { @@ -170,7 +170,7 @@ "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "debug": { @@ -197,7 +197,7 @@ "integrity": "sha1-3JObTT4GIM/gwc2APQ0tftBP/QQ=", "optional": true, "requires": { - "nan": "^2.10.0" + "nan": "2.11.0" } }, "earcut": { @@ -211,8 +211,8 @@ "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", "optional": true, "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" + "jsbn": "0.1.1", + "safer-buffer": "2.1.2" } }, "escape-regexp-component": { @@ -225,7 +225,7 @@ "resolved": "https://registry.npmjs.org/ewma/-/ewma-2.0.1.tgz", "integrity": "sha512-MYYK17A76cuuyvkR7MnqLW4iFYPEi5Isl2qb8rXiWpLiwFS9dxW/rncuNnjjgSENuVqZQkIuR4+DChVL4g1lnw==", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "extend": { @@ -258,9 +258,9 @@ "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-1.15.3.tgz", "integrity": "sha512-W+9ZZcZZlk3jc69mNvLAYy01msIpUp45aAtD/AIRWc5T0voI4WmHzm6oy+F3/jeGjb7AEE7AU8Inq58/gd/E5g==", "requires": { - "fast-decode-uri-component": "^1.0.0", - "safe-regex": "^1.1.0", - "semver-store": "^0.3.0" + "fast-decode-uri-component": "1.0.0", + "safe-regex": "1.1.0", + "semver-store": "0.3.0" } }, "forever-agent": { @@ -273,9 +273,9 @@ "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", "requires": { - "asynckit": "^0.4.0", + "asynckit": "0.4.0", "combined-stream": "1.0.6", - "mime-types": "^2.1.12" + "mime-types": "2.1.20" } }, "formidable": { @@ -306,7 +306,7 @@ "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", "requires": { - "assert-plus": "^1.0.0" + "assert-plus": "1.0.0" } }, "glob": { @@ -315,11 +315,11 @@ "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "optional": true, "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" } }, "handle-thing": { @@ -337,8 +337,8 @@ "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", "requires": { - "ajv": "^5.3.0", - "har-schema": "^2.0.0" + "ajv": "5.5.2", + "har-schema": "2.0.0" } }, "hpack.js": { @@ -346,10 +346,10 @@ "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=", "requires": { - "inherits": "^2.0.1", - "obuf": "^1.0.0", - "readable-stream": "^2.0.1", - "wbuf": "^1.1.0" + "inherits": "2.0.3", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "wbuf": "1.7.3" } }, "http-deceiver": { @@ -362,9 +362,9 @@ "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "assert-plus": "1.0.0", + "jsprim": "1.4.1", + "sshpk": "1.14.2" } }, "incremental-convex-hull": { @@ -372,8 +372,8 @@ "resolved": "https://registry.npmjs.org/incremental-convex-hull/-/incremental-convex-hull-1.0.1.tgz", "integrity": "sha1-UUKMFMudmmFEv+abKFH7N3M0vh4=", "requires": { - "robust-orientation": "^1.1.2", - "simplicial-complex": "^1.0.0" + "robust-orientation": "1.1.3", + "simplicial-complex": "1.0.0" } }, "inflight": { @@ -382,8 +382,8 @@ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { - "once": "^1.3.0", - "wrappy": "1" + "once": "1.4.0", + "wrappy": "1.0.2" } }, "inherits": { @@ -458,8 +458,8 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "pseudomap": "1.0.2", + "yallist": "2.1.2" } }, "mime": { @@ -477,7 +477,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", "requires": { - "mime-db": "~1.36.0" + "mime-db": "1.36.0" } }, "minimalistic-assert": { @@ -491,7 +491,7 @@ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { - "brace-expansion": "^1.1.7" + "brace-expansion": "1.1.11" } }, "minimist": { @@ -520,7 +520,7 @@ "resolved": "https://registry.npmjs.org/monotone-convex-hull-2d/-/monotone-convex-hull-2d-1.0.1.tgz", "integrity": "sha1-R/Xa6t88Sv03dkuqGqh4ekDu4Iw=", "requires": { - "robust-orientation": "^1.1.3" + "robust-orientation": "1.1.3" } }, "ms": { @@ -534,9 +534,9 @@ "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", "optional": true, "requires": { - "mkdirp": "~0.5.1", - "ncp": "~2.0.0", - "rimraf": "~2.4.0" + "mkdirp": "0.5.1", + "ncp": "2.0.0", + "rimraf": "2.4.5" } }, "mysql": { @@ -582,7 +582,7 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { - "wrappy": "1" + "wrappy": "1.0.2" } }, "path-is-absolute": { @@ -631,13 +631,13 @@ "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "2.0.0", + "safe-buffer": "5.1.2", + "string_decoder": "1.1.1", + "util-deprecate": "1.0.2" } }, "request": { @@ -645,26 +645,26 @@ "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" + "aws-sign2": "0.7.0", + "aws4": "1.8.0", + "caseless": "0.12.0", + "combined-stream": "1.0.6", + "extend": "3.0.2", + "forever-agent": "0.6.1", + "form-data": "2.3.2", + "har-validator": "5.1.0", + "http-signature": "1.2.0", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.20", + "oauth-sign": "0.9.0", + "performance-now": "2.1.0", + "qs": "6.5.2", + "safe-buffer": "5.1.2", + "tough-cookie": "2.4.3", + "tunnel-agent": "0.6.0", + "uuid": "3.3.2" } }, "restify": { @@ -672,28 +672,28 @@ "resolved": "https://registry.npmjs.org/restify/-/restify-7.2.1.tgz", "integrity": "sha512-xygVfQn/FiyzSPNIiOlzos6+RVcmTTK/bN0/m4z6vQwUY1yXntAsXM8ckq6hMxYfkhZfbPMM5hvBf75B8zLE1g==", "requires": { - "assert-plus": "^1.0.0", - "bunyan": "^1.8.12", - "csv": "^1.1.1", - "dtrace-provider": "^0.8.1", - "escape-regexp-component": "^1.0.2", - "ewma": "^2.0.1", - "find-my-way": "^1.13.0", - "formidable": "^1.2.1", - "http-signature": "^1.2.0", - "lodash": "^4.17.10", - "lru-cache": "^4.1.3", - "mime": "^1.5.0", - "negotiator": "^0.6.1", - "once": "^1.4.0", - "pidusage": "^1.2.0", - "qs": "^6.5.2", - "restify-errors": "^5.0.0", - "semver": "^5.4.1", - "spdy": "^3.4.7", - "uuid": "^3.1.0", - "vasync": "^1.6.4", - "verror": "^1.10.0" + "assert-plus": "1.0.0", + "bunyan": "1.8.12", + "csv": "1.2.1", + "dtrace-provider": "0.8.7", + "escape-regexp-component": "1.0.2", + "ewma": "2.0.1", + "find-my-way": "1.15.3", + "formidable": "1.2.1", + "http-signature": "1.2.0", + "lodash": "4.17.11", + "lru-cache": "4.1.3", + "mime": "1.6.0", + "negotiator": "0.6.1", + "once": "1.4.0", + "pidusage": "1.2.0", + "qs": "6.5.2", + "restify-errors": "5.0.0", + "semver": "5.5.1", + "spdy": "3.4.7", + "uuid": "3.3.2", + "vasync": "1.6.4", + "verror": "1.10.0" } }, "restify-errors": { @@ -701,10 +701,10 @@ "resolved": "https://registry.npmjs.org/restify-errors/-/restify-errors-5.0.0.tgz", "integrity": "sha512-+vby9Kxf7qlzvbZSTIEGkIixkeHG+pVCl34dk6eKnL+ua4pCezpdLT/1/eabzPZb65ADrgoc04jeWrrF1E1pvQ==", "requires": { - "assert-plus": "^1.0.0", - "lodash": "^4.2.1", - "safe-json-stringify": "^1.0.3", - "verror": "^1.8.1" + "assert-plus": "1.0.0", + "lodash": "4.17.11", + "safe-json-stringify": "1.2.0", + "verror": "1.10.0" } }, "restify-simple-versioning": { @@ -712,7 +712,7 @@ "resolved": "https://registry.npmjs.org/restify-simple-versioning/-/restify-simple-versioning-1.0.0.tgz", "integrity": "sha512-g20huxy+BkCJhgH678vVDDdFO9gIjeK4VR7Se9h03gSBGO6gZY5sjNaOHTCrl+Cw+eAg8I85EEx5bWrvFOLZQQ==", "requires": { - "restify-errors": "^5.0.0" + "restify-errors": "5.0.0" } }, "ret": { @@ -726,7 +726,7 @@ "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", "optional": true, "requires": { - "glob": "^6.0.1" + "glob": "6.0.4" } }, "robust-orientation": { @@ -734,10 +734,10 @@ "resolved": "https://registry.npmjs.org/robust-orientation/-/robust-orientation-1.1.3.tgz", "integrity": "sha1-2v9bANO+TmByLw6cAVbvln8cIEk=", "requires": { - "robust-scale": "^1.0.2", - "robust-subtract": "^1.0.0", - "robust-sum": "^1.0.0", - "two-product": "^1.0.2" + "robust-scale": "1.0.2", + "robust-subtract": "1.0.0", + "robust-sum": "1.0.0", + "two-product": "1.0.2" } }, "robust-scale": { @@ -745,8 +745,8 @@ "resolved": "https://registry.npmjs.org/robust-scale/-/robust-scale-1.0.2.tgz", "integrity": "sha1-d1Ey7QlULQKOWLLMecBikLz3jDI=", "requires": { - "two-product": "^1.0.2", - "two-sum": "^1.0.0" + "two-product": "1.0.2", + "two-sum": "1.0.0" } }, "robust-subtract": { @@ -775,7 +775,7 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { - "ret": "~0.1.10" + "ret": "0.1.15" } }, "safer-buffer": { @@ -803,8 +803,8 @@ "resolved": "https://registry.npmjs.org/simplicial-complex/-/simplicial-complex-1.0.0.tgz", "integrity": "sha1-bDOk7Wn81Nkbe8rdOzC2NoPq4kE=", "requires": { - "bit-twiddle": "^1.0.0", - "union-find": "^1.0.0" + "bit-twiddle": "1.0.2", + "union-find": "1.0.2" } }, "simplify-js": { @@ -817,12 +817,12 @@ "resolved": "https://registry.npmjs.org/spdy/-/spdy-3.4.7.tgz", "integrity": "sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw=", "requires": { - "debug": "^2.6.8", - "handle-thing": "^1.2.5", - "http-deceiver": "^1.2.7", - "safe-buffer": "^5.0.1", - "select-hose": "^2.0.0", - "spdy-transport": "^2.0.18" + "debug": "2.6.9", + "handle-thing": "1.2.5", + "http-deceiver": "1.2.7", + "safe-buffer": "5.1.2", + "select-hose": "2.0.0", + "spdy-transport": "2.1.0" } }, "spdy-transport": { @@ -830,13 +830,13 @@ "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-2.1.0.tgz", "integrity": "sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g==", "requires": { - "debug": "^2.6.8", - "detect-node": "^2.0.3", - "hpack.js": "^2.1.6", - "obuf": "^1.1.1", - "readable-stream": "^2.2.9", - "safe-buffer": "^5.0.1", - "wbuf": "^1.7.2" + "debug": "2.6.9", + "detect-node": "2.0.4", + "hpack.js": "2.1.6", + "obuf": "1.1.2", + "readable-stream": "2.3.6", + "safe-buffer": "5.1.2", + "wbuf": "1.7.3" } }, "sqlstring": { @@ -849,15 +849,15 @@ "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" + "asn1": "0.2.4", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.2", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.2", + "getpass": "0.1.7", + "jsbn": "0.1.1", + "safer-buffer": "2.1.2", + "tweetnacl": "0.14.5" } }, "stream-transform": { @@ -870,7 +870,7 @@ "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "5.1.2" } }, "tough-cookie": { @@ -878,8 +878,8 @@ "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" + "psl": "1.1.29", + "punycode": "1.4.1" } }, "tunnel-agent": { @@ -887,7 +887,7 @@ "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", "requires": { - "safe-buffer": "^5.0.1" + "safe-buffer": "5.1.2" } }, "turf": { @@ -895,52 +895,52 @@ "resolved": "http://registry.npmjs.org/turf/-/turf-3.0.14.tgz", "integrity": "sha1-6y9KgKLVg7jGSGvHtccZBGaGbCc=", "requires": { - "turf-along": "^3.0.12", - "turf-area": "^3.0.12", - "turf-bbox": "^3.0.12", - "turf-bbox-polygon": "^3.0.12", - "turf-bearing": "^3.0.12", - "turf-bezier": "^3.0.12", - "turf-buffer": "^3.0.12", - "turf-center": "^3.0.12", - "turf-centroid": "^3.0.12", - "turf-circle": "^3.0.12", - "turf-collect": "^3.0.12", - "turf-combine": "^3.0.12", - "turf-concave": "^3.0.12", - "turf-convex": "^3.0.12", - "turf-destination": "^3.0.12", - "turf-difference": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-envelope": "^3.0.12", - "turf-explode": "^3.0.12", - "turf-flip": "^3.0.12", - "turf-helpers": "^3.0.12", - "turf-hex-grid": "^3.0.12", - "turf-inside": "^3.0.12", - "turf-intersect": "^3.0.12", - "turf-isolines": "^3.0.12", - "turf-kinks": "^3.0.12", - "turf-line-distance": "^3.0.12", - "turf-line-slice": "^3.0.12", - "turf-meta": "^3.0.12", - "turf-midpoint": "^3.0.12", - "turf-nearest": "^3.0.12", - "turf-planepoint": "^3.0.12", - "turf-point-grid": "^3.0.12", - "turf-point-on-line": "^3.0.12", - "turf-point-on-surface": "^3.0.12", - "turf-random": "^3.0.12", - "turf-sample": "^3.0.12", - "turf-simplify": "^3.0.12", - "turf-square": "^3.0.12", - "turf-square-grid": "^3.0.12", - "turf-tag": "^3.0.12", - "turf-tesselate": "^3.0.12", - "turf-tin": "^3.0.12", - "turf-triangle-grid": "^3.0.12", - "turf-union": "^3.0.12", - "turf-within": "^3.0.12" + "turf-along": "3.0.12", + "turf-area": "3.0.12", + "turf-bbox": "3.0.12", + "turf-bbox-polygon": "3.0.12", + "turf-bearing": "3.0.12", + "turf-bezier": "3.0.12", + "turf-buffer": "3.0.12", + "turf-center": "3.0.12", + "turf-centroid": "3.0.12", + "turf-circle": "3.0.12", + "turf-collect": "3.0.12", + "turf-combine": "3.0.12", + "turf-concave": "3.0.12", + "turf-convex": "3.0.12", + "turf-destination": "3.0.12", + "turf-difference": "3.0.12", + "turf-distance": "3.0.12", + "turf-envelope": "3.0.12", + "turf-explode": "3.0.12", + "turf-flip": "3.0.12", + "turf-helpers": "3.0.12", + "turf-hex-grid": "3.0.12", + "turf-inside": "3.0.12", + "turf-intersect": "3.0.12", + "turf-isolines": "3.0.12", + "turf-kinks": "3.0.12", + "turf-line-distance": "3.0.12", + "turf-line-slice": "3.0.12", + "turf-meta": "3.0.12", + "turf-midpoint": "3.0.12", + "turf-nearest": "3.0.12", + "turf-planepoint": "3.0.12", + "turf-point-grid": "3.0.12", + "turf-point-on-line": "3.0.12", + "turf-point-on-surface": "3.0.12", + "turf-random": "3.0.12", + "turf-sample": "3.0.12", + "turf-simplify": "3.0.12", + "turf-square": "3.0.12", + "turf-square-grid": "3.0.12", + "turf-tag": "3.0.12", + "turf-tesselate": "3.0.12", + "turf-tin": "3.0.12", + "turf-triangle-grid": "3.0.12", + "turf-union": "3.0.12", + "turf-within": "3.0.12" } }, "turf-along": { @@ -948,10 +948,10 @@ "resolved": "https://registry.npmjs.org/turf-along/-/turf-along-3.0.12.tgz", "integrity": "sha1-5iK956S9E4wJZH1LFKoOpwBIXeY=", "requires": { - "turf-bearing": "^3.0.12", - "turf-destination": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-bearing": "3.0.12", + "turf-destination": "3.0.12", + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-area": { @@ -959,7 +959,7 @@ "resolved": "https://registry.npmjs.org/turf-area/-/turf-area-3.0.12.tgz", "integrity": "sha1-m35Gnvn7VY/RR7sMIUgjJjvb8Tw=", "requires": { - "geojson-area": "^0.2.1" + "geojson-area": "0.2.1" } }, "turf-bbox": { @@ -967,7 +967,7 @@ "resolved": "https://registry.npmjs.org/turf-bbox/-/turf-bbox-3.0.12.tgz", "integrity": "sha1-P6BhF8hEOGDsgKxg/V0vEyC/sb4=", "requires": { - "turf-meta": "^3.0.12" + "turf-meta": "3.0.12" } }, "turf-bbox-polygon": { @@ -975,7 +975,7 @@ "resolved": "https://registry.npmjs.org/turf-bbox-polygon/-/turf-bbox-polygon-3.0.12.tgz", "integrity": "sha1-Mw3AuzgyLWFUXflmzmyA9oWs9PI=", "requires": { - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-bearing": { @@ -983,7 +983,7 @@ "resolved": "https://registry.npmjs.org/turf-bearing/-/turf-bearing-3.0.12.tgz", "integrity": "sha1-ZfYJ3YUOc2THdxqm3th7DhkX/SA=", "requires": { - "turf-invariant": "^3.0.12" + "turf-invariant": "3.0.12" } }, "turf-bezier": { @@ -991,7 +991,7 @@ "resolved": "https://registry.npmjs.org/turf-bezier/-/turf-bezier-3.0.12.tgz", "integrity": "sha1-EC791KY7Jl7pyMFydjGSCzb03QI=", "requires": { - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-buffer": { @@ -1001,8 +1001,8 @@ "requires": { "geojson-normalize": "0.0.0", "jsts": "1.1.2", - "turf-combine": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-combine": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-center": { @@ -1010,8 +1010,8 @@ "resolved": "https://registry.npmjs.org/turf-center/-/turf-center-3.0.12.tgz", "integrity": "sha1-Rd1sFym7hnKR4+AC6cdQb4xEAZY=", "requires": { - "turf-bbox": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-bbox": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-centroid": { @@ -1019,8 +1019,8 @@ "resolved": "https://registry.npmjs.org/turf-centroid/-/turf-centroid-3.0.12.tgz", "integrity": "sha1-6u4NaYIEtX/DOZS7G8hnuNopP48=", "requires": { - "turf-helpers": "^3.0.12", - "turf-meta": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-meta": "3.0.12" } }, "turf-circle": { @@ -1028,8 +1028,8 @@ "resolved": "https://registry.npmjs.org/turf-circle/-/turf-circle-3.0.12.tgz", "integrity": "sha1-FAshy0lQ8tPLxw0t8BKTaGf1iTA=", "requires": { - "turf-destination": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-destination": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-collect": { @@ -1037,7 +1037,7 @@ "resolved": "https://registry.npmjs.org/turf-collect/-/turf-collect-3.0.12.tgz", "integrity": "sha1-bphtGnB9oxnMg+cjjQvN8Zqjx/I=", "requires": { - "turf-inside": "^3.0.12" + "turf-inside": "3.0.12" } }, "turf-combine": { @@ -1045,7 +1045,7 @@ "resolved": "https://registry.npmjs.org/turf-combine/-/turf-combine-3.0.12.tgz", "integrity": "sha1-FnB0bw/c4NHqiqain/5UONRGz3M=", "requires": { - "turf-meta": "^3.0.12" + "turf-meta": "3.0.12" } }, "turf-concave": { @@ -1053,10 +1053,10 @@ "resolved": "https://registry.npmjs.org/turf-concave/-/turf-concave-3.0.12.tgz", "integrity": "sha1-/KtgVpZbCoMZ9s2AJgEJXy/TqOs=", "requires": { - "turf-distance": "^3.0.12", - "turf-meta": "^3.0.12", - "turf-tin": "^3.0.12", - "turf-union": "^3.0.12" + "turf-distance": "3.0.12", + "turf-meta": "3.0.12", + "turf-tin": "3.0.12", + "turf-union": "3.0.12" } }, "turf-convex": { @@ -1064,9 +1064,9 @@ "resolved": "https://registry.npmjs.org/turf-convex/-/turf-convex-3.0.12.tgz", "integrity": "sha1-qI3cPiLRy2WHlqnIXTraO9Pso1c=", "requires": { - "convex-hull": "^1.0.3", - "turf-helpers": "^3.0.12", - "turf-meta": "^3.0.12" + "convex-hull": "1.0.3", + "turf-helpers": "3.0.12", + "turf-meta": "3.0.12" } }, "turf-destination": { @@ -1074,8 +1074,8 @@ "resolved": "https://registry.npmjs.org/turf-destination/-/turf-destination-3.0.12.tgz", "integrity": "sha1-fdb7+X6G+DGibIPvLVovjR2KbeI=", "requires": { - "turf-helpers": "^3.0.12", - "turf-invariant": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-invariant": "3.0.12" } }, "turf-difference": { @@ -1084,7 +1084,7 @@ "integrity": "sha1-nD0NdjBCEAW4slt/Bo7Z77S8bqc=", "requires": { "jsts": "1.1.2", - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-distance": { @@ -1092,8 +1092,8 @@ "resolved": "https://registry.npmjs.org/turf-distance/-/turf-distance-3.0.12.tgz", "integrity": "sha1-+5e4cF+s2ZOxReAUtBhiYQ7spEk=", "requires": { - "turf-helpers": "^3.0.12", - "turf-invariant": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-invariant": "3.0.12" } }, "turf-envelope": { @@ -1101,8 +1101,8 @@ "resolved": "https://registry.npmjs.org/turf-envelope/-/turf-envelope-3.0.12.tgz", "integrity": "sha1-lpIdJ4zIxmRpLjIOJUO5FAgNeGs=", "requires": { - "turf-bbox": "^3.0.12", - "turf-bbox-polygon": "^3.0.12" + "turf-bbox": "3.0.12", + "turf-bbox-polygon": "3.0.12" } }, "turf-explode": { @@ -1110,8 +1110,8 @@ "resolved": "https://registry.npmjs.org/turf-explode/-/turf-explode-3.0.12.tgz", "integrity": "sha1-xa4owoTNAGxWUR7H1AjEilQU7P4=", "requires": { - "turf-helpers": "^3.0.12", - "turf-meta": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-meta": "3.0.12" } }, "turf-flip": { @@ -1119,7 +1119,7 @@ "resolved": "https://registry.npmjs.org/turf-flip/-/turf-flip-3.0.12.tgz", "integrity": "sha1-3rhoF3uf87sxDF1BqqxhqRVqPLs=", "requires": { - "turf-meta": "^3.0.12" + "turf-meta": "3.0.12" } }, "turf-grid": { @@ -1127,7 +1127,7 @@ "resolved": "https://registry.npmjs.org/turf-grid/-/turf-grid-1.0.1.tgz", "integrity": "sha1-uQSrxWS5ObYnpmrBXrFuBTgpuA8=", "requires": { - "turf-point": "^2.0.0" + "turf-point": "2.0.1" } }, "turf-helpers": { @@ -1140,8 +1140,8 @@ "resolved": "https://registry.npmjs.org/turf-hex-grid/-/turf-hex-grid-3.0.12.tgz", "integrity": "sha1-BpjvZpAguzHY6cwgVtCr/K/ITo8=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-inside": { @@ -1149,7 +1149,7 @@ "resolved": "https://registry.npmjs.org/turf-inside/-/turf-inside-3.0.12.tgz", "integrity": "sha1-m6QPpu7WO+x+fYiqZCdiLE3wcGY=", "requires": { - "turf-invariant": "^3.0.12" + "turf-invariant": "3.0.12" } }, "turf-intersect": { @@ -1170,13 +1170,13 @@ "resolved": "https://registry.npmjs.org/turf-isolines/-/turf-isolines-3.0.12.tgz", "integrity": "sha1-ALIz3+LuvU7LR6lPySPG7OyJx6s=", "requires": { - "turf-bbox": "^3.0.12", + "turf-bbox": "3.0.12", "turf-grid": "1.0.1", - "turf-helpers": "^3.0.12", - "turf-inside": "^3.0.12", - "turf-planepoint": "^3.0.12", - "turf-square": "^3.0.12", - "turf-tin": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-inside": "3.0.12", + "turf-planepoint": "3.0.12", + "turf-square": "3.0.12", + "turf-tin": "3.0.12" } }, "turf-kinks": { @@ -1184,7 +1184,7 @@ "resolved": "https://registry.npmjs.org/turf-kinks/-/turf-kinks-3.0.12.tgz", "integrity": "sha1-6cmo26VyTZjyNQ/FveugaewzN1U=", "requires": { - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-line-distance": { @@ -1192,8 +1192,8 @@ "resolved": "https://registry.npmjs.org/turf-line-distance/-/turf-line-distance-3.0.12.tgz", "integrity": "sha1-cQj1smkH97jC3Rs5l4Zt06YOj18=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-line-slice": { @@ -1201,11 +1201,11 @@ "resolved": "https://registry.npmjs.org/turf-line-slice/-/turf-line-slice-3.0.12.tgz", "integrity": "sha1-9fGszJKtrmnqGsCynwdSmijd6RY=", "requires": { - "turf-bearing": "^3.0.12", - "turf-destination": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12", - "turf-point-on-line": "^3.0.12" + "turf-bearing": "3.0.12", + "turf-destination": "3.0.12", + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12", + "turf-point-on-line": "3.0.12" } }, "turf-meta": { @@ -1218,10 +1218,10 @@ "resolved": "https://registry.npmjs.org/turf-midpoint/-/turf-midpoint-3.0.12.tgz", "integrity": "sha1-sSdlroms3uhVb9XibJxfoEGgLL4=", "requires": { - "turf-bearing": "^3.0.12", - "turf-destination": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-invariant": "^3.0.12" + "turf-bearing": "3.0.12", + "turf-destination": "3.0.12", + "turf-distance": "3.0.12", + "turf-invariant": "3.0.12" } }, "turf-nearest": { @@ -1229,7 +1229,7 @@ "resolved": "https://registry.npmjs.org/turf-nearest/-/turf-nearest-3.0.12.tgz", "integrity": "sha1-cAIH9EQ/BQlvhs0kb5KfFw369G0=", "requires": { - "turf-distance": "^3.0.12" + "turf-distance": "3.0.12" } }, "turf-planepoint": { @@ -1242,7 +1242,7 @@ "resolved": "https://registry.npmjs.org/turf-point/-/turf-point-2.0.1.tgz", "integrity": "sha1-otzDCi0g9Ez1xicd97riwOIUYGk=", "requires": { - "minimist": "^1.1.0" + "minimist": "1.2.0" }, "dependencies": { "minimist": { @@ -1257,8 +1257,8 @@ "resolved": "https://registry.npmjs.org/turf-point-grid/-/turf-point-grid-3.0.12.tgz", "integrity": "sha1-1gSXi+ELyeUzBq4CzvcJhDHbSXE=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-point-on-line": { @@ -1266,10 +1266,10 @@ "resolved": "https://registry.npmjs.org/turf-point-on-line/-/turf-point-on-line-3.0.12.tgz", "integrity": "sha1-HYZjNU5wNy2xhj5iU+kEDEcSew8=", "requires": { - "turf-bearing": "^3.0.12", - "turf-destination": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-bearing": "3.0.12", + "turf-destination": "3.0.12", + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-point-on-surface": { @@ -1277,11 +1277,11 @@ "resolved": "https://registry.npmjs.org/turf-point-on-surface/-/turf-point-on-surface-3.0.12.tgz", "integrity": "sha1-m+UFtrC6eOmFZQAd47OkJnEVJAo=", "requires": { - "turf-center": "^3.0.12", - "turf-distance": "^3.0.12", - "turf-explode": "^3.0.12", - "turf-helpers": "^3.0.12", - "turf-inside": "^3.0.12" + "turf-center": "3.0.12", + "turf-distance": "3.0.12", + "turf-explode": "3.0.12", + "turf-helpers": "3.0.12", + "turf-inside": "3.0.12" } }, "turf-random": { @@ -1289,7 +1289,7 @@ "resolved": "https://registry.npmjs.org/turf-random/-/turf-random-3.0.12.tgz", "integrity": "sha1-NNuxQcPx6urhQk/Wxeq6H2+5seg=", "requires": { - "geojson-random": "^0.2.2" + "geojson-random": "0.2.2" } }, "turf-sample": { @@ -1297,7 +1297,7 @@ "resolved": "https://registry.npmjs.org/turf-sample/-/turf-sample-3.0.12.tgz", "integrity": "sha1-eUn4YgYSBH4TFMHO2H6ZwUJGPNI=", "requires": { - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-simplify": { @@ -1305,7 +1305,7 @@ "resolved": "https://registry.npmjs.org/turf-simplify/-/turf-simplify-3.0.12.tgz", "integrity": "sha1-heRDyLRqordSY4lETHOB2qKtGec=", "requires": { - "simplify-js": "^1.2.1" + "simplify-js": "1.2.3" } }, "turf-square": { @@ -1313,8 +1313,8 @@ "resolved": "https://registry.npmjs.org/turf-square/-/turf-square-3.0.12.tgz", "integrity": "sha1-Gjix4PsF/+D8qkMYji83lCpRW2Q=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-square-grid": { @@ -1322,8 +1322,8 @@ "resolved": "https://registry.npmjs.org/turf-square-grid/-/turf-square-grid-3.0.12.tgz", "integrity": "sha1-PB2ArBRVbGgTtHi9oBJRLtS5Psg=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-tag": { @@ -1331,7 +1331,7 @@ "resolved": "https://registry.npmjs.org/turf-tag/-/turf-tag-3.0.12.tgz", "integrity": "sha1-IoT/8Oih6Son1Kx/10cbPEjd0ag=", "requires": { - "turf-inside": "^3.0.12" + "turf-inside": "3.0.12" } }, "turf-tesselate": { @@ -1339,8 +1339,8 @@ "resolved": "https://registry.npmjs.org/turf-tesselate/-/turf-tesselate-3.0.12.tgz", "integrity": "sha1-QUdLe1s4ILzyc/tx4YlNjDzUDTU=", "requires": { - "earcut": "^2.0.0", - "turf-helpers": "^3.0.12" + "earcut": "2.1.3", + "turf-helpers": "3.0.12" } }, "turf-tin": { @@ -1348,7 +1348,7 @@ "resolved": "https://registry.npmjs.org/turf-tin/-/turf-tin-3.0.12.tgz", "integrity": "sha1-tlNGRHY6zhyd8kHJWNI4SFUlc4U=", "requires": { - "turf-helpers": "^3.0.12" + "turf-helpers": "3.0.12" } }, "turf-triangle-grid": { @@ -1356,8 +1356,8 @@ "resolved": "https://registry.npmjs.org/turf-triangle-grid/-/turf-triangle-grid-3.0.12.tgz", "integrity": "sha1-gGR+V9r+CTRoeaKaGKDmKUrPEVk=", "requires": { - "turf-distance": "^3.0.12", - "turf-helpers": "^3.0.12" + "turf-distance": "3.0.12", + "turf-helpers": "3.0.12" } }, "turf-union": { @@ -1373,8 +1373,8 @@ "resolved": "https://registry.npmjs.org/turf-within/-/turf-within-3.0.12.tgz", "integrity": "sha1-937q83cjhWG3+xM4526dEph0H5Q=", "requires": { - "turf-helpers": "^3.0.12", - "turf-inside": "^3.0.12" + "turf-helpers": "3.0.12", + "turf-inside": "3.0.12" } }, "tweetnacl": { @@ -1436,9 +1436,9 @@ "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", "requires": { - "assert-plus": "^1.0.0", + "assert-plus": "1.0.0", "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" + "extsprintf": "1.3.0" } }, "wbuf": { @@ -1446,7 +1446,7 @@ "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz", "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==", "requires": { - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "1.0.1" } }, "wgs84": { diff --git a/api/v1/areaFunctions.js b/api/v1/areaFunctions.js index 3ee54c0..837d33d 100644 --- a/api/v1/areaFunctions.js +++ b/api/v1/areaFunctions.js @@ -95,7 +95,7 @@ module.exports = { }); let area = mathFunc.calculateArea(points); - module.exports.polygonDestruction(res, gameID, userID, polygonPoints, area, polygonsMerged); + // module.exports.polygonDestruction(res, gameID, userID, polygonPoints, area, polygonsMerged); module.exports.submitFinalCollation(res, gameID, userID, polygonPoints, area, polygonsMerged); }); }, diff --git a/components/new-button.js b/components/new-button.js index 35212c4..7351e1f 100644 --- a/components/new-button.js +++ b/components/new-button.js @@ -37,7 +37,7 @@ export default class WalkButton extends Component { buttonText: "Start Capture", buttonColour: 'rgba(0,255,0,0.5)' }) - this.start(); + this.stop(); }else{ console.log("state false to true") this.setState({ @@ -45,7 +45,7 @@ export default class WalkButton extends Component { buttonText: "Stop Capture", buttonColour: 'rgba(255,0,0,0.5)' }) - this.stop() + this.start() }}} // style={sharedStyles.new} > diff --git a/config.json b/config.json index 7245913..729cc0b 100644 --- a/config.json +++ b/config.json @@ -1,4 +1,4 @@ { - "host" : "http://umbrasheep.com", + "host" : "umbrasheep.com", "port" : "13370" } \ No newline at end of file diff --git a/update-map.js b/update-map.js index a24f69e..8f771e9 100644 --- a/update-map.js +++ b/update-map.js @@ -1,6 +1,26 @@ const config = require("./config.json"); import CapturedArea from "./components/captured-area"; +export const sendArea = (gameID, username, polygon) => { + // console.log(polygon) + points = [] + polygon.map((point) => { + points.push({lat: point.coordinate.latitude, lng: point.coordinate.longitude}) + }) + let formBody = []; + formBody.push("gameID=" + gameID); + formBody.push("userID=" + username); + formBody.push("points=" + JSON.stringify(points)); + formBody = formBody.join("&"); + console.log(formBody) + fetch("http://"+config.host + ":" + config.port + "/v1/polygon", { + method: "post", + headers: {'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'}, + body: formBody + }) + .then(res => {return res.json()}).then(data => console.log(data)); +} + export const updateAreas = (gameID, update) => { getPolygons(gameID).then((responseJson) => { let polygons = [] @@ -24,10 +44,10 @@ export const updateAreas = (gameID, update) => { function getPolygons(gameID) { console.log("http://"+config.host + ":" + config.port + "/v1/polygons?gameID=" + gameID) return fetch("http://"+config.host + ":" + config.port + "/v1/polygons?gameID=" + gameID, {method: 'GET', - headers: {'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'},}) - .then((response) => response.json()) - .catch((error) => { - console.error(error); + headers: {'Content-Type':'application/x-www-form-urlencoded;charset=UTF-8'}}) + .then(response => response.json()) + .catch(error => { + console.error(error); }); }