Skip to content

Commit e79ac2c

Browse files
authored
Merge pull request #121 from bcgov/qa
Update to 0.0.20
2 parents 43f4a11 + a91b3ca commit e79ac2c

File tree

61 files changed

+3426
-4570
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3426
-4570
lines changed

config/layer-display.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
]
3737
},
3838
{
39-
"id": "dangerous-goods-routes",
39+
"id": "dangerous-goods-restrictions",
4040
"class": "smk-inline-legend",
4141
"isVisible": false
4242
},
@@ -64,7 +64,7 @@
6464
{
6565
"type": "folder",
6666
"title": "Height Restrictions",
67-
"isVisible": false,
67+
"isVisible": true,
6868
"isExpanded": true,
6969
"items": [
7070
{ "id": "overhead-structure-with-height-marker", "isVisible": true, "class": "smk-inline-legend" },
@@ -83,7 +83,7 @@
8383
{ "id": "cardlock", "isVisible": false, "class": "smk-inline-legend" },
8484
{ "id": "truck-parking", "isVisible": false, "class": "smk-inline-legend" },
8585
{ "id": "port-of-vancouver-facilities-terminals", "isVisible": false, "class": "smk-inline-legend" },
86-
{ "id": "industrial-area", "isVisible": false, "class": "smk-inline-legend" },
86+
{ "id": "industrial-area", "isVisible": true, "class": "smk-inline-legend" },
8787
{ "id": "downtown-vancouver", "isVisible": false, "class": "smk-inline-legend" },
8888
{
8989
"type": "group",

config/map.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,19 @@
109109
"truckRoute": false,
110110
"vehicleType": false
111111
},
112-
"apiKey": "11dd756f680c47b5aef5093d95543738",
112+
"routePlannerService": {
113+
"url": "https://router.api.gov.bc.ca/",
114+
"apiKey": "11dd756f680c47b5aef5093d95543738"
115+
},
116+
"geocoderService": {
117+
"url": "https://geocoder.api.gov.bc.ca/",
118+
"parameter": {
119+
"maxDistance": 50,
120+
"locationMode": "input"
121+
}
122+
},
113123
"truck": true,
124+
"criteria": "fastest",
114125
"segmentLayers": [
115126
{
116127
"id": "@potential",
@@ -201,7 +212,8 @@
201212
"position": "toolbar",
202213
"title": "Reports and Notices",
203214
"icon": "warning",
204-
"order": 99
215+
"order": 99,
216+
"useComponent": true
205217
}
206218
]
207219
}

config/test-services.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"tools": [
3+
{
4+
"type": "directions",
5+
"routePlannerService": {
6+
"# url": "https://ssl.refractions.net/ols/router/",
7+
"url": "https://routertst.pathfinder.gov.bc.ca/",
8+
"apiKey": "11dd756f680c47b5aef5093d95543738"
9+
},
10+
"geocoderService": {
11+
"url": "https://geocodertst.api.gov.bc.ca/",
12+
"parameter": {
13+
"maxDistance": 50,
14+
"locationMode": "input"
15+
}
16+
}
17+
}
18+
]
19+
}

fragments/disclaimer.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ <h1><span class="translink-logo"></span>Truck Route Planner</h1>
55

