Skip to content

Commit 57601d4

Browse files
committed
Drop Unused WKX Dep
1 parent 4b9f694 commit 57601d4

File tree

7 files changed

+20
-34
lines changed

7 files changed

+20
-34
lines changed

js/stores/settingsStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class settingsStore {
1212
this.state[attrname] = preState[attrname]
1313
}
1414
}
15-
localStorage.setItem('AppVersion', '1.6.0')
15+
localStorage.setItem('AppVersion', '1.6.1')
1616
}
1717
getState() {
1818
return this.state

js/views/vehicle_loc.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ const iconMap = {
1818
}
1919

2020
let leaflet = require('react-leaflet')
21-
let wkx = require('wkx')
22-
let Buffer = require('buffer').Buffer
2321
let Map = leaflet.Map
2422
let Marker = leaflet.Marker
2523
let Popup = leaflet.Popup

js/views/vehicle_loc_bootstrap.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class VehicleLocationBootstrap extends React.Component {
9999
const tripNodeMatches = (item) => {
100100
return item.trip_id === newProps.match.params.trip_id
101101
}
102-
StationStore.getData(this.props.match.params.station).then((data) => {
102+
StationStore.getData(this.props.match.params.station, this.props.match.params.region).then((data) => {
103103
this.setState({
104104
tripInfo: StationStore.tripData.find(tripNodeMatches) || this.state.tripInfo,
105105
stopInfo: data

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
"sendgrid": "^4.3.0",
8282
"stream-transform": "^0.1.2",
8383
"style-loader": "^0.18.2",
84-
"wkx": "^0.4.0",
8584
"zenscroll": "^4.0.0"
8685
}
8786
}

server/cache-new.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,20 @@ async function doShit() {
3838
await metlinkShapes.create('../cache/metlink.zipunarchived/shapes.txt', outputDir, ['20170828_20170808-090059'])
3939
await metlinkShapes.upload('nz-wlg-20170828-20170808-090059', path.resolve(outputDir, '20170828_20170808-090059'))
4040
}
41-
connection.isReady.then(doShit)
41+
async function doOtherShit() {
42+
const outputDir = '../cache/at.zipunarchived/shapes'
43+
// cleans up old import if exists
44+
if (fs.existsSync(outputDir)) {
45+
await new Promise((resolve, reject) => {
46+
rimraf(outputDir, resolve)
47+
})
48+
}
49+
fs.mkdirSync(outputDir)
50+
51+
let atShapes = new createShapes()
52+
await atShapes.create('../cache/at.zipunarchived/shapes.txt', outputDir, ['20170918162843_v58.15', '20170918164808_v58.16'])
53+
await atShapes.upload('nz-akl-20170918164808-v58-16', path.resolve(outputDir, '20170918164808_v58.16'))
54+
await atShapes.upload('nz-akl-20170918162843-v58-15', path.resolve(outputDir, '20170918162843_v58.15'))
55+
}
56+
// connection.isReady.then(doShit)
57+
connection.isReady.then(doOtherShit)

server/lines/index.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,10 @@ blobSvc.createContainerIfNotExists('shapewkb', function(error, result, response)
1919
}
2020
})
2121

22-
var shapeWKBOptions = {
23-
url: 'https://api.at.govt.nz/v2/gtfs/shapes/geometry/',
24-
headers: {
25-
'Ocp-Apim-Subscription-Key': process.env.atApiKey
26-
}
27-
}
2822
let lineOperators = {}
2923

3024
function cacheOperatorsAndShapes(prefix = 'nz-akl') {
3125
let todo = []
32-
let shapeCount = 0
33-
let shapesToCache = []
3426
for (var key in allLines) {
3527
todo.push(key)
3628
}
@@ -173,15 +165,7 @@ var line = {
173165
let shape_id = req.params.shape_id
174166
tableSvc.retrieveEntity('meta', 'shapewkb', shape_id, function(err, result, response) {
175167
if (err) {
176-
line.getShapeFromAt([shape_id], function(wkb) {
177-
if (wkb.length < 1) {
178-
res.status(404).send({
179-
error: 'not found'
180-
})
181-
} else {
182-
res.send(wkb[0].the_geom)
183-
}
184-
})
168+
res.status(404).send()
185169
return
186170
}
187171

0 commit comments

Comments
 (0)