diff --git a/mapping/mapping.json b/mapping/mapping.json index e8d19f9..4c95bc6 100644 --- a/mapping/mapping.json +++ b/mapping/mapping.json @@ -4,355 +4,447 @@ "id": "i-frea-sanr", "x": 658.23, "y": 2401.96, - "label": "Freedom Avenue & Sandstone Road" + "label": "Freedom Avenue & Sandstone Road", + "type": "intersection" }, { "id": "i-frea-durr", "x": 803.43, "y": 2398.87, - "label": "Freedom Avenue & Durham Road" + "label": "Freedom Avenue & Durham Road", + "type": "intersection" }, { "id": "i-frea-mais", "x": 918.75, "y": 2399.22, - "label": "Freedom Avenue & Main Street" + "label": "Freedom Avenue & Main Street", + "type": "intersection" }, { "id": "i-frea-pars", "x": 1072.97, "y": 2398.39, - "label": "Freedom Avenue & Park Street" + "label": "Freedom Avenue & Park Street", + "type": "intersection" }, { "id": "i-frea-rivd", "x": 1242, "y": 2397.39, - "label": "Freedom Avenue & Riverside Drive" + "label": "Freedom Avenue & Riverside Drive", + "type": "intersection" }, { "id": "i-frea-indr", "x": 1420.48, "y": 2399.2, - "label": "Freedom Avenue & Industrial Road" + "label": "Freedom Avenue & Industrial Road", + "type": "intersection" }, { "id": "i-frea-cros", "x": 1571.94, "y": 2398.35, - "label": "Freedom Avenue & Cross Street" + "label": "Freedom Avenue & Cross Street", + "type": "intersection" }, { "id": "i-frea-clis", "x": 1729.62, "y": 2399.96, - "label": "Freedom Avenue & Cline Street" - }, - { - "id": "i-frea-hwy5", - "x": 2154.98, - "y": 2397.43, - "label": "Freedom Avenue & River City HWY 55" + "label": "Freedom Avenue & Cline Street", + "type": "intersection" }, { "id": "i-graa-sanr", "x": 659.92, "y": 2270.42, - "label": "Grand Avenue & Sandstone Road" + "label": "Grand Avenue & Sandstone Road", + "type": "intersection" }, { "id": "i-graa-mais", "x": 916.47, "y": 2271.2, - "label": "Grand Avenue & Main Street" + "label": "Grand Avenue & Main Street", + "type": "intersection" }, { "id": "i-graa-durr", "x": 803.45, "y": 2270.92, - "label": "Grand Avenue & Durham Road" + "label": "Grand Avenue & Durham Road", + "type": "intersection" }, { "id": "i-graa-pars", "x": 1071.92, "y": 2272.83, - "label": "Grand Avenue & Park Street" + "label": "Grand Avenue & Park Street", + "type": "intersection" }, { "id": "i-orcb-rivd", "x": 1239.74, "y": 2157.72, - "label": "Orchard Boulevard & Riverside Drive" + "label": "Orchard Boulevard & Riverside Drive", + "type": "intersection" }, { "id": "i-orcb-mais", "x": 916.47, "y": 2157.47, - "label": "Orchard Boulevard & Main Street" + "label": "Orchard Boulevard & Main Street", + "type": "intersection" }, { "id": "i-orcb-durr", "x": 817.93, "y": 2174.92, - "label": "Orchard Boulevard & Durham Road" + "label": "Orchard Boulevard & Durham Road", + "type": "intersection" }, { "id": "i-soua-durr", "x": 802.43, "y": 2533.38, - "label": "Southern Avenue & Durham Road" + "label": "Southern Avenue & Durham Road", + "type": "intersection" }, { "id": "i-soua-mais", "x": 917.45, "y": 2532.38, - "label": "Southern Avenue & Main Street" + "label": "Southern Avenue & Main Street", + "type": "intersection" }, { "id": "i-soua-pars", "x": 1071.98, "y": 2531.88, - "label": "Southern Avenue & Park Street" + "label": "Southern Avenue & Park Street", + "type": "intersection" }, { "id": "i-libw-durr", "x": 803.43, "y": 2647.32, - "label": "Liberty Way & Durham Road" + "label": "Liberty Way & Durham Road", + "type": "intersection" }, { "id": "i-libw-mais", "x": 917.95, "y": 2645.32, - "label": "Liberty Way & Main Street" + "label": "Liberty Way & Main Street", + "type": "intersection" }, { "id": "i-libw-pars", "x": 1056.72, "y": 2628.92, - "label": "Liberty Way & Park Street" + "label": "Liberty Way & Park Street", + "type": "intersection" }, { "id": "i-orcb-pars", "x": 1070.88, "y": 2157.92, - "label": "Orchard Boulevard & Park Street" + "label": "Orchard Boulevard & Park Street", + "type": "intersection" }, { "id": "i-orcb-indr", "x": 1419.49, "y": 2158.11, - "label": "Orchard Boulevard & Industrial Road" + "label": "Orchard Boulevard & Industrial Road", + "type": "intersection" }, { "id": "i-orcb-cros", "x": 1574.99, "y": 2155.87, - "label": "Orchard Boulevard & Cross Street" + "label": "Orchard Boulevard & Cross Street", + "type": "intersection" }, { "id": "i-orcb-clis", "x": 1729.48, "y": 2158.23, - "label": "Orchard Boulevard & Cline Street" + "label": "Orchard Boulevard & Cline Street", + "type": "intersection" }, { "id": "i-geoa-indr", "x": 1419.61, "y": 2271.1, - "label": "Georgia Avenue & Industrial Road" + "label": "Georgia Avenue & Industrial Road", + "type": "intersection" }, { "id": "i-geoa-cros", "x": 1574.96, "y": 2270.89, - "label": "Georgia Avenue & Cross Street" + "label": "Georgia Avenue & Cross Street", + "type": "intersection" }, { "id": "i-geoa-clis", "x": 1728.99, "y": 2270.89, - "label": "Georgia Avenue & Cline Street" + "label": "Georgia Avenue & Cline Street", + "type": "intersection" }, { "id": "i-madc-cros", "x": 1574.16, "y": 2532.21, - "label": "Madison Court & Cross Street" + "label": "Madison Court & Cross Street", + "type": "intersection" }, { "id": "i-madc-indr", "x": 1440.94, "y": 2517.93, - "label": "Madison Court & Industrial Road" + "label": "Madison Court & Industrial Road", + "type": "intersection" }, { "id": "i-madc-clis", "x": 1712.27, "y": 2514.63, - "label": "Madison Court & Cline Street" + "label": "Madison Court & Cline Street", + "type": "intersection" }, { "id": "i-graa-fair", "x": 483.38, "y": 2254.85, - "label": "Grand Avenue & Fairfax Road" + "label": "Grand Avenue & Fairfax Road", + "type": "intersection" }, { "id": "i-hilr-sanr", "x": 658.46, "y": 2083.41, - "label": "Hillview Road & Sandstone Road" + "label": "Hillview Road & Sandstone Road", + "type": "intersection" }, { "id": "i-hilr-fair", "x": 469.53, "y": 2085.94, - "label": "Hillview Road & Fairfax Road" + "label": "Hillview Road & Fairfax Road", + "type": "intersection" }, { "id": "i-indp-sanr", "x": 672.57, "y": 2003.89, - "label": "Independence Parkway & Sandstone Road" + "label": "Independence Parkway & Sandstone Road", + "type": "intersection" }, { "id": "i-indp-mais", "x": 917.6, "y": 1984.39, - "label": "Independence Parkway & Main Street" + "label": "Independence Parkway & Main Street", + "type": "intersection" }, { "id": "i-indp-pars", "x": 1072.59, "y": 1985.88, - "label": "Independence Parkway & Park Street" + "label": "Independence Parkway & Park Street", + "type": "intersection" }, { "id": "i-indp-rivd", "x": 1242.01, "y": 1984.39, - "label": "Independence Parkway & Riverside Drive" + "label": "Independence Parkway & Riverside Drive", + "type": "intersection" }, { "id": "i-indp-cros", "x": 1561.56, "y": 2006.36, - "label": "Independence Parkway & Cross Street" + "label": "Independence Parkway & Cross Street", + "type": "intersection" }, { "id": "i-fair-arbl", "x": 793.02, "y": 1757.48, - "label": "Fairfax Road & Arbor Lane" + "label": "Fairfax Road & Arbor Lane", + "type": "intersection" }, { "id": "i-orch-cold", "x": 1825.12, "y": 2155.38, - "label": "Orchard Blvd & Colonial Drive" + "label": "Orchard Blvd & Colonial Drive", + "type": "intersection" }, { "id": "i-frea-vald", "x": 325.99, "y": 2393.72, - "label": "Freedom Avenue & Valley Drive" + "label": "Freedom Avenue & Valley Drive", + "type": "intersection" }, { - "id": "i-frea-vald", + "id": "i-vald-arbl", "x": 791.31, "y": 1611.89, - "label": "Valley Drive & Arbor Lane" + "label": "Valley Drive & Arbor Lane", + "type": "intersection" }, { "id": "i-fair-rivd", "x": 1239.22, "y": 1612.81, - "label": "Fairfax Road & Riverside Drive" + "label": "Fairfax Road & Riverside Drive", + "type": "intersection" }, { "id": "i-orcb-vins", "x": 1940.29, "y": 2125.76, - "label": "Orchard Blvd & Vine Street" + "label": "Orchard Blvd & Vine Street", + "type": "intersection" }, { "id": "i-indp-gibl", - "x": 1419.10, + "x": 1419.1, "y": 1984.38, - "label": "Independence Parkway & Gibson Lane" + "label": "Independence Parkway & Gibson Lane", + "type": "intersection" }, { "id": "i-gibl-lees", "x": 1686.25, "y": 1728.82, - "label": "Gibson Lane & Lee Street" + "label": "Gibson Lane & Lee Street", + "type": "intersection" + }, + { + "id": "i-hwy5nb-maps", + "x": 2165.0, + "y": 1089.44, + "label": "Highway 55 Northbound & Maple Street", + "type": "intersection" }, { - "id": "i-maps-hwy5", - "x": 2155.63, + "id": "i-hwy5sb-maps", + "x": 2145.0, "y": 1089.44, - "label": "Maple Street & Highway 55" + "label": "Highway 55 Southbound & Maple Street", + "type": "intersection" }, { "id": "i-hwy5-rivd", "x": 1243.02, "y": 716.39, - "label": "Highway 55 & Riverside Drive" + "label": "Highway 55 & Riverside Drive", + "type": "intersection" }, { "id": "i-gibl-cold", "x": 1826.81, - "y": 1731.70, - "label": "Gibson Lane & Colonial Drive" + "y": 1731.7, + "label": "Gibson Lane & Colonial Drive", + "type": "intersection" }, { "id": "i-vins-lees", - "x": 1709.30, + "x": 1709.3, "y": 1613.21, - "label": "Vine Street & Lee Street" + "label": "Vine Street & Lee Street", + "type": "intersection" }, - - - - - - - { "id": "dmv", "x": 759.99, "y": 2472.78, "label": "DMV", - "address": "2012 Durham Road, Postal 201" + "address": "2012 Durham Road, Postal 201", + "type": "poi" }, { "id": "liberty-cafe", "x": 774.74, "y": 2366.72, "label": "Liberty Cafe", - "address": "2063 Freedom Avenue, Postal 206" + "address": "2063 Freedom Avenue, Postal 206", + "type": "poi" }, { "id": "river-city-mod-shop", "x": 712.49, "y": 2224.73, "label": "River City Mod Shop", - "address": "2111 Grand Avenue, Postal 211" + "address": "2111 Grand Avenue, Postal 211", + "type": "poi" }, { "id": "river-city-fire-rescue-station-1", "x": 587.21, "y": 2118.8, "label": "River City Fire Rescue Station 1", - "address": "2101 Hillview Road, Postal 210" + "address": "2101 Hillview Road, Postal 210", + "type": "poi" }, { "id": "liberty-county-courthouse", "x": 885.1, "y": 2246.57, "label": "Liberty County Courthouse", - "address": "2121 Main Street, Postal 212" + "address": "2121 Main Street, Postal 212", + "type": "poi" + }, + { + "id": "i-hwy5nb-frea", + "x": 2165.0, + "y": 2397.43, + "label": "Highway 55 Northbound & Freedom Avenue", + "type": "intersection" + }, + { + "id": "i-hwy5sb-frea", + "x": 2145.0, + "y": 2397.43, + "label": "Highway 55 Southbound & Freedom Avenue", + "type": "intersection" + }, + { + "id": "w-hwy5nb-mid", + "x": 2165.0, + "y": 1743.4, + "label": "Highway 55 Northbound (Midpoint)", + "type": "waypoint" + }, + { + "id": "w-hwy5sb-mid", + "x": 2145.0, + "y": 1743.4, + "label": "Highway 55 Southbound (Midpoint)", + "type": "waypoint" + }, + { + "id": "r-hwy5nb-frea-off", + "x": 2120.0, + "y": 2350.0, + "label": "HWY 55 NB Freedom Ave Off-ramp", + "type": "intersection" + }, + { + "id": "r-frea-hwy5sb-on", + "x": 2120.0, + "y": 2420.0, + "label": "Freedom Ave HWY 55 SB On-ramp", + "type": "intersection" } ], "edges": [ @@ -360,409 +452,633 @@ "from": "i-frea-sanr", "to": "i-graa-sanr", "distance": 131.55, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-sanr", "to": "i-frea-durr", "distance": 145.23, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-sanr", "to": "i-graa-durr", "distance": 143.53, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-durr", "to": "i-frea-durr", "distance": 127.95, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-durr", "to": "i-frea-mais", "distance": 115.32, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-mais", "to": "i-frea-mais", "distance": 126.5, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-durr", "to": "i-graa-mais", "distance": 118.2, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-indr", "to": "i-orcb-cros", "distance": 155.52, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-cros", "to": "i-orcb-clis", "distance": 154.51, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-indr", "to": "i-geoa-indr", "distance": 112.99, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-geoa-indr", "to": "i-geoa-cros", "distance": 155.35, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-durr", "to": "i-orcb-durr", "distance": 97.09, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-mais", "to": "i-graa-pars", "distance": 155.46, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-pars", "to": "i-frea-pars", "distance": 125.56, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-mais", "to": "i-frea-pars", "distance": 154.22, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-pars", "to": "i-frea-rivd", "distance": 169.03, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-rivd", "to": "i-frea-indr", "distance": 178.49, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-indr", "to": "i-frea-cros", "distance": 151.46, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-cros", "to": "i-frea-clis", "distance": 157.69, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-geoa-cros", "to": "i-geoa-clis", "distance": 154.03, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-geoa-indr", "to": "i-frea-indr", "distance": 128.1, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-geoa-cros", "to": "i-frea-cros", "distance": 127.5, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-geoa-clis", "to": "i-frea-clis", "distance": 129.07, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-durr", "to": "i-orcb-mais", "distance": 100.07, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-durr", "to": "i-soua-durr", "distance": 134.51, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-soua-durr", "to": "i-libw-durr", "distance": 113.94, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-mais", "to": "i-soua-mais", "distance": 133.17, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-pars", "to": "i-soua-pars", "distance": 133.49, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-soua-pars", "to": "i-libw-pars", "distance": 98.23, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-soua-durr", "to": "i-soua-mais", "distance": 115.02, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-soua-mais", "to": "i-soua-pars", "distance": 154.53, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-libw-durr", "to": "i-libw-mais", "distance": 114.54, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-libw-mais", "to": "i-libw-pars", "distance": 139.74, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-sanr", "to": "i-hilr-sanr", "distance": 187.02, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-hilr-sanr", "to": "i-indp-sanr", "distance": 80.76, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-fair", "to": "i-hilr-fair", "distance": 169.48, - "speed": 55 + "speed": 55, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-fair", "to": "i-graa-sanr", "distance": 177.23, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-hilr-fair", "to": "i-hilr-sanr", "distance": 188.95, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-indp-sanr", "to": "i-indp-mais", "distance": 245.8, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-indp-mais", "to": "i-indp-pars", "distance": 155, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-indp-pars", "to": "i-indp-rivd", "distance": 169.43, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-mais", "to": "i-orcb-mais", "distance": 113.73, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-mais", "to": "i-indp-mais", "distance": 173.08, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-graa-pars", "to": "i-orcb-pars", "distance": 114.91, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-pars", "to": "i-indp-pars", "distance": 172.05, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-rivd", "to": "i-orcb-rivd", "distance": 239.68, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-rivd", "to": "i-indp-rivd", "distance": 173.34, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-mais", "to": "i-orcb-pars", "distance": 154.41, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-pars", "to": "i-orcb-rivd", "distance": 168.86, - "speed": 45 + "speed": 45, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-rivd", "to": "i-orcb-indr", "distance": 179.75, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-madc-indr", "to": "i-madc-cros", "distance": 133.98, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-madc-cros", "to": "i-madc-clis", "distance": 139.22, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-indr", "to": "i-madc-indr", "distance": 120.48, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-cros", "to": "i-indp-cros", "distance": 150.11, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-cros", "to": "i-madc-cros", "distance": 133.88, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-clis", "to": "i-madc-clis", "distance": 115.98, - "speed": 40 + "speed": 40, + "oneWay": false, + "waypoints": [] }, { "from": "i-orcb-clis", "to": "i-orch-cold", "distance": 95.68, - "speed": 50 + "speed": 50, + "oneWay": false, + "waypoints": [] }, { "from": "i-frea-clis", - "to": "i-frea-hwy5", - "distance": 425.37, - "speed": 50 + "to": "i-hwy5nb-frea", + "distance": 430.06, + "speed": 50, + "oneWay": false, + "waypoints": [ + [ + 1900.0, + 2410.0 + ], + [ + 2050.0, + 2380.0 + ] + ] }, { "from": "dmv", "to": "i-soua-durr", "distance": 70, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "dmv", "to": "i-frea-durr", "distance": 86, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "liberty-cafe", "to": "i-frea-durr", "distance": 40, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "liberty-cafe", "to": "i-graa-durr", "distance": 100, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "river-city-mod-shop", "to": "i-graa-sanr", "distance": 50, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "river-city-mod-shop", "to": "i-graa-durr", "distance": 101, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "river-city-fire-rescue-station-1", "to": "i-hilr-sanr", "distance": 80, - "speed": 35 + "speed": 35, + "oneWay": false, + "waypoints": [] }, { "from": "river-city-fire-rescue-station-1", "to": "i-hilr-fair", "distance": 122, - "speed": 35 + "speed": 35, + "oneWay": false, + "waypoints": [] }, { "from": "liberty-county-courthouse", "to": "i-graa-mais", "distance": 40, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] }, { "from": "liberty-county-courthouse", "to": "i-graa-durr", "distance": 85, - "speed": 25 + "speed": 25, + "oneWay": false, + "waypoints": [] + }, + { + "from": "i-hwy5nb-frea", + "to": "w-hwy5nb-mid", + "distance": 654.03, + "speed": 65, + "oneWay": true, + "waypoints": [] + }, + { + "from": "w-hwy5nb-mid", + "to": "i-hwy5nb-maps", + "distance": 653.96, + "speed": 65, + "oneWay": true, + "waypoints": [] + }, + { + "from": "i-hwy5sb-maps", + "to": "w-hwy5sb-mid", + "distance": 653.96, + "speed": 65, + "oneWay": true, + "waypoints": [] + }, + { + "from": "w-hwy5sb-mid", + "to": "i-hwy5sb-frea", + "distance": 654.03, + "speed": 65, + "oneWay": true, + "waypoints": [] + }, + { + "id": "e-hwy5nb-off-ramp", + "from": "w-hwy5nb-mid", + "to": "r-hwy5nb-frea-off", + "distance": 500.0, + "speed": 35, + "oneWay": true, + "waypoints": [ + [ + 2150.0, + 2100.0 + ], + [ + 2130.0, + 2250.0 + ] + ] + }, + { + "from": "r-hwy5nb-frea-off", + "to": "i-frea-clis", + "distance": 400.0, + "speed": 35, + "oneWay": true, + "waypoints": [] + }, + { + "from": "i-frea-clis", + "to": "r-frea-hwy5sb-on", + "distance": 390.0, + "speed": 35, + "oneWay": true, + "waypoints": [] + }, + { + "from": "r-frea-hwy5sb-on", + "to": "i-hwy5sb-frea", + "distance": 30.0, + "speed": 35, + "oneWay": true, + "waypoints": [ + [ + 2130.0, + 2410.0 + ] + ] } ] -} \ No newline at end of file +} diff --git a/server.log b/server.log deleted file mode 100644 index 4e45a6c..0000000 --- a/server.log +++ /dev/null @@ -1,49 +0,0 @@ -127.0.0.1 - - [07/Mar/2026 21:42:54] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:54] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:54] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:54] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:55] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:55] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:42:55] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:12] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:30] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:43:48] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:13] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:44:36] "GET /mapping/snow_blank.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET / HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /workers/style.css HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /workers/script.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /workers/testing.js HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /mapping/mapping.json HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /mapping/snow_postals.png HTTP/1.1" 200 - -127.0.0.1 - - [07/Mar/2026 21:45:13] "GET /mapping/snow_blank.png HTTP/1.1" 200 - diff --git a/workers/script.js b/workers/script.js index 38d3da3..dc5db77 100644 --- a/workers/script.js +++ b/workers/script.js @@ -241,7 +241,9 @@ async function loadMapData() { }); mapData.edges.forEach(edge => { mapData.adjacencyList[edge.from].push({ to: edge.to, edge }); - mapData.adjacencyList[edge.to].push({ to: edge.from, edge }); + if (!edge.oneWay) { + mapData.adjacencyList[edge.to].push({ to: edge.from, edge }); + } }); } catch (err) { console.error("Failed to load map data:", err); @@ -332,9 +334,9 @@ function findFastestRoute(startId, endId) { // For buildings, ensure we consider the 2 nearest intersections as entry/exit points const ensureDynamicEdges = (nodeId) => { const node = nodes.find(n => n.id === nodeId); - if (!node || node.label.includes('&')) return; + if (!node || node.type !== 'poi') return; - const intersections = nodes.filter(n => n.label.includes('&')); + const intersections = nodes.filter(n => n.type === 'intersection'); const sorted = intersections.map(inter => { const dx = inter.x - node.x; const dy = inter.y - node.y; @@ -420,14 +422,20 @@ function generateDirections(path) { path.forEach((step, index) => { const toNode = mapData.nodes.find(n => n.id === step.to); + + // Skip waypoint nodes in directions + if (toNode.type === 'waypoint') return; + const roadName = toNode.label.includes('&') ? toNode.label.split('&')[0].trim() : toNode.label; if (index === 0) { directions.push(`Head towards ${toNode.label}`); currentRoad = roadName; - } else if (index === path.length - 1) { + } + + if (index === path.length - 1) { directions.push(`Arrive at ${toNode.label}`); - } else if (roadName !== currentRoad) { + } else if (index > 0 && toNode.type === 'intersection' && roadName !== currentRoad) { directions.push(`Turn onto ${toNode.label}`); currentRoad = roadName; } @@ -457,8 +465,20 @@ document.getElementById('go-btn').addEventListener('click', () => { let totalTime = 0; path.forEach(step => { - const node = mapData.nodes.find(n => n.id === step.to); - latlngs.push(map.unproject([node.x, node.y], nativeZoom)); + const toNode = mapData.nodes.find(n => n.id === step.to); + + // Add waypoints if they exist + if (step.edge.waypoints && step.edge.waypoints.length > 0) { + // Check if we need to reverse waypoints (if traversing edge in reverse) + const isReverse = step.from === step.edge.to; + const waypoints = isReverse ? [...step.edge.waypoints].reverse() : step.edge.waypoints; + + waypoints.forEach(wp => { + latlngs.push(map.unproject([wp[0], wp[1]], nativeZoom)); + }); + } + + latlngs.push(map.unproject([toNode.x, toNode.y], nativeZoom)); totalDistance += step.edge.distance; totalTime += step.edge.distance / (step.edge.speed || 40); });