66
<section>
77
<p>
8-
This website (the Truck Route Planner (TRP) Beta) and all of the information it contains are provided "as is" without warranty of any kind, whether express or implied.
8+
This website (the Truck Route Planner (TRP)) and all of the information it contains are provided "as is" without warranty of any kind, whether express or implied.
99
All implied warranties, including, without limitation, implied warranties of merchantability, fitness for a particular purpose, and non-infringement, are hereby expressly disclaimed.
1010
</p>
1111
<p>
12-
Links and references to any other websites are provided for information only and listing shall not be taken as endorsement of any kind.
13-
TransLink is not responsible for the content or reliability of the linked websites and does not endorse the content, products, services or views expressed within them.
12+
Links and references to any other websites are provided for information only and listing shall not be taken as endorsement of any kind.
13+
TransLink or any of its partners or stakeholders (including, without limitation, the Province of BC) are not responsible for the content or reliability of the linked websites and do not endorse the content, products, services or views expressed within them.
14+
</p>
15+
<p>
16+
Under no circumstances will TransLink or any of its partners or stakeholders (including, without limitation, the Province of BC) be liable to any person or business entity for any direct, indirect, special, incidental, consequential, or other damage based on any use of this website or any other website to which this site is linked, including, without limitation, any lost profits, business interruption, or loss of programs or information, even if TransLink or any of its partners or stakeholders (including, without limitation, the Province of BC) have been specifically advised.
1417
</p>
1518
<p>
16-
Under no circumstances will TransLink be liable to any person or business entity for any direct, indirect, special, incidental, consequential, or other damage based on any use of this website or any other website to which this site is linked, including, without limitation, any lost profits, business interruption, or loss of programs or information, even if TransLink has been specifically advised.
19+
TransLink and the Province of BC, in their sole discretion, may at any time without notice revise the content and features of this website and the terms and conditions of its use, or terminate this website at any time, for any reason, without any notice and without any liability to any person or business entity.
1720
</p>
1821
<img src="images/no_mobile_icon.svg" class="warningImage" alt="Graphic warning to discourage using mobile devices">
1922
<p>

fragments/glossary.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,10 @@
1212
A route, or a portion of a route, that may not comply with municipal truck route bylaws and may not be suitable for a vehicle with the default or user-entered vehicle parameters.
1313
The driver and/or carrier is responsible for ensuring the default vehicle parameters or user-entered vehicle parameters are an accurate representation of the actual vehicle, for verifying all clearances and restrictions on the route, and for ensuring the vehicle is operated in compliance with all applicable municipal bylaws and provincial and federal regulations.
1414
</dd>
15+
16+
<dt>Heavy Truck</dt>
17+
<dd>
18+
A motor vehicle with a licensed gross vehicle weight (LGVW) greater than 11,794 kg (26,000 lb).
19+
</dd>
1520
</dl>
1621
</section>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<p>
22
<span>{{ direction.name || direction.text }}, {{ segment.locality }}:</span>
3-
<span v-html="notification.message"></span>
3+
<span v-html="message"></span>
44
</p>

fragments/report-not-heavy-truck.html

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
1-
<template v-if="municipalities.length > 0">
1+
<div v-if="municipalities.length > 0">
22
<p>
33
Based on the GVW and axle count, your vehicle is not considered to be a heavy truck in the following municipalities:
44
</p>
55
<ul class="municipalities">
66
<li v-for="muni in municipalities">{{ muni }}</li>
77
</ul>
8-
<p>
9-
The driver and/or carrier is responsible for ensuring the default vehicle parameters or user-entered vehicle parameters are an accurate representation of the actual vehicle, for verifying all clearances and restrictions on the route, and for ensuring the vehicle is operated in compliance with all applicable municipal bylaws and provincial and federal regulations.
10-
<a href="[LINK to Municipal and Provincial contact information]">LINK to Municipal and Provincial contact information</a>
11-
</p>
12-
</template>
8+
</div>

fragments/report-oversize.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div>
2+
<p>
3+
Based on the vehicle parameters you entered, you may require a municipal and/or Provincial permit to operate this vehicle.
4+
The driver and/or carrier is responsible for ensuring the default vehicle parameters or user-entered vehicle parameters are an accurate representation of the actual vehicle, for verifying all clearances and restrictions on the route, and for ensuring the vehicle is operated in compliance with all applicable municipal bylaws and provincial and federal regulations.
5+
</p>
6+
<p>
7+
<activate-tool id="bespoke--contacts" title="Link to Municipal and Provincial contact information">Municipal and Provincial contact information</activate-tool>
8+
</p>
9+
</div>

fragments/report-truck.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<div>
2+
<p>
3+
The driver and/or carrier is responsible for ensuring the default vehicle parameters or user-entered vehicle parameters are an accurate representation of the actual vehicle, for verifying all clearances and restrictions on the route, and for ensuring the vehicle is operated in compliance with all applicable municipal bylaws and provincial and federal regulations.
4+
</p>
5+
<p>
6+
<activate-tool id="bespoke--contacts" title="Link to Municipal and Provincial contact information">Municipal and Provincial contact information</activate-tool>
7+
</p>
8+
</div>

