Skip to content

Commit a010d1a

Browse files
committed
disable mapillary.js
1 parent cf6daf6 commit a010d1a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "traccar-route-replay",
3-
"version": "1.2.8",
3+
"version": "1.2.9",
44
"private": true,
55
"scripts": {
66
"dev": "nuxt",

pages/index.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
</option>
4242
</select>
4343
<input id="follow" v-model="follow" type="checkbox">
44-
<label for="follow">{{ $t('Follow vehicle') }}</label>
44+
<label for="follow">{{ $t('Follow') }}</label>
4545
</div>
4646
</div>
4747
<div ref="speedometer" class="mapboxgl-ctrl">
@@ -214,7 +214,6 @@ export default {
214214
const bounds = bbox(points(this.path))
215215
map.fitBounds(bounds, { padding: boundsPadding })
216216
this.updateSliderBackground()
217-
init(bounds, this.path, map)
218217
this.checkImage()
219218
this.$refs.noUiSlider.noUiSlider.updateOptions({
220219
range: {
@@ -227,6 +226,8 @@ export default {
227226
},
228227
playing () {
229228
if (this.playing) {
229+
const bounds = bbox(points(this.path))
230+
init(bounds, this.path, map)
230231
if (this.i + 1 === this.path.length) { this.i = 0 }
231232
this.play()
232233
}
@@ -412,7 +413,7 @@ export default {
412413
const i = this.i
413414
if (this.route[i]) {
414415
const image = getImage(this.path[i], this.route[i].course)
415-
if (image.id && this.imgId !== image.id && this.imgTime !== 'loading...') {
416+
if (image && image.id && this.imgId !== image.id && this.imgTime !== 'loading...') {
416417
this.imgTime = 'loading...'
417418
this.imgId = image.id
418419
viewer.moveTo(image.id)

utils/mapillary.js

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export function init (bounds, path, map) {
2828
}
2929

3030
export function getImage (p, course) {
31+
if (!bboxes) { return }
3132
const filtered = bboxes.filter(f => booleanPointInPolygon(point(p), f))
3233
if (filtered.length) {
3334
const [box] = filtered

0 commit comments

Comments
 (0)