From 1bd4a800951c1c4deb1c33b2a2760f5d48eef3df Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 15 Nov 2016 11:56:43 -0600 Subject: [PATCH 01/20] buildpack --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d0ff7c0..a5da741 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,6 @@ Copy `envSample` as `.env`. Install node dependencies using `npm install` Run the development server using `npm run start` - # Local Configuration Variables You can edit them in `.env` file. From a2d4d409004f6e37c540cab76d7319c824294721 Mon Sep 17 00:00:00 2001 From: Matthew Twomey Date: Tue, 15 Nov 2016 14:41:00 -0600 Subject: [PATCH 02/20] Updated README.md --- README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d0ff7c0..6dd00fd 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,25 @@ Run the development server using `npm run start` You can edit them in `.env` file. # Heroku Deployment +Make sure your variables are defined in .env first. + +Install the heroku config plugin: +``` +heroku plugins:install heroku-config``` + ``` git init git add . git commit -m "react-create-app on Heroku" -# make sure commit all codes and usuaully you do not need to run above command if you are sure your codes in git repo is latest. -heroku create -b https://github.com/mars/create-react-app-buildpack.git +# make sure commit all codes and usually you do not need to run above command if you are sure your codes in git repo is latest. + +heroku create +heroku buildpacks:add heroku/nodejs +heroku buildpacks:add https://github.com/mars/create-react-app-buildpack.git + # set variables defined in .env -heroku config:set REACT_APP_API_BASE_PATH=base url -heroku config:set REACT_APP_SOCKET_URL=socket url -heroku config:set REACT_APP_AUTH0_CLIEND_ID=auth0 client id -heroku config:set REACT_APP_AUTH0_DOMAIN=auth0 domain -heroku config:set REACT_APP_GOOGLE_API_KEY=google api key +heroku config:push + git push heroku HEAD:master heroku open ``` @@ -31,5 +38,4 @@ You can use new configuration with below commands from [set-vars-on-heroku](http ``` heroku config:set REACT_APP_API_BASE_PATH=new base url git commit --allow-empty -m "Set REACT_APP_API_BASE_PATH config var" -git push heroku HEAD:master -``` +git push heroku HEAD:master``` From 7f7bfbc83c7e14a1af631a91284a1d751b931ad9 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 15 Nov 2016 15:58:21 -0600 Subject: [PATCH 03/20] added back in lat/long in infowindow --- src/components/mission/InfoWindow.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/components/mission/InfoWindow.js b/src/components/mission/InfoWindow.js index e135f41..065c72b 100644 --- a/src/components/mission/InfoWindow.js +++ b/src/components/mission/InfoWindow.js @@ -198,6 +198,30 @@ class InfoWindow extends Component {
+ + + Lat/X: + + + + this.latitudeElement = latElem} + onChange={this.handlePointChange.bind(this, 'lat')} /> + + + + + + Lon/Y: + + + + this.longitudeElement = lngElem} + onChange={this.handlePointChange.bind(this, 'lng')} /> + + + Param1: From 51e95ef398bfaee456223e7a1af7c28faa971ea8 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 15 Nov 2016 16:40:55 -0600 Subject: [PATCH 04/20] fix #23 and #24 --- src/components/mission/EditMissionPlanner.js | 2 +- src/components/mission/InfoWindow.js | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/mission/EditMissionPlanner.js b/src/components/mission/EditMissionPlanner.js index fe6a06f..3ae3c1a 100644 --- a/src/components/mission/EditMissionPlanner.js +++ b/src/components/mission/EditMissionPlanner.js @@ -61,7 +61,7 @@ class EditMissionPlanner extends Component { * @param {object} event the propogated event */ handleMapClick(event) { - this.addPoint(this, event.latLng, 0); + MapHelper.addPoint(this, event.latLng, 0); } componentWillReceiveProps(nextProps) { diff --git a/src/components/mission/InfoWindow.js b/src/components/mission/InfoWindow.js index 065c72b..497465b 100644 --- a/src/components/mission/InfoWindow.js +++ b/src/components/mission/InfoWindow.js @@ -45,12 +45,14 @@ class InfoWindow extends Component { } getSelectedCommand() { - if (this.state.type === 'T') { - return 'Takeoff'; - } else if (this.state.type === 'W') { - return 'Waypoint'; - } else { - return ''; + if (this.state.command === 22) { + return `Takeoff (${this.state.command} / ${this.state.type} ) `; + } else if (this.state.command === 16) { + return `Waypoint (${this.state.command} / ${this.state.type} ) `; + } else if (this.state.command === 21) { + return `Land (${this.state.command} / ${this.state.type} ) `; + } else { + return `command: ${this.state.command} / type: ${this.state.type} `; } } From 396a1d21ff0bc85f4d705c7e1eb6ad26d4850275 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 15 Nov 2016 17:47:59 -0600 Subject: [PATCH 05/20] playing with markers --- src/components/mission/helpers/MapHelper.js | 2 +- src/i/circle_cubs.svg | 9 ++++++ src/i/circle_green.svg | 33 ++------------------- 3 files changed, 12 insertions(+), 32 deletions(-) create mode 100644 src/i/circle_cubs.svg diff --git a/src/components/mission/helpers/MapHelper.js b/src/components/mission/helpers/MapHelper.js index 51d54a6..8bd0f23 100644 --- a/src/components/mission/helpers/MapHelper.js +++ b/src/components/mission/helpers/MapHelper.js @@ -8,7 +8,7 @@ * @author TCSCODER * @version 1.0.0 */ - import circleGreen from '../../../i/circle_green.svg'; + import circleGreen from '../../../i/circle_cubs.svg'; /** * Clear all markers (waypoints) diff --git a/src/i/circle_cubs.svg b/src/i/circle_cubs.svg new file mode 100644 index 0000000..45a32bf --- /dev/null +++ b/src/i/circle_cubs.svg @@ -0,0 +1,9 @@ + + + + Layer 1 + + + + + diff --git a/src/i/circle_green.svg b/src/i/circle_green.svg index 36d0af5..3a848f0 100644 --- a/src/i/circle_green.svg +++ b/src/i/circle_green.svg @@ -3,37 +3,8 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + From 8e42e3ecf216dab577c333c55d4dcadb218eef51 Mon Sep 17 00:00:00 2001 From: Matthew Twomey Date: Wed, 16 Nov 2016 16:36:58 -0600 Subject: [PATCH 06/20] Updated position of circles --- src/components/mission/helpers/MapHelper.js | 32 +++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/components/mission/helpers/MapHelper.js b/src/components/mission/helpers/MapHelper.js index 8bd0f23..a0bccc8 100644 --- a/src/components/mission/helpers/MapHelper.js +++ b/src/components/mission/helpers/MapHelper.js @@ -175,6 +175,30 @@ initPolyline(_self); } + function latLng2Point(latLng, map) { + const google = window.google; + var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()); + var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()); + var scale = Math.pow(2, map.getZoom()); + var worldPoint = map.getProjection().fromLatLngToPoint(latLng); + return new google.maps.Point((worldPoint.x - bottomLeft.x) * scale, (worldPoint.y - topRight.y) * scale); +} + +function point2LatLng(point, map) { + const google = window.google; + var topRight = map.getProjection().fromLatLngToPoint(map.getBounds().getNorthEast()); + var bottomLeft = map.getProjection().fromLatLngToPoint(map.getBounds().getSouthWest()); + var scale = Math.pow(2, map.getZoom()); + var worldPoint = new google.maps.Point(point.x / scale + bottomLeft.x, point.y / scale + topRight.y); + return map.getProjection().fromPointToLatLng(worldPoint); +} + +function offsetLatLng(latLng, map){ + var point = latLng2Point(latLng, map); + point.y -= 10; + return point2LatLng(point, map); +} + /** * Draw Polyline on the map * @@ -184,8 +208,9 @@ const google = window.google; const locations = []; for (let i=1;i<_self.state.markers.length;i++) { - locations.push(_self.state.markers[i].getPosition()); + locations.push(offsetLatLng(_self.state.markers[i].getPosition(), _self.map)); } + if (_self.poly) _self.poly.setMap(null); _self.poly = new google.maps.Polyline({ path: locations, @@ -283,5 +308,8 @@ addPoint, deleteWaypoint, initPolyline, - getMarkerOpts + getMarkerOpts, + latLng2Point, + point2LatLng, + offsetLatLng }; From 6235fd9c8c312dd35d744e057e6c6ca7813a2bc7 Mon Sep 17 00:00:00 2001 From: Matthew Twomey Date: Tue, 15 Nov 2016 14:41:00 -0600 Subject: [PATCH 07/20] Updated README.md --- README.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index a5da741..d9b75dd 100644 --- a/README.md +++ b/README.md @@ -10,18 +10,25 @@ Run the development server using `npm run start` You can edit them in `.env` file. # Heroku Deployment +Make sure your variables are defined in .env first. + +Install the heroku config plugin: +``` +heroku plugins:install heroku-config``` + ``` git init git add . git commit -m "react-create-app on Heroku" -# make sure commit all codes and usuaully you do not need to run above command if you are sure your codes in git repo is latest. -heroku create -b https://github.com/mars/create-react-app-buildpack.git +# make sure commit all codes and usually you do not need to run above command if you are sure your codes in git repo is latest. + +heroku create +heroku buildpacks:add heroku/nodejs +heroku buildpacks:add https://github.com/mars/create-react-app-buildpack.git + # set variables defined in .env -heroku config:set REACT_APP_API_BASE_PATH=base url -heroku config:set REACT_APP_SOCKET_URL=socket url -heroku config:set REACT_APP_AUTH0_CLIEND_ID=auth0 client id -heroku config:set REACT_APP_AUTH0_DOMAIN=auth0 domain -heroku config:set REACT_APP_GOOGLE_API_KEY=google api key +heroku config:push + git push heroku HEAD:master heroku open ``` @@ -30,5 +37,4 @@ You can use new configuration with below commands from [set-vars-on-heroku](http ``` heroku config:set REACT_APP_API_BASE_PATH=new base url git commit --allow-empty -m "Set REACT_APP_API_BASE_PATH config var" -git push heroku HEAD:master -``` +git push heroku HEAD:master``` From 0a94021c6d03949a8eda01e71764dcb2fb170486 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 17 Nov 2016 13:38:57 -0600 Subject: [PATCH 08/20] Add Heroku generated app.json --- app.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000..33f6c94 --- /dev/null +++ b/app.json @@ -0,0 +1,39 @@ +{ + "name": "dsp-app", + "description": "Airbus DSP", + "scripts": { + }, + "env": { + "REACT_APP_API_BASE_PATH": { + "required": true + }, + "REACT_APP_AUTH0_CLIEND_ID": { + "required": true + }, + "REACT_APP_AUTH0_DOMAIN": { + "required": true + }, + "REACT_APP_GOOGLE_API_KEY": { + "required": true + }, + "REACT_APP_SOCKET_URL": { + "required": true + } + }, + "formation": { + "web": { + "quantity": 1 + } + }, + "addons": [ + "papertrail" + ], + "buildpacks": [ + { + "url": "heroku/nodejs" + }, + { + "url": "https://github.com/mars/create-react-app-buildpack.git" + } + ] +} From c658fc7a74f89a83fbc005a09cc622465f47dae5 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 17 Nov 2016 13:48:15 -0600 Subject: [PATCH 09/20] added app.json file to towmeys --- app.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000..33f6c94 --- /dev/null +++ b/app.json @@ -0,0 +1,39 @@ +{ + "name": "dsp-app", + "description": "Airbus DSP", + "scripts": { + }, + "env": { + "REACT_APP_API_BASE_PATH": { + "required": true + }, + "REACT_APP_AUTH0_CLIEND_ID": { + "required": true + }, + "REACT_APP_AUTH0_DOMAIN": { + "required": true + }, + "REACT_APP_GOOGLE_API_KEY": { + "required": true + }, + "REACT_APP_SOCKET_URL": { + "required": true + } + }, + "formation": { + "web": { + "quantity": 1 + } + }, + "addons": [ + "papertrail" + ], + "buildpacks": [ + { + "url": "heroku/nodejs" + }, + { + "url": "https://github.com/mars/create-react-app-buildpack.git" + } + ] +} From f6303e81e7b04343bc4cebd69532ccdcb970c847 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 17 Nov 2016 14:32:42 -0600 Subject: [PATCH 10/20] app.json for heroku, oh and merged in cubs --- app.json | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 app.json diff --git a/app.json b/app.json new file mode 100644 index 0000000..33f6c94 --- /dev/null +++ b/app.json @@ -0,0 +1,39 @@ +{ + "name": "dsp-app", + "description": "Airbus DSP", + "scripts": { + }, + "env": { + "REACT_APP_API_BASE_PATH": { + "required": true + }, + "REACT_APP_AUTH0_CLIEND_ID": { + "required": true + }, + "REACT_APP_AUTH0_DOMAIN": { + "required": true + }, + "REACT_APP_GOOGLE_API_KEY": { + "required": true + }, + "REACT_APP_SOCKET_URL": { + "required": true + } + }, + "formation": { + "web": { + "quantity": 1 + } + }, + "addons": [ + "papertrail" + ], + "buildpacks": [ + { + "url": "heroku/nodejs" + }, + { + "url": "https://github.com/mars/create-react-app-buildpack.git" + } + ] +} From 42eb2305c72b7c2d0d3f5566f70477b5e52f0cb9 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 17 Nov 2016 14:45:06 -0600 Subject: [PATCH 11/20] force heroku --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a5da741..95c6572 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,5 @@ heroku config:set REACT_APP_API_BASE_PATH=new base url git commit --allow-empty -m "Set REACT_APP_API_BASE_PATH config var" git push heroku HEAD:master ``` + +dev From 5918d77048c4bfcd549d6e54a8003e43339283ff Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 17 Nov 2016 14:46:38 -0600 Subject: [PATCH 12/20] force heroku --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 95c6572..56a63bd 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,3 @@ git commit --allow-empty -m "Set REACT_APP_API_BASE_PATH config var" git push heroku HEAD:master ``` -dev From 246f9cb49ee4c11d62ab9102778a0e6c4b6a03b4 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 22 Nov 2016 15:26:26 -0600 Subject: [PATCH 13/20] Create ISSUE_TEMPLATE --- ISSUE_TEMPLATE | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 ISSUE_TEMPLATE diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE new file mode 100644 index 0000000..3a3e6fd --- /dev/null +++ b/ISSUE_TEMPLATE @@ -0,0 +1,4 @@ +![](https://scontent.ford1-1.fna.fbcdn.net/v/t1.0-9/14717161_10154488333556101_5487997839680388224_n.png?oh=fd410a07763a52f126ae17433dc85340&oe=58A1F9EB) + +We have a pretty decent start with out Drone Service Provider App and we are ready to make a bunch of small fixes and enhancements before we start to add some new features. In the forum you will find the github repo to our front end. +You will be happy to know that it is pre-configure to connect to our working backend. All you have to do is. From 249a5002923b6304f3b315f2c1a14b4bfcd0f4fe Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 22 Nov 2016 16:42:26 -0600 Subject: [PATCH 14/20] Update ISSUE_TEMPLATE --- ISSUE_TEMPLATE | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE index 3a3e6fd..00f8554 100644 --- a/ISSUE_TEMPLATE +++ b/ISSUE_TEMPLATE @@ -1,4 +1,34 @@ ![](https://scontent.ford1-1.fna.fbcdn.net/v/t1.0-9/14717161_10154488333556101_5487997839680388224_n.png?oh=fd410a07763a52f126ae17433dc85340&oe=58A1F9EB) -We have a pretty decent start with out Drone Service Provider App and we are ready to make a bunch of small fixes and enhancements before we start to add some new features. In the forum you will find the github repo to our front end. -You will be happy to know that it is pre-configure to connect to our working backend. All you have to do is. +## Intro + + +## Requirements + + +## Project Background + + +For this series we are creating a Drone Service Platform (DSP) which consist of a marketplace where customers can request drone services for providers/operators. Examples of the services would be drone delivery, mapping, monitoring and many other tasks. In addition to delivering drone services we will also provide a level of traffic management. + + + + +## Other notable challenges in this series +[Maps React and REST](https://www.topcoder.com/challenge-details/30055562) +[React Map Mission Plan](http://www.topcoder.com/challenge-details/30055599/?type=develop&noncache=true) +[Mission Plan fixes part 1](https://www.topcoder.com/challenge-details/30055665) +[WEBAPI - Consumer to DSP API Product Catalog - swagger API design](http://www.topcoder.com/challenge-details/30055646) + + +# Links +[front end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-app] +[back end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-server] + + +## Submission Guidelines +1. Ensure good test coverage on all modules +2. Upload documentation for how to run your submission +3. Upload all your source code as a zip for review +4. Winner will be required to submit a pull request with their winning code. +5. Please include a video with your submission. If you are not comfortable with spoken english feel free to annotate with text. From 2887ab5a3ad3f096a098ce78de0086a4ac698ebe Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Tue, 22 Nov 2016 17:16:02 -0600 Subject: [PATCH 15/20] Update ISSUE_TEMPLATE --- ISSUE_TEMPLATE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE index 00f8554..58d4b4d 100644 --- a/ISSUE_TEMPLATE +++ b/ISSUE_TEMPLATE @@ -22,8 +22,8 @@ For this series we are creating a Drone Service Platform (DSP) which consist of # Links -[front end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-app] -[back end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-server] +[front end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-app) +[back end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-server) ## Submission Guidelines From bac62691ac1bf291a9120fb5e27e2ebf2b6c908c Mon Sep 17 00:00:00 2001 From: nardevorg Date: Wed, 7 Dec 2016 00:04:25 +0100 Subject: [PATCH 16/20] Fix login and mission planner --- src/api/User.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/User.js b/src/api/User.js index 0a34e59..bbfaf92 100644 --- a/src/api/User.js +++ b/src/api/User.js @@ -23,7 +23,7 @@ class UserApi { } login(email, password) { - const url = `${this.basePath}/api/v1/users/auth`; + const url = `${this.basePath}/api/v1/login`; return reqwest({ url: url, method: 'post', type: 'json', contentType: 'application/json', @@ -34,19 +34,21 @@ class UserApi { } register(name, email, password) { - const url = `${this.basePath}/api/v1/users`; + const url = `${this.basePath}/api/v1/register`; return reqwest({ url: url, method: 'post', type: 'json', contentType: 'application/json', data: JSON.stringify({ - name: name, + firstName: name, + lastName: name, email: email, + phone: "1", password: password, })}); } registerSocialUser(name, email) { - const url = `${this.basePath}/api/v1/users/social`; + const url = `${this.basePath}/api/v1/login/social`; return reqwest({ url: url, method: 'post', type: 'json', contentType: 'application/json', From 6386e4217d2b6d9913d4dbe0d329aa7f13e9626f Mon Sep 17 00:00:00 2001 From: gondzo Date: Wed, 7 Dec 2016 03:57:11 +0100 Subject: [PATCH 17/20] mission planner fixes --- src/api/Mission.js | 2 ++ src/components/mission/MissionPlannerList.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/Mission.js b/src/api/Mission.js index d162438..6b7c824 100644 --- a/src/api/Mission.js +++ b/src/api/Mission.js @@ -45,6 +45,7 @@ class MissionApi { plannedHomePosition: homePosition, missionItems: items, missionName: name, + status:'waiting', })}); } @@ -58,6 +59,7 @@ class MissionApi { plannedHomePosition: homePosition, missionItems: items, missionName: name, + status:'waiting', })}); } diff --git a/src/components/mission/MissionPlannerList.js b/src/components/mission/MissionPlannerList.js index 69998a8..949e9a4 100644 --- a/src/components/mission/MissionPlannerList.js +++ b/src/components/mission/MissionPlannerList.js @@ -26,13 +26,13 @@ class MissionPlannerList extends Component { componentDidMount() { this.missionApi.getAll().then((missions) => { - this.setState({ missions: missions }); + this.setState({ missions: missions.items }); }); } refresh() { this.missionApi.getAll().then((missions) => { - this.setState({ missions: missions }); + this.setState({ missions: missions.items }); }); } From 682e4d4dc6c4507cfefcfb839e4e5c174e9cd8ca Mon Sep 17 00:00:00 2001 From: gondzo Date: Fri, 9 Dec 2016 00:09:05 +0100 Subject: [PATCH 18/20] fix lat/lon change to currentLocation --- src/components/maps/GoogleMap.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/maps/GoogleMap.js b/src/components/maps/GoogleMap.js index f490ea0..48a59c5 100644 --- a/src/components/maps/GoogleMap.js +++ b/src/components/maps/GoogleMap.js @@ -35,7 +35,7 @@ class GoogleMap extends Component { getMarkerConfig(drone) { const google = window.google; const config = { clickable: false, crossOnDrag: false, - cursor: 'pointer', position: new google.maps.LatLng(drone.lat, drone.lng) }; + cursor: 'pointer', position: new google.maps.LatLng(drone.currentLocation[0],drone.currentLocation[1]) }; switch (drone.status) { case 'in-motion': config.icon = 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png'; @@ -90,7 +90,7 @@ class GoogleMap extends Component { }); // get a list of all the drones droneApi.getAll().then((drones) => { - _self.markers = drones.map((single) => { + _self.markers = drones.items.map((single) => { const marker = new google.maps.Marker(_self.getMarkerConfig(single)); // set the marker id, to identify a drone uniquely marker.set('id', single.id); @@ -110,7 +110,7 @@ class GoogleMap extends Component { // find a marker by id const marker = _.find(_self.markers, { id: data.id }); if (marker) { - marker.setPosition(new google.maps.LatLng(data.lat, data.lng)); + marker.setPosition(new google.maps.LatLng(data.currentLocation[0], data.currentLocation[1])); // repaint the cluster _self.markerCluster.repaint(); } From 4878c49281804c2549ff9426d18124b39ab90245 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 15 Dec 2016 15:12:16 -0600 Subject: [PATCH 19/20] Update ISSUE_TEMPLATE --- ISSUE_TEMPLATE | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE index 58d4b4d..89acfb4 100644 --- a/ISSUE_TEMPLATE +++ b/ISSUE_TEMPLATE @@ -15,15 +15,19 @@ For this series we are creating a Drone Service Platform (DSP) which consist of ## Other notable challenges in this series -[Maps React and REST](https://www.topcoder.com/challenge-details/30055562) -[React Map Mission Plan](http://www.topcoder.com/challenge-details/30055599/?type=develop&noncache=true) -[Mission Plan fixes part 1](https://www.topcoder.com/challenge-details/30055665) -[WEBAPI - Consumer to DSP API Product Catalog - swagger API design](http://www.topcoder.com/challenge-details/30055646) +* [Maps React and REST](https://www.topcoder.com/challenge-details/30055562) +* [React Map Mission Plan](http://www.topcoder.com/challenge-details/30055599/?type=develop&noncache=true) +* [Mission Plan fixes part 1](https://www.topcoder.com/challenge-details/30055665) +* [WEBAPI - Consumer to DSP API Product Catalog - swagger API design](http://www.topcoder.com/challenge-details/30055646) +* [Move Mission Planner to react frontend)[https://www.topcoder.com/challenge-details/30055900] +* [Move Traffic Map to react frontend)[https://www.topcoder.com/challenge-details/30055925] +* [No Fly Zone Polygons](https://www.topcoder.com/challenge-details/30055935) # Links -[front end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-app) -[back end src: topcoderinc/dsp-app](http://github.com/topcoderinc/dsp-server) +[front end src: topcoderinc/dsp-frontend](http://github.com/topcoderinc/dsp-frontend) +[back end src: topcoderinc/dsp-server](http://github.com/topcoderinc/dsp-server) +[Live Heroku Dev Frontend: http://kb-dsp-server-dev.herokuapp.com/api/v1](http://kb-dsp-server-dev.herokuapp.com/api-docs/) ## Submission Guidelines From 484ebe5399be9b020394465b273e01696ecd5ef0 Mon Sep 17 00:00:00 2001 From: Kyle Bowerman Date: Thu, 15 Dec 2016 15:48:30 -0600 Subject: [PATCH 20/20] Update ISSUE_TEMPLATE --- ISSUE_TEMPLATE | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ISSUE_TEMPLATE b/ISSUE_TEMPLATE index 89acfb4..8190732 100644 --- a/ISSUE_TEMPLATE +++ b/ISSUE_TEMPLATE @@ -19,8 +19,8 @@ For this series we are creating a Drone Service Platform (DSP) which consist of * [React Map Mission Plan](http://www.topcoder.com/challenge-details/30055599/?type=develop&noncache=true) * [Mission Plan fixes part 1](https://www.topcoder.com/challenge-details/30055665) * [WEBAPI - Consumer to DSP API Product Catalog - swagger API design](http://www.topcoder.com/challenge-details/30055646) -* [Move Mission Planner to react frontend)[https://www.topcoder.com/challenge-details/30055900] -* [Move Traffic Map to react frontend)[https://www.topcoder.com/challenge-details/30055925] +* [Move Mission Planner to react frontend](https://www.topcoder.com/challenge-details/30055900) +* [Move Traffic Map to react frontend](https://www.topcoder.com/challenge-details/30055925) * [No Fly Zone Polygons](https://www.topcoder.com/challenge-details/30055935)