fragments/reports.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<section class="trp-reports">
22
<div class="trp-report"
3-
v-bind:class="[ r.type ]"
43
v-for="r in reports"
5-
v-if="r.message"
6-
v-html="r.message"
4+
v-bind:class="[ r.type ]"
5+
v-bind:is="r.component"
76
></div>
87
</section>

index.html

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ <h3 id="package-build-date" title="?">
136136
'smk-container-sel': "#smk-map-frame",
137137
'smk-config': [
138138
'./layers/cardlock/config.json',
139-
'./layers/dangerous-goods-routes/config.json',
139+
// './layers/dangerous-goods-routes/config.json',
140+
'./layers/dangerous-goods-restrictions/config.json',
140141
'./layers/downtown-vancouver/config.json',
141142
'./layers/industrial-area/config.json',
142143
'./layers/inspection-station/config.json',
@@ -227,8 +228,8 @@ <h3 id="package-build-date" title="?">
227228
el: el,
228229
data: {
229230
vehicleTypes: JSON.parse( JSON.stringify( TRP.vehicleTypes ) ),
230-
vehicleIndex: null,
231-
configIndex: null,
231+
vehicleIndex: tool.trp && tool.trp.vehicleIndex,
232+
configIndex: tool.trp && tool.trp.configIndex,
232233
},
233234
computed: {
234235
vehicleStyle: function () {
@@ -266,24 +267,36 @@ <h3 id="package-build-date" title="?">
266267
tool.truckWeight = config.weight
267268
tool.oversize = config.oversize
268269

270+
tool.trp = {
271+
vehicleIndex: this.vehicleIndex,
272+
configIndex: this.configIndex
273+
}
274+
269275
Vue.nextTick( function () {
270276
smk.$tool[ 'directions' ].findRoute()
271277
} )
272278
},
273279
}
274280
} )
275281

276-
vm.selectVehicle( 0 )
282+
if ( !tool.trp ) {
283+
vm.selectVehicle( 0 )
284+
}
277285

278286
smk.on( tool.id, {
279287
'change': function ( ev ) {
280288
var config = vm.$data.vehicleTypes[ vm.$data.vehicleIndex ].configs[ vm.$data.configIndex ]
281-
289+
282290
tool.oversize = config.oversize
283291
|| config.height < tool.truckHeight
284292
|| config.width < tool.truckWidth
285293
|| config.length < tool.truckLength
286294
|| config.weight < tool.truckWeight
295+
296+
tool.trp = {
297+
vehicleIndex: vm.$data.vehicleIndex,
298+
configIndex: vm.$data.configIndex
299+
}
287300
}
288301
} )
289302
} )
@@ -308,7 +321,8 @@ <h3 id="package-build-date" title="?">
308321
if ( !reports || reports.length == 0 ) return
309322

310323
smk.$tool[ 'bespoke--reports' ].status = 'ready'
311-
routingReports = response.reports = reports
324+
response.reports = JSON.parse( JSON.stringify( reports ) )
325+
routingReports = reports
312326
} )
313327
}
314328
} )
@@ -334,9 +348,17 @@ <h3 id="package-build-date" title="?">
334348
SMK.HANDLER.set( 'bespoke--reports', 'activated', function ( smk, tool, el ) {
335349
// debugger
336350
include( [ { url: './fragments/reports.html' }, { url: './fragments/reports.css' } ], 'bespoke--reports' ).then( function ( inc ) {
337-
el.innerHTML = htmlTemplate( inc[ 'bespoke--reports.reports-html' ], {
338-
reports: routingReports
339-
} )
351+
tool.component = {
352+
template: inc[ 'bespoke--reports.reports-html' ],
353+
data: function () {
354+
return {
355+
reports: routingReports.map( function ( r ) {
356+
r.component.data = function () { return r.component.dataObj }
357+
return r
358+
} )
359+
}
360+
}
361+
}
340362
} )
341363
} )
342364

@@ -346,6 +368,7 @@ <h3 id="package-build-date" title="?">
346368
function htmlTemplate( template, data ) {
347369
return ( new Vue( { template: '<div>' + template + '</div>', data: data } ) ).$mount().$el.innerHTML
348370
}
371+
349372
</script>
350373

351374

layers/.DS_Store

6 KB
Binary file not shown.

0 commit comments

Comments
 (0)