From 054ea852bb6519ddb3653ffdc4959f63c56cbe91 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 12 Nov 2016 17:16:13 +0100 Subject: [PATCH 001/200] Credits Czech Republic --> Czechia --- credits.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/credits.php b/credits.php index 6dad08b9..bf4bc685 100644 --- a/credits.php +++ b/credits.php @@ -176,10 +176,10 @@
  • Croatian Roads. State highway list from Croatian Roads d. o. o.
  • -
  • Czech Republic +
  • Czechia
  • Denmark From 999734c0bee63e55f425f9042a33c447744ef18d Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 13 Nov 2016 21:21:48 -0700 Subject: [PATCH 002/200] Add '%' char to last column in stats by region table. --- user/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/system.php b/user/system.php index a713c6b1..f8471516 100644 --- a/user/system.php +++ b/user/system.php @@ -330,7 +330,7 @@ function waypointsFromSQL() { {$row['region']} {$row['clinchedMileage']} {$row['totalMileage']} - {$row['percentage']} + {$row['percentage']}% HTML; } From 2be242b848a65bc70e8c1080393394b6b57e5fd7 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Tue, 22 Nov 2016 10:57:41 -0500 Subject: [PATCH 003/200] Make whole row clickable on route waypoint table #108 --- hb/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hb/index.php b/hb/index.php index abe8dc5e..10551c1a 100644 --- a/hb/index.php +++ b/hb/index.php @@ -345,7 +345,7 @@ function initFloatingHeaders($table) { if (!startsWith($row['pointName'], "+")) { $colorFactor = $row['driverPercent'] / 100; $colors = [255, 255 - round($colorFactor * 128), 255 - round($colorFactor * 128)]; - echo "(" . $row['latitude'] . "," . $row['longitude'] . ")" . $row['pointName'] . "{$row['driverPercent']}\n"; + echo "(" . $row['latitude'] . "," . $row['longitude'] . ")" . $row['pointName'] . "{$row['driverPercent']}\n"; } $waypointnum = $waypointnum + 1; } From d4dd7b7bd8deb51566fcf4882e17d988673d267c Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 10 Dec 2016 21:56:51 -0500 Subject: [PATCH 004/200] usaga shields --- shields/template_usaga.svg | 1 + shields/template_usaga_wide.svg | 1 + 2 files changed, 2 insertions(+) create mode 100644 shields/template_usaga.svg create mode 100644 shields/template_usaga_wide.svg diff --git a/shields/template_usaga.svg b/shields/template_usaga.svg new file mode 100644 index 00000000..77b04329 --- /dev/null +++ b/shields/template_usaga.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaga_wide.svg b/shields/template_usaga_wide.svg new file mode 100644 index 00000000..238f2591 --- /dev/null +++ b/shields/template_usaga_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file From ebfa7a47911ba74e79dd777f5cf9fdb6f1538d68 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Thu, 15 Dec 2016 16:41:42 +0100 Subject: [PATCH 005/200] Line breaks under "Travel Mapping Highway Data" --- index.php | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/index.php b/index.php index 10428aab..cb8542e0 100644 --- a/index.php +++ b/index.php @@ -17,10 +17,10 @@ Travel Mapping is a collaborative project implemented and maintained by a group of travel -enthusiasts who enjoy tracking their cumulative highway travels. This +enthusiasts who enjoy tracking their cumulative highway travels. This site allows its users to submit lists of highway segments they've traveled on the highway -systems that have been included in the project. Those lists are +systems that have been included in the project. Those lists are then imported into the project's database, to be included along with other users' stats and maps. @@ -60,24 +60,35 @@ echo tm_count_rows("systems", "WHERE level='active'"); ?> -"active" systems. Active systems are those which we believe are +"active" systems. Active systems are those which we believe are accurate and complete, and for which any changes that affect users will be noted in the highway data -updates table. An additional +updates table. + +

    + +

    An additional systems are in "preview" status, which means they are substantially -complete, but still undergoing final revisions. These may still +complete, but still undergoing final revisions. These may still undergo significant changes without notification. +

    + +

    + - more are in development but are not yet complete. Active system -encompass + more are in development but are not yet complete. + +

    + +

    Active system encompass @@ -101,7 +112,7 @@

    -Anyone can submit their travels to be included in the site. Please +Anyone can submit their travels to be included in the site. Please see the information in the project forum for how to create and submit your data. @@ -111,7 +122,7 @@ Once your data is in the system, you will be listed on the main traveler stats page, and you can see a -summary of your travels on your user page. Click +summary of your travels on your user page. Click around on the various links and table entries to find more ways to see your travels, both as tabular statistics and plotted on maps. @@ -119,13 +130,13 @@

    -Some experienced users volunteer to help the project. If this +Some experienced users volunteer to help the project. If this interests you, start by reporting problems with existing highway data. Those who have learned the project's structure and highway data rules and guidelines can help greatly by providing review of new highway -systems in development. Highly experienced users can learn how to +systems in development. Highly experienced users can learn how to plot new highway systems under the guidance of experienced -contributors. Again, see the project forum for +contributors. Again, see the project forum for more information.

    @@ -134,8 +145,8 @@

    Highway data is updated almost daily as corrections are made and progress is made on systems in -development. When a highway system is deemed correct and complete to -the best of our knowledge, it becomes "active". Here are the newest +development. When a highway system is deemed correct and complete to +the best of our knowledge, it becomes "active". Here are the newest systems to become active, with their activation dates:

      Date: Sat, 17 Dec 2016 10:00:54 -0500 Subject: [PATCH 006/200] Fixing fonts Change Roadgeek 2005 -> Roadgeek 2014 --- shields/template_usaga.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaga.svg b/shields/template_usaga.svg index 77b04329..76725fad 100644 --- a/shields/template_usaga.svg +++ b/shields/template_usaga.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From e9b1d0e033022d743379feef7cad1c671671c194 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 17 Dec 2016 10:01:32 -0500 Subject: [PATCH 007/200] Fixing fonts Change Roadgeek 2005 -> Roadgeek 2014 --- shields/template_usaga_wide.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaga_wide.svg b/shields/template_usaga_wide.svg index 238f2591..77096403 100644 --- a/shields/template_usaga_wide.svg +++ b/shields/template_usaga_wide.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From bded49578b25a7eae27d79abcbd293f66361b823 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 17 Dec 2016 10:15:43 -0500 Subject: [PATCH 008/200] Increase font size --- shields/template_usaga_wide.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaga_wide.svg b/shields/template_usaga_wide.svg index 77096403..37530e1d 100644 --- a/shields/template_usaga_wide.svg +++ b/shields/template_usaga_wide.svg @@ -1 +1 @@ -***NUMBER*** +***NUMBER*** From 36e2d2fbd31224830e3dcd5872ff3ec412eb6a1d Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 17 Dec 2016 10:15:53 -0500 Subject: [PATCH 009/200] Increase font size --- shields/template_usaga.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaga.svg b/shields/template_usaga.svg index 76725fad..7577bf99 100644 --- a/shields/template_usaga.svg +++ b/shields/template_usaga.svg @@ -1 +1 @@ -***NUMBER*** +***NUMBER*** From 20aa1113dbf0ba9d3674c5efe0da422ff2448282 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 18 Dec 2016 22:35:39 -0500 Subject: [PATCH 010/200] Fixes #117. --- devel/datacheck.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/devel/datacheck.php b/devel/datacheck.php index 70a7e639..ed14e573 100644 --- a/devel/datacheck.php +++ b/devel/datacheck.php @@ -56,9 +56,25 @@ function writeTable($db, $fpVal, $joins) { + +

      Travel Mapping Highway Data Datacheck Errors

      -

      Quick links: [Errors in Active Systems][Errors in Preview Systems][Errors in In-Dev Systems][Errors Marked as FPs].

      +

      Quick links: [Errors in Active Systems][Errors in Preview Systems][Errors in In-Dev Systems] +[Errors Marked as FPs].'; +} +else { + echo '[Reload with Marked FPs Included].'; +} +?> +

      See also the [Log of Unmatched FPs from datacheckfps.csv] and @@ -121,6 +137,9 @@ function writeTable($db, $fpVal, $joins) { ?> +

      Errors Marked as FPs ("Crossed Off")

      These have been marked as FPs @@ -134,6 +153,9 @@ function writeTable($db, $fpVal, $joins) { writeTable($tmdb, "1", " where "); ?> + From 41ccf1f42a57f4bc63ad9309d2d21cf2058053cf Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Mon, 19 Dec 2016 22:20:47 -0500 Subject: [PATCH 011/200] Show only recent entries by default and sort for new updates.csv entry format. --- devel/updates.php | 87 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 79 insertions(+), 8 deletions(-) diff --git a/devel/updates.php b/devel/updates.php index 985d354d..d21a8546 100644 --- a/devel/updates.php +++ b/devel/updates.php @@ -32,14 +32,56 @@

      Quick links: [Highway System Status Changes][Updates to Highway Data in Active Systems].

      + +

      Highway System Status Changes -

      Highway System Status Changes

      - +[Show +Entries] +
      - +
      DateCountry/RegionSystem CodeSystem DescriptionNew Status
      fetch_assoc()) { @@ -60,13 +102,42 @@
      DateCountry/RegionSystem CodeSystem DescriptionNew Status
      -

      Updates to Highway Data in Active Systems

      +

      Updates to Highway Data in Active Systems + + +[Show +Entries] +

      fetch_assoc()) { From c81c7f562f13797d1c97878144c48d609d476694 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Tue, 20 Dec 2016 16:11:24 -0500 Subject: [PATCH 012/200] Fix link from system.php to mapview.php from top table. --- user/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/system.php b/user/system.php index f8471516..275ca9f9 100644 --- a/user/system.php +++ b/user/system.php @@ -254,7 +254,7 @@ function waypointsFromSQL() { $row = tm_fetch_user_row_with_rank($res, 'clinchedMileage'); $res->free(); $percentage = $row['clinchedMileage'] / $system_mileage * 100; - $link = "window.open('/user/mapview.php?u=" . $user . "&sys=" . $system . "')"; + $link = "window.open('/user/mapview.php?u=" . $tmuser . "&sys=" . $system . "')"; echo ""; //Second, fetch routes clinched/driven From f4a5a8d81cae553a5cc6b927d2b90d0cf59eb4ac Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Tue, 20 Dec 2016 19:49:24 -0500 Subject: [PATCH 013/200] Change link from system.php to clinched.php instead of mapview.php from top table. --- user/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/system.php b/user/system.php index 275ca9f9..3d5e4c39 100644 --- a/user/system.php +++ b/user/system.php @@ -254,7 +254,7 @@ function waypointsFromSQL() { $row = tm_fetch_user_row_with_rank($res, 'clinchedMileage'); $res->free(); $percentage = $row['clinchedMileage'] / $system_mileage * 100; - $link = "window.open('/user/mapview.php?u=" . $tmuser . "&sys=" . $system . "')"; + $link = "window.open('/user/clinched.php?u=" . $tmuser . "&sys=" . $system . "')"; echo ""; //Second, fetch routes clinched/driven From f19854366222b3749a250bca0828f303a2dcdedc Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Tue, 20 Dec 2016 19:53:14 -0500 Subject: [PATCH 014/200] Corrected change of link from system.php to clinched.php instead of mapview.php from top table. --- user/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/system.php b/user/system.php index 3d5e4c39..1a2e66bb 100644 --- a/user/system.php +++ b/user/system.php @@ -254,7 +254,7 @@ function waypointsFromSQL() { $row = tm_fetch_user_row_with_rank($res, 'clinchedMileage'); $res->free(); $percentage = $row['clinchedMileage'] / $system_mileage * 100; - $link = "window.open('/user/clinched.php?u=" . $tmuser . "&sys=" . $system . "')"; + $link = "window.open('/shields/clinched.php?u=" . $tmuser . "&sys=" . $system . "')"; echo ""; //Second, fetch routes clinched/driven From 419c186fc228ef482e5439c2dfdd2a1f4d8371be Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Tue, 20 Dec 2016 22:59:15 -0500 Subject: [PATCH 015/200] Fix for #74. --- user/index.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/user/index.php b/user/index.php index a35adeec..cc182f1b 100644 --- a/user/index.php +++ b/user/index.php @@ -227,7 +227,27 @@ fetch_assoc()) { if ($row['clinchedMileage'] == 0) continue; From 16cd50bf57a43e876ed2325c3cce695e9983c493 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Wed, 21 Dec 2016 10:04:36 -0500 Subject: [PATCH 016/200] Fix for fix for #74. --- user/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/user/index.php b/user/index.php index cc182f1b..b46d099a 100644 --- a/user/index.php +++ b/user/index.php @@ -244,7 +244,9 @@ INNER JOIN systemMileageByRegion AS sm ON sm.systemName = sys.systemName LEFT JOIN clinchedSystemMileageByRegion AS csm - ON csm.systemName = sys.systemName AND csm.traveler = '$tmuser' + ON sm.region = csm.region AND + csm.systemName = sys.systemName AND + csm.traveler = '$tmuser' WHERE (sys.level = 'active' OR sys.level = 'preview') GROUP BY sm.systemName; SQL; From 6bb43183a71b207396743b314135713199240ef0 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Wed, 21 Dec 2016 15:49:29 -0500 Subject: [PATCH 017/200] Sort updates by region as secondary criteria. --- devel/updates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/updates.php b/devel/updates.php index d21a8546..7a15b73e 100644 --- a/devel/updates.php +++ b/devel/updates.php @@ -132,11 +132,11 @@ Date: Wed, 21 Dec 2016 17:26:21 -0500 Subject: [PATCH 018/200] Sort updates by route as third criteria. --- devel/updates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devel/updates.php b/devel/updates.php index 7a15b73e..17d25723 100644 --- a/devel/updates.php +++ b/devel/updates.php @@ -132,11 +132,11 @@ Date: Wed, 4 Jan 2017 16:31:22 -0500 Subject: [PATCH 019/200] FL, NY, PA, and SC shields FL has a 4-wide shield for FL9336. NY has some suffixed 3-digit routes. --- shields/template_usafl.svg | 1 + shields/template_usafl_wide.svg | 1 + shields/template_usafl_wide4.svg | 1 + shields/template_usany.svg | 1 + shields/template_usany_wide.svg | 1 + shields/template_usany_wide4.svg | 1 + shields/template_usapa.svg | 1 + shields/template_usapa_wide.svg | 1 + shields/template_usasc.svg | 1 + shields/template_usasc_wide.svg | 1 + 10 files changed, 10 insertions(+) create mode 100644 shields/template_usafl.svg create mode 100644 shields/template_usafl_wide.svg create mode 100644 shields/template_usafl_wide4.svg create mode 100644 shields/template_usany.svg create mode 100644 shields/template_usany_wide.svg create mode 100644 shields/template_usany_wide4.svg create mode 100644 shields/template_usapa.svg create mode 100644 shields/template_usapa_wide.svg create mode 100644 shields/template_usasc.svg create mode 100644 shields/template_usasc_wide.svg diff --git a/shields/template_usafl.svg b/shields/template_usafl.svg new file mode 100644 index 00000000..c3f974f4 --- /dev/null +++ b/shields/template_usafl.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usafl_wide.svg b/shields/template_usafl_wide.svg new file mode 100644 index 00000000..5ce83986 --- /dev/null +++ b/shields/template_usafl_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usafl_wide4.svg b/shields/template_usafl_wide4.svg new file mode 100644 index 00000000..e5a50134 --- /dev/null +++ b/shields/template_usafl_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usany.svg b/shields/template_usany.svg new file mode 100644 index 00000000..976718a5 --- /dev/null +++ b/shields/template_usany.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usany_wide.svg b/shields/template_usany_wide.svg new file mode 100644 index 00000000..f971d5e6 --- /dev/null +++ b/shields/template_usany_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usany_wide4.svg b/shields/template_usany_wide4.svg new file mode 100644 index 00000000..169c1304 --- /dev/null +++ b/shields/template_usany_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usapa.svg b/shields/template_usapa.svg new file mode 100644 index 00000000..b154bbe9 --- /dev/null +++ b/shields/template_usapa.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usapa_wide.svg b/shields/template_usapa_wide.svg new file mode 100644 index 00000000..2db98dd3 --- /dev/null +++ b/shields/template_usapa_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usasc.svg b/shields/template_usasc.svg new file mode 100644 index 00000000..d7d56dfd --- /dev/null +++ b/shields/template_usasc.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usasc_wide.svg b/shields/template_usasc_wide.svg new file mode 100644 index 00000000..d7d56dfd --- /dev/null +++ b/shields/template_usasc_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file From f63e922a13949b566e483309c9f34ecbd82a52e6 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Wed, 4 Jan 2017 16:40:46 -0500 Subject: [PATCH 020/200] Almost made the same mistake again. --- shields/template_usany_wide.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usany_wide.svg b/shields/template_usany_wide.svg index f971d5e6..01415e7a 100644 --- a/shields/template_usany_wide.svg +++ b/shields/template_usany_wide.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From 94be1c28136e042a54f326b4d801353997a915a1 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Wed, 4 Jan 2017 16:41:41 -0500 Subject: [PATCH 021/200] Almost made the same mistake again. --- shields/template_usany_wide4.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usany_wide4.svg b/shields/template_usany_wide4.svg index 169c1304..abe06bda 100644 --- a/shields/template_usany_wide4.svg +++ b/shields/template_usany_wide4.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From 67e2ce3f8bd15515e68a2eb7ff1977636ea1bf6e Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Wed, 4 Jan 2017 17:05:16 -0500 Subject: [PATCH 022/200] Add cases for 4-wide shields in FL and NY --- shields/shieldgen.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 24956712..73e55b5c 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -63,6 +63,16 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'usafl': + $routeNum = str_replace("FL", "", $row['route']); + if (strlen($routeNum) > 3) { + $svg = file_get_contents("{$dir}/template_usafl_wide4.svg"); + } elseif (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_usafl_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9': $routeNum = str_replace("KY", "", $row['route']); @@ -99,6 +109,16 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); $svg = str_replace("***SYS***", $region, $svg); break; + + case 'usany': + $routeNum = str_replace("NY", "", $row['route']); + if (strlen($routeNum) > 3) { + $svg = file_get_contents("{$dir}/template_usany_wide4.svg"); + } elseif (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_usany_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'gbnm':case 'nirm': $routeNum = str_replace("M", "", $row['route']); From 2ac4c8c34fd92671b0003b9eba1a31df8b39ab17 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Fri, 6 Jan 2017 18:45:41 -0500 Subject: [PATCH 023/200] KS, MI, MN, MO, NE, NV, OH, UT, and WY shields --- shields/template_usaks.svg | 1 + shields/template_usaks_wide.svg | 1 + shields/template_usami.svg | 1 + shields/template_usami_wide.svg | 1 + shields/template_usamn.svg | 1 + shields/template_usamn_wide.svg | 1 + shields/template_usamo.svg | 1 + shields/template_usamo_wide.svg | 1 + shields/template_usane.svg | 1 + shields/template_usane_wide.svg | 1 + shields/template_usanv.svg | 1 + shields/template_usanv_wide.svg | 1 + shields/template_usaoh.svg | 1 + shields/template_usaoh_wide.svg | 1 + shields/template_usaut.svg | 1 + shields/template_usaut_wide.svg | 1 + shields/template_usawy.svg | 1 + shields/template_usawy_wide.svg | 1 + 18 files changed, 18 insertions(+) create mode 100644 shields/template_usaks.svg create mode 100644 shields/template_usaks_wide.svg create mode 100644 shields/template_usami.svg create mode 100644 shields/template_usami_wide.svg create mode 100644 shields/template_usamn.svg create mode 100644 shields/template_usamn_wide.svg create mode 100644 shields/template_usamo.svg create mode 100644 shields/template_usamo_wide.svg create mode 100644 shields/template_usane.svg create mode 100644 shields/template_usane_wide.svg create mode 100644 shields/template_usanv.svg create mode 100644 shields/template_usanv_wide.svg create mode 100644 shields/template_usaoh.svg create mode 100644 shields/template_usaoh_wide.svg create mode 100644 shields/template_usaut.svg create mode 100644 shields/template_usaut_wide.svg create mode 100644 shields/template_usawy.svg create mode 100644 shields/template_usawy_wide.svg diff --git a/shields/template_usaks.svg b/shields/template_usaks.svg new file mode 100644 index 00000000..71e87850 --- /dev/null +++ b/shields/template_usaks.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaks_wide.svg b/shields/template_usaks_wide.svg new file mode 100644 index 00000000..c6bb6f8a --- /dev/null +++ b/shields/template_usaks_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usami.svg b/shields/template_usami.svg new file mode 100644 index 00000000..316ad6ae --- /dev/null +++ b/shields/template_usami.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usami_wide.svg b/shields/template_usami_wide.svg new file mode 100644 index 00000000..df21f101 --- /dev/null +++ b/shields/template_usami_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usamn.svg b/shields/template_usamn.svg new file mode 100644 index 00000000..bb27aaa8 --- /dev/null +++ b/shields/template_usamn.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usamn_wide.svg b/shields/template_usamn_wide.svg new file mode 100644 index 00000000..e7f9b3a9 --- /dev/null +++ b/shields/template_usamn_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usamo.svg b/shields/template_usamo.svg new file mode 100644 index 00000000..00517901 --- /dev/null +++ b/shields/template_usamo.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usamo_wide.svg b/shields/template_usamo_wide.svg new file mode 100644 index 00000000..82478a9d --- /dev/null +++ b/shields/template_usamo_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usane.svg b/shields/template_usane.svg new file mode 100644 index 00000000..9c7b71a3 --- /dev/null +++ b/shields/template_usane.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usane_wide.svg b/shields/template_usane_wide.svg new file mode 100644 index 00000000..cea4caef --- /dev/null +++ b/shields/template_usane_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usanv.svg b/shields/template_usanv.svg new file mode 100644 index 00000000..a8e90957 --- /dev/null +++ b/shields/template_usanv.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usanv_wide.svg b/shields/template_usanv_wide.svg new file mode 100644 index 00000000..a8e90957 --- /dev/null +++ b/shields/template_usanv_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaoh.svg b/shields/template_usaoh.svg new file mode 100644 index 00000000..8d73a48a --- /dev/null +++ b/shields/template_usaoh.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaoh_wide.svg b/shields/template_usaoh_wide.svg new file mode 100644 index 00000000..a8668e16 --- /dev/null +++ b/shields/template_usaoh_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaut.svg b/shields/template_usaut.svg new file mode 100644 index 00000000..54d34060 --- /dev/null +++ b/shields/template_usaut.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaut_wide.svg b/shields/template_usaut_wide.svg new file mode 100644 index 00000000..91e9bafd --- /dev/null +++ b/shields/template_usaut_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usawy.svg b/shields/template_usawy.svg new file mode 100644 index 00000000..866f6213 --- /dev/null +++ b/shields/template_usawy.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usawy_wide.svg b/shields/template_usawy_wide.svg new file mode 100644 index 00000000..ca4a5f7f --- /dev/null +++ b/shields/template_usawy_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file From ff467d3729ec22c9362f8219d7a15d92a4cc6169 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 7 Jan 2017 09:43:20 -0800 Subject: [PATCH 024/200] MA/ME shields --- shields/shieldgen.php | 16 ++++++++++++++++ shields/template_usama.svg | 3 +++ shields/template_usama_wide.svg | 3 +++ shields/template_usame.svg | 3 +++ shields/template_usame_wide.svg | 3 +++ 5 files changed, 28 insertions(+) create mode 100644 shields/template_usama.svg create mode 100644 shields/template_usama_wide.svg create mode 100644 shields/template_usame.svg create mode 100644 shields/template_usame_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 73e55b5c..710a2813 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -73,6 +73,22 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'usama': + $routeNum = str_replace("MA", "", $row['route']); + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_usama_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + + case 'usame': + $routeNum = str_replace("ME", "", $row['route']); + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_usame_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9': $routeNum = str_replace("KY", "", $row['route']); diff --git a/shields/template_usama.svg b/shields/template_usama.svg new file mode 100644 index 00000000..bea445c2 --- /dev/null +++ b/shields/template_usama.svg @@ -0,0 +1,3 @@ + +***NUMBER*** + diff --git a/shields/template_usama_wide.svg b/shields/template_usama_wide.svg new file mode 100644 index 00000000..a341e61f --- /dev/null +++ b/shields/template_usama_wide.svg @@ -0,0 +1,3 @@ + +***NUMBER*** + diff --git a/shields/template_usame.svg b/shields/template_usame.svg new file mode 100644 index 00000000..bea445c2 --- /dev/null +++ b/shields/template_usame.svg @@ -0,0 +1,3 @@ + +***NUMBER*** + diff --git a/shields/template_usame_wide.svg b/shields/template_usame_wide.svg new file mode 100644 index 00000000..a341e61f --- /dev/null +++ b/shields/template_usame_wide.svg @@ -0,0 +1,3 @@ + +***NUMBER*** + From 8b30885c42874f83a89085c10e85cfffaaa032e4 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 7 Jan 2017 09:55:28 -0800 Subject: [PATCH 025/200] alphabetical order --- shields/shieldgen.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 710a2813..33edb584 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -73,6 +73,11 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9': + $routeNum = str_replace("KY", "", $row['route']); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usama': $routeNum = str_replace("MA", "", $row['route']); @@ -90,11 +95,6 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9': - $routeNum = str_replace("KY", "", $row['route']); - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; - case 'usamt': $routeNum = str_replace("MT", "", $row['route']); if (strlen($routeNum) > 3) { From 39cfe5cdb682283b8417de1bda47b1fbeda51d4e Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 7 Jan 2017 12:57:18 -0500 Subject: [PATCH 026/200] A more modular way to handle 4-wide shields --- shields/shieldgen.php | 45 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 32 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 73e55b5c..eaf263e4 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -63,32 +63,12 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - - case 'usafl': - $routeNum = str_replace("FL", "", $row['route']); - if (strlen($routeNum) > 3) { - $svg = file_get_contents("{$dir}/template_usafl_wide4.svg"); - } elseif (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_usafl_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; case 'usaky3': case 'usaky4': case 'usaky5': case 'usaky6': case 'usaky7': case 'usaky8': case 'usaky9': $routeNum = str_replace("KY", "", $row['route']); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'usamt': - $routeNum = str_replace("MT", "", $row['route']); - if (strlen($routeNum) > 3) { - $svg = file_get_contents("{$dir}/template_usamt_wide4.svg"); - } elseif (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_usamt_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; - case 'usansf': $region = explode(".", $r)[0]; $routeNum = str_replace(strtoupper($region), "", $row['route']); @@ -109,17 +89,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); $svg = str_replace("***SYS***", $region, $svg); break; - - case 'usany': - $routeNum = str_replace("NY", "", $row['route']); - if (strlen($routeNum) > 3) { - $svg = file_get_contents("{$dir}/template_usany_wide4.svg"); - } elseif (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_usany_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; - + case 'gbnm':case 'nirm': $routeNum = str_replace("M", "", $row['route']); if (strlen($routeNum) > 2) { @@ -155,7 +125,18 @@ function generate($r, $force_reload = false) default: $region = strtoupper(explode(".", $r)[0]); $routeNum = str_replace($region, "", $row['route']); - if (strlen($routeNum) > 2) { + if (strlen($routeNum) > 3) { + if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide4.svg")) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); + } + elseif (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + else { + $svg = file_get_contents("{$dir}/generic_wide.svg"); + } + } + elseif (strlen($routeNum) > 2) { if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } else { From 6add996f006c6e0d472b4667728c597faa6be42a Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 7 Jan 2017 11:02:31 -0800 Subject: [PATCH 027/200] undo redundant changes to shieldgen.php --- shields/shieldgen.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 33edb584..73e55b5c 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -78,22 +78,6 @@ function generate($r, $force_reload = false) $routeNum = str_replace("KY", "", $row['route']); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - - case 'usama': - $routeNum = str_replace("MA", "", $row['route']); - if (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_usama_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; - - case 'usame': - $routeNum = str_replace("ME", "", $row['route']); - if (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_usame_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; case 'usamt': $routeNum = str_replace("MT", "", $row['route']); From 5dfcfb017b1ca6a092b408eb6cd8fc6c111030b9 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 7 Jan 2017 11:05:29 -0800 Subject: [PATCH 028/200] add missing ' --- shields/template_usama.svg | 2 +- shields/template_usama_wide.svg | 2 +- shields/template_usame.svg | 2 +- shields/template_usame_wide.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shields/template_usama.svg b/shields/template_usama.svg index bea445c2..fb94d3ab 100644 --- a/shields/template_usama.svg +++ b/shields/template_usama.svg @@ -1,3 +1,3 @@ -***NUMBER*** +***NUMBER*** diff --git a/shields/template_usama_wide.svg b/shields/template_usama_wide.svg index a341e61f..0cb1e03a 100644 --- a/shields/template_usama_wide.svg +++ b/shields/template_usama_wide.svg @@ -1,3 +1,3 @@ -***NUMBER*** +***NUMBER*** diff --git a/shields/template_usame.svg b/shields/template_usame.svg index bea445c2..fb94d3ab 100644 --- a/shields/template_usame.svg +++ b/shields/template_usame.svg @@ -1,3 +1,3 @@ -***NUMBER*** +***NUMBER*** diff --git a/shields/template_usame_wide.svg b/shields/template_usame_wide.svg index a341e61f..0cb1e03a 100644 --- a/shields/template_usame_wide.svg +++ b/shields/template_usame_wide.svg @@ -1,3 +1,3 @@ -***NUMBER*** +***NUMBER*** From 4ee551d0d893955741a838cd470a9a29e06eb467 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 7 Jan 2017 19:09:23 -0500 Subject: [PATCH 029/200] HI, NM, OR, and SD shields --- shields/template_usahi.svg | 1 + shields/template_usahi_wide.svg | 1 + shields/template_usahi_wide4.svg | 1 + shields/template_usanm.svg | 1 + shields/template_usanm_wide.svg | 1 + shields/template_usanm_wide4.svg | 1 + shields/template_usaor.svg | 1 + shields/template_usaor_wide.svg | 1 + shields/template_usaor_wide4.svg | 1 + shields/template_usasd.svg | 1 + shields/template_usasd_wide.svg | 1 + shields/template_usasd_wide4.svg | 1 + 12 files changed, 12 insertions(+) create mode 100644 shields/template_usahi.svg create mode 100644 shields/template_usahi_wide.svg create mode 100644 shields/template_usahi_wide4.svg create mode 100644 shields/template_usanm.svg create mode 100644 shields/template_usanm_wide.svg create mode 100644 shields/template_usanm_wide4.svg create mode 100644 shields/template_usaor.svg create mode 100644 shields/template_usaor_wide.svg create mode 100644 shields/template_usaor_wide4.svg create mode 100644 shields/template_usasd.svg create mode 100644 shields/template_usasd_wide.svg create mode 100644 shields/template_usasd_wide4.svg diff --git a/shields/template_usahi.svg b/shields/template_usahi.svg new file mode 100644 index 00000000..1fd1388a --- /dev/null +++ b/shields/template_usahi.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usahi_wide.svg b/shields/template_usahi_wide.svg new file mode 100644 index 00000000..c681e169 --- /dev/null +++ b/shields/template_usahi_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usahi_wide4.svg b/shields/template_usahi_wide4.svg new file mode 100644 index 00000000..13951e67 --- /dev/null +++ b/shields/template_usahi_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usanm.svg b/shields/template_usanm.svg new file mode 100644 index 00000000..96c60468 --- /dev/null +++ b/shields/template_usanm.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usanm_wide.svg b/shields/template_usanm_wide.svg new file mode 100644 index 00000000..174c670a --- /dev/null +++ b/shields/template_usanm_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usanm_wide4.svg b/shields/template_usanm_wide4.svg new file mode 100644 index 00000000..afddf6d3 --- /dev/null +++ b/shields/template_usanm_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaor.svg b/shields/template_usaor.svg new file mode 100644 index 00000000..3f0f0bcc --- /dev/null +++ b/shields/template_usaor.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaor_wide.svg b/shields/template_usaor_wide.svg new file mode 100644 index 00000000..5d1290d3 --- /dev/null +++ b/shields/template_usaor_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usaor_wide4.svg b/shields/template_usaor_wide4.svg new file mode 100644 index 00000000..19f8e5df --- /dev/null +++ b/shields/template_usaor_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usasd.svg b/shields/template_usasd.svg new file mode 100644 index 00000000..e042e0c2 --- /dev/null +++ b/shields/template_usasd.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usasd_wide.svg b/shields/template_usasd_wide.svg new file mode 100644 index 00000000..31731ffa --- /dev/null +++ b/shields/template_usasd_wide.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file diff --git a/shields/template_usasd_wide4.svg b/shields/template_usasd_wide4.svg new file mode 100644 index 00000000..f57c4f41 --- /dev/null +++ b/shields/template_usasd_wide4.svg @@ -0,0 +1 @@ +***NUMBER*** \ No newline at end of file From b26024db8dcbf5a149bba9dea13fd8fccac30a2f Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 8 Jan 2017 10:20:27 +0100 Subject: [PATCH 030/200] deub shield --- shields/template_deub.svg | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 shields/template_deub.svg diff --git a/shields/template_deub.svg b/shields/template_deub.svg new file mode 100644 index 00000000..923265e1 --- /dev/null +++ b/shields/template_deub.svg @@ -0,0 +1,9 @@ + + + + + + +***NUMBER*** + + From bb94bc2357441e20c2707cc2aad704aafe0f5a43 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 8 Jan 2017 10:24:14 +0100 Subject: [PATCH 031/200] Revert "Line breaks under "Travel Mapping Highway Data"" This reverts commit ebfa7a47911ba74e79dd777f5cf9fdb6f1538d68. --- index.php | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/index.php b/index.php index cb8542e0..10428aab 100644 --- a/index.php +++ b/index.php @@ -17,10 +17,10 @@ Travel Mapping is a collaborative project implemented and maintained by a group of travel -enthusiasts who enjoy tracking their cumulative highway travels. This +enthusiasts who enjoy tracking their cumulative highway travels. This site allows its users to submit lists of highway segments they've traveled on the highway -systems that have been included in the project. Those lists are +systems that have been included in the project. Those lists are then imported into the project's database, to be included along with other users' stats and maps. @@ -60,35 +60,24 @@ echo tm_count_rows("systems", "WHERE level='active'"); ?> -"active" systems. Active systems are those which we believe are +"active" systems. Active systems are those which we believe are accurate and complete, and for which any changes that affect users will be noted in the highway data -updates table. - -

      - -

      An additional +updates table. An additional systems are in "preview" status, which means they are substantially -complete, but still undergoing final revisions. These may still +complete, but still undergoing final revisions. These may still undergo significant changes without notification. -

      - -

      - - more are in development but are not yet complete. - -

      - -

      Active system encompass + more are in development but are not yet complete. Active system +encompass @@ -112,7 +101,7 @@

      -Anyone can submit their travels to be included in the site. Please +Anyone can submit their travels to be included in the site. Please see the information in the project forum for how to create and submit your data. @@ -122,7 +111,7 @@ Once your data is in the system, you will be listed on the main traveler stats page, and you can see a -summary of your travels on your user page. Click +summary of your travels on your user page. Click around on the various links and table entries to find more ways to see your travels, both as tabular statistics and plotted on maps. @@ -130,13 +119,13 @@

      -Some experienced users volunteer to help the project. If this +Some experienced users volunteer to help the project. If this interests you, start by reporting problems with existing highway data. Those who have learned the project's structure and highway data rules and guidelines can help greatly by providing review of new highway -systems in development. Highly experienced users can learn how to +systems in development. Highly experienced users can learn how to plot new highway systems under the guidance of experienced -contributors. Again, see the project forum for +contributors. Again, see the project forum for more information.

      @@ -145,8 +134,8 @@

      Highway data is updated almost daily as corrections are made and progress is made on systems in -development. When a highway system is deemed correct and complete to -the best of our knowledge, it becomes "active". Here are the newest +development. When a highway system is deemed correct and complete to +the best of our knowledge, it becomes "active". Here are the newest systems to become active, with their activation dates:

        Date: Sat, 7 Jan 2017 09:34:59 -0500 Subject: [PATCH 032/200] update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3351eb66..fa61639d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ shields/unoptimized devel/test.php .idea/ +lib/tm.conf +local.sh From b3517921de0b84e94dbcf1664adca826925cba57 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Sat, 7 Jan 2017 20:59:52 -0500 Subject: [PATCH 033/200] Separate out waypoint ops for hb --- api/waypoints.js.php | 180 +++++++++++++++++++++++++++++++++++++++++++ hb/index.php | 49 +----------- 2 files changed, 182 insertions(+), 47 deletions(-) create mode 100644 api/waypoints.js.php diff --git a/api/waypoints.js.php b/api/waypoints.js.php new file mode 100644 index 00000000..9e2554df --- /dev/null +++ b/api/waypoints.js.php @@ -0,0 +1,180 @@ + 0) { + $select_regions = $select_regions.")"; + $where_regions = $where_regions.")"; + } + + // select based on system? + $systems = tm_qs_multi_or_comma_to_array("sys"); + + // restrict to waypoints matching routes whose system is given in the "sys=" query string parameter + $select_systems = ""; + $where_systems = ""; + $num_systems = 0; + foreach ($systems as $system) { + if ($num_systems == 0) { + $select_systems = " and (routes.systemName='".$system."'"; + $where_systems = " where (routes.systemName='".$system."'"; + } + else { + $select_systems = $select_systems." or routes.systemName='".$system."'"; + $where_systems = $where_systems." or routes.systemName='".$system."'"; + } + $num_systems = $num_systems + 1; + } + if ($num_systems > 0) { + $select_systems = $select_systems.")"; + $where_systems = $where_systems.")"; + } + + if (array_key_exists("rte", $_GET)) { + $rteClause = " where (routes.route like '".$_GET['rte']."' or route regexp '".$_GET['rte']."[a-z]')"; + $rteClause = str_replace("*", "%", $rteClause); + if (array_key_exists('rg', $_GET)) $rteClause .= " AND ".orClauseBuilder('rg', 'region','routes'); + if (array_key_exists('sys', $_GET)) $rteClause .= " AND ".orClauseBuilder('sys', 'systemName','routes'); + $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." ORDER BY root, waypoints.pointId;"; + } elseif (($num_systems == 0) && ($num_regions == 0)) { + // for now, put in a default to usai, do something better later + $select_systems = " and (routes.systemName='usai')"; + $where_systems = " where (routes.systemName='usai')"; + $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root".$select_regions.$select_systems." JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ORDER BY root, waypoints.pointId;"; + } else { + $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root".$select_regions.$select_systems." JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ORDER BY root, waypoints.pointId;"; + } + + $res = tmdb_query($sql_command); + + $routenum = 0; + $pointnum = 0; + $lastRoute = ""; + while ($row = $res->fetch_assoc()) { + if (!($row['root'] == $lastRoute)) { + echo "newRouteIndices[".$routenum."] = ".$pointnum.";\n"; + echo "routeTier[".$routenum."] = ".$row['tier'].";\n"; + echo "routeColor[".$routenum."] = '".$row['color']."';\n"; + echo "routeSystem[".$routenum."] = '".$row['systemname']."';\n"; + $lastRoute = $row['root']; + $routenum = $routenum + 1; + } + echo "waypoints[".$pointnum."] = new Waypoint(\"".$row['pointName']."\",".$row['latitude'].",".$row['longitude']."); // Route = ".$row['root']." (".$row['color'].")\n"; + $pointnum = $pointnum + 1; + } + + // check for query string parameter for traveler clinched mapping of route + if (array_key_exists("u",$_GET)) { + echo "// select_systems: ".$select_systems."\n"; + echo "// where_systems: ".$where_systems."\n"; + echo "traveler = '".$_GET['u']."';\n"; + // retrieve list of segments for this region or regions + if(isset($rteClause)) { + $sql_command = "SELECT segments.segmentId, segments.root FROM segments JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." ORDER BY root, segments.segmentId;"; + } else { + $sql_command = "SELECT segments.segmentId, segments.root FROM segments JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$where_regions.$select_systems." ORDER BY root, segments.segmentId;"; + } + $res = tmdb_query($sql_command); + $segmentIndex = 0; + while ($row = $res->fetch_assoc()) { + echo "segments[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n"; + $segmentIndex = $segmentIndex + 1; + } + if(isset($rteClause)) { + $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." AND clinched.traveler='".$_GET['u']."' ORDER BY root, segments.segmentId;"; + } else { + $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$where_regions.$select_systems." AND clinched.traveler='".$_GET['u']."' ORDER BY root, segments.segmentId;"; + } + $res = tmdb_query($sql_command); + $segmentIndex = 0; + while ($row = $res->fetch_assoc()) { + echo "clinched[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n"; + $segmentIndex = $segmentIndex + 1; + } + echo "mapClinched = true;\n"; + } + + // insert custom color code if needed + tm_generate_custom_colors_array(); + } + + function select_single_route () + { + $routeparam = $_GET['r']; + + if (array_key_exists('u', $_GET)) { + $tmuser = $_GET['u']; + } else { + $tmuser = ""; + } + + if ($routeparam != "") { + // select all waypoints matching the root given in the "r=" query string parameter + $sql_command = "SELECT pointName, latitude, longitude FROM waypoints WHERE root = '" . $routeparam . "';"; + $res = tmdb_query($sql_command); + $pointnum = 0; + while ($row = $res->fetch_assoc()) { + echo "waypoints[" . $pointnum . "] = new Waypoint(\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ");\n"; + $pointnum = $pointnum + 1; + } + $res->free(); + } else { + // nothing to select waypoints, we're done + echo "return;\n"; + } + // check for query string parameter for traveler clinched mapping of route + if ($tmuser != "") { + echo "traveler = '" . $tmuser . "';\n"; + if ($routeparam != "") { + // retrieve list of segments for this route + echo "// SQL: select segmentId from segments where root = '" . $routeparam . "';\n"; + $sql_command = "SELECT segmentId FROM segments WHERE root = '" . $routeparam . "';"; + $res = tmdb_query($sql_command); + $segmentIndex = 0; + while ($row = $res->fetch_assoc()) { + echo "segments[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n"; + $segmentIndex = $segmentIndex + 1; + } + $res->free(); + $sql_command = "SELECT segments.segmentId FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId WHERE segments.root='" . $routeparam . "' AND clinched.traveler='" . $tmuser . "';"; + $res = tmdb_query($sql_command); + $segmentIndex = 0; + while ($row = $res->fetch_assoc()) { + echo "clinched[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n"; + $segmentIndex = $segmentIndex + 1; + } + $res->free(); + } + echo "mapClinched = true;\n"; + } + } +?> + +function waypointsFromSQL() { + + genEdges = true; +} \ No newline at end of file diff --git a/hb/index.php b/hb/index.php index 10551c1a..59a94e2a 100644 --- a/hb/index.php +++ b/hb/index.php @@ -142,53 +142,8 @@ - + - - - - + + Travel Mapping: Draft Map Overlay Viewer diff --git a/user/region.php b/user/region.php index 274029e4..9a06fa43 100644 --- a/user/region.php +++ b/user/region.php @@ -89,66 +89,7 @@ - + - - $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname WHERE ".$select_region."routes.systemName = '".$system."' AND clinched.traveler='".$tmuser."' ORDER BY root, segments.segmentId;"; - $res = tmdb_query($sql_command); - $segmentIndex = 0; - while ($row = $res->fetch_assoc()) { - echo "clinched[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n"; - $segmentIndex = $segmentIndex + 1; - } - $res->free(); - - echo "mapClinched = true;\n"; - - // insert custom color code if needed - tm_generate_custom_colors_array(); - ?> - genEdges = true; - } - Date: Sat, 7 Jan 2017 22:47:21 -0500 Subject: [PATCH 035/200] Updated documentation and added some error checking --- api/waypoints.js.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/api/waypoints.js.php b/api/waypoints.js.php index 9e2554df..1ffba46c 100644 --- a/api/waypoints.js.php +++ b/api/waypoints.js.php @@ -1,5 +1,25 @@ Date: Sat, 7 Jan 2017 23:36:44 -0500 Subject: [PATCH 036/200] modified to improve UX when loading --- api/waypoints.js.php | 4 +++- user/mapview.php | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/waypoints.js.php b/api/waypoints.js.php index 1ffba46c..89b94897 100644 --- a/api/waypoints.js.php +++ b/api/waypoints.js.php @@ -197,4 +197,6 @@ function waypointsFromSQL() { else { select_route_set(); } ?> genEdges = true; -} \ No newline at end of file +} + + \ No newline at end of file diff --git a/user/mapview.php b/user/mapview.php index f7ce8b46..6202d6dc 100644 --- a/user/mapview.php +++ b/user/mapview.php @@ -114,9 +114,8 @@ - + - Travel Mapping: Draft Map Overlay Viewer @@ -282,4 +281,6 @@ function initFloatingHeaders($table) { close(); ?> + + From 3347e2abcee8d3bc5b9543ca3a112a6b54027008 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Sat, 7 Jan 2017 23:48:12 -0500 Subject: [PATCH 037/200] ux loading improvements for hb, region, and system --- api/waypoints.js.php | 4 +--- hb/index.php | 2 +- user/region.php | 2 +- user/system.php | 3 +-- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/api/waypoints.js.php b/api/waypoints.js.php index 89b94897..1ffba46c 100644 --- a/api/waypoints.js.php +++ b/api/waypoints.js.php @@ -197,6 +197,4 @@ function waypointsFromSQL() { else { select_route_set(); } ?> genEdges = true; -} - - \ No newline at end of file +} \ No newline at end of file diff --git a/hb/index.php b/hb/index.php index 59a94e2a..7d49ff91 100644 --- a/hb/index.php +++ b/hb/index.php @@ -142,7 +142,6 @@ - diff --git a/user/region.php b/user/region.php index 9a06fa43..957bbabe 100644 --- a/user/region.php +++ b/user/region.php @@ -89,7 +89,6 @@ - close(); ?> + diff --git a/user/system.php b/user/system.php index 457865a4..01325a84 100644 --- a/user/system.php +++ b/user/system.php @@ -91,8 +91,6 @@ - - close(); ?> + From 1e283a44e355616273a5c67bda55bf4d28355d96 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Sun, 8 Jan 2017 11:32:16 -0500 Subject: [PATCH 038/200] Cleaned up text interpolations in waypoint generation code --- api/waypoints.js.php | 124 ++++++++++++++++++++++++++++++++----------- 1 file changed, 94 insertions(+), 30 deletions(-) diff --git a/api/waypoints.js.php b/api/waypoints.js.php index 1ffba46c..41851c5d 100644 --- a/api/waypoints.js.php +++ b/api/waypoints.js.php @@ -34,12 +34,12 @@ function select_route_set () { $num_regions = 0; foreach ($regions as $region) { if ($num_regions == 0) { - $select_regions = " and (routes.region='".$region."'"; - $where_regions = " where (region='".$region."'"; + $select_regions = " and (routes.region='$region'"; + $where_regions = " where (region='$region'"; } else { - $select_regions = $select_regions." or routes.region='".$region."'"; - $where_regions = $where_regions." or region='".$region."'"; + $select_regions = $select_regions." or routes.region='$region'"; + $where_regions = $where_regions." or region='$region'"; } $num_regions = $num_regions + 1; } @@ -57,12 +57,12 @@ function select_route_set () { $num_systems = 0; foreach ($systems as $system) { if ($num_systems == 0) { - $select_systems = " and (routes.systemName='".$system."'"; - $where_systems = " where (routes.systemName='".$system."'"; + $select_systems = " and (routes.systemName='$system'"; + $where_systems = " where (routes.systemName='$system'"; } else { - $select_systems = $select_systems." or routes.systemName='".$system."'"; - $where_systems = $where_systems." or routes.systemName='".$system."'"; + $select_systems = $select_systems." or routes.systemName='$system'"; + $where_systems = $where_systems." or routes.systemName='$system'"; } $num_systems = $num_systems + 1; } @@ -76,14 +76,39 @@ function select_route_set () { $rteClause = str_replace("*", "%", $rteClause); if (array_key_exists('rg', $_GET)) $rteClause .= " AND ".orClauseBuilder('rg', 'region','routes'); if (array_key_exists('sys', $_GET)) $rteClause .= " AND ".orClauseBuilder('sys', 'systemName','routes'); - $sql_command = "SELECT waypoints.pointName, waypoints.latitude, waypoints.longitude, waypoints.root, systems.tier, systems.color, systems.systemname FROM waypoints JOIN routes ON routes.root = waypoints.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." ORDER BY root, waypoints.pointId;"; + $sql_command = <<fetch_assoc()) { if (!($row['root'] == $lastRoute)) { - echo "newRouteIndices[".$routenum."] = ".$pointnum.";\n"; - echo "routeTier[".$routenum."] = ".$row['tier'].";\n"; - echo "routeColor[".$routenum."] = '".$row['color']."';\n"; - echo "routeSystem[".$routenum."] = '".$row['systemname']."';\n"; + echo <<fetch_assoc()) { - echo "segments[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n"; + echo "segments[$segmentIndex] = {$row['segmentId']}; // route={$row['root']}\n"; $segmentIndex = $segmentIndex + 1; } if(isset($rteClause)) { - $sql_command = "SELECT segments.segmentId, segments.root FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId JOIN routes ON routes.root = segments.root JOIN systems ON routes.systemname = systems.systemname AND ".$activeClause." ".$rteClause." AND clinched.traveler='".$_GET['u']."' ORDER BY root, segments.segmentId;"; + $sql_command = <<fetch_assoc()) { - echo "clinched[".$segmentIndex."] = ".$row['segmentId']."; // route=".$row['root']."\n"; + echo "clinched[$segmentIndex] = {$row['segmentId']}; // route={$row['root']}\n"; $segmentIndex = $segmentIndex + 1; } echo "mapClinched = true;\n"; @@ -155,7 +213,7 @@ function select_single_route () $res = tmdb_query($sql_command); $pointnum = 0; while ($row = $res->fetch_assoc()) { - echo "waypoints[" . $pointnum . "] = new Waypoint(\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ");\n"; + echo "waypoints[$pointnum] = new Waypoint(\"{$row['pointName']}\",{$row['latitude']},{$row['longitude']});\n"; $pointnum = $pointnum + 1; } $res->free(); @@ -165,23 +223,29 @@ function select_single_route () } // check for query string parameter for traveler clinched mapping of route if ($tmuser != "") { - echo "traveler = '" . $tmuser . "';\n"; + echo "traveler = '$tmuser';\n"; if ($routeparam != "") { // retrieve list of segments for this route echo "// SQL: select segmentId from segments where root = '" . $routeparam . "';\n"; - $sql_command = "SELECT segmentId FROM segments WHERE root = '" . $routeparam . "';"; + $sql_command = "SELECT segmentId FROM segments WHERE root = '$routeparam';"; $res = tmdb_query($sql_command); $segmentIndex = 0; while ($row = $res->fetch_assoc()) { - echo "segments[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n"; + echo "segments[$segmentIndex] = {$row['segmentId']};\n"; $segmentIndex = $segmentIndex + 1; } $res->free(); - $sql_command = "SELECT segments.segmentId FROM segments RIGHT JOIN clinched ON segments.segmentId = clinched.segmentId WHERE segments.root='" . $routeparam . "' AND clinched.traveler='" . $tmuser . "';"; + $sql_command = <<fetch_assoc()) { - echo "clinched[" . $segmentIndex . "] = " . $row['segmentId'] . ";\n"; + echo "clinched[$segmentIndex] = {$row['segmentId']};\n"; $segmentIndex = $segmentIndex + 1; } $res->free(); From df4b628ab835823290c2014e89bec853951fdd13 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 8 Jan 2017 18:05:27 +0100 Subject: [PATCH 039/200] deub shield using black instead of white --- shields/template_deub.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_deub.svg b/shields/template_deub.svg index 923265e1..c8e31f7f 100644 --- a/shields/template_deub.svg +++ b/shields/template_deub.svg @@ -4,6 +4,6 @@ -***NUMBER*** +***NUMBER*** From 6373f42b0a33d3b2fa25a9453f6f1d40fb953c55 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 8 Jan 2017 20:55:17 +0100 Subject: [PATCH 040/200] deub shield --- shields/template_deub.svg | 14 ++++++++------ shields/template_deub_wide.svg | 11 +++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 shields/template_deub_wide.svg diff --git a/shields/template_deub.svg b/shields/template_deub.svg index c8e31f7f..bea38552 100644 --- a/shields/template_deub.svg +++ b/shields/template_deub.svg @@ -1,9 +1,11 @@ - - - - -***NUMBER*** - + + + + + + ***NUMBER*** + + diff --git a/shields/template_deub_wide.svg b/shields/template_deub_wide.svg new file mode 100644 index 00000000..bea38552 --- /dev/null +++ b/shields/template_deub_wide.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + From a52019042448098b2c8d443c0c2b989c4a667eb1 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sun, 8 Jan 2017 21:25:02 -0800 Subject: [PATCH 041/200] add DC shield only one route (DC 295) so this is just the shield for that --- shields/template_usadc.svg | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 shields/template_usadc.svg diff --git a/shields/template_usadc.svg b/shields/template_usadc.svg new file mode 100644 index 00000000..b0639ef4 --- /dev/null +++ b/shields/template_usadc.svg @@ -0,0 +1,10 @@ + + + + + + + + + + From 8d9bbdd5f12be9dfaca9c8fb04a609627b0dee46 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Mon, 9 Jan 2017 15:31:35 +0100 Subject: [PATCH 042/200] shieldgen: replace prefix for deua/deub --- shields/shieldgen.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index eaf263e4..86f996c3 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -89,7 +89,13 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); $svg = str_replace("***SYS***", $region, $svg); break; - + + case 'deua': case 'deub': + $routeNum = str_replace("A", "", $row['route']);; + $routeNum = str_replace("B", "", $routeNum); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'gbnm':case 'nirm': $routeNum = str_replace("M", "", $row['route']); if (strlen($routeNum) > 2) { From db90ca41dc5a2272e003412dace7ddca69fbb8a9 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Mon, 9 Jan 2017 15:50:08 +0100 Subject: [PATCH 043/200] deua shield --- shields/template_deua.svg | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 shields/template_deua.svg diff --git a/shields/template_deua.svg b/shields/template_deua.svg new file mode 100644 index 00000000..0f5c7380 --- /dev/null +++ b/shields/template_deua.svg @@ -0,0 +1,9 @@ + + + + + + + ***NUMBER*** + + From 16662cce2b9dc60c406522a39940521e09a39d53 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Mon, 9 Jan 2017 07:50:49 -0800 Subject: [PATCH 044/200] all DC shields are wide, fix weird hairline crack by not minifying --- shields/template_usadc.svg | 10 ------ shields/template_usadc_wide.svg | 58 +++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 10 deletions(-) delete mode 100644 shields/template_usadc.svg create mode 100644 shields/template_usadc_wide.svg diff --git a/shields/template_usadc.svg b/shields/template_usadc.svg deleted file mode 100644 index b0639ef4..00000000 --- a/shields/template_usadc.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/shields/template_usadc_wide.svg b/shields/template_usadc_wide.svg new file mode 100644 index 00000000..39b673b9 --- /dev/null +++ b/shields/template_usadc_wide.svg @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + From c0332641cf27a41010eaabb99fbceadd9673425a Mon Sep 17 00:00:00 2001 From: michihdeu Date: Mon, 9 Jan 2017 17:00:57 +0100 Subject: [PATCH 045/200] shield: deua fix, eure+auta new --- shields/template_auta.svg | 7 +++++++ shields/template_auta_wide.svg | 7 +++++++ shields/template_deua.svg | 3 +-- shields/template_deub.svg | 2 +- shields/template_eure.svg | 9 +++++++++ shields/template_eure_wide.svg | 9 +++++++++ 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 shields/template_auta.svg create mode 100644 shields/template_auta_wide.svg create mode 100644 shields/template_eure.svg create mode 100644 shields/template_eure_wide.svg diff --git a/shields/template_auta.svg b/shields/template_auta.svg new file mode 100644 index 00000000..2bcd1616 --- /dev/null +++ b/shields/template_auta.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_auta_wide.svg b/shields/template_auta_wide.svg new file mode 100644 index 00000000..1979137c --- /dev/null +++ b/shields/template_auta_wide.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_deua.svg b/shields/template_deua.svg index 0f5c7380..aa15364f 100644 --- a/shields/template_deua.svg +++ b/shields/template_deua.svg @@ -2,8 +2,7 @@ - - ***NUMBER*** + ***NUMBER*** diff --git a/shields/template_deub.svg b/shields/template_deub.svg index bea38552..044901c7 100644 --- a/shields/template_deub.svg +++ b/shields/template_deub.svg @@ -5,7 +5,7 @@ - ***NUMBER*** + ***NUMBER*** diff --git a/shields/template_eure.svg b/shields/template_eure.svg new file mode 100644 index 00000000..04a044f4 --- /dev/null +++ b/shields/template_eure.svg @@ -0,0 +1,9 @@ + + + + + + + ***NUMBER*** + + diff --git a/shields/template_eure_wide.svg b/shields/template_eure_wide.svg new file mode 100644 index 00000000..04a044f4 --- /dev/null +++ b/shields/template_eure_wide.svg @@ -0,0 +1,9 @@ + + + + + + + ***NUMBER*** + + From 4eb734f904c171265f487c4b38bd756c17311da3 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Mon, 9 Jan 2017 22:01:08 +0100 Subject: [PATCH 046/200] ltua + ltuk --- shields/shieldgen.php | 3 ++- shields/template_ltua.svg | 9 +++++++++ shields/template_ltua_wide.svg | 9 +++++++++ shields/template_ltuk.svg | 10 ++++++++++ 4 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 shields/template_ltua.svg create mode 100644 shields/template_ltua_wide.svg create mode 100644 shields/template_ltuk.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 86f996c3..c88ca209 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -90,9 +90,10 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'deua': case 'deub': + case 'deua': case 'deub': case 'ltuk' $routeNum = str_replace("A", "", $row['route']);; $routeNum = str_replace("B", "", $routeNum); + $routeNum = str_replace("K", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; diff --git a/shields/template_ltua.svg b/shields/template_ltua.svg new file mode 100644 index 00000000..0d7d7fec --- /dev/null +++ b/shields/template_ltua.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_ltua_wide.svg b/shields/template_ltua_wide.svg new file mode 100644 index 00000000..0d7d7fec --- /dev/null +++ b/shields/template_ltua_wide.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_ltuk.svg b/shields/template_ltuk.svg new file mode 100644 index 00000000..43bf5294 --- /dev/null +++ b/shields/template_ltuk.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From 5620d2d69d458d42b7526a57b89dff61e97dd599 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Mon, 9 Jan 2017 22:22:42 -0800 Subject: [PATCH 047/200] optimize DC shield, add LA shields --- shields/template_usadc_wide.svg | 78 ++++++++++----------------------- shields/template_usala.svg | 4 ++ shields/template_usala_wide.svg | 4 ++ 3 files changed, 32 insertions(+), 54 deletions(-) create mode 100644 shields/template_usala.svg create mode 100644 shields/template_usala_wide.svg diff --git a/shields/template_usadc_wide.svg b/shields/template_usadc_wide.svg index 39b673b9..2bf31159 100644 --- a/shields/template_usadc_wide.svg +++ b/shields/template_usadc_wide.svg @@ -1,58 +1,28 @@ - - - - - - - - - - + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + diff --git a/shields/template_usala.svg b/shields/template_usala.svg new file mode 100644 index 00000000..f8f534c9 --- /dev/null +++ b/shields/template_usala.svg @@ -0,0 +1,4 @@ + + +image/svg+xml***NUMBER*** + diff --git a/shields/template_usala_wide.svg b/shields/template_usala_wide.svg new file mode 100644 index 00000000..f8f534c9 --- /dev/null +++ b/shields/template_usala_wide.svg @@ -0,0 +1,4 @@ + + +image/svg+xml***NUMBER*** + From d62d3af96cda3537e420a52960b3ef954acde99b Mon Sep 17 00:00:00 2001 From: michihdeu Date: Tue, 10 Jan 2017 16:54:24 +0100 Subject: [PATCH 048/200] Roadgeek 2014 Series D --> Roadgeek 2005 Mittelschrift --- shields/template_auta.svg | 2 +- shields/template_auta_wide.svg | 2 +- shields/template_deua.svg | 2 +- shields/template_deub.svg | 2 +- shields/template_deub_wide.svg | 2 +- shields/template_eure.svg | 2 +- shields/template_eure_wide.svg | 2 +- shields/template_ltua.svg | 2 +- shields/template_ltua_wide.svg | 2 +- shields/template_ltuk.svg | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/shields/template_auta.svg b/shields/template_auta.svg index 2bcd1616..d4c1d387 100644 --- a/shields/template_auta.svg +++ b/shields/template_auta.svg @@ -1,7 +1,7 @@ - + ***NUMBER*** diff --git a/shields/template_auta_wide.svg b/shields/template_auta_wide.svg index 1979137c..f518d152 100644 --- a/shields/template_auta_wide.svg +++ b/shields/template_auta_wide.svg @@ -1,7 +1,7 @@ - + ***NUMBER*** diff --git a/shields/template_deua.svg b/shields/template_deua.svg index aa15364f..4ff3fbca 100644 --- a/shields/template_deua.svg +++ b/shields/template_deua.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_deub.svg b/shields/template_deub.svg index 044901c7..a3dfc2ad 100644 --- a/shields/template_deub.svg +++ b/shields/template_deub.svg @@ -4,7 +4,7 @@ - + ***NUMBER*** diff --git a/shields/template_deub_wide.svg b/shields/template_deub_wide.svg index bea38552..a36aad31 100644 --- a/shields/template_deub_wide.svg +++ b/shields/template_deub_wide.svg @@ -4,7 +4,7 @@ - + ***NUMBER*** diff --git a/shields/template_eure.svg b/shields/template_eure.svg index 04a044f4..8ac19b48 100644 --- a/shields/template_eure.svg +++ b/shields/template_eure.svg @@ -3,7 +3,7 @@ - + ***NUMBER*** diff --git a/shields/template_eure_wide.svg b/shields/template_eure_wide.svg index 04a044f4..8ac19b48 100644 --- a/shields/template_eure_wide.svg +++ b/shields/template_eure_wide.svg @@ -3,7 +3,7 @@ - + ***NUMBER*** diff --git a/shields/template_ltua.svg b/shields/template_ltua.svg index 0d7d7fec..00ca3051 100644 --- a/shields/template_ltua.svg +++ b/shields/template_ltua.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_ltua_wide.svg b/shields/template_ltua_wide.svg index 0d7d7fec..00ca3051 100644 --- a/shields/template_ltua_wide.svg +++ b/shields/template_ltua_wide.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_ltuk.svg b/shields/template_ltuk.svg index 43bf5294..ee373475 100644 --- a/shields/template_ltuk.svg +++ b/shields/template_ltuk.svg @@ -3,7 +3,7 @@ - + ***NUMBER*** From f69578a9101212182445abd00a98e85b0f52db56 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Tue, 10 Jan 2017 11:22:38 -0500 Subject: [PATCH 049/200] Increase font size of type text in usaib shield --- shields/template_usaib.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaib.svg b/shields/template_usaib.svg index f32afaba..fe304793 100644 --- a/shields/template_usaib.svg +++ b/shields/template_usaib.svg @@ -1,3 +1,3 @@ ***NUMBER*** -***TYPE*** +***TYPE*** From 7cf528e92450b381d5def15cb91b3740c13e12b3 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Tue, 10 Jan 2017 11:25:23 -0500 Subject: [PATCH 050/200] Increase font size slightly on US shield --- shields/template_usaus.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usaus.svg b/shields/template_usaus.svg index df8173a9..44fefebc 100644 --- a/shields/template_usaus.svg +++ b/shields/template_usaus.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From ff0a0c356d9488c91a52493702ee669ca98d940a Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Tue, 10 Jan 2017 11:26:30 -0500 Subject: [PATCH 051/200] Increase font size slightly on US shield --- shields/template_usausb.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_usausb.svg b/shields/template_usausb.svg index df8173a9..44fefebc 100644 --- a/shields/template_usausb.svg +++ b/shields/template_usausb.svg @@ -1 +1 @@ -***NUMBER*** \ No newline at end of file +***NUMBER*** From b37fd15811fe4606a6b5e8ca8f2cc51895ff468c Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Tue, 10 Jan 2017 20:19:38 -0500 Subject: [PATCH 052/200] Fix syntax error introduced in #131. --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index c88ca209..61cdf199 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -90,7 +90,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'deua': case 'deub': case 'ltuk' + case 'deua': case 'deub': case 'ltuk': $routeNum = str_replace("A", "", $row['route']);; $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); From 0638842272b9d74c984159a066e9e5b2286fedbb Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Tue, 10 Jan 2017 18:41:35 -0800 Subject: [PATCH 053/200] fix both DC and LA --- shields/template_usadc_wide.svg | 13 +------------ shields/template_usala.svg | 4 ---- shields/template_usala1.svg | 2 ++ shields/template_usala1_wide.svg | 2 ++ shields/template_usala_wide.svg | 4 ---- 5 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 shields/template_usala.svg create mode 100644 shields/template_usala1.svg create mode 100644 shields/template_usala1_wide.svg delete mode 100644 shields/template_usala_wide.svg diff --git a/shields/template_usadc_wide.svg b/shields/template_usadc_wide.svg index 2bf31159..bce84e31 100644 --- a/shields/template_usadc_wide.svg +++ b/shields/template_usadc_wide.svg @@ -1,15 +1,4 @@ - - - - - - - image/svg+xml - - - - - + diff --git a/shields/template_usala.svg b/shields/template_usala.svg deleted file mode 100644 index f8f534c9..00000000 --- a/shields/template_usala.svg +++ /dev/null @@ -1,4 +0,0 @@ - - -image/svg+xml***NUMBER*** - diff --git a/shields/template_usala1.svg b/shields/template_usala1.svg new file mode 100644 index 00000000..8f4325c4 --- /dev/null +++ b/shields/template_usala1.svg @@ -0,0 +1,2 @@ +image/svg+xml***NUMBER*** + diff --git a/shields/template_usala1_wide.svg b/shields/template_usala1_wide.svg new file mode 100644 index 00000000..8f4325c4 --- /dev/null +++ b/shields/template_usala1_wide.svg @@ -0,0 +1,2 @@ +image/svg+xml***NUMBER*** + diff --git a/shields/template_usala_wide.svg b/shields/template_usala_wide.svg deleted file mode 100644 index f8f534c9..00000000 --- a/shields/template_usala_wide.svg +++ /dev/null @@ -1,4 +0,0 @@ - - -image/svg+xml***NUMBER*** - From 29d5f11d95a90177fa1542e19e90554c8372c399 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Wed, 11 Jan 2017 19:40:57 +0100 Subject: [PATCH 054/200] shield fixes (using viewbox) --- shields/template_auta.svg | 2 +- shields/template_auta_wide.svg | 2 +- shields/template_deua.svg | 2 +- shields/template_deub_wide.svg | 11 ----------- shields/template_eure.svg | 2 +- shields/template_eure_wide.svg | 2 +- shields/template_ltua.svg | 2 +- shields/template_ltua_wide.svg | 2 +- shields/template_ltuk.svg | 2 +- 9 files changed, 8 insertions(+), 19 deletions(-) delete mode 100644 shields/template_deub_wide.svg diff --git a/shields/template_auta.svg b/shields/template_auta.svg index d4c1d387..e35f4366 100644 --- a/shields/template_auta.svg +++ b/shields/template_auta.svg @@ -1,5 +1,5 @@ - + ***NUMBER*** diff --git a/shields/template_auta_wide.svg b/shields/template_auta_wide.svg index f518d152..9b4930fe 100644 --- a/shields/template_auta_wide.svg +++ b/shields/template_auta_wide.svg @@ -1,5 +1,5 @@ - + ***NUMBER*** diff --git a/shields/template_deua.svg b/shields/template_deua.svg index 4ff3fbca..7ec97888 100644 --- a/shields/template_deua.svg +++ b/shields/template_deua.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_deub_wide.svg b/shields/template_deub_wide.svg deleted file mode 100644 index a36aad31..00000000 --- a/shields/template_deub_wide.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - ***NUMBER*** - - - diff --git a/shields/template_eure.svg b/shields/template_eure.svg index 8ac19b48..aa6b5a86 100644 --- a/shields/template_eure.svg +++ b/shields/template_eure.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_eure_wide.svg b/shields/template_eure_wide.svg index 8ac19b48..aa6b5a86 100644 --- a/shields/template_eure_wide.svg +++ b/shields/template_eure_wide.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_ltua.svg b/shields/template_ltua.svg index 00ca3051..e48ef4a3 100644 --- a/shields/template_ltua.svg +++ b/shields/template_ltua.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_ltua_wide.svg b/shields/template_ltua_wide.svg index 00ca3051..e48ef4a3 100644 --- a/shields/template_ltua_wide.svg +++ b/shields/template_ltua_wide.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_ltuk.svg b/shields/template_ltuk.svg index ee373475..f4d70df5 100644 --- a/shields/template_ltuk.svg +++ b/shields/template_ltuk.svg @@ -1,5 +1,5 @@ - + From a4ce1f25b4051deb82137a11cc4451be55d3fd56 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Wed, 11 Jan 2017 20:33:14 +0100 Subject: [PATCH 055/200] Shields: deua fix / autb, auts, chea, cheh new --- shields/shieldgen.php | 2 +- shields/template_autb.svg | 7 +++++++ shields/template_autb_wide.svg | 7 +++++++ shields/template_auts.svg | 7 +++++++ shields/template_auts_wide.svg | 7 +++++++ shields/template_chea.svg | 11 +++++++++++ shields/template_cheh.svg | 9 +++++++++ shields/template_cheh_wide.svg | 9 +++++++++ shields/template_deua.svg | 2 +- 9 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 shields/template_autb.svg create mode 100644 shields/template_autb_wide.svg create mode 100644 shields/template_auts.svg create mode 100644 shields/template_auts_wide.svg create mode 100644 shields/template_chea.svg create mode 100644 shields/template_cheh.svg create mode 100644 shields/template_cheh_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 61cdf199..4669ce54 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -90,7 +90,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'deua': case 'deub': case 'ltuk': + case 'chea': case 'deua': case 'deub': case 'ltuk': $routeNum = str_replace("A", "", $row['route']);; $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); diff --git a/shields/template_autb.svg b/shields/template_autb.svg new file mode 100644 index 00000000..e35f4366 --- /dev/null +++ b/shields/template_autb.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_autb_wide.svg b/shields/template_autb_wide.svg new file mode 100644 index 00000000..9b4930fe --- /dev/null +++ b/shields/template_autb_wide.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_auts.svg b/shields/template_auts.svg new file mode 100644 index 00000000..e35f4366 --- /dev/null +++ b/shields/template_auts.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_auts_wide.svg b/shields/template_auts_wide.svg new file mode 100644 index 00000000..9b4930fe --- /dev/null +++ b/shields/template_auts_wide.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_chea.svg b/shields/template_chea.svg new file mode 100644 index 00000000..914f7456 --- /dev/null +++ b/shields/template_chea.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_cheh.svg b/shields/template_cheh.svg new file mode 100644 index 00000000..13bbc811 --- /dev/null +++ b/shields/template_cheh.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_cheh_wide.svg b/shields/template_cheh_wide.svg new file mode 100644 index 00000000..b8945a6d --- /dev/null +++ b/shields/template_cheh_wide.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_deua.svg b/shields/template_deua.svg index 7ec97888..0a58931a 100644 --- a/shields/template_deua.svg +++ b/shields/template_deua.svg @@ -3,6 +3,6 @@ - ***NUMBER*** + ***NUMBER*** From 3afb149873fa7aabacb3be90b24b2cf0ea7c58d8 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Wed, 11 Jan 2017 20:44:09 +0100 Subject: [PATCH 056/200] autb prefix elimination --- shields/shieldgen.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 4669ce54..dfb6a845 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -97,6 +97,14 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'autb': + $routeNum = str_replace("B", "", $routeNum); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_autb_wide.svg"); + } + break; + case 'gbnm':case 'nirm': $routeNum = str_replace("M", "", $row['route']); if (strlen($routeNum) > 2) { From d100ffbb75cd3f1447554918c62e5e25a6373349 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Wed, 11 Jan 2017 20:46:08 +0100 Subject: [PATCH 057/200] cheh prefix elimination --- shields/shieldgen.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index dfb6a845..880edab8 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -90,9 +90,10 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'chea': case 'deua': case 'deub': case 'ltuk': + case 'chea': case 'cheh': case 'deua': case 'deub': case 'ltuk': $routeNum = str_replace("A", "", $row['route']);; $routeNum = str_replace("B", "", $routeNum); + $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; From 9b60aa888314a93eca3a398d5a0552f4f921861d Mon Sep 17 00:00:00 2001 From: michihdeu Date: Wed, 11 Jan 2017 20:58:46 +0100 Subject: [PATCH 058/200] shieldgen.php --- shields/shieldgen.php | 18 ++++++++++++++---- shields/template_eure_wide.svg | 9 --------- 2 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 shields/template_eure_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 880edab8..17f70a18 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -90,19 +90,29 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'chea': case 'cheh': case 'deua': case 'deub': case 'ltuk': + case 'chea': case 'deua': case 'deub': case 'ltuk': + // remove prefix $routeNum = str_replace("A", "", $row['route']);; $routeNum = str_replace("B", "", $routeNum); - $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'autb': + case 'autb': case 'cheh': + // remove prefix, use wide svg file $routeNum = str_replace("B", "", $routeNum); + $routeNum = str_replace("H", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); if (strlen($routeNum) > 2) { - $svg = file_get_contents("{$dir}/template_autb_wide.svg"); + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + break; + + case 'eure': + $svg = str_replace("***NUMBER***", $routeNum, $svg); + // use wide svg file + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } break; diff --git a/shields/template_eure_wide.svg b/shields/template_eure_wide.svg deleted file mode 100644 index aa6b5a86..00000000 --- a/shields/template_eure_wide.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - ***NUMBER*** - - From d049fcebe49cca24134e4f51b66b9f763f54a2d0 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Wed, 11 Jan 2017 22:12:16 -0800 Subject: [PATCH 059/200] add ND, MT sec --- shields/shieldgen.php | 5 +++++ shields/template_usamts_wide.svg | 6 ++++++ shields/template_usand.svg | 21 +++++++++++++++++++++ shields/template_usand_wide.svg | 21 +++++++++++++++++++++ 4 files changed, 53 insertions(+) create mode 100644 shields/template_usamts_wide.svg create mode 100644 shields/template_usand.svg create mode 100644 shields/template_usand_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 61cdf199..fd2d4695 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -68,6 +68,11 @@ function generate($r, $force_reload = false) $routeNum = str_replace("KY", "", $row['route']); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'usamts': + $routeNum = str_replace("SR", "", $row['route']); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usansf': $region = explode(".", $r)[0]; diff --git a/shields/template_usamts_wide.svg b/shields/template_usamts_wide.svg new file mode 100644 index 00000000..433fa097 --- /dev/null +++ b/shields/template_usamts_wide.svg @@ -0,0 +1,6 @@ + + + + + ***NUMBER*** + diff --git a/shields/template_usand.svg b/shields/template_usand.svg new file mode 100644 index 00000000..9e98bb94 --- /dev/null +++ b/shields/template_usand.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + ***NUMBER*** + diff --git a/shields/template_usand_wide.svg b/shields/template_usand_wide.svg new file mode 100644 index 00000000..d25c6798 --- /dev/null +++ b/shields/template_usand_wide.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + ***NUMBER*** + + From 91b1686b181388d4cbd1a2e7d0863317fe4328e7 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Wed, 11 Jan 2017 22:27:11 -0800 Subject: [PATCH 060/200] add wide4 for ND --- shields/template_usand_wide4.svg | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 shields/template_usand_wide4.svg diff --git a/shields/template_usand_wide4.svg b/shields/template_usand_wide4.svg new file mode 100644 index 00000000..3983c6d5 --- /dev/null +++ b/shields/template_usand_wide4.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + ***NUMBER*** + + From 1a861dd7fc74983116d8625be01b329d0c0f0a62 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Thu, 12 Jan 2017 19:52:50 +0100 Subject: [PATCH 061/200] autb shield text: remove L --- shields/shieldgen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 62a84c64..44286723 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -107,6 +107,7 @@ function generate($r, $force_reload = false) // remove prefix, use wide svg file $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("H", "", $routeNum); + $routeNum = str_replace("L", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); From 03264fa12dee10a2bc4ec82215c0d25c9c66935b Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 13:43:26 -0500 Subject: [PATCH 062/200] add usaid shield --- shields/template_usaid.svg | 2 ++ shields/template_usaid_wide.svg | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 shields/template_usaid.svg create mode 100644 shields/template_usaid_wide.svg diff --git a/shields/template_usaid.svg b/shields/template_usaid.svg new file mode 100644 index 00000000..51b10f6f --- /dev/null +++ b/shields/template_usaid.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usaid_wide.svg b/shields/template_usaid_wide.svg new file mode 100644 index 00000000..74e29a41 --- /dev/null +++ b/shields/template_usaid_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + From 5b2a10f2d339425d9ced568b448ec66db4c17dcf Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 14:25:10 -0500 Subject: [PATCH 063/200] add usanh shield --- shields/shieldgen.php | 10 ++++++++++ shields/template_usanh.svg | 2 ++ shields/template_usanh_wide.svg | 2 ++ shields/template_usanh_wide4.svg | 3 +++ 4 files changed, 17 insertions(+) create mode 100644 shields/template_usanh.svg create mode 100644 shields/template_usanh_wide.svg create mode 100644 shields/template_usanh_wide4.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 44286723..db89c398 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -154,6 +154,16 @@ function generate($r, $force_reload = false) } break; + case 'usanh': + $matches = []; + $routeNum = str_replace('NH', "", $row['route']); + if (preg_match('/(?[0-9]+)(?[A-Za-z]+)/', $routeNum, $matches)) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); + $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***LETTER***", $matches['letter'], $svg); + break; + } + default: $region = strtoupper(explode(".", $r)[0]); $routeNum = str_replace($region, "", $row['route']); diff --git a/shields/template_usanh.svg b/shields/template_usanh.svg new file mode 100644 index 00000000..5aa8f9a3 --- /dev/null +++ b/shields/template_usanh.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usanh_wide.svg b/shields/template_usanh_wide.svg new file mode 100644 index 00000000..a726388f --- /dev/null +++ b/shields/template_usanh_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usanh_wide4.svg b/shields/template_usanh_wide4.svg new file mode 100644 index 00000000..983f8e04 --- /dev/null +++ b/shields/template_usanh_wide4.svg @@ -0,0 +1,3 @@ +***NUMBER*** +***LETTER*** + From 8028e1198a02d5c686f4c85f89e0f88a8dd9b87a Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 14:37:52 -0500 Subject: [PATCH 064/200] fixed usamts shield --- shields/{template_usamts_wide.svg => template_usamts.svg} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename shields/{template_usamts_wide.svg => template_usamts.svg} (97%) diff --git a/shields/template_usamts_wide.svg b/shields/template_usamts.svg similarity index 97% rename from shields/template_usamts_wide.svg rename to shields/template_usamts.svg index 433fa097..835109f5 100644 --- a/shields/template_usamts_wide.svg +++ b/shields/template_usamts.svg @@ -2,5 +2,5 @@ - ***NUMBER*** + ***NUMBER*** From 5b62817795884129767cfff74c3f15bbf79e880f Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 15:02:08 -0500 Subject: [PATCH 065/200] add usari shield --- shields/template_usari.svg | 14 ++++++++++++++ shields/template_usari_wide.svg | 14 ++++++++++++++ shields/template_usari_wide4.svg | 14 ++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 shields/template_usari.svg create mode 100644 shields/template_usari_wide.svg create mode 100644 shields/template_usari_wide4.svg diff --git a/shields/template_usari.svg b/shields/template_usari.svg new file mode 100644 index 00000000..b867f6b8 --- /dev/null +++ b/shields/template_usari.svg @@ -0,0 +1,14 @@ + + + + +***NUMBER*** + + + + + + + + + diff --git a/shields/template_usari_wide.svg b/shields/template_usari_wide.svg new file mode 100644 index 00000000..f73254b6 --- /dev/null +++ b/shields/template_usari_wide.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + +***NUMBER*** + + diff --git a/shields/template_usari_wide4.svg b/shields/template_usari_wide4.svg new file mode 100644 index 00000000..be77be0f --- /dev/null +++ b/shields/template_usari_wide4.svg @@ -0,0 +1,14 @@ + + + + + + + + + + + +***NUMBER*** + + From 479b6a85708e19b2ad1279afbd882634edc8c2e8 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 16:20:24 -0500 Subject: [PATCH 066/200] add usatx, usatxl, and usatxs shields --- shields/shieldgen.php | 37 +++++++++++++++++++++++++++++ shields/template_usatx.svg | 2 ++ shields/template_usatx_aux.svg | 3 +++ shields/template_usatx_aux_wide.svg | 3 +++ shields/template_usatx_wide.svg | 2 ++ 5 files changed, 47 insertions(+) create mode 100644 shields/template_usatx.svg create mode 100644 shields/template_usatx_aux.svg create mode 100644 shields/template_usatx_aux_wide.svg create mode 100644 shields/template_usatx_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index db89c398..1999ae69 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -154,6 +154,43 @@ function generate($r, $force_reload = false) } break; + case 'usatx': case 'usatxl': case 'usatxs': + if ($row['root'] == 'tx.nasa1' or $row['systemName'] != 'usatx' or $row['banner'] != "") { + $system = ""; + $num = ""; + $svg_path = "{$dir}/template_usatx_aux.svg"; + + $sys_map['Lp'] = "LOOP"; + $sys_map['Spr'] = "SPUR"; + $sys_map['Bus'] = "BUS"; + $sys_map['Trk'] = "TRUCK"; + + if ($row['root'] == 'tx.nasa1') { + $system = "NASA"; + $num = "1"; + } elseif ($row['root'] == 'tx.lp008') { + $system = "BELTWAY"; + $num = "8"; + } else { + $matches = []; + preg_match('/(TX|)(?[A-Za-z]+)(?[0-9]+)/', $row['route'], $matches); + + if(array_key_exists($matches['system'], $sys_map)) $system = $sys_map[$matches['system']]; + else $system = $sys_map[$row['banner']]; + + $num = $matches['number']; + + if (strlen($num) >= 3) { + $svg_path = "{$dir}/template_usatx_aux_wide.svg"; + } + } + + $svg = file_get_contents($svg_path); + $svg = str_replace("***NUMBER***", $num, $svg); + $svg = str_replace("***SYS***", $system, $svg); + break; + } + case 'usanh': $matches = []; $routeNum = str_replace('NH', "", $row['route']); diff --git a/shields/template_usatx.svg b/shields/template_usatx.svg new file mode 100644 index 00000000..e4c284e6 --- /dev/null +++ b/shields/template_usatx.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usatx_aux.svg b/shields/template_usatx_aux.svg new file mode 100644 index 00000000..3b0d6374 --- /dev/null +++ b/shields/template_usatx_aux.svg @@ -0,0 +1,3 @@ +***SYS*** +***NUMBER*** + diff --git a/shields/template_usatx_aux_wide.svg b/shields/template_usatx_aux_wide.svg new file mode 100644 index 00000000..efcdf20d --- /dev/null +++ b/shields/template_usatx_aux_wide.svg @@ -0,0 +1,3 @@ +***SYS*** +***NUMBER*** + diff --git a/shields/template_usatx_wide.svg b/shields/template_usatx_wide.svg new file mode 100644 index 00000000..f8cecef5 --- /dev/null +++ b/shields/template_usatx_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + From 47dbdf82dad0f1ed68121277dbae27e1a25747e8 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 16:37:51 -0500 Subject: [PATCH 067/200] add usavt shields --- shields/template_usavt.svg | 2 ++ shields/template_usavt_wide.svg | 2 ++ shields/template_usavt_wide4.svg | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 shields/template_usavt.svg create mode 100644 shields/template_usavt_wide.svg create mode 100644 shields/template_usavt_wide4.svg diff --git a/shields/template_usavt.svg b/shields/template_usavt.svg new file mode 100644 index 00000000..cdec0a61 --- /dev/null +++ b/shields/template_usavt.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usavt_wide.svg b/shields/template_usavt_wide.svg new file mode 100644 index 00000000..454fe053 --- /dev/null +++ b/shields/template_usavt_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usavt_wide4.svg b/shields/template_usavt_wide4.svg new file mode 100644 index 00000000..6a81786b --- /dev/null +++ b/shields/template_usavt_wide4.svg @@ -0,0 +1,2 @@ +***NUMBER*** + From 67a6deec5f4662a2daa872182c262e6f379315fb Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 17:01:02 -0500 Subject: [PATCH 068/200] add usawi shields --- shields/template_usawi.svg | 2 ++ shields/template_usawi_wide.svg | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 shields/template_usawi.svg create mode 100644 shields/template_usawi_wide.svg diff --git a/shields/template_usawi.svg b/shields/template_usawi.svg new file mode 100644 index 00000000..59f9141a --- /dev/null +++ b/shields/template_usawi.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usawi_wide.svg b/shields/template_usawi_wide.svg new file mode 100644 index 00000000..330023b2 --- /dev/null +++ b/shields/template_usawi_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + From c0fb820d131dc726a377783f045f8f38cf8972fa Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 21:34:16 -0500 Subject: [PATCH 069/200] Add usawa shields --- shields/template_usawa.svg | 2 ++ shields/template_usawa_wide.svg | 2 ++ 2 files changed, 4 insertions(+) create mode 100644 shields/template_usawa.svg create mode 100644 shields/template_usawa_wide.svg diff --git a/shields/template_usawa.svg b/shields/template_usawa.svg new file mode 100644 index 00000000..7fd66016 --- /dev/null +++ b/shields/template_usawa.svg @@ -0,0 +1,2 @@ +***NUMBER*** + diff --git a/shields/template_usawa_wide.svg b/shields/template_usawa_wide.svg new file mode 100644 index 00000000..88086d7c --- /dev/null +++ b/shields/template_usawa_wide.svg @@ -0,0 +1,2 @@ +***NUMBER*** + From c3b90fa1cae6ea617b8471683dc4311ae8626580 Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 21:44:44 -0500 Subject: [PATCH 070/200] Add usatn shield --- shields/template_usatn.svg | 46 +++++++++++++++++++++++++++++++++ shields/template_usatn_wide.svg | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 shields/template_usatn.svg create mode 100644 shields/template_usatn_wide.svg diff --git a/shields/template_usatn.svg b/shields/template_usatn.svg new file mode 100644 index 00000000..bcee33e4 --- /dev/null +++ b/shields/template_usatn.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +***NUMBER*** + diff --git a/shields/template_usatn_wide.svg b/shields/template_usatn_wide.svg new file mode 100644 index 00000000..20c7a909 --- /dev/null +++ b/shields/template_usatn_wide.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +***NUMBER*** + From 0c767ed50147551e03aee469b91c2c6ce7cbfe2f Mon Sep 17 00:00:00 2001 From: Thing342 Date: Thu, 12 Jan 2017 22:10:03 -0500 Subject: [PATCH 071/200] Add usaok shields --- shields/template_usaok.svg | 19 +++++++++++++++++++ shields/template_usaok_wide.svg | 11 +++++++++++ 2 files changed, 30 insertions(+) create mode 100644 shields/template_usaok.svg create mode 100644 shields/template_usaok_wide.svg diff --git a/shields/template_usaok.svg b/shields/template_usaok.svg new file mode 100644 index 00000000..cd4db6d5 --- /dev/null +++ b/shields/template_usaok.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + +***NUMBER*** +***NUMBER*** + + diff --git a/shields/template_usaok_wide.svg b/shields/template_usaok_wide.svg new file mode 100644 index 00000000..3bdb24b6 --- /dev/null +++ b/shields/template_usaok_wide.svg @@ -0,0 +1,11 @@ + + + + + + + +***NUMBER*** +***NUMBER*** + + From 9bba6720e179b54c7e63044c566e9bebc5d49a07 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Thu, 12 Jan 2017 19:41:59 -0800 Subject: [PATCH 072/200] fix MT sec, add cannsf --- shields/template_cannsf_wide.svg | 78 +++++++++++++++++++ ...te_usamts_wide.svg => template_usamts.svg} | 0 2 files changed, 78 insertions(+) create mode 100644 shields/template_cannsf_wide.svg rename shields/{template_usamts_wide.svg => template_usamts.svg} (100%) diff --git a/shields/template_cannsf_wide.svg b/shields/template_cannsf_wide.svg new file mode 100644 index 00000000..d9abb839 --- /dev/null +++ b/shields/template_cannsf_wide.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ***NUMBER*** + diff --git a/shields/template_usamts_wide.svg b/shields/template_usamts.svg similarity index 100% rename from shields/template_usamts_wide.svg rename to shields/template_usamts.svg From d51574d8ee605c503def96a9d243353b765ca3ef Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 14 Jan 2017 19:51:15 -0800 Subject: [PATCH 073/200] add islth --- shields/shieldgen.php | 5 +++++ shields/template_islth.svg | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 shields/template_islth.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 1999ae69..06b2656b 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -138,6 +138,11 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'islth': //uses same shield, no wide + $routeNum = str_replace("TH", "", $row['route']); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usasf': case 'usanp': case 'eursf': case 'usakyp': case 'gbrtr': $lines = explode(',',preg_replace('/(?!^)[A-Z]{3,}(?=[A-Z][a-z])|[A-Z][a-z]/', ',$0', $row['route'])); diff --git a/shields/template_islth.svg b/shields/template_islth.svg new file mode 100644 index 00000000..e1c6da21 --- /dev/null +++ b/shields/template_islth.svg @@ -0,0 +1,8 @@ + + + + + + ***NUMBER*** + + From 2af57400691b0836dfbd04571d314a059461b006 Mon Sep 17 00:00:00 2001 From: Eric Bryant Date: Thu, 19 Jan 2017 23:43:32 -0500 Subject: [PATCH 074/200] update New York credits --- credits.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/credits.php b/credits.php index bf4bc685..a417cee4 100644 --- a/credits.php +++ b/credits.php @@ -595,9 +595,10 @@
      • New York, USA
      • North Carolina, USA From 589bdb0afe4eb4d8cb1993c075908363a8c647a8 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Thu, 19 Jan 2017 23:19:27 -0800 Subject: [PATCH 075/200] add usaas, usamp --- shields/template_usaas_wide.svg | 3 +++ shields/template_usamp.svg | 12 ++++++++++++ shields/template_usamp_wide.svg | 12 ++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 shields/template_usaas_wide.svg create mode 100644 shields/template_usamp.svg create mode 100644 shields/template_usamp_wide.svg diff --git a/shields/template_usaas_wide.svg b/shields/template_usaas_wide.svg new file mode 100644 index 00000000..ac864923 --- /dev/null +++ b/shields/template_usaas_wide.svg @@ -0,0 +1,3 @@ + +***NUMBER*** + diff --git a/shields/template_usamp.svg b/shields/template_usamp.svg new file mode 100644 index 00000000..a8c5960f --- /dev/null +++ b/shields/template_usamp.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_usamp_wide.svg b/shields/template_usamp_wide.svg new file mode 100644 index 00000000..3cfcb946 --- /dev/null +++ b/shields/template_usamp_wide.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + From ef095a16c6564305fe005ecb3e50a58877e7bfac Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 21 Jan 2017 11:52:01 -0500 Subject: [PATCH 076/200] user/index.php favicon --- user/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/user/index.php b/user/index.php index b46d099a..82a1aa93 100644 --- a/user/index.php +++ b/user/index.php @@ -10,6 +10,7 @@ + Date: Sat, 21 Jan 2017 12:03:21 -0500 Subject: [PATCH 085/200] updates.php favicon --- devel/updates.php | 1 + 1 file changed, 1 insertion(+) diff --git a/devel/updates.php b/devel/updates.php index 17d25723..d9dac3cd 100644 --- a/devel/updates.php +++ b/devel/updates.php @@ -3,6 +3,7 @@ + From a1c8c71f861dbb7dbb2f7ad7eda76f626fd66013 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 21 Jan 2017 12:05:05 -0500 Subject: [PATCH 086/200] stat.php favicon --- stat.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stat.php b/stat.php index 219826d0..6c991d86 100644 --- a/stat.php +++ b/stat.php @@ -9,6 +9,7 @@ + @@ -192,4 +193,4 @@
      DateRegionRouteFile RootDescription
      Miles Driven".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']}
      Miles Driven".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']}
      Miles Driven".sprintf('%0.2f', $row['clinchedMileage'])." of ".sprintf('%0.2f', $system_mileage)." mi (".sprintf('%0.2f',$percentage)."%) Rank: {$row['rank']}
      - \ No newline at end of file + From b0f8f69f60a851654f745c74845ab5842c1db0a7 Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sat, 21 Jan 2017 16:53:46 -0500 Subject: [PATCH 087/200] Hopefully fixes blank autb, cheh, and eure sheilds --- shields/shieldgen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 06b2656b..74175793 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -105,7 +105,7 @@ function generate($r, $force_reload = false) case 'autb': case 'cheh': // remove prefix, use wide svg file - $routeNum = str_replace("B", "", $routeNum); + $routeNum = str_replace("B", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); @@ -115,7 +115,7 @@ function generate($r, $force_reload = false) break; case 'eure': - $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***NUMBER***", $row['route'], $svg); // use wide svg file if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); From 27b55fae6432327b47d2f284a795f4513aefb451 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 22 Jan 2017 15:28:26 -0500 Subject: [PATCH 088/200] Remove extra semicolons. #143. --- shields/shieldgen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 74175793..e808f956 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -97,7 +97,7 @@ function generate($r, $force_reload = false) case 'chea': case 'deua': case 'deub': case 'ltuk': // remove prefix - $routeNum = str_replace("A", "", $row['route']);; + $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); @@ -131,7 +131,7 @@ function generate($r, $force_reload = false) break; case 'gbnam':case 'niram': - $routeNum = str_replace("M", "", $row['route']);; + $routeNum = str_replace("M", "", $row['route']); $routeNum = str_replace("A", "", $routeNum); if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_gbnam_wide.svg"); From 0e72d17e95ad715eadc2e42cd4468f800ea9efb5 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 22 Jan 2017 15:58:00 -0500 Subject: [PATCH 089/200] Fix indicated in conversation for #143. --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index e808f956..940225ea 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -108,10 +108,10 @@ function generate($r, $force_reload = false) $routeNum = str_replace("B", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); - $svg = str_replace("***NUMBER***", $routeNum, $svg); if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } + $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'eure': From 859f84031ce62826d07cd345c9557cd2876960ba Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Fri, 27 Jan 2017 14:42:56 -0500 Subject: [PATCH 090/200] Make info window text selectable again --- css/travelMapping.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/css/travelMapping.css b/css/travelMapping.css index 8764b4c8..d14f1ff5 100644 --- a/css/travelMapping.css +++ b/css/travelMapping.css @@ -138,6 +138,10 @@ table.gratable tr.float th { background-color: #999999; } +div.gm-style { + user-select: auto !important; +} + /* from jdtstyle.css: */ /*body { margin-top: 10px; From 8a89475a626da1b46d7c3c050b586f232fd598ec Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Fri, 27 Jan 2017 19:38:47 -0500 Subject: [PATCH 091/200] Minor format. --- css/travelMapping.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/travelMapping.css b/css/travelMapping.css index 8764b4c8..e021f67c 100644 --- a/css/travelMapping.css +++ b/css/travelMapping.css @@ -395,3 +395,4 @@ margin-left: 10px; width: 750px; text-align: right; } + From aea3aba25b243e30ed41a81d9c7dd3f2e636fa1a Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 28 Jan 2017 20:09:05 +0100 Subject: [PATCH 092/200] Shields BEL/NLD --- shields/shieldgen.php | 33 ++++++++++++++++++++++++++------- shields/template_bela.svg | 11 +++++++++++ shields/template_bela_wide.svg | 12 ++++++++++++ shields/template_belb.svg | 12 ++++++++++++ shields/template_beln.svg | 13 +++++++++++++ shields/template_beln_wide.svg | 13 +++++++++++++ shields/template_beln_wide3.svg | 13 +++++++++++++ shields/template_belr.svg | 11 +++++++++++ shields/template_belr_wide.svg | 12 ++++++++++++ shields/template_nlda.svg | 12 ++++++++++++ shields/template_nlda_wide.svg | 12 ++++++++++++ shields/template_nlda_wide4.svg | 12 ++++++++++++ shields/template_nldp.svg | 7 +++++++ shields/template_nldr.svg | 7 +++++++ 14 files changed, 173 insertions(+), 7 deletions(-) create mode 100644 shields/template_bela.svg create mode 100644 shields/template_bela_wide.svg create mode 100644 shields/template_belb.svg create mode 100644 shields/template_beln.svg create mode 100644 shields/template_beln_wide.svg create mode 100644 shields/template_beln_wide3.svg create mode 100644 shields/template_belr.svg create mode 100644 shields/template_belr_wide.svg create mode 100644 shields/template_nlda.svg create mode 100644 shields/template_nlda_wide.svg create mode 100644 shields/template_nlda_wide4.svg create mode 100644 shields/template_nldp.svg create mode 100644 shields/template_nldr.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 940225ea..6bf477c7 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -95,11 +95,12 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'chea': case 'deua': case 'deub': case 'ltuk': + case 'chea': case 'deua': case 'deub': case 'islth': case 'ltuk': // remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); + $routeNum = str_replace("TH", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; @@ -114,7 +115,19 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'eure': + case 'beln': + // remove prefix, use 2 wider svg files + $routeNum = str_replace("N", "", $row['route']); + if (strlen($routeNum) > 1) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide3.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + + case 'bela': case 'belr': case 'eure': $svg = str_replace("***NUMBER***", $row['route'], $svg); // use wide svg file if (strlen($routeNum) > 2) { @@ -122,6 +135,17 @@ function generate($r, $force_reload = false) } break; + case 'nlda': + // use 2 wider svg files + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + if (strlen($routeNum) > 3) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'gbnm':case 'nirm': $routeNum = str_replace("M", "", $row['route']); if (strlen($routeNum) > 2) { @@ -138,11 +162,6 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - - case 'islth': //uses same shield, no wide - $routeNum = str_replace("TH", "", $row['route']); - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; case 'usasf': case 'usanp': case 'eursf': case 'usakyp': case 'gbrtr': $lines = explode(',',preg_replace('/(?!^)[A-Z]{3,}(?=[A-Z][a-z])|[A-Z][a-z]/', ',$0', $row['route'])); diff --git a/shields/template_bela.svg b/shields/template_bela.svg new file mode 100644 index 00000000..86799f44 --- /dev/null +++ b/shields/template_bela.svg @@ -0,0 +1,11 @@ + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_bela_wide.svg b/shields/template_bela_wide.svg new file mode 100644 index 00000000..719dff5e --- /dev/null +++ b/shields/template_bela_wide.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_belb.svg b/shields/template_belb.svg new file mode 100644 index 00000000..719dff5e --- /dev/null +++ b/shields/template_belb.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_beln.svg b/shields/template_beln.svg new file mode 100644 index 00000000..4f15f8fe --- /dev/null +++ b/shields/template_beln.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_beln_wide.svg b/shields/template_beln_wide.svg new file mode 100644 index 00000000..98fdfc79 --- /dev/null +++ b/shields/template_beln_wide.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_beln_wide3.svg b/shields/template_beln_wide3.svg new file mode 100644 index 00000000..8bc038d4 --- /dev/null +++ b/shields/template_beln_wide3.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_belr.svg b/shields/template_belr.svg new file mode 100644 index 00000000..86799f44 --- /dev/null +++ b/shields/template_belr.svg @@ -0,0 +1,11 @@ + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_belr_wide.svg b/shields/template_belr_wide.svg new file mode 100644 index 00000000..719dff5e --- /dev/null +++ b/shields/template_belr_wide.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_nlda.svg b/shields/template_nlda.svg new file mode 100644 index 00000000..84b5f0f7 --- /dev/null +++ b/shields/template_nlda.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_nlda_wide.svg b/shields/template_nlda_wide.svg new file mode 100644 index 00000000..66ccb38a --- /dev/null +++ b/shields/template_nlda_wide.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_nlda_wide4.svg b/shields/template_nlda_wide4.svg new file mode 100644 index 00000000..b6041d45 --- /dev/null +++ b/shields/template_nlda_wide4.svg @@ -0,0 +1,12 @@ + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_nldp.svg b/shields/template_nldp.svg new file mode 100644 index 00000000..12a68a7a --- /dev/null +++ b/shields/template_nldp.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_nldr.svg b/shields/template_nldr.svg new file mode 100644 index 00000000..4a3fc6f5 --- /dev/null +++ b/shields/template_nldr.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + From be65b04596e78c466eda9be0a82a5d26999fbb27 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 28 Jan 2017 20:55:54 +0100 Subject: [PATCH 093/200] nlds + missing viewbox parameter added --- shields/shieldgen.php | 6 ++++++ shields/template_nlda.svg | 2 +- shields/template_nlda_wide.svg | 2 +- shields/template_nlda_wide4.svg | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 6bf477c7..3d096cde 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -104,6 +104,12 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'nlds': + // remove prefix and suffix + $routeNum = substr($row['route'], 1, 3); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'autb': case 'cheh': // remove prefix, use wide svg file $routeNum = str_replace("B", "", $row['route']); diff --git a/shields/template_nlda.svg b/shields/template_nlda.svg index 84b5f0f7..baef34a1 100644 --- a/shields/template_nlda.svg +++ b/shields/template_nlda.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_nlda_wide.svg b/shields/template_nlda_wide.svg index 66ccb38a..ac0b4b35 100644 --- a/shields/template_nlda_wide.svg +++ b/shields/template_nlda_wide.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_nlda_wide4.svg b/shields/template_nlda_wide4.svg index b6041d45..fc8e62dd 100644 --- a/shields/template_nlda_wide4.svg +++ b/shields/template_nlda_wide4.svg @@ -1,5 +1,5 @@ - + From 2c5e536d2e136dcdc18c314025b35f7ae0ac641c Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 28 Jan 2017 20:56:53 +0100 Subject: [PATCH 094/200] ... --- shields/template_nlds.svg | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 shields/template_nlds.svg diff --git a/shields/template_nlds.svg b/shields/template_nlds.svg new file mode 100644 index 00000000..5b1c2fe4 --- /dev/null +++ b/shields/template_nlds.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + ***NUMBER*** + + From a26789aa911654d18ad09e6bf80fc2520cc8a1a6 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 29 Jan 2017 09:46:53 +0100 Subject: [PATCH 095/200] BEL/NLD shield fixes There's an odd rectangle in the back of the bela+belr shields. It doesn't appear when I test it (with different backcolor to make it visible). Modified the viewbox parameter. --- shields/shieldgen.php | 8 ++++---- shields/template_bela.svg | 2 +- shields/template_bela_wide.svg | 2 +- shields/template_belr.svg | 2 +- shields/template_belr_wide.svg | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 3d096cde..0e02ab7d 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,7 +20,7 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { - case 'cantch': //do nothing + case 'cantch': case 'nldp': case 'nldr': //do nothing break; case 'usai': @@ -143,13 +143,13 @@ function generate($r, $force_reload = false) case 'nlda': // use 2 wider svg files - if (strlen($routeNum) > 2) { + if (strlen($row['route']) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } - if (strlen($routeNum) > 3) { + if (strlen($row['route']) > 3) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); } - $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***NUMBER***", $row['route'], $svg); break; case 'gbnm':case 'nirm': diff --git a/shields/template_bela.svg b/shields/template_bela.svg index 86799f44..0167cc4f 100644 --- a/shields/template_bela.svg +++ b/shields/template_bela.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_bela_wide.svg b/shields/template_bela_wide.svg index 719dff5e..7019f676 100644 --- a/shields/template_bela_wide.svg +++ b/shields/template_bela_wide.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_belr.svg b/shields/template_belr.svg index 86799f44..0167cc4f 100644 --- a/shields/template_belr.svg +++ b/shields/template_belr.svg @@ -1,5 +1,5 @@ - + diff --git a/shields/template_belr_wide.svg b/shields/template_belr_wide.svg index 719dff5e..7019f676 100644 --- a/shields/template_belr_wide.svg +++ b/shields/template_belr_wide.svg @@ -1,5 +1,5 @@ - + From 5a75e681cdc6aaa6a8f5096e9df31d6535ae7de0 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 29 Jan 2017 14:27:10 +0100 Subject: [PATCH 096/200] BEL/NLD shields, replace placeholder --- shields/shieldgen.php | 6 +++++- shields/template_nlda_wide.svg | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 0e02ab7d..68498d29 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,7 +20,7 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { - case 'cantch': case 'nldp': case 'nldr': //do nothing + case 'cantch': //do nothing break; case 'usai': @@ -95,6 +95,10 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; + case 'belb': case 'nldp': case 'nldr': + //replace placeholder + $svg = str_replace("***NUMBER***", $row['route'], $svg); + case 'chea': case 'deua': case 'deub': case 'islth': case 'ltuk': // remove prefix $routeNum = str_replace("A", "", $row['route']); diff --git a/shields/template_nlda_wide.svg b/shields/template_nlda_wide.svg index ac0b4b35..11eaf0d0 100644 --- a/shields/template_nlda_wide.svg +++ b/shields/template_nlda_wide.svg @@ -7,6 +7,6 @@ - ***NUMBER*** + ***NUMBER*** From bc974fa9663410791f84400be07ebc93026a5291 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 29 Jan 2017 15:52:57 +0100 Subject: [PATCH 097/200] ALA, DNK, FIN, NOR and SWE shields --- shields/shieldgen.php | 27 ++++++++++++++++++--------- shields/template_alakt.svg | 11 +++++++++++ shields/template_alavt.svg | 11 +++++++++++ shields/template_dnkpr.svg | 10 ++++++++++ shields/template_dnkpr_wide.svg | 10 ++++++++++ shields/template_dnksr.svg | 10 ++++++++++ shields/template_finkt.svg | 11 +++++++++++ shields/template_finvt.svg | 11 +++++++++++ shields/template_finvt_wide.svg | 11 +++++++++++ shields/template_norfv.svg | 10 ++++++++++ shields/template_norfv_wide.svg | 10 ++++++++++ shields/template_norfv_wide3.svg | 10 ++++++++++ shields/template_norrv.svg | 11 +++++++++++ shields/template_norrv_wide.svg | 11 +++++++++++ shields/template_norrv_wide3.svg | 11 +++++++++++ shields/template_swel.svg | 10 ++++++++++ shields/template_swer.svg | 10 ++++++++++ shields/template_swer_wide.svg | 10 ++++++++++ 18 files changed, 196 insertions(+), 9 deletions(-) create mode 100644 shields/template_alakt.svg create mode 100644 shields/template_alavt.svg create mode 100644 shields/template_dnkpr.svg create mode 100644 shields/template_dnkpr_wide.svg create mode 100644 shields/template_dnksr.svg create mode 100644 shields/template_finkt.svg create mode 100644 shields/template_finvt.svg create mode 100644 shields/template_finvt_wide.svg create mode 100644 shields/template_norfv.svg create mode 100644 shields/template_norfv_wide.svg create mode 100644 shields/template_norfv_wide3.svg create mode 100644 shields/template_norrv.svg create mode 100644 shields/template_norrv_wide.svg create mode 100644 shields/template_norrv_wide3.svg create mode 100644 shields/template_swel.svg create mode 100644 shields/template_swer.svg create mode 100644 shields/template_swer_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 68498d29..b60a1b21 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -96,26 +96,30 @@ function generate($r, $force_reload = false) break; case 'belb': case 'nldp': case 'nldr': - //replace placeholder + // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); - case 'chea': case 'deua': case 'deub': case 'islth': case 'ltuk': - // remove prefix + case 'alakt': case 'alavt': case 'chea': case 'deua': case 'dnksr': case 'deub': case 'finkt': case 'islth': case 'ltuk': case 'swel': + // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); + $routeNum = str_replace("Kt", "", $routeNum); + $routeNum = str_replace("L", "", $routeNum); + $routeNum = str_replace("SR", "", $routeNum); $routeNum = str_replace("TH", "", $routeNum); + $routeNum = str_replace("Vt", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'nlds': - // remove prefix and suffix + // replace placeholder, remove prefix and suffix $routeNum = substr($row['route'], 1, 3); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'autb': case 'cheh': - // remove prefix, use wide svg file + // replace placeholder, remove prefix, use wide svg file for 3-digit numbers $routeNum = str_replace("B", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); @@ -125,9 +129,14 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'beln': - // remove prefix, use 2 wider svg files + case 'beln': case 'dnkpr': case 'finvt': case 'norfv': case 'norrv': case 'swer': + // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers $routeNum = str_replace("N", "", $row['route']); + $routeNum = str_replace("Fv", "", $routeNum); + $routeNum = str_replace("PR", "", $routeNum); + $routeNum = str_replace("R", "", $routeNum); + $routeNum = str_replace("Rv", "", $routeNum); + $routeNum = str_replace("Vt", "", $routeNum); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } @@ -139,14 +148,14 @@ function generate($r, $force_reload = false) case 'bela': case 'belr': case 'eure': $svg = str_replace("***NUMBER***", $row['route'], $svg); - // use wide svg file + // replace placeholder, use wide svg file for 3-digit numbers if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } break; case 'nlda': - // use 2 wider svg files + // replace placeholder, use wide svg files for 3-/4-digit numbers if (strlen($row['route']) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } diff --git a/shields/template_alakt.svg b/shields/template_alakt.svg new file mode 100644 index 00000000..5718f297 --- /dev/null +++ b/shields/template_alakt.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_alavt.svg b/shields/template_alavt.svg new file mode 100644 index 00000000..2c91d973 --- /dev/null +++ b/shields/template_alavt.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_dnkpr.svg b/shields/template_dnkpr.svg new file mode 100644 index 00000000..aeda929e --- /dev/null +++ b/shields/template_dnkpr.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_dnkpr_wide.svg b/shields/template_dnkpr_wide.svg new file mode 100644 index 00000000..62316642 --- /dev/null +++ b/shields/template_dnkpr_wide.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_dnksr.svg b/shields/template_dnksr.svg new file mode 100644 index 00000000..5e6c76b2 --- /dev/null +++ b/shields/template_dnksr.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_finkt.svg b/shields/template_finkt.svg new file mode 100644 index 00000000..5c227496 --- /dev/null +++ b/shields/template_finkt.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_finvt.svg b/shields/template_finvt.svg new file mode 100644 index 00000000..96c873ed --- /dev/null +++ b/shields/template_finvt.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_finvt_wide.svg b/shields/template_finvt_wide.svg new file mode 100644 index 00000000..96c873ed --- /dev/null +++ b/shields/template_finvt_wide.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norfv.svg b/shields/template_norfv.svg new file mode 100644 index 00000000..cd67ceba --- /dev/null +++ b/shields/template_norfv.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norfv_wide.svg b/shields/template_norfv_wide.svg new file mode 100644 index 00000000..f1b80a40 --- /dev/null +++ b/shields/template_norfv_wide.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norfv_wide3.svg b/shields/template_norfv_wide3.svg new file mode 100644 index 00000000..5e6c76b2 --- /dev/null +++ b/shields/template_norfv_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norrv.svg b/shields/template_norrv.svg new file mode 100644 index 00000000..65ed4811 --- /dev/null +++ b/shields/template_norrv.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norrv_wide.svg b/shields/template_norrv_wide.svg new file mode 100644 index 00000000..9e4977a6 --- /dev/null +++ b/shields/template_norrv_wide.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_norrv_wide3.svg b/shields/template_norrv_wide3.svg new file mode 100644 index 00000000..dcfd3285 --- /dev/null +++ b/shields/template_norrv_wide3.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_swel.svg b/shields/template_swel.svg new file mode 100644 index 00000000..93a69e37 --- /dev/null +++ b/shields/template_swel.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_swer.svg b/shields/template_swer.svg new file mode 100644 index 00000000..630ccf8e --- /dev/null +++ b/shields/template_swer.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_swer_wide.svg b/shields/template_swer_wide.svg new file mode 100644 index 00000000..5029a5d2 --- /dev/null +++ b/shields/template_swer_wide.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From b19d19c8f842a220f537b9c80c37cb8a85ad29ea Mon Sep 17 00:00:00 2001 From: theFXexpert Date: Sun, 29 Jan 2017 13:11:28 -0500 Subject: [PATCH 098/200] ARG --- css/travelMapping.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/travelMapping.css b/css/travelMapping.css index d14f1ff5..12f92841 100644 --- a/css/travelMapping.css +++ b/css/travelMapping.css @@ -138,7 +138,7 @@ table.gratable tr.float th { background-color: #999999; } -div.gm-style { +div.gm-style div { user-select: auto !important; } From c7e4c370a312e7f956566deb5a3a2d84f13d4ed2 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 29 Jan 2017 20:31:07 +0100 Subject: [PATCH 099/200] shield fixes --- shields/shieldgen.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index b60a1b21..d79eec30 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -103,8 +103,8 @@ function generate($r, $force_reload = false) // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); - $routeNum = str_replace("K", "", $routeNum); $routeNum = str_replace("Kt", "", $routeNum); + $routeNum = str_replace("K", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); $routeNum = str_replace("SR", "", $routeNum); $routeNum = str_replace("TH", "", $routeNum); @@ -131,11 +131,11 @@ function generate($r, $force_reload = false) case 'beln': case 'dnkpr': case 'finvt': case 'norfv': case 'norrv': case 'swer': // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers - $routeNum = str_replace("N", "", $row['route']); - $routeNum = str_replace("Fv", "", $routeNum); + $routeNum = str_replace("Fv", "", $row['route']); + $routeNum = str_replace("N", "", $routeNum); $routeNum = str_replace("PR", "", $routeNum); - $routeNum = str_replace("R", "", $routeNum); $routeNum = str_replace("Rv", "", $routeNum); + $routeNum = str_replace("R", "", $routeNum); $routeNum = str_replace("Vt", "", $routeNum); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); From 0acc628e3315d57897fdd8d5b41a0b56c263bf6a Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 29 Jan 2017 14:46:23 -0500 Subject: [PATCH 100/200] Odd conflict... --- css/travelMapping.css | 2 +- shields/shieldgen.php | 27 ++++++++++++++++++--------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/css/travelMapping.css b/css/travelMapping.css index d4daf254..8deec84a 100644 --- a/css/travelMapping.css +++ b/css/travelMapping.css @@ -138,7 +138,7 @@ table.gratable tr.float th { background-color: #999999; } -div.gm-style { +div.gm-style div { user-select: auto !important; } diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 68498d29..b60a1b21 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -96,26 +96,30 @@ function generate($r, $force_reload = false) break; case 'belb': case 'nldp': case 'nldr': - //replace placeholder + // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); - case 'chea': case 'deua': case 'deub': case 'islth': case 'ltuk': - // remove prefix + case 'alakt': case 'alavt': case 'chea': case 'deua': case 'dnksr': case 'deub': case 'finkt': case 'islth': case 'ltuk': case 'swel': + // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); + $routeNum = str_replace("Kt", "", $routeNum); + $routeNum = str_replace("L", "", $routeNum); + $routeNum = str_replace("SR", "", $routeNum); $routeNum = str_replace("TH", "", $routeNum); + $routeNum = str_replace("Vt", "", $routeNum); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'nlds': - // remove prefix and suffix + // replace placeholder, remove prefix and suffix $routeNum = substr($row['route'], 1, 3); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'autb': case 'cheh': - // remove prefix, use wide svg file + // replace placeholder, remove prefix, use wide svg file for 3-digit numbers $routeNum = str_replace("B", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); @@ -125,9 +129,14 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'beln': - // remove prefix, use 2 wider svg files + case 'beln': case 'dnkpr': case 'finvt': case 'norfv': case 'norrv': case 'swer': + // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers $routeNum = str_replace("N", "", $row['route']); + $routeNum = str_replace("Fv", "", $routeNum); + $routeNum = str_replace("PR", "", $routeNum); + $routeNum = str_replace("R", "", $routeNum); + $routeNum = str_replace("Rv", "", $routeNum); + $routeNum = str_replace("Vt", "", $routeNum); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } @@ -139,14 +148,14 @@ function generate($r, $force_reload = false) case 'bela': case 'belr': case 'eure': $svg = str_replace("***NUMBER***", $row['route'], $svg); - // use wide svg file + // replace placeholder, use wide svg file for 3-digit numbers if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } break; case 'nlda': - // use 2 wider svg files + // replace placeholder, use wide svg files for 3-/4-digit numbers if (strlen($row['route']) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } From edebfde9694e0a2b1e1e1070ba77c32ae4544240 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 29 Jan 2017 22:39:26 -0500 Subject: [PATCH 101/200] Updated developer tools page. --- devel/tools.php | 80 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/tmfooter.php | 1 - 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 devel/tools.php diff --git a/devel/tools.php b/devel/tools.php new file mode 100644 index 00000000..93066e73 --- /dev/null +++ b/devel/tools.php @@ -0,0 +1,80 @@ + + + + + + + + + + +Travel Mapping Developer Tools and Links + + + + +

      Travel Mapping Developer Tools and Links

      + + +

      + +This page gathers information, tools, and other links primarily of +interest to Travel Mapping project contributors. +Most of the files below are regenerated during each site update. +

      + +

      Developer Tools

      + +
      + +
      + +

      Highway Data Development Logs

      + + + +
      + +
      + +

      Web Site Development and Site Update Logs

      + + + + + +close(); +?> + diff --git a/lib/tmfooter.php b/lib/tmfooter.php index 9948f361..14ad274c 100644 --- a/lib/tmfooter.php +++ b/lib/tmfooter.php @@ -2,7 +2,6 @@
    • Datacheck entries that nearly match false positive entries
    • Travel Mapping Graph Data
      - Graphs can be loaded into HDX to verify unexpected or broken concurrencies.
    • + Graphs can be loaded into HDX to verify unexpected or broken concurrencies. +
    • Master Near-Miss Point (NMP) file +
      + NMP file can be loaded into HDX to find very nearby points that might be appropriate to combine.
    • Log of points that are very close together and might be candidates to merge
    • List of unprocessed wpt files
      From c5bd6dcd738f9a659af26bb1984184d782231672 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 4 Feb 2017 10:13:43 -0800 Subject: [PATCH 109/200] add cansk (under cansph for now), canmbw --- shields/shieldgen.php | 24 +++++++++++++++++++++++- shields/template_canmbw.svg | 18 ++++++++++++++++++ shields/template_canmbw_wide.svg | 18 ++++++++++++++++++ shields/template_cansk.svg | 24 ++++++++++++++++++++++++ shields/template_cansk_wide.svg | 24 ++++++++++++++++++++++++ 5 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 shields/template_canmbw.svg create mode 100644 shields/template_canmbw_wide.svg create mode 100644 shields/template_cansk.svg create mode 100644 shields/template_cansk_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 47cac8dd..795f2425 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,6 +20,27 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { + case 'cansph': + $region = explode(".", $r)[0]; + $routeNum = str_replace(strtoupper($region), "", $row['route']); + if (strlen($routeNum) > 2) { + if (file_exists("{$dir}/template_can" . $region . "_wide.svg")) { + $svg = file_get_contents("{$dir}/template_can" . $region . "_wide.svg"); + } else { + $svg = file_get_contents("{$dir}/generic_wide.svg"); + } + } else { + if (file_exists("template_can" . $region . ".svg")) { + $svg = file_get_contents("{$dir}/template_can" . $region . ".svg"); + } else { + $svg = file_get_contents("{$dir}/generic.svg"); + } + } + $region = strtoupper($region); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***SYS***", $region, $svg); + break; + case 'cantch': //do nothing break; @@ -99,7 +120,7 @@ function generate($r, $force_reload = false) // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); - case 'alakt': case 'alavt': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': + case 'alakt': case 'alavt': case 'canmbw': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); @@ -110,6 +131,7 @@ function generate($r, $force_reload = false) $routeNum = str_replace("Kt", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); + $routeNum = str_replace("Rte", "", $row['route']); $routeNum = str_replace("SR", "", $routeNum); $routeNum = str_replace("TH", "", $routeNum); $routeNum = str_replace("T", "", $routeNum); diff --git a/shields/template_canmbw.svg b/shields/template_canmbw.svg new file mode 100644 index 00000000..0072f89e --- /dev/null +++ b/shields/template_canmbw.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_canmbw_wide.svg b/shields/template_canmbw_wide.svg new file mode 100644 index 00000000..7abc0708 --- /dev/null +++ b/shields/template_canmbw_wide.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + ***NUMBER*** + + diff --git a/shields/template_cansk.svg b/shields/template_cansk.svg new file mode 100644 index 00000000..32f52e5c --- /dev/null +++ b/shields/template_cansk.svg @@ -0,0 +1,24 @@ + + + + + ***NUMBER*** + + + + + + + + + + + + + + + + + + + diff --git a/shields/template_cansk_wide.svg b/shields/template_cansk_wide.svg new file mode 100644 index 00000000..32f52e5c --- /dev/null +++ b/shields/template_cansk_wide.svg @@ -0,0 +1,24 @@ + + + + + ***NUMBER*** + + + + + + + + + + + + + + + + + + + From b0dc71813eedaa0db6bf6fa59417950eebfed39e Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 4 Feb 2017 10:26:34 -0800 Subject: [PATCH 110/200] fix the $routenum --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 795f2425..253dd191 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -131,7 +131,7 @@ function generate($r, $force_reload = false) $routeNum = str_replace("Kt", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); $routeNum = str_replace("L", "", $routeNum); - $routeNum = str_replace("Rte", "", $row['route']); + $routeNum = str_replace("Rte", "", $routeNum); $routeNum = str_replace("SR", "", $routeNum); $routeNum = str_replace("TH", "", $routeNum); $routeNum = str_replace("T", "", $routeNum); From 4cdb80572247418c6b9a2b35087d9c312932a1dd Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 4 Feb 2017 20:28:41 +0100 Subject: [PATCH 111/200] roudn fix --- shields/shieldgen.php | 20 +++++++++----------- shields/template_roudn_wide6.svg | 7 ------- 2 files changed, 9 insertions(+), 18 deletions(-) delete mode 100644 shields/template_roudn_wide6.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 8996bc89..ec53b6cd 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -151,6 +151,15 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'roudn': + // replace placeholder, remove prefix, use wide svg file for 4-digit numbers + $routeNum = str_replace("DN", "", $row['route']); + if (strlen($routeNum) > 3) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + $svg = str_replace("***NUMBER***", $row['route'], $svg); + break; + case 'bela': case 'belr': case 'eure': case 'roua': // replace placeholder, use wide svg file for 3-digit numbers if (strlen($routeNum) > 2) { @@ -170,17 +179,6 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $row['route'], $svg); break; - case 'roudn': - // replace placeholder, use wide svg file for 4-/6-digit numbers - if (strlen($row['route']) > 3) { - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); - } - if (strlen($row['route']) > 5) { - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide6.svg"); - } - $svg = str_replace("***NUMBER***", $row['route'], $svg); - break; - case 'deubwl': case 'deubyst': case 'deubbl': case 'deuhel': case 'deumvl': case 'deunil': case 'deunwl': case 'deurpl': case 'deusll': case 'deusns': case 'deustl': case 'deushl': case 'deuthl': // replace placeholder, use wide svg files $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($row['route']) . ".svg"); diff --git a/shields/template_roudn_wide6.svg b/shields/template_roudn_wide6.svg deleted file mode 100644 index 5e83148a..00000000 --- a/shields/template_roudn_wide6.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - ***NUMBER*** - - From b3d09ccca5572e2a9a8cb8982b361e0b9f5a4d70 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 4 Feb 2017 22:25:37 +0100 Subject: [PATCH 112/200] Shields: HUN/LUX --- shields/template_hunf.svg | 9 +++++++++ shields/template_hunm.svg | 9 +++++++++ shields/template_luxa.svg | 9 +++++++++ shields/template_luxa_wide.svg | 9 +++++++++ shields/template_luxb.svg | 9 +++++++++ shields/template_luxb_wide.svg | 9 +++++++++ shields/template_luxn.svg | 9 +++++++++ shields/template_luxn_wide.svg | 9 +++++++++ 8 files changed, 72 insertions(+) create mode 100644 shields/template_hunf.svg create mode 100644 shields/template_hunm.svg create mode 100644 shields/template_luxa.svg create mode 100644 shields/template_luxa_wide.svg create mode 100644 shields/template_luxb.svg create mode 100644 shields/template_luxb_wide.svg create mode 100644 shields/template_luxn.svg create mode 100644 shields/template_luxn_wide.svg diff --git a/shields/template_hunf.svg b/shields/template_hunf.svg new file mode 100644 index 00000000..4bb2d80e --- /dev/null +++ b/shields/template_hunf.svg @@ -0,0 +1,9 @@ + + + + + + + ***NUMBER*** + + diff --git a/shields/template_hunm.svg b/shields/template_hunm.svg new file mode 100644 index 00000000..e8194cc9 --- /dev/null +++ b/shields/template_hunm.svg @@ -0,0 +1,9 @@ + + + + + + + ***NUMBER*** + + diff --git a/shields/template_luxa.svg b/shields/template_luxa.svg new file mode 100644 index 00000000..1c5809dc --- /dev/null +++ b/shields/template_luxa.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxa_wide.svg b/shields/template_luxa_wide.svg new file mode 100644 index 00000000..2809dd32 --- /dev/null +++ b/shields/template_luxa_wide.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxb.svg b/shields/template_luxb.svg new file mode 100644 index 00000000..1c5809dc --- /dev/null +++ b/shields/template_luxb.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxb_wide.svg b/shields/template_luxb_wide.svg new file mode 100644 index 00000000..2809dd32 --- /dev/null +++ b/shields/template_luxb_wide.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxn.svg b/shields/template_luxn.svg new file mode 100644 index 00000000..5da549a2 --- /dev/null +++ b/shields/template_luxn.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxn_wide.svg b/shields/template_luxn_wide.svg new file mode 100644 index 00000000..2364f62f --- /dev/null +++ b/shields/template_luxn_wide.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + From 976ab2283cf1d70dc171f2df4b723a3b494191be Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 4 Feb 2017 22:28:36 +0100 Subject: [PATCH 113/200] shieldgen.php --- shields/shieldgen.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 61166963..db9a5a65 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,7 +20,7 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { - case 'cansph': + case 'cansph': $region = explode(".", $r)[0]; $routeNum = str_replace(strtoupper($region), "", $row['route']); if (strlen($routeNum) > 2) { @@ -116,17 +116,18 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'belb': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': + case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); - case 'alakt': case 'alavt': case 'canmbw': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': + case 'alakt': case 'alavt': case 'canmbw': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'hunf': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); $routeNum = str_replace("B", "", $routeNum); $routeNum = str_replace("DK", "", $routeNum); $routeNum = str_replace("DW", "", $routeNum); $routeNum = str_replace("D", "", $routeNum); + $routeNum = str_replace("F", "", $routeNum); $routeNum = str_replace("I", "", $routeNum); $routeNum = str_replace("Kt", "", $routeNum); $routeNum = str_replace("K", "", $routeNum); @@ -145,10 +146,11 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'autb': + case 'autb': case 'luxn': // replace placeholder, remove prefix, use wide svg file for 3-digit numbers $routeNum = str_replace("B", "", $row['route']); $routeNum = str_replace("L", "", $routeNum); + $routeNum = str_replace("N", "", $routeNum); if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } @@ -179,10 +181,10 @@ function generate($r, $force_reload = false) if (strlen($routeNum) > 3) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } - $svg = str_replace("***NUMBER***", $row['route'], $svg); + $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'bela': case 'belr': case 'eure': case 'roua': + case 'bela': case 'belr': case 'eure': case 'luxa': case 'luxb': case 'roua': // replace placeholder, use wide svg file for 3-digit numbers if (strlen($routeNum) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); From 49b84a6a4979c38ace05abe944ba210c32a54a81 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 4 Feb 2017 15:32:31 -0800 Subject: [PATCH 114/200] add missing $dir for usansf, cansph --- shields/shieldgen.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index db9a5a65..6e3bad6c 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -30,7 +30,7 @@ function generate($r, $force_reload = false) $svg = file_get_contents("{$dir}/generic_wide.svg"); } } else { - if (file_exists("template_can" . $region . ".svg")) { + if (file_exists("{$dir}/template_can" . $region . ".svg")) { $svg = file_get_contents("{$dir}/template_can" . $region . ".svg"); } else { $svg = file_get_contents("{$dir}/generic.svg"); @@ -105,7 +105,7 @@ function generate($r, $force_reload = false) $svg = file_get_contents("{$dir}/generic_wide.svg"); } } else { - if (file_exists("template_usa" . $region . ".svg")) { + if (file_exists("{$dir}/template_usa" . $region . ".svg")) { $svg = file_get_contents("{$dir}/template_usa" . $region . ".svg"); } else { $svg = file_get_contents("{$dir}/generic.svg"); From 707161783c9322c3be2669832f34dd798be65e12 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 5 Feb 2017 08:46:55 +0100 Subject: [PATCH 115/200] Shields: HUN/LUX fix --- shields/shieldgen.php | 2 +- shields/template_hunf.svg | 16 ++++++++++------ shields/template_hunm.svg | 16 ++++++++++------ shields/template_luxa.svg | 4 ++-- shields/template_luxa_wide.svg | 4 ++-- shields/template_luxb.svg | 4 ++-- shields/template_luxb_wide.svg | 4 ++-- 7 files changed, 29 insertions(+), 21 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index db9a5a65..fc739042 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -186,7 +186,7 @@ function generate($r, $force_reload = false) case 'bela': case 'belr': case 'eure': case 'luxa': case 'luxb': case 'roua': // replace placeholder, use wide svg file for 3-digit numbers - if (strlen($routeNum) > 2) { + if (strlen($row['route']) > 2) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } $svg = str_replace("***NUMBER***", $row['route'], $svg); diff --git a/shields/template_hunf.svg b/shields/template_hunf.svg index 4bb2d80e..83393ca0 100644 --- a/shields/template_hunf.svg +++ b/shields/template_hunf.svg @@ -1,9 +1,13 @@ - - - - - ***NUMBER*** - + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_hunm.svg b/shields/template_hunm.svg index e8194cc9..644db270 100644 --- a/shields/template_hunm.svg +++ b/shields/template_hunm.svg @@ -1,9 +1,13 @@ - - - - - ***NUMBER*** - + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_luxa.svg b/shields/template_luxa.svg index 1c5809dc..c5b3464e 100644 --- a/shields/template_luxa.svg +++ b/shields/template_luxa.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxa_wide.svg b/shields/template_luxa_wide.svg index 2809dd32..b7d36a13 100644 --- a/shields/template_luxa_wide.svg +++ b/shields/template_luxa_wide.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxb.svg b/shields/template_luxb.svg index 1c5809dc..c5b3464e 100644 --- a/shields/template_luxb.svg +++ b/shields/template_luxb.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxb_wide.svg b/shields/template_luxb_wide.svg index 2809dd32..b7d36a13 100644 --- a/shields/template_luxb_wide.svg +++ b/shields/template_luxb_wide.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** From caaad0fcf61537c31b2c39db193593c01ad20f0d Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 5 Feb 2017 08:50:19 +0100 Subject: [PATCH 116/200] Sorry, it looks different on preview compared to live; I think I should make another try... --- shields/template_luxa.svg | 2 +- shields/template_luxa_wide.svg | 2 +- shields/template_luxb.svg | 2 +- shields/template_luxb_wide.svg | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shields/template_luxa.svg b/shields/template_luxa.svg index c5b3464e..1b614402 100644 --- a/shields/template_luxa.svg +++ b/shields/template_luxa.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_luxa_wide.svg b/shields/template_luxa_wide.svg index b7d36a13..296bde85 100644 --- a/shields/template_luxa_wide.svg +++ b/shields/template_luxa_wide.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_luxb.svg b/shields/template_luxb.svg index c5b3464e..1b614402 100644 --- a/shields/template_luxb.svg +++ b/shields/template_luxb.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_luxb_wide.svg b/shields/template_luxb_wide.svg index b7d36a13..296bde85 100644 --- a/shields/template_luxb_wide.svg +++ b/shields/template_luxb_wide.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** From 357d7ded6dc565b98c33cd27ac7b071777d841f6 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 5 Feb 2017 21:19:35 +0100 Subject: [PATCH 117/200] Shields: HUN fix --- shields/template_hunf.svg | 2 +- shields/template_hunm.svg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/shields/template_hunf.svg b/shields/template_hunf.svg index 83393ca0..7d7b0622 100644 --- a/shields/template_hunf.svg +++ b/shields/template_hunf.svg @@ -6,7 +6,7 @@ - ***NUMBER*** + ***NUMBER*** diff --git a/shields/template_hunm.svg b/shields/template_hunm.svg index 644db270..fe558551 100644 --- a/shields/template_hunm.svg +++ b/shields/template_hunm.svg @@ -6,7 +6,7 @@ - ***NUMBER*** + ***NUMBER*** From 31e622da13f438b16d0a2d9778fdcccc01a2eb3a Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 5 Feb 2017 21:22:29 +0100 Subject: [PATCH 118/200] LUX fix --- shields/template_luxa.svg | 4 ++-- shields/template_luxa_wide.svg | 4 ++-- shields/template_luxb.svg | 4 ++-- shields/template_luxb_wide.svg | 4 ++-- shields/template_luxn.svg | 4 ++-- shields/template_luxn_wide.svg | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/shields/template_luxa.svg b/shields/template_luxa.svg index 1b614402..cae11d39 100644 --- a/shields/template_luxa.svg +++ b/shields/template_luxa.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxa_wide.svg b/shields/template_luxa_wide.svg index 296bde85..a5c35f45 100644 --- a/shields/template_luxa_wide.svg +++ b/shields/template_luxa_wide.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxb.svg b/shields/template_luxb.svg index 1b614402..cae11d39 100644 --- a/shields/template_luxb.svg +++ b/shields/template_luxb.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxb_wide.svg b/shields/template_luxb_wide.svg index 296bde85..a5c35f45 100644 --- a/shields/template_luxb_wide.svg +++ b/shields/template_luxb_wide.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxn.svg b/shields/template_luxn.svg index 5da549a2..19e1b2d3 100644 --- a/shields/template_luxn.svg +++ b/shields/template_luxn.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** diff --git a/shields/template_luxn_wide.svg b/shields/template_luxn_wide.svg index 2364f62f..daa30172 100644 --- a/shields/template_luxn_wide.svg +++ b/shields/template_luxn_wide.svg @@ -2,8 +2,8 @@ - - ***NUMBER*** + + ***NUMBER*** From 4b7fcf4e990c10a0a2255422515d8bc6a37c8270 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sun, 5 Feb 2017 16:12:37 -0800 Subject: [PATCH 119/200] add canyt shields --- shields/shieldgen.php | 10 ++++++++++ shields/template_canyt1.svg | 10 ++++++++++ shields/template_canyt10.svg | 11 +++++++++++ shields/template_canyt11.svg | 11 +++++++++++ shields/template_canyt2.svg | 10 ++++++++++ shields/template_canyt3.svg | 10 ++++++++++ shields/template_canyt37.svg | 11 +++++++++++ shields/template_canyt4.svg | 10 ++++++++++ shields/template_canyt5.svg | 10 ++++++++++ shields/template_canyt6.svg | 10 ++++++++++ shields/template_canyt7.svg | 10 ++++++++++ shields/template_canyt8.svg | 11 +++++++++++ shields/template_canyt9.svg | 10 ++++++++++ 13 files changed, 134 insertions(+) create mode 100644 shields/template_canyt1.svg create mode 100644 shields/template_canyt10.svg create mode 100644 shields/template_canyt11.svg create mode 100644 shields/template_canyt2.svg create mode 100644 shields/template_canyt3.svg create mode 100644 shields/template_canyt37.svg create mode 100644 shields/template_canyt4.svg create mode 100644 shields/template_canyt5.svg create mode 100644 shields/template_canyt6.svg create mode 100644 shields/template_canyt7.svg create mode 100644 shields/template_canyt8.svg create mode 100644 shields/template_canyt9.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 2990cf8d..86a0b736 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -43,6 +43,16 @@ function generate($r, $force_reload = false) case 'cantch': //do nothing break; + + case 'canyt': + $routeNum = str_replace("YT", "", $row['route']); //gets rid of the extra YT on BC ones + if (file_exists("{$dir}/template_canyt" . $routeNum . ".svg")) { + $svg = file_get_contents("{$dir}/template_canyt" . $routeNum . ".svg"); + } + else { + $svg = file_get_contents("{$dir}/generic_wide.svg"); + } + break; case 'usai': case 'usaif': diff --git a/shields/template_canyt1.svg b/shields/template_canyt1.svg new file mode 100644 index 00000000..65e0f7bc --- /dev/null +++ b/shields/template_canyt1.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt10.svg b/shields/template_canyt10.svg new file mode 100644 index 00000000..756c173b --- /dev/null +++ b/shields/template_canyt10.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/shields/template_canyt11.svg b/shields/template_canyt11.svg new file mode 100644 index 00000000..463a5c49 --- /dev/null +++ b/shields/template_canyt11.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/shields/template_canyt2.svg b/shields/template_canyt2.svg new file mode 100644 index 00000000..5b34abcf --- /dev/null +++ b/shields/template_canyt2.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt3.svg b/shields/template_canyt3.svg new file mode 100644 index 00000000..83d74a1c --- /dev/null +++ b/shields/template_canyt3.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt37.svg b/shields/template_canyt37.svg new file mode 100644 index 00000000..71899dbe --- /dev/null +++ b/shields/template_canyt37.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/shields/template_canyt4.svg b/shields/template_canyt4.svg new file mode 100644 index 00000000..500a3cfe --- /dev/null +++ b/shields/template_canyt4.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt5.svg b/shields/template_canyt5.svg new file mode 100644 index 00000000..e47f11b4 --- /dev/null +++ b/shields/template_canyt5.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt6.svg b/shields/template_canyt6.svg new file mode 100644 index 00000000..ed6d8422 --- /dev/null +++ b/shields/template_canyt6.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt7.svg b/shields/template_canyt7.svg new file mode 100644 index 00000000..3e8e753b --- /dev/null +++ b/shields/template_canyt7.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/shields/template_canyt8.svg b/shields/template_canyt8.svg new file mode 100644 index 00000000..d0f2a024 --- /dev/null +++ b/shields/template_canyt8.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/shields/template_canyt9.svg b/shields/template_canyt9.svg new file mode 100644 index 00000000..09542232 --- /dev/null +++ b/shields/template_canyt9.svg @@ -0,0 +1,10 @@ + + + + + + + + + + From bbb14a36ca89a8b63d68d84b0cd955f9a817db6a Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 11 Feb 2017 12:56:09 +0100 Subject: [PATCH 120/200] Shields: deul fix + fraa + fran --- shields/shieldgen.php | 13 +++++++++++-- shields/template_fraa_wide3.svg | 10 ++++++++++ shields/template_fraa_wide4.svg | 10 ++++++++++ shields/template_fraa_wide5.svg | 10 ++++++++++ shields/template_fraa_wide6.svg | 10 ++++++++++ shields/template_fran_wide3.svg | 10 ++++++++++ shields/template_fran_wide4.svg | 10 ++++++++++ shields/template_fran_wide5.svg | 10 ++++++++++ shields/template_fran_wide6.svg | 10 ++++++++++ shields/template_frht_wide3.svg | 10 ++++++++++ shields/template_frht_wide4.svg | 10 ++++++++++ shields/template_frht_wide5.svg | 10 ++++++++++ 12 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 shields/template_fraa_wide3.svg create mode 100644 shields/template_fraa_wide4.svg create mode 100644 shields/template_fraa_wide5.svg create mode 100644 shields/template_fraa_wide6.svg create mode 100644 shields/template_fran_wide3.svg create mode 100644 shields/template_fran_wide4.svg create mode 100644 shields/template_fran_wide5.svg create mode 100644 shields/template_fran_wide6.svg create mode 100644 shields/template_frht_wide3.svg create mode 100644 shields/template_frht_wide4.svg create mode 100644 shields/template_frht_wide5.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 86a0b736..31c8fb96 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -194,6 +194,15 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'fraa': case 'fran': case 'frht': + // replace placeholder, replace prefix, use wide svg files + $routeNum = str_replace("A", "A ", $row['route']); + $routeNum = str_replace("N", "N ", $routeNum); + //$routeNum = str_replace("T", "T", $routeNum); //no blank required! + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" strlen($routeNum) . ".svg"); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'bela': case 'belr': case 'eure': case 'luxa': case 'luxb': case 'roua': // replace placeholder, use wide svg file for 3-digit numbers if (strlen($row['route']) > 2) { @@ -214,8 +223,8 @@ function generate($r, $force_reload = false) break; case 'deubwl': case 'deubyst': case 'deubbl': case 'deuhel': case 'deumvl': case 'deunil': case 'deunwl': case 'deurpl': case 'deusll': case 'deusns': case 'deustl': case 'deushl': case 'deuthl': - // replace placeholder, use wide svg files - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($row['route']) . ".svg"); + // replace placeholder, use wide svg files (German Landesstrassen) + $svg = file_get_contents("{$dir}/template_deul" . strlen($row['route']) . ".svg"); $svg = str_replace("***NUMBER***", $row['route'], $svg); break; diff --git a/shields/template_fraa_wide3.svg b/shields/template_fraa_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_fraa_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fraa_wide4.svg b/shields/template_fraa_wide4.svg new file mode 100644 index 00000000..7d92eadd --- /dev/null +++ b/shields/template_fraa_wide4.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fraa_wide5.svg b/shields/template_fraa_wide5.svg new file mode 100644 index 00000000..0d905baf --- /dev/null +++ b/shields/template_fraa_wide5.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fraa_wide6.svg b/shields/template_fraa_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_fraa_wide6.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fran_wide3.svg b/shields/template_fran_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_fran_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fran_wide4.svg b/shields/template_fran_wide4.svg new file mode 100644 index 00000000..7d92eadd --- /dev/null +++ b/shields/template_fran_wide4.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fran_wide5.svg b/shields/template_fran_wide5.svg new file mode 100644 index 00000000..0d905baf --- /dev/null +++ b/shields/template_fran_wide5.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_fran_wide6.svg b/shields/template_fran_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_fran_wide6.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_frht_wide3.svg b/shields/template_frht_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_frht_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_frht_wide4.svg b/shields/template_frht_wide4.svg new file mode 100644 index 00000000..56a6b90e --- /dev/null +++ b/shields/template_frht_wide4.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_frht_wide5.svg b/shields/template_frht_wide5.svg new file mode 100644 index 00000000..4b7e4983 --- /dev/null +++ b/shields/template_frht_wide5.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From 46dca35e3e70c7e748991f1a78438b2aeb494fcc Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 11 Feb 2017 14:00:46 -0800 Subject: [PATCH 121/200] fix broken shieldgen.php --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 31c8fb96..b1e2e333 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -199,7 +199,7 @@ function generate($r, $force_reload = false) $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); //$routeNum = str_replace("T", "T", $routeNum); //no blank required! - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" strlen($routeNum) . ".svg"); + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($routeNum) . ".svg"); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; From 4c9f66de84d33e6652817549fe7a53df8bb42dd6 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 11 Feb 2017 16:10:52 -0800 Subject: [PATCH 122/200] some french territories --- shields/shieldgen.php | 2 +- shields/template_frht_wide3.svg | 2 +- shields/template_glpn_wide3.svg | 10 ++++++++++ shields/template_glpn_wide4.svg | 10 ++++++++++ shields/template_glpn_wide6.svg | 10 ++++++++++ shields/template_mtqa_wide3.svg | 10 ++++++++++ shields/template_spmn_wide3.svg | 10 ++++++++++ 7 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 shields/template_glpn_wide3.svg create mode 100644 shields/template_glpn_wide4.svg create mode 100644 shields/template_glpn_wide6.svg create mode 100644 shields/template_mtqa_wide3.svg create mode 100644 shields/template_spmn_wide3.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index b1e2e333..5cfadb10 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -194,7 +194,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'fraa': case 'fran': case 'frht': + case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': // replace placeholder, replace prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); diff --git a/shields/template_frht_wide3.svg b/shields/template_frht_wide3.svg index ecc4af44..45ee201e 100644 --- a/shields/template_frht_wide3.svg +++ b/shields/template_frht_wide3.svg @@ -2,7 +2,7 @@ - + ***NUMBER*** diff --git a/shields/template_glpn_wide3.svg b/shields/template_glpn_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_glpn_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_glpn_wide4.svg b/shields/template_glpn_wide4.svg new file mode 100644 index 00000000..7d92eadd --- /dev/null +++ b/shields/template_glpn_wide4.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_glpn_wide6.svg b/shields/template_glpn_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_glpn_wide6.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_mtqa_wide3.svg b/shields/template_mtqa_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_mtqa_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_spmn_wide3.svg b/shields/template_spmn_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_spmn_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From fd563068f4c8ce175135fb96b52cee5729b8efc9 Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 11 Feb 2017 16:16:57 -0800 Subject: [PATCH 123/200] more french territories All (including last commit) verified by either Wikipedia or in the case of SPM, photos --- shields/shieldgen.php | 2 +- shields/template_gufn_wide3.svg | 10 ++++++++++ shields/template_gufn_wide6.svg | 10 ++++++++++ shields/template_reun_wide3.svg | 10 ++++++++++ shields/template_reun_wide4.svg | 10 ++++++++++ shields/template_reun_wide5.svg | 10 ++++++++++ shields/template_reun_wide6.svg | 10 ++++++++++ 7 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 shields/template_gufn_wide3.svg create mode 100644 shields/template_gufn_wide6.svg create mode 100644 shields/template_reun_wide3.svg create mode 100644 shields/template_reun_wide4.svg create mode 100644 shields/template_reun_wide5.svg create mode 100644 shields/template_reun_wide6.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 5cfadb10..209da769 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -194,7 +194,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': + case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': // replace placeholder, replace prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); diff --git a/shields/template_gufn_wide3.svg b/shields/template_gufn_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_gufn_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_gufn_wide6.svg b/shields/template_gufn_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_gufn_wide6.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_reun_wide3.svg b/shields/template_reun_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_reun_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_reun_wide4.svg b/shields/template_reun_wide4.svg new file mode 100644 index 00000000..7d92eadd --- /dev/null +++ b/shields/template_reun_wide4.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_reun_wide5.svg b/shields/template_reun_wide5.svg new file mode 100644 index 00000000..0d905baf --- /dev/null +++ b/shields/template_reun_wide5.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_reun_wide6.svg b/shields/template_reun_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_reun_wide6.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From ae2349eb5c26a1c88b05fe8d4b24d2ead6e0354f Mon Sep 17 00:00:00 2001 From: Rschen7754 Date: Sat, 11 Feb 2017 16:20:43 -0800 Subject: [PATCH 124/200] add morocco, tunisia Wikipedia has them using the same shields as France --- shields/shieldgen.php | 2 +- shields/template_mara_wide3.svg | 10 ++++++++++ shields/template_mara_wide5.svg | 10 ++++++++++ shields/template_tuna_wide3.svg | 10 ++++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 shields/template_mara_wide3.svg create mode 100644 shields/template_mara_wide5.svg create mode 100644 shields/template_tuna_wide3.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 209da769..b2fc4ed1 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -194,7 +194,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': + case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': case 'mara': case 'tuna': // replace placeholder, replace prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); diff --git a/shields/template_mara_wide3.svg b/shields/template_mara_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_mara_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_mara_wide5.svg b/shields/template_mara_wide5.svg new file mode 100644 index 00000000..0d905baf --- /dev/null +++ b/shields/template_mara_wide5.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_tuna_wide3.svg b/shields/template_tuna_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_tuna_wide3.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + From 52011a0ab7eae3b65e2fad3c702226cd66707fa7 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 12 Feb 2017 11:22:41 +0100 Subject: [PATCH 125/200] Shields: AND, ESP, ITA + beln fix Spain is simplified: national (blue) motorway signs are generally used for national and regional motorways, numbering w/o "-" (e.g. A1 instead of A-1) --- shields/shieldgen.php | 21 +++++++++++++++++++-- shields/template_andcg.svg | 10 ++++++++++ shields/template_espa.svg | 11 +++++++++++ shields/template_espa_wide3.svg | 11 +++++++++++ shields/template_espa_wide4.svg | 11 +++++++++++ shields/template_espa_wide5.svg | 11 +++++++++++ shields/template_itaa.svg | 7 +++++++ 7 files changed, 80 insertions(+), 2 deletions(-) create mode 100644 shields/template_andcg.svg create mode 100644 shields/template_espa.svg create mode 100644 shields/template_espa_wide3.svg create mode 100644 shields/template_espa_wide4.svg create mode 100644 shields/template_espa_wide5.svg create mode 100644 shields/template_itaa.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index b2fc4ed1..39fe960a 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -126,7 +126,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': + case 'andcg': case 'belb': case 'hunm': case 'itaa': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); @@ -167,7 +167,10 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'beln': case 'cheh': case 'dnkpr': case 'finvt': case 'norfv': case 'norrv': case 'swer': + case 'beln0': case 'beln1': case 'beln2': case 'beln3': case 'beln4': case 'beln5': case 'beln6': case 'beln7': case 'beln8': case 'beln9': case 'beln': + case 'cheh': case 'dnkpr': case 'finvt': + case 'norfv0': case 'norfv1': case 'norfv2': case 'norfv3': case 'norfv4': case 'norfv5': case 'norfv6': case 'norfv7': case 'norfv8': case 'norfv9': case 'norfv': + case 'norrv': case 'swer': // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers $routeNum = str_replace("Fv", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); @@ -222,6 +225,20 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $row['route'], $svg); break; + case 'espa': + // replace placeholder, use wide svg files for 3-/4-/5-digit numbers (Spain is simplified: national (blue) motorway signs are generally used for national and regional motorways, numbering w/o "-" (e.g. A1 instead of A-1)) + if (strlen($row['route']) > 2) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide3.svg"); + } + if (strlen($row['route']) > 3) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); + } + if (strlen($row['route']) > 4) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide5.svg"); + } + $svg = str_replace("***NUMBER***", $row['route'], $svg); + break; + case 'deubwl': case 'deubyst': case 'deubbl': case 'deuhel': case 'deumvl': case 'deunil': case 'deunwl': case 'deurpl': case 'deusll': case 'deusns': case 'deustl': case 'deushl': case 'deuthl': // replace placeholder, use wide svg files (German Landesstrassen) $svg = file_get_contents("{$dir}/template_deul" . strlen($row['route']) . ".svg"); diff --git a/shields/template_andcg.svg b/shields/template_andcg.svg new file mode 100644 index 00000000..c59fb9db --- /dev/null +++ b/shields/template_andcg.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espa.svg b/shields/template_espa.svg new file mode 100644 index 00000000..64c4775d --- /dev/null +++ b/shields/template_espa.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espa_wide3.svg b/shields/template_espa_wide3.svg new file mode 100644 index 00000000..7461186d --- /dev/null +++ b/shields/template_espa_wide3.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espa_wide4.svg b/shields/template_espa_wide4.svg new file mode 100644 index 00000000..fabec373 --- /dev/null +++ b/shields/template_espa_wide4.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espa_wide5.svg b/shields/template_espa_wide5.svg new file mode 100644 index 00000000..8c00c5a2 --- /dev/null +++ b/shields/template_espa_wide5.svg @@ -0,0 +1,11 @@ + + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_itaa.svg b/shields/template_itaa.svg new file mode 100644 index 00000000..a0313912 --- /dev/null +++ b/shields/template_itaa.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + From 18943a7c18602e503765247d64e09cf7b2b27e48 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 12 Feb 2017 11:29:07 +0100 Subject: [PATCH 126/200] Minor hunm fix --- shields/template_hunm.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_hunm.svg b/shields/template_hunm.svg index fe558551..3ba093ce 100644 --- a/shields/template_hunm.svg +++ b/shields/template_hunm.svg @@ -6,7 +6,7 @@ - ***NUMBER*** + ***NUMBER*** From 635e98f3417a32a1ecff3c66c7da847357a9b05e Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 12 Feb 2017 14:44:34 +0100 Subject: [PATCH 127/200] Shields: beln, itaa and norfv fixes --- shields/shieldgen.php | 45 +++++++++++++++++++++++++++++---- shields/template_itaa_wide5.svg | 7 +++++ shields/template_itaa_wide7.svg | 7 +++++ 3 files changed, 54 insertions(+), 5 deletions(-) create mode 100644 shields/template_itaa_wide5.svg create mode 100644 shields/template_itaa_wide7.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 39fe960a..0b215dc3 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -126,10 +126,21 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'andcg': case 'belb': case 'hunm': case 'itaa': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': + case 'andcg': case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); + case 'itaa': + // replace placeholder, use wide svg file for 5-/7-digit numbers + if (strlen($routeNum) > 4) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide5.svg"); + } + if (strlen($routeNum) > 6) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide7.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'alakt': case 'alavt': case 'canmbw': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'hunf': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': // replace placeholder, remove prefix $routeNum = str_replace("A", "", $row['route']); @@ -167,10 +178,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'beln0': case 'beln1': case 'beln2': case 'beln3': case 'beln4': case 'beln5': case 'beln6': case 'beln7': case 'beln8': case 'beln9': case 'beln': - case 'cheh': case 'dnkpr': case 'finvt': - case 'norfv0': case 'norfv1': case 'norfv2': case 'norfv3': case 'norfv4': case 'norfv5': case 'norfv6': case 'norfv7': case 'norfv8': case 'norfv9': case 'norfv': - case 'norrv': case 'swer': + case 'cheh': case 'dnkpr': case 'finvt': case 'norrv': case 'swer': // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers $routeNum = str_replace("Fv", "", $row['route']); $routeNum = str_replace("H", "", $routeNum); @@ -188,6 +196,33 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'beln0': case 'beln1': case 'beln2': case 'beln3': case 'beln4': case 'beln5': case 'beln6': case 'beln7': case 'beln8': case 'beln9': case 'beln': + // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers (Belgian workaround till beln is merged again) + $routeNum = str_replace("N", "", $row['route']); + $svg = file_get_contents("{$dir}/template_beln.svg"); + if (strlen($routeNum) > 1) { + $svg = file_get_contents("{$dir}/template_beln_wide.svg"); + } + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_beln_wide3.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + + case 'norfv0': case 'norfv1': case 'norfv2': case 'norfv3': case 'norfv4': case 'norfv5': case 'norfv6': case 'norfv7': case 'norfv8': case 'norfv9': case 'norfv': + // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers (Norwegian workaround till beln is merged again) + $routeNum = str_replace("Fv", "", $row['route']); + $routeNum = str_replace("N", "", $row['route']); + $svg = file_get_contents("{$dir}/template_norfv.svg"); + if (strlen($routeNum) > 1) { + $svg = file_get_contents("{$dir}/template_norfv_wide.svg"); + } + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_norfv_wide3.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'roudn': // replace placeholder, remove prefix, use wide svg file for 4-digit numbers $routeNum = str_replace("DN", "", $row['route']); diff --git a/shields/template_itaa_wide5.svg b/shields/template_itaa_wide5.svg new file mode 100644 index 00000000..a9d950e3 --- /dev/null +++ b/shields/template_itaa_wide5.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + diff --git a/shields/template_itaa_wide7.svg b/shields/template_itaa_wide7.svg new file mode 100644 index 00000000..5a0020c9 --- /dev/null +++ b/shields/template_itaa_wide7.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + From 13dbd1f05280179141c0b303eecb1276aa64ab60 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 12 Feb 2017 14:49:22 +0100 Subject: [PATCH 128/200] andcg fix --- shields/shieldgen.php | 9 ++++++++- shields/template_andcg_wide.svg | 10 ++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 shields/template_andcg_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 0b215dc3..11f8dd31 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -126,10 +126,17 @@ function generate($r, $force_reload = false) $svg = str_replace("***SYS***", $region, $svg); break; - case 'andcg': case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': + case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); + case 'andcg': + // replace placeholder, use wide svg file for 4-digit numbers + if (strlen($routeNum) > 3) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + break; + case 'itaa': // replace placeholder, use wide svg file for 5-/7-digit numbers if (strlen($routeNum) > 4) { diff --git a/shields/template_andcg_wide.svg b/shields/template_andcg_wide.svg new file mode 100644 index 00000000..94d64b45 --- /dev/null +++ b/shields/template_andcg_wide.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + \ No newline at end of file From 770905c4801ba1d8d113781115b9a1adc0e284b8 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 12 Feb 2017 16:46:48 +0100 Subject: [PATCH 129/200] andcg / itaa --- shields/shieldgen.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 11f8dd31..f440e8b6 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -129,23 +129,25 @@ function generate($r, $force_reload = false) case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': // replace placeholder $svg = str_replace("***NUMBER***", $row['route'], $svg); + break; case 'andcg': // replace placeholder, use wide svg file for 4-digit numbers - if (strlen($routeNum) > 3) { + if (strlen($row['route']) > 3) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } + $svg = str_replace("***NUMBER***", $row['route'], $svg); break; case 'itaa': // replace placeholder, use wide svg file for 5-/7-digit numbers - if (strlen($routeNum) > 4) { + if (strlen($row['route']) > 4) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide5.svg"); } - if (strlen($routeNum) > 6) { + if (strlen($row['route']) > 6) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide7.svg"); } - $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***NUMBER***", $row['route'], $svg); break; case 'alakt': case 'alavt': case 'canmbw': case 'chea': case 'czed': case 'czei': case 'czeii': case 'deua': case 'dnksr': case 'deub': case 'estp': case 'estt': case 'finkt': case 'hunf': case 'islth': case 'ltuk': case 'poldk': case 'poldw': case 'svki': case 'swel': From 9ca8139487988da5c8cb49571389452a3ae75532 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sat, 25 Feb 2017 09:23:52 +0100 Subject: [PATCH 130/200] norfv fix --- shields/shieldgen.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index f440e8b6..e2f5b47c 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -219,9 +219,8 @@ function generate($r, $force_reload = false) break; case 'norfv0': case 'norfv1': case 'norfv2': case 'norfv3': case 'norfv4': case 'norfv5': case 'norfv6': case 'norfv7': case 'norfv8': case 'norfv9': case 'norfv': - // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers (Norwegian workaround till beln is merged again) + // replace placeholder, remove prefix, use wide svg files for 2-/3-digit numbers (Norwegian workaround till norfv is merged again) $routeNum = str_replace("Fv", "", $row['route']); - $routeNum = str_replace("N", "", $row['route']); $svg = file_get_contents("{$dir}/template_norfv.svg"); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_norfv_wide.svg"); From 7821f697f44ade52217577370c47a00e1989be85 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sun, 26 Feb 2017 13:20:38 -0500 Subject: [PATCH 131/200] Fixed wording. --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 10428aab..871c022c 100644 --- a/index.php +++ b/index.php @@ -76,7 +76,7 @@ - more are in development but are not yet complete. Active system + more are in development but are not yet complete. Active systems encompass - miles of "clinchable" highways in active systems, and that total is + miles of "clinchable" highways, and that expands to From d691d47ade7f2acc6b8f6bc453c5189bbef7322c Mon Sep 17 00:00:00 2001 From: michihdeu Date: Tue, 21 Mar 2017 14:56:13 +0100 Subject: [PATCH 132/200] espn shield --- shields/shieldgen.php | 9 ++++++++- shields/template_espn_wide3.svg | 9 +++++++++ shields/template_espn_wide4.svg | 9 +++++++++ shields/template_espn_wide5.svg | 9 +++++++++ shields/template_espn_wide6.svg | 9 +++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 shields/template_espn_wide3.svg create mode 100644 shields/template_espn_wide4.svg create mode 100644 shields/template_espn_wide5.svg create mode 100644 shields/template_espn_wide6.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index e2f5b47c..386ad097 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -241,7 +241,7 @@ function generate($r, $force_reload = false) break; case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': case 'mara': case 'tuna': - // replace placeholder, replace prefix, use wide svg files + // replace placeholder, add blank after prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); //$routeNum = str_replace("T", "T", $routeNum); //no blank required! @@ -249,6 +249,13 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'espn': + // replace placeholder, add hyphen after prefix, use wide svg files + $routeNum = str_replace("N", "N-", $row['route']); + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($routeNum) . ".svg"); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'bela': case 'belr': case 'eure': case 'luxa': case 'luxb': case 'roua': // replace placeholder, use wide svg file for 3-digit numbers if (strlen($row['route']) > 2) { diff --git a/shields/template_espn_wide3.svg b/shields/template_espn_wide3.svg new file mode 100644 index 00000000..33943a3d --- /dev/null +++ b/shields/template_espn_wide3.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espn_wide4.svg b/shields/template_espn_wide4.svg new file mode 100644 index 00000000..928afa1e --- /dev/null +++ b/shields/template_espn_wide4.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espn_wide5.svg b/shields/template_espn_wide5.svg new file mode 100644 index 00000000..46cf175a --- /dev/null +++ b/shields/template_espn_wide5.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_espn_wide6.svg b/shields/template_espn_wide6.svg new file mode 100644 index 00000000..8f1e5ee4 --- /dev/null +++ b/shields/template_espn_wide6.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + From 8281770fa6a29a79cf6f06f52db39b9e07360a20 Mon Sep 17 00:00:00 2001 From: michihdeu Date: Sun, 26 Mar 2017 18:56:17 +0200 Subject: [PATCH 133/200] credits --- credits.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/credits.php b/credits.php index a417cee4..27865093 100644 --- a/credits.php +++ b/credits.php @@ -730,7 +730,8 @@ Filpus Roadgeek
    • Adam Froehlig (froggie)
      Froggie's Place
    • -
    • Si Hollett (si404)
    • +
    • Si Hollett (si404)
    • +
    • Michael H (michih)
    • James Mast (rickmastfan67)
      Rickmastfan67 Blog
    • Jeff Morrison (jeffm)
      From 925fd0a3286a82db6770a77ee48715de98e0e26c Mon Sep 17 00:00:00 2001 From: Si Hollett Date: Tue, 11 Apr 2017 21:31:47 +0100 Subject: [PATCH 134/200] update credits with WY hopefully this works --- credits.php | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/credits.php b/credits.php index 27865093..2341d9e8 100644 --- a/credits.php +++ b/credits.php @@ -708,6 +708,46 @@
    • Wyoming, USA
    • General From 0ffc88b129685e554729587c61fd934047a8d8c4 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 12 May 2017 16:32:50 +0200 Subject: [PATCH 135/200] PRT shields --- shields/shieldgen.php | 8 ++++++++ shields/template_prta.svg | 9 +++++++++ shields/template_prtic.svg | 10 ++++++++++ shields/template_prtip.svg | 9 +++++++++ 4 files changed, 36 insertions(+) create mode 100644 shields/template_prta.svg create mode 100644 shields/template_prtic.svg create mode 100644 shields/template_prtip.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 386ad097..1372e6fe 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -240,6 +240,14 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + case 'prta': case 'prtip': case 'prtic': + // replace placeholder, add blank after prefix + $routeNum = str_replace("A", "A ", $row['route']); + $routeNum = str_replace("IC", "IC ", $routeNum); + $routeNum = str_replace("IP", "IP ", $routeNum); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; + case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': case 'mara': case 'tuna': // replace placeholder, add blank after prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); diff --git a/shields/template_prta.svg b/shields/template_prta.svg new file mode 100644 index 00000000..7743f9a2 --- /dev/null +++ b/shields/template_prta.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + diff --git a/shields/template_prtic.svg b/shields/template_prtic.svg new file mode 100644 index 00000000..42331edb --- /dev/null +++ b/shields/template_prtic.svg @@ -0,0 +1,10 @@ + + + + + + + ***NUMBER*** + + + diff --git a/shields/template_prtip.svg b/shields/template_prtip.svg new file mode 100644 index 00000000..a8fe1a07 --- /dev/null +++ b/shields/template_prtip.svg @@ -0,0 +1,9 @@ + + + + + + ***NUMBER*** + + + From 6203de66da5668eb883c073dca20babc764e54b1 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Wed, 17 May 2017 22:42:11 -0400 Subject: [PATCH 136/200] First complete version of selectable distance units. #20. --- hb/index.php | 48 ++++++++++++++++++++++++---------------------- index.php | 11 +++++++---- lib/tmphpfuncs.php | 42 ++++++++++++++++++++++++++++++++++++---- lib/tmphpuser.php | 34 ++++++++++++++++++++++++++++++++ stat.php | 45 +++++++++++++++++++++++++------------------ updatetest.csh | 2 +- user/index.php | 42 +++++++++++++++++++++------------------- user/mapview.php | 4 ++-- user/region.php | 38 +++++++++++++++++++----------------- user/system.php | 34 +++++++++++++++++--------------- 10 files changed, 194 insertions(+), 106 deletions(-) diff --git a/hb/index.php b/hb/index.php index bb69afce..f9ec7ad7 100644 --- a/hb/index.php +++ b/hb/index.php @@ -99,12 +99,6 @@ 0) { @@ -181,7 +175,8 @@ tm_system_select(FALSE); echo ""; tm_region_select(FALSE); - echo ""; + // should be taken care of by the cookie: + //echo ""; echo ""; } @@ -242,7 +237,22 @@ function initFloatingHeaders($table) { require $_SERVER['DOCUMENT_ROOT'] . "/shields/shieldgen.php"; echo "
      \n"; echo "" . generate($_GET['r'], true) . ""; - echo "View Associated Routes"; + echo "View Associated Routes"; + + echo ""; + $sql_command = "SELECT region, route, banner, city FROM routes WHERE root = '" .$routeparam. "';"; + $res = tmdb_query($sql_command); + $row = $res->fetch_assoc(); + echo $row['region'] . " " . $row['route']; + if (strlen($row['banner']) > 0) { + echo " " . $row['banner']; + } + if (strlen($row['city']) > 0) { + echo " (" . $row['city'] . ")"; + } + $res->free(); + echo ""; + echo ""; $sql_command = << fetch_assoc(); + $totalLength = tm_convert_distance($row['totalMileage']) . " " . $tmunits; + $averageTraveled = tm_convert_distance($row['avgMileage']). " " . $tmunits; echo << + - s + s
      Route Stats
      Total Mileage{$row['totalMileage']} mi
      Total Length{$totalLength}
      LIST Name{$routeInfo['region']} {$routeInfo['route']}{$routeInfo['banner']}{$routeInfo['abbrev']}
      Total Drivers{$row['numDrivers']} ({$row['drivenPct']} %)
      Average Mileage{$row['avgMileage']} mi ({$row['mileagePct']} %)
      Average Traveled{$averageTraveled} ({$row['mileagePct']} %)
      HTML; echo "\n"; @@ -313,26 +325,16 @@ function initFloatingHeaders($table) { ENDA; if ($routeparam != "") { echo "
      Waypoints
      CoordinatesName%
      "; - $sql_command = "SELECT region, route, banner, city FROM routes WHERE root = '" .$routeparam. "';"; - $res = tmdb_query($sql_command); - $row = $res->fetch_assoc(); - echo $row['region'] . " " . $row['route']; - if (strlen($row['banner']) > 0) { - echo " " . $row['banner']; - } - if (strlen($row['city']) > 0) { - echo " (" . $row['city'] . ")"; - } - $res->free(); - echo ""; echo " Show Markers "; echo ""; echo "
      "; echo "User: "; tm_user_select(); + echo "\n"; + tm_units_select(); echo "
      "; echo ""; - echo ""; + echo ""; echo "
      \n"; } echo << @@ -83,17 +84,19 @@ ?> routes for - miles of "clinchable" highways, and that expands to + of "clinchable" highways, and that expands to routes for - miles when preview systems are included. + when preview systems are included.

      diff --git a/lib/tmphpfuncs.php b/lib/tmphpfuncs.php index 02312861..5ce38198 100644 --- a/lib/tmphpfuncs.php +++ b/lib/tmphpfuncs.php @@ -196,13 +196,31 @@ function tm_user_select() { echo "\n"; } + + +// function to generate a units selection "select" object +function tm_units_select() { + global $tmunits; + global $tm_supported_units; + echo "\n"; +} + // function to generate a user selection input form -function tm_user_select_form() { - // TODO: action should come as a parameter - echo "

      \n"; +function tm_user_select_form($action = "\".\"") { + echo "

      \n"; echo "\n"; tm_user_select(); - echo "\n"; + echo "\n"; + tm_units_select(); + echo "\n"; echo "

      \n"; } @@ -349,6 +367,22 @@ function tm_fetch_user_row_with_rank($res, $rankBy) { return $row; } +// additional metric/non-metric units support functions + +// simply return the string representation +function tm_echo_units() { + global $tmunits; + echo $tmunits; +} + +// convert to the currently-selected units +function tm_convert_distance($mileage) { + + global $tmunits; + global $tm_supported_units; + return number_format($mileage * $tm_supported_units[$tmunits], 2); +} + // functions from http://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php function startsWith($haystack, $needle) { diff --git a/lib/tmphpuser.php b/lib/tmphpuser.php index b51135c2..61f39cbd 100644 --- a/lib/tmphpuser.php +++ b/lib/tmphpuser.php @@ -7,6 +7,9 @@ This has to be done before any output is generated to avoid a warning from setcookie, so this file should be required as the first line of any other php file that needs to use it. + + Also take care of the $tmunits variable based on the units= + QS parameter and/or the "units" cookie. */ // u= is the user, stored in $tmuser variable, can also come from the @@ -21,4 +24,35 @@ header("Location: ?u=" . $_COOKIE['lastuser'] . "&" . parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY)); /* Redirect browser */ exit; } + +// units= is the units preference, stored in $tmunits variable, can +// also come from units cookie, and will be stored in that cookie +// when specified +$tmunits = "miles"; +// associative array of supported units and their conversions from miles +$tm_supported_units = array( + "miles"=>1.0, + "km"=>1.609344, + "ft"=>5280, + "meters"=>1609.344 +); + + +if (array_key_exists("units", $_GET)) { + $unitsparam = strtolower($_GET['units']); + if (array_key_exists($unitsparam, $tm_supported_units)) { + $tmunits = $unitsparam; + setcookie("units", $unitsparam, time() + (86400 * 30), "/"); + } + else { + // default to miles for unknown units + $tmunits = "miles"; + setcookie("units", "miles", time() + (86400 * 30), "/"); + } +} +else if (isset($_COOKIE['units'])) { + header("Location: ?units=" .$_COOKIE['units'] . "&" . parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY)); /* Redirect browser */ + exit; +} + ?> diff --git a/stat.php b/stat.php index 6c991d86..9f2918b9 100644 --- a/stat.php +++ b/stat.php @@ -47,23 +47,24 @@

      Traveler Statistics

      +

      \n"; - echo "\n"; - tm_user_select(); - echo "\n"; - echo "

      \n"; - }else{ + $totalMileage = round(tm_sum_column("overallMileageByRegion", "activeMileage"), 2); + $totalPreviewMileage = round(tm_sum_column("overallMileageByRegion", "activePreviewMileage"), 2); +// if ($tmuser == TM_NO_USER) { +// echo "

      \n"; +// echo "\n"; +// tm_user_select(); +// echo "\n"; +// echo "

      \n"; +// }else{ echo << HTML; - } +// } ?>
      - + HTML; echo ""; @@ -78,7 +79,9 @@ $res = tmdb_query($sql); $row = tm_fetch_user_row_with_rank($res, 'clinchedMileage'); echo ""; - echo ""; + echo ""; echo ""; $sql = <<{$row['clinchedMileage']} / {$totalPreviewMileage} ({$row['percentage']}%)"; + echo ""; echo ""; echo <<
      Current User
      UserActive MileageRankActive + Preview MileageRank
      UserActive Distance TraveledRankActive + Preview Distance TraveledRank
      {$row['traveler']}{$row['clinchedMileage']} / {$totalMileage} ({$row['percentage']}%)".tm_convert_distance($row['clinchedMileage'])." of ".tm_convert_distance($totalMileage)." "; + tm_echo_units(); + echo " ({$row['percentage']}%){$row['rank']}".tm_convert_distance($row['clinchedMileage'])." of ".tm_convert_distance($totalPreviewMileage)." "; + tm_echo_units(); + echo " ({$row['percentage']}%){$row['rank']}
      - + - + @@ -132,9 +137,10 @@ } else { $highlight = ''; } + $print_distance = tm_convert_distance($row['clinchedMileage']); echo << - + HTML; $rank++; @@ -149,12 +155,12 @@
      Traveler Mileage in Active SystemsTravels in Active Systems
      Rank UsernameMiles TraveledDistance Traveled () %
      {$rank}{$row['traveler']}{$row['clinchedMileage']}{$row['percentage']}%{$rank}{$row['traveler']}{$print_distance}{$row['percentage']}%
      - + - + @@ -176,9 +182,10 @@ } else { $highlight = ''; } + $print_distance = tm_convert_distance($row['clinchedMileage']); echo << - + HTML; $rank++; diff --git a/updatetest.csh b/updatetest.csh index 8396bbd8..c8f7dd88 100644 --- a/updatetest.csh +++ b/updatetest.csh @@ -1,5 +1,5 @@ #!/bin/csh -f scp *.php blizzard.teresco.org:/home/www/tmtest/ -foreach dir (user lib devel hb shields css api) +foreach dir (user lib devel hb css api) scp $dir/*.{php,js,svg,css} blizzard.teresco.org:/home/www/tmtest/$dir end diff --git a/user/index.php b/user/index.php index 78e312cb..b1a0ebdb 100644 --- a/user/index.php +++ b/user/index.php @@ -104,13 +104,15 @@ $res = tmdb_query($sql_command); $row = $res->fetch_assoc(); $res->free(); - echo ""; - echo ""; - echo ""; + echo ""; + echo ""; + echo ""; echo ""; @@ -147,7 +149,7 @@ $res->free(); echo ""; - echo ""; + echo ""; echo ""; echo ""; echo ""; @@ -170,12 +172,12 @@ - - - - - - + + + + + + @@ -205,7 +207,7 @@ } $activePreviewPercent = round($row['clinchedActivePreviewMileage'] / $row['totalActivePreviewMileage'] * 100.0, 2); $activePreviewPercent = sprintf('%0.2f', $activePreviewPercent); - echo ""; + echo ""; } $res->free(); ?> @@ -220,9 +222,9 @@ - - - + + + @@ -260,8 +262,8 @@ echo ""; echo ""; echo ""; - echo ""; - echo ""; + echo ""; + echo ""; echo ""; echo ""; echo ""; diff --git a/user/mapview.php b/user/mapview.php index 8a139646..5cb1fc98 100644 --- a/user/mapview.php +++ b/user/mapview.php @@ -209,7 +209,7 @@ function initFloatingHeaders($table) {
      Traveler Mileage in Active and Preview SystemsTravels in Active and Preview Systems
      Rank UsernameMiles TraveledDistance Traveled () %
      {$rank}{$row['traveler']}{$row['clinchedMileage']}{$row['percentage']}%{$rank}{$row['traveler']}{$print_distance}{$row['percentage']}%
      Miles Driven" . $row['clinchedActiveMileage']; - echo "/" . $row['totalActiveMileage'] . " mi ("; - echo $row['activePercentage'] . "%) Rank: TBD" . $row['clinchedActivePreviewMileage']; - echo "/" . $row['totalActivePreviewMileage'] . " mi ("; - echo $row['activePreviewPercentage'] . "%) Rank: TBD
      Distance Traveled" . tm_convert_distance($row['clinchedActiveMileage']); + echo "/" . tm_convert_distance($row['totalActiveMileage']) . " "; + tm_echo_units(); + echo " (" . $row['activePercentage'] . "%) Rank: TBD" . tm_convert_distance($row['clinchedActivePreviewMileage']); + echo "/" . tm_convert_distance($row['totalActivePreviewMileage']) . " "; + tm_echo_units(); + echo " (" . $row['activePreviewPercentage'] . "%) Rank: TBD
      Routes DrivenRoutes Traveled".$activeDriven." of " . $activeRoutes . " (" . $activeDrivenPct . "%) Rank: TBD".$activePreviewDriven." of " . $activePreviewRoutes . " (" . $activePreviewDrivenPct . "%) Rank: TBD
      Country RegionClinched (mi)Overall (mi)% ClinchedClinched (mi)Overall (mi)% ClinchedClinched ()Overall ()%Clinched ()Overall ()% Map
      " . $row['country'] . "" . $row['name'] . "" . sprintf('%0.2f', $row['clinchedActiveMileage']) . "" . sprintf('%0.2f', $row['totalActiveMileage']) . "" . $activePercent . "%" . sprintf('%0.2f', $row['clinchedActivePreviewMileage']) . "" . sprintf('%0.2f', $row['totalActivePreviewMileage']) . "" . $activePreviewPercent . "%
      " . $row['country'] . "" . $row['name'] . "" . tm_convert_distance($row['clinchedActiveMileage']) . "" . tm_convert_distance($row['totalActiveMileage']) . "" . $activePercent . "%" . tm_convert_distance($row['clinchedActivePreviewMileage']) . "" . tm_convert_distance($row['totalActivePreviewMileage']) . "" . $activePreviewPercent . "%
      System Name Tier StatusClinched MileageTotal MileagePercentClinched ()Total ()% Clinched Map
      " . $row['fullName'] . "Tier " . $row['tier'] . "" . $row['level'] . "" . $row['clinchedMileage'] . "" . $row['totalMileage'] . "" . tm_convert_distance($row['clinchedMileage']) . "" . tm_convert_distance($row['totalMileage']) . "" . $row['percentage'] . "%
      - + + two rows of data in the table --> + + + + Date: Thu, 18 May 2017 22:26:30 -0400 Subject: [PATCH 138/200] First complete version of user stat rankings by region. --- user/region.php | 153 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 131 insertions(+), 22 deletions(-) diff --git a/user/region.php b/user/region.php index 15a413f6..ae59c9a3 100644 --- a/user/region.php +++ b/user/region.php @@ -14,12 +14,28 @@ + + @@ -58,7 +66,8 @@

      All Graphs

      -

      +

      +

      Filter by number of vertices (collapsed)

      from @@ -68,15 +77,8 @@

      Filter by graph type

      +
      RouteSystemClinchedOverall%
      Clinched ()Overall ()%
      DUMMY 000000000.00%
      DUMMY000000000.00%
      @@ -103,8 +105,8 @@ $result = $tmdb->query("SELECT * FROM graphs"); $counter = 0; $prevRow; -while ($row = $result->fetch_array()) { +while ($row = $result->fetch_array()) { //keep track of simple info so we can put it after collapsed if ($counter%2 == 0){ $prevRow = $row; @@ -125,6 +127,13 @@ } $counter++; } +$values = array(); +$descr = array(); +$result = $tmdb->query("SELECT * FROM graphTypes"); +while ($row = $result->fetch_array()) { + array_push($values, $row[0]); + array_push($descr, $row[1]); +} ?>
      Graph DescriptionCollapsed Format GraphSimple Format Graph
      @@ -135,6 +144,15 @@ info: false }); +var vals = ; +var inner = ; +for (var i=0; i 0){ var str = event.target.id.substring(0,3)+"Body"; @@ -142,15 +160,15 @@ function tableFilter(event){ for (var i=1; i event.target.value) - tbody.childNodes[i].classList.add("hideNum"); + tbody.childNodes[i].classList.add("hideNumL"); else - tbody.childNodes[i].classList.remove("hideNum"); + tbody.childNodes[i].classList.remove("hideNumL"); } else{ if(parseInt(tbody.childNodes[i].childNodes[5].className.substring(1)) < event.target.value) - tbody.childNodes[i].classList.add("hideNum"); + tbody.childNodes[i].classList.add("hideNumS"); else - tbody.childNodes[i].classList.remove("hideNum"); + tbody.childNodes[i].classList.remove("hideNumS"); } hideRow(tbody.childNodes[i]); } @@ -168,7 +186,7 @@ function selFilter(event){ } } function hideRow(elem){ - if(elem.classList.contains("hideType") || elem.classList.contains("hideNum")) + if(elem.classList.contains("hideType") || elem.classList.contains("hideNumL") || elem.classList.contains("hideNumS")) elem.style.display = "none"; else elem.style.display = ""; From 210e2b19ef3374914032ce3ab7a4a3dfcbfc94fe Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Sat, 1 Jul 2017 09:51:53 -0400 Subject: [PATCH 149/200] Clarify devel systems on front page. --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index d7dbf242..c4f8dddd 100644 --- a/index.php +++ b/index.php @@ -77,8 +77,9 @@ - more are in development but are not yet complete. Active systems -encompass + more are in development but are not yet complete. These "devel" + systems are not yet included in stats or plotted on user maps. + Active systems encompass From a3e9e04538dc72fd33a5811415d1bc63dce3e677 Mon Sep 17 00:00:00 2001 From: rschen7754 Date: Tue, 4 Jul 2017 14:13:16 -0700 Subject: [PATCH 150/200] add alba shield (same as itaa) --- .gitignore | 1 + shields/template_alba.svg | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 shields/template_alba.svg diff --git a/.gitignore b/.gitignore index fa61639d..7f0284b8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ devel/test.php .idea/ lib/tm.conf local.sh +.DS_Store diff --git a/shields/template_alba.svg b/shields/template_alba.svg new file mode 100644 index 00000000..a0313912 --- /dev/null +++ b/shields/template_alba.svg @@ -0,0 +1,7 @@ + + + + + ***NUMBER*** + + From 3ee161caf479b273b76d0aed68d660c6b01145b4 Mon Sep 17 00:00:00 2001 From: Jim Teresco Date: Mon, 10 Jul 2017 21:02:24 -0400 Subject: [PATCH 151/200] Check for invalid QS params. --- hb/index.php | 6 +++--- lib/tmphpfuncs.php | 23 ++++++++++++++++++++++- lib/tmphpuser.php | 5 +++-- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/hb/index.php b/hb/index.php index f9ec7ad7..bd0cf165 100644 --- a/hb/index.php +++ b/hb/index.php @@ -122,7 +122,7 @@ // if a specific route is specified, that's what we'll view if (array_key_exists("r", $_GET)) { - $routeparam = $_GET['r']; + $routeparam = tm_validate_root($_GET['r']); } else { $routeparam = ""; } @@ -148,7 +148,7 @@ <?php if ($routeparam != "") { - $sql_command = "SELECT * FROM routes WHERE root = '" . $_GET['r'] . "'"; + $sql_command = "SELECT * FROM routes WHERE root = '" . $routeparam . "'"; $res = tmdb_query($sql_command); $routeInfo = $res->fetch_array(); $res->free(); @@ -236,7 +236,7 @@ function initFloatingHeaders($table) { if ($routeparam != "") { require $_SERVER['DOCUMENT_ROOT'] . "/shields/shieldgen.php"; echo "<div id=\"pointbox\">\n"; - echo "<span class='bigshield'>" . generate($_GET['r'], true) . "</span>"; + echo "<span class='bigshield'>" . generate($routeparam, true) . "</span>"; echo "<span><a href='/user/mapview.php?rte={$routeInfo['route']}'>View Associated Routes</a></span>"; echo "<span>"; diff --git a/lib/tmphpfuncs.php b/lib/tmphpfuncs.php index 4c64c3c7..eecf3537 100644 --- a/lib/tmphpfuncs.php +++ b/lib/tmphpfuncs.php @@ -42,7 +42,7 @@ $gmaps_api_key = chop(fgets($tmconffile)); fclose($tmconffile); -if (array_key_exists("dbname", $_GET)) { +if (array_key_exists("dbname", $_GET) && ctype_alpha($_GET['dbname'])) { $tmdbname = $_GET['dbname']; } @@ -383,6 +383,27 @@ function tm_convert_distance($mileage) { return number_format($mileage * $tm_supported_units[$tmunits], 2, '.', ''); } +// validate a string as a possible "root": must be letters, followed by +// a period, followed by some number of letters and numbers. No other +// characters allowed, and no longer than 32 total characters in length. +function tm_validate_root($root) { + + if (strlen($root) > 32) { + return "toolong.root"; + } + $array = explode('.', $root); + if (count($array) != 2) { + return "noregion.root"; + } + if (!ctype_alpha($array[0])) { + return "badregion.root"; + } + if (!ctype_alnum($array[1])) { + return "badroute.root"; + } + return $root; +} + // functions from http://stackoverflow.com/questions/834303/startswith-and-endswith-functions-in-php function startsWith($haystack, $needle) { diff --git a/lib/tmphpuser.php b/lib/tmphpuser.php index 61f39cbd..eb5f42a3 100644 --- a/lib/tmphpuser.php +++ b/lib/tmphpuser.php @@ -14,13 +14,14 @@ // u= is the user, stored in $tmuser variable, can also come from the // lastuser cookie, and will be stored in that cookie when specified +// note: must be alphanumeric or is ignored define("TM_NO_USER", "null"); $tmuser = TM_NO_USER; -if (array_key_exists("u", $_GET)) { +if (array_key_exists("u", $_GET) && ctype_alnum($_GET['u'])) { $tmuser = $_GET['u']; setcookie("lastuser", $tmuser, time() + (86400 * 30), "/"); -} else if (isset($_COOKIE['lastuser'])) { +} else if (isset($_COOKIE['lastuser']) && ctype_alnum($_COOKIE['lastuser'])) { header("Location: ?u=" . $_COOKIE['lastuser'] . "&" . parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY)); /* Redirect browser */ exit; } From 32249ba138fbf63e840aa6bae591ae33a4d0a56f Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 11 Jul 2017 10:30:31 -0400 Subject: [PATCH 152/200] Further fixes for #193. --- lib/tmphpuser.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/tmphpuser.php b/lib/tmphpuser.php index eb5f42a3..3087357b 100644 --- a/lib/tmphpuser.php +++ b/lib/tmphpuser.php @@ -18,10 +18,13 @@ define("TM_NO_USER", "null"); $tmuser = TM_NO_USER; -if (array_key_exists("u", $_GET) && ctype_alnum($_GET['u'])) { - $tmuser = $_GET['u']; - setcookie("lastuser", $tmuser, time() + (86400 * 30), "/"); -} else if (isset($_COOKIE['lastuser']) && ctype_alnum($_COOKIE['lastuser'])) { +if (array_key_exists("u", $_GET)) { + $tmusertemp = str_replace("_", "", $_GET['u']); + if (ctype_alnum($tmusertemp)) { + $tmuser = $_GET['u']; + setcookie("lastuser", $tmuser, time() + (86400 * 30), "/"); + } +} else if (isset($_COOKIE['lastuser'])) { header("Location: ?u=" . $_COOKIE['lastuser'] . "&" . parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY)); /* Redirect browser */ exit; } From 0d09d320856b1f89c55289a0289b733bbcd7a8f2 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 11 Jul 2017 11:07:15 -0400 Subject: [PATCH 153/200] Updated comment. #193. --- lib/tmphpuser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tmphpuser.php b/lib/tmphpuser.php index 3087357b..dffa86ea 100644 --- a/lib/tmphpuser.php +++ b/lib/tmphpuser.php @@ -14,7 +14,7 @@ // u= is the user, stored in $tmuser variable, can also come from the // lastuser cookie, and will be stored in that cookie when specified -// note: must be alphanumeric or is ignored +// note: must be alphanumeric (plus underscores) or is ignored define("TM_NO_USER", "null"); $tmuser = TM_NO_USER; From 47536bc95171dc7511fafb2a36ed68ec326dd768 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Wed, 12 Jul 2017 13:50:37 -0400 Subject: [PATCH 154/200] Updates to return to a single version of tmjsfuncs.js (TM and HDX). --- lib/tmjsfuncs.js | 237 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 177 insertions(+), 60 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 366eba76..78276b00 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -1,18 +1,19 @@ // -// CHM Data Viewer-related Javascript functions +// Travel Mapping (TM) Data Viewer-related Javascript functions +// formerly for Clinched Highway Mapping (CHM) data // -// Load and view data files related to Clinched Highway Mapping (CHM) -// related academic data sets. +// Load and view data files related to TM-related academic data sets. // // Renamed as tmjsfuncs.js as part of the Travel Mapping project // -// Author: Jim Teresco, Siena College, The College of Saint Rose +// Primary author: Jim Teresco, Siena College, The College of Saint Rose +// Additional authors: Razie Fathi, Arjol Pengu, Maria Bamundo, Clarice Tarbay // -// Code developed based on examples from +// Portions of this code developed based on examples from // http://cmap.m-plex.com/tools/wptedit/wptedit.html // http://www.alecjacobson.com/weblog/?p=1645 // -// Modification History: +// Modification History (pre-GitHub): // // 2011-06-20 JDT Initial implementation // 2011-06-21 JDT Added .gra support and checkbox for hidden marker display @@ -32,7 +33,8 @@ // 2016-06-27 JDT Removed code not needed by TM // -// global variable to hold the map, which will be assigned a google.maps.Map reference +// global variable to hold the map, which will be assigned a +// google.maps.Map reference var map; // array of waypoints displayed @@ -78,12 +80,15 @@ colorCodes[5] = { name: "green", unclinched: "rgb(100,255,100)", clinched: "rgb( colorCodes[6] = { name: "magenta", unclinched: "rgb(255,100,255)", clinched: "rgb(255,0,255)" }; colorCodes[7] = { name: "lightsalmon", unclinched: "rgb(255,200,200)", clinched: "rgb(255,160,122)" }; -// array of custom color codes to be pulled from query string parameter "colors=" +// array of custom color codes to be pulled from query string parameter +// "colors=" var customColorCodes = new Array(); +// the window that will pop up when someone clicks on a waypoint's marker var infowindow = new google.maps.InfoWindow(); -// some map options, from http://cmap.m-plex.com/hb/maptypes.js by Timothy Reichard +// some map options, early ones based on +// http://cmap.m-plex.com/hb/maptypes.js by Timothy Reichard var MapnikOptions = { alt: "Show Mapnik road map tiles from OpenStreetMap.org", getTileUrl: getMapnikTileURL, @@ -201,7 +206,18 @@ function getBlankURL() { return '/empty.gif'; } + var intersectionimage = { + url: 'Intersection.png', + // This marker is 16x16 + size: new google.maps.Size(16, 16), + // The origin for this image is 0,0. + origin: new google.maps.Point(0, 0), + // The anchor for this image is the center of the intersection + anchor: new google.maps.Point(8, 8) +}; + +var oldintersectionimage = { url: 'smallintersection.png', // This marker is 16x16 size: new google.maps.Size(16, 16), @@ -222,13 +238,19 @@ function loadmap() { var typeHERE = new google.maps.ImageMapType(HEREOptions); var maptypelist = ['Mapnik', google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.TERRAIN, 'Blank', 'DE', 'Esri', 'HERE']; - var maptypecontroloptions = {mapTypeIds: maptypelist, position: google.maps.TOP_RIGHT, style: google.maps.MapTypeControlStyle.DROPDOWN_MENU}; - //var mapopt = {center: new google.maps.LatLng(42.664529, -73.786470), zoom: 12, mapTypeId: 'Mapnik', mapTypeControl: true, mapTypeControlOptions: maptypecontroloptions, streetViewControl: true, disableDefaultUI: true, panControl: true, zoomControl: true, scaleControl: true, overviewMapControl: true, keyboardShortcuts: true, disableDoubleClickZoom: false}; - // OLD coordinates are Albertus Hall room 400-2 at The College of Saint Rose - //var mapopt = {center: new google.maps.LatLng(42.664529, -73.786470), zoom: 16, mapTypeControl: true, mapTypeControlOptions: maptypecontroloptions}; + var maptypecontroloptions = { + mapTypeIds: maptypelist, + position: google.maps.TOP_RIGHT, + style: google.maps.MapTypeControlStyle.DROPDOWN_MENU + }; // coordinates are Roger Bacon 321 at Siena College - var mapopt = {center: new google.maps.LatLng(42.719450, -73.752063), zoom: 16, mapTypeControl: true, mapTypeControlOptions: maptypecontroloptions}; + var mapopt = { + center: new google.maps.LatLng(42.719450, -73.752063), + zoom: 16, + mapTypeControl: true, + mapTypeControlOptions: maptypecontroloptions + }; map = new google.maps.Map(document.getElementById("map"), mapopt); @@ -280,16 +302,20 @@ function updateMap() } connections = new Array(); + // set up to find bounding box of points we plot var minlat = 999; var maxlat = -999; var minlon = 999; var maxlon = -999; - polypoints = new Array(); + // remove any markers previously on the map for (var i = 0; i < markers.length; i++) { markers[i].setMap(null); } + markers = new Array(); + // set variables that determine if all/only visible/no markers + // should be drawn on the map var showHidden = false; if (document.getElementById('showHidden') != null) { showHidden = document.getElementById('showHidden').checked; @@ -299,8 +325,10 @@ function updateMap() showMarkers = document.getElementById('showMarkers').checked; } - markers = new Array(); + // draw our waypoint markers markerinfo = new Array(); + polypoints = new Array(); + var bounds = new google.maps.LatLngBounds(); for (var i = 0; i < waypoints.length; i++) { minlat = Math.min(minlat, waypoints[i].lat); @@ -322,18 +350,8 @@ function updateMap() } bounds.extend(polypoints[i]); } - - var midlat = (minlat + maxlat)/2; - var midlon = (minlon + maxlon)/2; - - var nsdist = Mileage(minlat, midlon, maxlat, midlon); - var ewdist = Mileage(midlat, minlon, midlat, maxlon); - var maxdist = Math.max(nsdist, ewdist); - - //var zoom = 17 - (12 + Math.floor(Math.log(maxdist/800)/Math.log(2.0))); - //zoom = Math.max(zoom, 0); - //zoom = Math.min(zoom, 17); - //map.setZoom(zoom); + + // set our map view according to the bounds we computed map.fitBounds(bounds); // if this is a graph in HDX, we draw edges as connections, @@ -361,8 +379,15 @@ function updateMap() } } edgePoints[nextPoint] = new google.maps.LatLng(waypoints[v2].lat, waypoints[v2].lon); - connections[i] = new google.maps.Polyline({path: edgePoints, strokeColor: "#0000FF", strokeWeight: 10, strokeOpacity: 0.4, map: map}); - //map.addOverlay(connections[i]); + color = getGraphEdgeColor(graphEdges[i]); + connections[i] = new google.maps.Polyline({ + path: edgePoints, + strokeColor: color, + strokeWeight: 10, + strokeOpacity: 0.4, + map: map + }); + edgeListener(i); } } else if (usingAdjacencyLists) { @@ -394,7 +419,7 @@ function updateMap() // be comma-separated, then use that to choose a // color to indicate the number of routes // following the edge - concurrent = thisEdge.label.split(",").length; + /*concurrent = thisEdge.label.split(",").length; color = ""; switch (concurrent) { case 1: @@ -412,12 +437,23 @@ function updateMap() default: color = "#FF0000"; break; - } - connections[edgeNum] = new google.maps.Polyline({path: edgePoints, strokeColor: color, strokeWeight: 10, strokeOpacity: 0.4, map: map}); + }*/ + color = getGraphEdgeColor(thisEdge); + connections[edgeNum] = new google.maps.Polyline({ + path: edgePoints, + strokeColor: color, + strokeWeight: 10, + strokeOpacity: 0.4, + map: map + }); + edgeListener(edgeNum); edgeNum++; } } } + google.maps.event.clearListeners(map, 'zoom_changed'); + google.maps.event.addListener(map, 'zoom_changed', zoomChange); + zoomChange(); } // connecting waypoints in order to plot a path else if (mapClinched) { @@ -429,7 +465,6 @@ function updateMap() var weight = 2; if (newRouteIndices.length > 0) { // if newRouteIndices is not empty, we're plotting multiple routes - //DBG.write("Multiple clinched routes!"); var nextSegment = 0; for (var route = 0; route < newRouteIndices.length; route++) { var start = newRouteIndices[route]; @@ -440,7 +475,6 @@ function updateMap() else { end = newRouteIndices[route+1]-1; } - //DBG.write("route = " + route + ", start = " + start + ", end = " + end); // support for clinch colors from systems.csv var unclinchedColor = "rgb(200,200,200)"; //"#cccccc"; var clinchedColor = "rgb(255,128,128)"; //"#ff8080"; @@ -471,35 +505,31 @@ function updateMap() waypoints[i+1].lat, waypoints[i+1].lon); totalMiles += segmentLength; - //DBG.write("i = " + i); var color = unclinchedColor; var opacity = 0.3; if (segments[nextSegment] == clinched[nextClinchedCheck]) { - //DBG.write("Clinched!"); color = clinchedColor; zIndex = zIndex + 10; nextClinchedCheck++; clinchedMiles += segmentLength; opacity = 0.85; } - connections[nextSegment] = new google.maps.Polyline( - {path: edgePoints, strokeColor: color, strokeWeight: weight, strokeOpacity: opacity, - zIndex : zIndex, map: map}); - nextSegment++; + connections[nextSegment] = new google.maps.Polyline({ + path: edgePoints, + strokeColor: color, + strokeWeight: weight, + strokeOpacity: opacity, + zIndex: zIndex, + map: map + }); + edgeListener(nextSegment); + nextSegment++; } } - // set up listener for changes to zoom level and adjust strokeWeight in response - //DBG.write("Setting up zoom_changed"); + // set up listener for changes to zoom level and adjust + // strokeWeight in response google.maps.event.clearListeners(map, 'zoom_changed'); google.maps.event.addListener(map, 'zoom_changed', zoomChange); -// google.maps.event.addListener(map, 'zoom_changed', function() { -// var level = map.getZoom(); -// var weight = Math.floor(level); -// DBG.write("Zoom level " + level + ", weight = " + weight); -// for (var i=0; i<connections.length; i++) { -// connections[i].setOptions({strokeWeight: weight}); -// } -// }); } else { // single route @@ -518,7 +548,14 @@ function updateMap() nextClinchedCheck++; clinchedMiles += segmentLength; } - connections[i] = new google.maps.Polyline({path: edgePoints, strokeColor: color, strokeWeight: 10, strokeOpacity: 0.75, map: map}); + connections[i] = new google.maps.Polyline({ + path: edgePoints, + strokeColor: color, + strokeWeight: 10, + strokeOpacity: 0.75, + map: map + }); + edgeListener(i); } } if (document.getElementById('controlboxinfo') != null) { @@ -526,14 +563,49 @@ function updateMap() } } else if (genEdges) { - connections[0] = new google.maps.Polyline({path: polypoints, strokeColor: "#0000FF", strokeWeight: 10, strokeOpacity: 0.75, map: map}); - //map.addOverlay(connections[0]); + connections[0] = new google.maps.Polyline({ + path: polypoints, + strokeColor: "#0000FF", + strokeWeight: 10, + strokeOpacity: 0.75, + map: map + }); + google.maps.event.addListener(connections[0], 'click', function(){edgeClick(0);}); } // don't think this should not be needed, but an attempt to get // hidden waypoints to be hidden when first created showHiddenClicked(); } +// find a color to use to draw an edge in a graph, where colors represent +// the number of concurrent routes on a segment +function getGraphEdgeColor(edge) { + // count the commas, which tell us how many concurrent routes are + // represented, as they will be comma-separated, then use that to + // choose a color to indicate the number of routes following the + // edge + concurrent = edge.label.split(",").length; + color = ""; + switch (concurrent) { + case 1: + color = "#0000FF"; + break; + case 2: + color = "#00FF00"; + break; + case 3: + color = "#FF00FF"; + break; + case 4: + color = "#FFFF00"; + break; + default: + color = "#FF0000"; + break; + } + return color; +} + function zoomChange() { var level = map.getZoom(); @@ -542,9 +614,7 @@ function zoomChange() { else if (level < 12) newWeight = 6; else if (level < 15) newWeight = 10; else newWeight = 16; - //DBG.write("zoomChange: Zoom level " + level + ", newWeight = " + newWeight); for (var i=0; i<connections.length; i++) { - //connections[i].setMap(null); connections[i].setOptions({strokeWeight: newWeight}); } } @@ -558,6 +628,8 @@ function AddMarker(marker, markerinfo, i) { }); } +// note: there is also a LabelClickHDX used when selecting start and +// end vertices for HDX algorithm visualizations function LabelClick(i, label, lat, lon, errors) { map.panTo(new google.maps.LatLng(lat, lon)); @@ -566,6 +638,18 @@ function LabelClick(i, label, lat, lon, errors) { infowindow.open(map, markers[i]); } +// handle clicks on edges +function edgeClick(i){ + var v1 = waypoints[graphEdges[i].v1]; + var v2 = waypoints[graphEdges[i].v2]; + var midlat = (parseFloat(v1.lat) + parseFloat(v2.lat))/2.0; + var midlon = (parseFloat(v1.lon) + parseFloat(v2.lon))/2.0; + map.panTo(new google.maps.LatLng(midlat, midlon)); + infowindow.setContent(edgeInfo(i)); + infowindow.setPosition(new google.maps.LatLng(midlat, midlon)); + infowindow.open(map); +} + function MarkerInfo(i, wpt) { var intersections = ""; @@ -581,10 +665,15 @@ function MarkerInfo(i, wpt) { } intersections += "</p>"; } - return '<p style="line-height:160%;"><span style="font-size:24pt;">' + wpt.label + '</span><br><b>Waypoint ' + (i+1) + '<\/b><br><b>Coords.:<\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; + return '<p style="line-height:160%;"><span style="font-size:24pt;color:black;">' + wpt.label + '</span><br><b>Waypoint ' + (i+1) + '<\/b><br><b>Coords.:<\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; } +function edgeInfo(i){ + return '<p style="line-height:160%;"><span style="font-size:24pt; color:black">' + graphEdges[i].label + '</span><br><b>Edge Number: ' + (i) + '<\/b><br><b>Endpoints:<\/b> ' + waypoints[graphEdges[i].v1].label + ' - ' +waypoints[graphEdges[i].v2].label + '<br><b>Distance: </b><span class="miles">' +generateUnit(waypoints[graphEdges[i].v1].lat, waypoints[graphEdges[i].v1].lon, waypoints[graphEdges[i].v2].lat, waypoints[graphEdges[i].v2].lon)+ "</span>"; +} + + // compute distance in miles between two lat/lon points function Mileage(lat1, lon1, lat2, lon2) { if(lat1 == lat2 && lon1 == lon2) @@ -614,7 +703,6 @@ function showHiddenClicked() { if (document.getElementById('showHidden') != null) { showHidden = document.getElementById('showHidden').checked; } - //DBG.write("showHiddenClicked: showHidden is " + showHidden); if (showHidden) { // add in the hidden markers for (var i = 0; i < waypoints.length; i++) { @@ -633,6 +721,24 @@ function showHiddenClicked() { } } +// GraphEdge constructor, vertex numbers can come in as strings or +// numbers, will store as numbers +function GraphEdge(v1, v2, label, via) { + + if (typeof v1 === 'string') { + this.v1 = parseInt(v1); + this.v2 = parseInt(v2); + } + else { + this.v1 = v1; + this.v2 = v2; + } + this.label = label; + this.via = via; + + return this; +} + // callback for when the hideMarkers checkbox is clicked function showMarkersClicked() { @@ -651,9 +757,20 @@ function showMarkersClicked() { } } +// listen for clicks on edges +function edgeListener(i){ + google.maps.event.addListener(connections[i], + 'click', + function(e){ + edgeClick(i); + }); +} + + + function redirect(url) { - var win = window.open(url); - win.focus(); + var win = window.open(url); + win.focus(); } // JS debug window by Mike Maddox from From 9dc56853acd537332fab65a96850020575b9eb7b Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Wed, 12 Jul 2017 14:39:33 -0400 Subject: [PATCH 155/200] Move file from api to lib. --- hb/index.php | 2 +- {api => lib}/waypoints.js.php | 0 user/mapview.php | 2 +- user/region.php | 2 +- user/system.php | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename {api => lib}/waypoints.js.php (100%) diff --git a/hb/index.php b/hb/index.php index bd0cf165..a89d61f0 100644 --- a/hb/index.php +++ b/hb/index.php @@ -399,5 +399,5 @@ function initFloatingHeaders($table) { $tmdb->close(); ?> </body> -<script type="application/javascript" src="../api/waypoints.js.php?<?php echo "r=$routeparam&u=$tmuser";?>"></script> +<script type="application/javascript" src="../lib/waypoints.js.php?<?php echo "r=$routeparam&u=$tmuser";?>"></script> </html> diff --git a/api/waypoints.js.php b/lib/waypoints.js.php similarity index 100% rename from api/waypoints.js.php rename to lib/waypoints.js.php diff --git a/user/mapview.php b/user/mapview.php index 463040fa..9c005380 100644 --- a/user/mapview.php +++ b/user/mapview.php @@ -287,5 +287,5 @@ function initFloatingHeaders($table) { $tmdb->close(); ?> -<script type="application/javascript" src="../api/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> +<script type="application/javascript" src="../lib/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> </html> diff --git a/user/region.php b/user/region.php index ae59c9a3..bf366599 100644 --- a/user/region.php +++ b/user/region.php @@ -484,5 +484,5 @@ function redirect($link) { $activePreviewDrivenRes->free(); $tmdb->close(); ?> -<script type="application/javascript" src="../api/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> +<script type="application/javascript" src="../lib/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> </html> diff --git a/user/system.php b/user/system.php index f663f161..fd1ce2a3 100644 --- a/user/system.php +++ b/user/system.php @@ -340,5 +340,5 @@ <?php $tmdb->close(); ?> -<script type="application/javascript" src="../api/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> +<script type="application/javascript" src="../lib/waypoints.js.php?<?php echo $_SERVER['QUERY_STRING']?>"></script> </html> From 0400b3eb8fcebdf7d5dc0ec548722927b593396d Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Wed, 12 Jul 2017 14:55:26 -0400 Subject: [PATCH 156/200] Move images to lib directory. --- lib/Intersection.png | Bin 0 -> 15481 bytes empty.gif => lib/empty.gif | Bin {hb => lib}/smallintersection.png | Bin lib/tmjsfuncs.js | 6 +++--- updateserver.sh | 4 ++-- user/smallintersection.png | Bin 971 -> 0 bytes 6 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 lib/Intersection.png rename empty.gif => lib/empty.gif (100%) rename {hb => lib}/smallintersection.png (100%) delete mode 100644 user/smallintersection.png diff --git a/lib/Intersection.png b/lib/Intersection.png new file mode 100644 index 0000000000000000000000000000000000000000..1e7e08e1b28434fc7bcdda62e9864b40d9a874da GIT binary patch literal 15481 zcmeI3e{2)y8OJY3g(Ngkw6R94>#nAOuI>5m{4+jmx2X+vHcWn2gm$PopI^sU>^s+Y zPMoaJbO8aPKlmY7hce1EMhBG&Ev1=Yv|Bw;Hg!v2sB7ugr5#esGL=;;C{(4{o$c6{ zH_od}?X-VhOZMIKKJWK=?mqAPJidQ!YvZc>t11^&5(H6IAMiJ8$D8zT`E2d?+y5Tt zwL?WButp(>xnI-2WyIe8YJzaRC$_e!ZNZhCAji#oSPlVmI-byG6NLMobb=Sw0hJ7a z4pH)$E}wkeM2caLX|+Ab1QR|G6$3p<(9*N2Rp?nKxWcA;yp`@Wrv-=ul_%5jn51xN zk0~3M)6Vr_+C*ljsOvnYIz1uT7HlMaauSesvx5>?Yc1(?nOVE5)?&Mxv@ooLW?VFD zqZpQBTpYua`H#t4shzo#;Rx64Uy)CzSsqhVRTCUdcXf4{yR2q8*+H`|my2dBw8cVc zGbp87Qu#C`DT{MKCgS*kA|%CxD#{Y6$K^wEO7)mbdZNN7e_!!LA(5oy*=ZE%G@qbZ zGeegWg@uA9kxIt0mlhUi5Cd@_sfwm!OX?C)S(TNjJWa}id)ma>ngoM|+$FC!9xs_% zQI~gW2=YivDwWpm1fZLNBBzo9Sl+4K%HmRYuZof4;!KL9d#1g1kQS$r>7JY{yA^UP z<ks$$^CbbV%E?w)j(KyttZ@P%>GSEk%1Pd_T9m?am+~Dq4NHpaU5p0&yb8R!l42Yb zQ`^c~IJ=c&8H%xS3}XnAn+e4T%3(3mT`Go+W39#*hM8~-t$xD1%Fif@ajqdwSl}XZ zGR~`BG0t}YIw5tq>EfVaW?@%xJ~<{QwaWrttD7!0Y*1x)8donVDlZA3-tW~0%%T|P zLJlV6;_Xh#&RQ8t2-^S^axy$+vjGQdsdWImRmegN295G5q5ZOu(yJvOI;@4}1s+%( z4jbiigaj&Nweb}1j6^7g7i#Ub&RUz5w@rjL$ftyENQzpg<70+7`qlrpDN2Nyk}4o7 z+Wzb|>|1U3W_wu+cy#jUgd-+qds2c=DnPF|k7=Uh3QergqjXKSay2%3H}eX5L4dHE zo-|s#tb#Hx6Q?fV%qZvL8|2gH=!yafRZzK5*;&&EQRIl)#V0{shqfnXQtP>>lVxyt zH?4R7nD{?f2!-$ba?3EYI{K2!VC+f%zhx-yVj;>)9U$zbCpPfJz|2-Ix1N(LYoZ}c ztwgu}cf@H`tnDa1TRp6so-$U<oSWaKS7R)do$s_T+J|QK-@Mf5hNWxJQllG|7L^Z3 zqUyEevq8fKmHwZZYv?W7;~nri>~^c&O~b>mqESqPSesweI<KPl6V{Q}z>bo_HPZ<V zj=V6pRE7t!Yz^i{wZ}Z|36m~7VooW~LKpigPl|W+RYrwk;Uo|cw25({`9NNb3j%^R zF)lP8$cu47K+q<}h2{f!F)j!Q+Qhifd>}8z1pz^u7#Erk<i)rkAZQcgLi2&V7#9Qt zZDL$#K9CpVf`Fh+j0?>N@?u;N5VVPLq4_{wj0*ySHZd+VAIOVwK|s(Z#)aksc`+^s z2-?KB(0m{-#svXEn-~|G59GzTARuTH<3jU+ycib*1Z`qmXg-h^<AQ*oO^gf82l8TE z5D>J9aiRG@UW^L@f;KTOG#|)|aX~=PCdP&419>qn2ngCl;;JmZv<W2bP0cRtmCWV) ze$}GA&PfV^<{&}z)DT2(A3<Cj*N&G6BE=BIKiUa`dzK(>mUljUdIdquT3GL|YfWE> z?K;)a(o}usaq7*nh1-wr-}WfEXm-6^^VT~XH=RCv`tiE+W9(>oUy3>SMB4}Zx1Biv zVi%TO-5Kq@`oYGni3N)MZaFpZOvZJ5Q+nsp4==7Cy8JuWhaUO9)MvhXZ~T7m9pSM* z-T&H-{mYy~=LcP(S!BiSp9OaQhJSxW`L%`Lz4Z0f(!pPzII;53g1xtVQW5%fJF($M znN*~H?W#=8oc=ZapFecxxRsr~c31T3$c=|a=N%Q)Ka?%)+cnfA`JZ3;O2viEgPT`3 zBu<&mEjVXBk;(*41~y06SApl6pMJHjEIRktmRE0kw{QNA&h2}nkDU($zqu^_@_gH4 zgWk-Q%0Sft;?PsK+cumHy!?FSoBOVqdam~;GjsMlJQCl%oeTV}DKfieS2Q`Rs^+OB zOIQB$>XYyMY~JDB!@vLD;ml8jEq~wOxe))T^ZlV6*S^vI)?dxHq+(>*OCw{|<)cT( z$_F02_mSJKzjADN?AaZ*?dwcOdiUJgvh|VPdE}@3CuP#{=;iSYF@EbyK!{&lc=p_^ z-NOUV{9@5ZH*Y-Nvg8MYKVET3eCUkh@QXkF`R3L)_C9gEV$gY|wf)Gk_TYno*B+SL z-Ir(|Z#dP_I455H=iz}RHyn6-@UH!*H<hI`mQ-MHVC~zZzh$><@O@nM@n62xOg#7c z$a^OndM@656XCo5v|Ah=-PTk-zxs=R?K@I2{Q260f9zix8G7T>sxRgddq(<SsBc=l RUVk~be)%f@i}$tv@IU3dBE$dy literal 0 HcmV?d00001 diff --git a/empty.gif b/lib/empty.gif similarity index 100% rename from empty.gif rename to lib/empty.gif diff --git a/hb/smallintersection.png b/lib/smallintersection.png similarity index 100% rename from hb/smallintersection.png rename to lib/smallintersection.png diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 78276b00..2e031e0d 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -203,12 +203,12 @@ var BlankOptions = { alt: "Show a blank background", }; function getBlankURL() { - return '/empty.gif'; + return '/lib/empty.gif'; } var intersectionimage = { - url: 'Intersection.png', + url: '/lib/Intersection.png', // This marker is 16x16 size: new google.maps.Size(16, 16), // The origin for this image is 0,0. @@ -218,7 +218,7 @@ var intersectionimage = { }; var oldintersectionimage = { - url: 'smallintersection.png', + url: '/lib/smallintersection.png', // This marker is 16x16 size: new google.maps.Size(16, 16), // The origin for this image is 0,0. diff --git a/updateserver.sh b/updateserver.sh index 35271bb0..5e644321 100644 --- a/updateserver.sh +++ b/updateserver.sh @@ -8,7 +8,7 @@ server=blizzard.teresco.org basedir=/home/www/ rootdir=tmtest shieldsdir= -otherdirs="user lib devel hb css api graphs" +otherdirs="user lib devel hb css graphs" while (( "$#" )); do if [ "$1" == "--prod" ]; then @@ -25,5 +25,5 @@ done echo "Updating to $server:$basedir$rootdir, directories $otherdirs $shieldsdir" scp *.php $server:$basedir$rootdir for dir in $otherdirs $shieldsdir; do - scp $dir/*.{php,js,svg,css} $server:$basedir$rootdir/$dir + scp $dir/*.{php,js,svg,css,png} $server:$basedir$rootdir/$dir done diff --git a/user/smallintersection.png b/user/smallintersection.png deleted file mode 100644 index aff56fbedffb743d385de589592678ee89e8d9b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 971 zcmZ`&dq~q!6#iyyKAPIYrVR}rXb)TMp{c{l>DHWWYfiH?Qa5utZK&JQ9K%d9(4vQs zqy?qXn^r9dwscULQJ6F<i|Aoyk`h)%1!A+iQ9*xnxc8oOzTbDwJ@<oOlR_@`_hb42 z@Ry_umBi0=Z=YG@T*?Z}B5rnxKqdgL9hx((qLQ3qP>NGw=?@(vNqAAZQU;h}fcm|_ z6oKkL06W>hcp<<)1_W20uxBQdI)Or(Eh2=!Mx(-;_BZncK|lhb0s%lAu<*~<Re%$q z1JS?$!1;qe1Lgrs01_+!20ev@Ljq!?>Jji3AkT>ahCLu@GKWkBM3N^0f$kZ6XduJ5 zja)t36Ziu}7NQ1OULGXg)9no~-;=U_(|o)kOF^C#XhUiOWNE;0;41LML$Crw1ScXx zu_OwbO{gx$8XnTuU}+R83cw6Tl?wR^P-zHeKp{lIMlcpYl?g=}sIw3>7s4c<6}W<# znVCZ)1~q9cHY(*=2-<qm;n>EYNPC`I?ESq8?I&Bg>D=e?4R)RR{GD!{`BLt~bGu4w zceLNM*vuxo&0%Y^mUdcnx^m0rL0jW($wbLb+q#ih25CuAZx9R1qSZ%<_VBGt&ovOm z<?c<{U2`CcfYTD8AUou7Q6aq6$7mQin$^`bpP`|V;nAueL+{@O58*4dF}YFH)g`)X z?ukx`Y)N(0DF<9GuC<Ob?3MCUzo$+x>31ulIYUslcKRdz!SajNjI!|#6|+6Vsy6SS z=e_9UHZ%Ee=h>Mi?i8($zHjks*O5%8%jM);tNP-*p58l=@4D3_ak(V-mtD|~t)R!8 zjU4dPj7pr0@z$Kd)qV6E)!&tq0h;?9X4$0j_Dd=Kz`;c+<*Y3AxB5Yop2KA)CY4M{ za?kWq!bW3zeD(JIhJD>T^ST^mrw)hr@Z<-p&yM+8mg`$W6*Jry?ICvUGG4=Ti0;K+ z50u4UCOSkLMO%#9RmNg|k-nHXaM>Ili=D{g#AkDPd|o1-m%w7j@!4#{EB?ek1-gpu zT21Z$3%u$Z+<#%1`-ZFvjj=|hFNRnl4HuVI7>tG@y|&UAp0tvk5Y~}=nh+ro$%U5G G!iHbfiWCn3 From 7d5dda81a8668ff764f50cd3cd20cd274d41311a Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Wed, 12 Jul 2017 15:26:45 -0400 Subject: [PATCH 157/200] Some code reorg, force Mapnik as default map tiles. --- lib/tmjsfuncs.js | 45 ++++++++++++++++----------------------------- 1 file changed, 16 insertions(+), 29 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 2e031e0d..a75ae877 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -37,6 +37,10 @@ // google.maps.Map reference var map; +// many of the following are given values in code generated by +// waypoints.js.php for TM functionality, or by functions in +// hdxjsfuns.js (in EduTools/HighwayDataExaminer) for HDX functionality. + // array of waypoints displayed var waypoints = new Array(); // array of waypoint indices where route changes for region mapping @@ -55,8 +59,16 @@ var markerinfo = new Array(); var polypoints = new Array(); // array of connections on map as google.maps.Polyline overlays var connections = new Array(); -// array of graph edges (for graph data, used by HDX, which imports this code) + +// array of graph edges (for graph data, used by HDX, which imports this code) - +// this would be a single list of all graph edges. When using an adjacency +// list representation, edges would also be in vertex-based adjacency lists var graphEdges = new Array(); +// boolean to determine if graph edges should be generated automatically +var genEdges = false; +// boolean to determine if graph edges are in vertex adjacency lists +var usingAdjacencyLists = false; + // array of segments and clinched for "clinched by traveler" mapping var segments = new Array(); var clinched = new Array(); @@ -64,10 +76,6 @@ var clinched = new Array(); var mapClinched = false; // traveler name for clinched var traveler; -// boolean to determine if graph edges should be generated automatically -var genEdges = false; -// boolean to determine if graph edges are in vertex adjacency lists -var usingAdjacencyLists = false; // array of objects that define color codes from names in the DB var colorCodes = new Array(); @@ -261,6 +269,8 @@ function loadmap() { map.mapTypes.set('DE', typeOpenStreetMapDE); map.mapTypes.set('Esri', typeEsri); map.mapTypes.set('HERE', typeHERE); + + map.setMapTypeId('Mapnik'); } // construct a new Waypoint object (based on similar function by Tim Reichard) @@ -414,30 +424,7 @@ function updateMap() } } edgePoints[nextPoint] = new google.maps.LatLng(waypoints[thisEdge.v2].lat, waypoints[thisEdge.v2].lon); - // count the commas, which tell us how many - // concurrent routes are represented, as they will - // be comma-separated, then use that to choose a - // color to indicate the number of routes - // following the edge - /*concurrent = thisEdge.label.split(",").length; - color = ""; - switch (concurrent) { - case 1: - color = "#0000FF"; - break; - case 2: - color = "#00FF00"; - break; - case 3: - color = "#FF00FF"; - break; - case 4: - color = "#FFFF00"; - break; - default: - color = "#FF0000"; - break; - }*/ + color = getGraphEdgeColor(thisEdge); connections[edgeNum] = new google.maps.Polyline({ path: edgePoints, From cf8b3fe249e505cc2ab23f899452179e24035bee Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Wed, 12 Jul 2017 17:58:46 -0400 Subject: [PATCH 158/200] Generalize lib dir, add coords link (closes https://github.com/TravelMapping/EduTools/issues/107) --- lib/tmjsfuncs.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index a75ae877..49d4a265 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -33,6 +33,14 @@ // 2016-06-27 JDT Removed code not needed by TM // +// get path to lib directory where some images are found, +// which *might* have been set from an hdx.conf file. +var tmlibdir = "/lib/"; +try { + tmlibdir = tmliburl; +} +catch(e) {} + // global variable to hold the map, which will be assigned a // google.maps.Map reference var map; @@ -211,12 +219,12 @@ var BlankOptions = { alt: "Show a blank background", }; function getBlankURL() { - return '/lib/empty.gif'; + return tmlibdir + 'empty.gif'; } var intersectionimage = { - url: '/lib/Intersection.png', + url: tmlibdir + 'Intersection.png', // This marker is 16x16 size: new google.maps.Size(16, 16), // The origin for this image is 0,0. @@ -226,7 +234,7 @@ var intersectionimage = { }; var oldintersectionimage = { - url: '/lib/smallintersection.png', + url: tmlibdir + 'smallintersection.png', // This marker is 16x16 size: new google.maps.Size(16, 16), // The origin for this image is 0,0. @@ -652,7 +660,7 @@ function MarkerInfo(i, wpt) { } intersections += "</p>"; } - return '<p style="line-height:160%;"><span style="font-size:24pt;color:black;">' + wpt.label + '</span><br><b>Waypoint ' + (i+1) + '<\/b><br><b>Coords.:<\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; + return '<p style="line-height:160%;"><span style="font-size:24pt;color:black;">' + wpt.label + '</span><br><b>Waypoint ' + (i+1) + '<\/b><br><b><a target="_blank" href="http://www.openstreetmap.org/?lat='+wpt.lat+'&lon='+wpt.lon+'">Coords.:<\a><\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; } From 346ee861a882903b10acd858233127887028365b Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 13 Jul 2017 10:08:12 -0400 Subject: [PATCH 159/200] Added comment about shared code. --- lib/tmjsfuncs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 49d4a265..a4324fea 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -33,6 +33,12 @@ // 2016-06-27 JDT Removed code not needed by TM // +// IMPORTANT: when making any modifications to code here, especially +// the loadmap function, note that it is used by various TM pages, +// where variables are mostly set in code generated by waypoints.js.php, +// but also by HDX, where variables are set in various places in +// hdxjsfuncs.js + // get path to lib directory where some images are found, // which *might* have been set from an hdx.conf file. var tmlibdir = "/lib/"; From affdcb4186c277b06dbe60b654b92d7ed6e22ef2 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 13 Jul 2017 15:14:06 -0400 Subject: [PATCH 160/200] Move 'Blank' map tiles to the end of the list. --- lib/tmjsfuncs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index a4324fea..8ea90dfb 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -109,7 +109,7 @@ var customColorCodes = new Array(); // the window that will pop up when someone clicks on a waypoint's marker var infowindow = new google.maps.InfoWindow(); -// some map options, early ones based on +// some of the original map options code is based on // http://cmap.m-plex.com/hb/maptypes.js by Timothy Reichard var MapnikOptions = { alt: "Show Mapnik road map tiles from OpenStreetMap.org", @@ -259,7 +259,7 @@ function loadmap() { var typeEsri = new google.maps.ImageMapType(EsriOptions); var typeHERE = new google.maps.ImageMapType(HEREOptions); - var maptypelist = ['Mapnik', google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.TERRAIN, 'Blank', 'DE', 'Esri', 'HERE']; + var maptypelist = ['Mapnik', google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.SATELLITE, google.maps.MapTypeId.HYBRID, google.maps.MapTypeId.TERRAIN, 'DE', 'Esri', 'HERE', 'Blank']; var maptypecontroloptions = { mapTypeIds: maptypelist, position: google.maps.TOP_RIGHT, From 4029ea80caa5aab31e6478a8b159b3bb734538b0 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 13 Jul 2017 15:27:14 -0400 Subject: [PATCH 161/200] Some code formatting and removed obsolete MQ code. --- lib/tmjsfuncs.js | 98 +++++++++++++++++------------------------------- 1 file changed, 35 insertions(+), 63 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 8ea90dfb..714823e7 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -112,14 +112,15 @@ var infowindow = new google.maps.InfoWindow(); // some of the original map options code is based on // http://cmap.m-plex.com/hb/maptypes.js by Timothy Reichard -var MapnikOptions = { alt: "Show Mapnik road map tiles from OpenStreetMap.org", - getTileUrl: getMapnikTileURL, - maxZoom: 18, - minZoom: 0, - name: "Mapnik", - opacity: 1, - tileSize: new google.maps.Size(256, 256) - }; +var MapnikOptions = { + alt: "Show Mapnik road map tiles from OpenStreetMap.org", + getTileUrl: getMapnikTileURL, + maxZoom: 18, + minZoom: 0, + name: "Mapnik", + opacity: 1, + tileSize: new google.maps.Size(256, 256) +}; var OpenStreetMapDEOptions = { alt: "Show OpenStreetMapDE road map tiles from OpenStreetMap.org", @@ -132,7 +133,8 @@ var OpenStreetMapDEOptions = { }; function getOpenStreetMapDEURL(point, zoom) { - return 'http://tile.openstreetmap.de/tiles/osmde/' + zoom + '/' + point.x + '/' + point.y + '.png'; + return 'http://tile.openstreetmap.de/tiles/osmde/' + zoom + '/' + + point.x + '/' + point.y + '.png'; } var EsriOptions = { @@ -146,7 +148,9 @@ var EsriOptions = { }; function EsriURL(point, zoom) { - return 'http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/' + zoom + '/' + point.y + '/' + point.x; + + return 'http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/tile/' + + zoom + '/' + point.y + '/' + point.x; } var OpenStreetMapDEOptions = { @@ -160,7 +164,9 @@ var OpenStreetMapDEOptions = { }; function getOpenStreetMapDEURL(point, zoom) { - return 'http://tile.openstreetmap.de/tiles/osmde/' + zoom + '/' + point.x + '/' + point.y + '.png'; + + return 'http://tile.openstreetmap.de/tiles/osmde/' + zoom + '/' + + point.x + '/' + point.y + '.png'; } //HERE map tiles @@ -175,60 +181,32 @@ var HEREOptions = { }; function HEREURL(point, zoom) { - return 'https://1.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/' + zoom + '/' + point.x + '/' + point.y + '/256/png8?app_id=VX6plk5zCW0wzrNcN64O&app_code=LcZFksQAhfg7rvZvcZ1lqw'; -} - -function getMapnikTileURL(point, zoom) -{ - return 'http://tile.openstreetmap.org/' + zoom + '/' + point.x + '/' + point.y + '.png'; -} - -var MQOpenMapOptions = { alt: "Show Mapquest Open Map road map tiles based on OpenStreetMap.org data", - getTileUrl: getMQOpenMapTileURL, - maxZoom: 18, - minZoom: 0, - name: "MQOpenMap", - opacity: 1, - tileSize: new google.maps.Size(256, 256) - }; - -function getMQOpenMapTileURL(point, zoom) -{ - var subdomain = Math.floor( Math.random() * (4 - 1 + 1) ) + 1; // Request tile from random subdomain. - return 'http://otile' + subdomain + '.mqcdn.com/tiles/1.0.0/map/' + zoom + '/' + point.x + '/' + point.y + '.jpg'; - //return 'http://cmap.m-plex.com/hb/ymaptile.php?t=m&s=mq&x=' + point.x + '&y=' + point.y + '&z=' + zoom; + + return 'https://1.base.maps.cit.api.here.com/maptile/2.1/maptile/newest/normal.day/' + + zoom + '/' + point.x + '/' + point.y + + '/256/png8?app_id=VX6plk5zCW0wzrNcN64O&app_code=LcZFksQAhfg7rvZvcZ1lqw'; } -var MQOpenSatOptions = { alt: "Show Mapquest Open Map satellite imagery tiles based on OpenStreetMap.org data", - getTileUrl: getMQOpenSatTileURL, - maxZoom: 18, - minZoom: 0, - name: "MQOpenSat", - opacity: 1, - tileSize: new google.maps.Size(256, 256) - }; - -function getMQOpenSatTileURL(point, zoom) -{ - var subdomain = Math.floor( Math.random() * (4 - 1 + 1) ) + 1; // Request tile from random subdomain. - return 'http://otile' + subdomain + '.mqcdn.com/tiles/1.0.0/sat/' + zoom + '/' + point.x + '/' + point.y + '.jpg'; - //return 'http://cmap.m-plex.com/hb/ymaptile.php?t=s&s=mq&x=' + point.x + '&y=' + point.y + '&z=' + zoom; +function getMapnikTileURL(point, zoom) { + + return 'http://tile.openstreetmap.org/' + zoom + '/' + point.x + '/' + + point.y + '.png'; } -var BlankOptions = { alt: "Show a blank background", - getTileUrl: getBlankURL, - maxZoom: 18, - minZoom: 0, - name: "Blank", - opacity: 1, - tileSize: new google.maps.Size(256, 256) - }; +var BlankOptions = { + alt: "Show a blank background", + getTileUrl: getBlankURL, + maxZoom: 18, + minZoom: 0, + name: "Blank", + opacity: 1, + tileSize: new google.maps.Size(256, 256) +}; function getBlankURL() { - return tmlibdir + 'empty.gif'; + return tmlibdir + 'empty.gif'; } - var intersectionimage = { url: tmlibdir + 'Intersection.png', // This marker is 16x16 @@ -251,8 +229,6 @@ var oldintersectionimage = { // loadmap constructs and sets up the initial map function loadmap() { - var typeMQOpenMap = new google.maps.ImageMapType(MQOpenMapOptions); - var typeMQOpenSat = new google.maps.ImageMapType(MQOpenSatOptions); var typeMapnik = new google.maps.ImageMapType(MapnikOptions); var typeBlank = new google.maps.ImageMapType(BlankOptions); var typeOpenStreetMapDE = new google.maps.ImageMapType(OpenStreetMapDEOptions); @@ -276,8 +252,6 @@ function loadmap() { map = new google.maps.Map(document.getElementById("map"), mapopt); - map.mapTypes.set('MQOpenMap', typeMQOpenMap); - map.mapTypes.set('MQOpenSat', typeMQOpenSat); map.mapTypes.set('Mapnik', typeMapnik); map.mapTypes.set('Blank', typeBlank); map.mapTypes.set('DE', typeOpenStreetMapDE); @@ -767,8 +741,6 @@ function edgeListener(i){ }); } - - function redirect(url) { var win = window.open(url); win.focus(); From ea883d0588a6b5fba05a3aca9ed6862d31bc446f Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 13 Jul 2017 15:50:54 -0400 Subject: [PATCH 162/200] Fixed some JS code naming convention violations. --- hb/index.php | 2 +- lib/tmjsfuncs.js | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/hb/index.php b/hb/index.php index a89d61f0..fe983df4 100644 --- a/hb/index.php +++ b/hb/index.php @@ -312,7 +312,7 @@ function initFloatingHeaders($table) { if (!startsWith($row['pointName'], "+")) { $colorFactor = $row['driverPercent'] / 100; $colors = [255, 255 - round($colorFactor * 128), 255 - round($colorFactor * 128)]; - echo "<tr onClick='javascript:LabelClick(" . $waypointnum . ",\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ",0);'><td>(" . $row['latitude'] . "," . $row['longitude'] . ")</td><td class='link'>" . $row['pointName'] . "</td><td style='background-color: rgb({$colors[0]},{$colors[1]},{$colors[2]})'>{$row['driverPercent']}</td></tr>\n"; + echo "<tr onClick='javascript:labelClick(" . $waypointnum . ",\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ",0);'><td>(" . $row['latitude'] . "," . $row['longitude'] . ")</td><td class='link'>" . $row['pointName'] . "</td><td style='background-color: rgb({$colors[0]},{$colors[1]},{$colors[2]})'>{$row['driverPercent']}</td></tr>\n"; } $waypointnum = $waypointnum + 1; } diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 714823e7..05a55d99 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -336,7 +336,7 @@ function updateMap() polypoints[i] = new google.maps.LatLng(waypoints[i].lat, waypoints[i].lon); - markerinfo[i] = MarkerInfo(i, waypoints[i]); + markerinfo[i] = markerInfo(i, waypoints[i]); markers[i] = new google.maps.Marker({ position: polypoints[i], //map: map, @@ -344,7 +344,7 @@ function updateMap() icon: intersectionimage }); if (showMarkers && (showHidden || waypoints[i].visible)) { - AddMarker(markers[i], markerinfo[i], i); + addMarker(markers[i], markerinfo[i], i); } bounds.extend(polypoints[i]); } @@ -475,10 +475,10 @@ function updateMap() var edgePoints = new Array(2); edgePoints[0] = new google.maps.LatLng(waypoints[i].lat, waypoints[i].lon); edgePoints[1] = new google.maps.LatLng(waypoints[i+1].lat, waypoints[i+1].lon); - var segmentLength = Mileage(waypoints[i].lat, - waypoints[i].lon, - waypoints[i+1].lat, - waypoints[i+1].lon); + var segmentLength = distanceInMiles(waypoints[i].lat, + waypoints[i].lon, + waypoints[i+1].lat, + waypoints[i+1].lon); totalMiles += segmentLength; var color = unclinchedColor; var opacity = 0.3; @@ -512,10 +512,10 @@ function updateMap() var edgePoints = new Array(2); edgePoints[0] = new google.maps.LatLng(waypoints[i].lat, waypoints[i].lon); edgePoints[1] = new google.maps.LatLng(waypoints[i+1].lat, waypoints[i+1].lon); - var segmentLength = Mileage(waypoints[i].lat, - waypoints[i].lon, - waypoints[i+1].lat, - waypoints[i+1].lon); + var segmentLength = distanceInMiles(waypoints[i].lat, + waypoints[i].lon, + waypoints[i+1].lat, + waypoints[i+1].lon); totalMiles += segmentLength; var color = "#cccccc"; if (segments[i] == clinched[nextClinchedCheck]) { @@ -594,7 +594,7 @@ function zoomChange() { } } -function AddMarker(marker, markerinfo, i) { +function addMarker(marker, markerinfo, i) { marker.setMap(map); google.maps.event.addListener(marker, 'click', function() { @@ -603,9 +603,9 @@ function AddMarker(marker, markerinfo, i) { }); } -// note: there is also a LabelClickHDX used when selecting start and +// note: there is also a labelClickHDX used when selecting start and // end vertices for HDX algorithm visualizations -function LabelClick(i, label, lat, lon, errors) { +function labelClick(i, label, lat, lon, errors) { map.panTo(new google.maps.LatLng(lat, lon)); //infowindow.setContent(info); @@ -625,7 +625,7 @@ function edgeClick(i){ infowindow.open(map); } -function MarkerInfo(i, wpt) { +function markerInfo(i, wpt) { var intersections = ""; if (wpt.hasOwnProperty('intersecting')) { @@ -650,7 +650,7 @@ function edgeInfo(i){ // compute distance in miles between two lat/lon points -function Mileage(lat1, lon1, lat2, lon2) { +function distanceInMiles(lat1, lon1, lat2, lon2) { if(lat1 == lat2 && lon1 == lon2) return 0.; @@ -661,7 +661,7 @@ function Mileage(lat1, lon1, lat2, lon2) { } // compute distance in feet between two lat/lon points -function Feet(lat1, lon1, lat2, lon2) { +function distanceInFeet(lat1, lon1, lat2, lon2) { if(lat1 == lat2 && lon1 == lon2) return 0.; @@ -682,7 +682,7 @@ function showHiddenClicked() { // add in the hidden markers for (var i = 0; i < waypoints.length; i++) { if (!waypoints[i].visible) { - AddMarker(markers[i], markerinfo[i], i); + addMarker(markers[i], markerinfo[i], i); } } } @@ -721,7 +721,7 @@ function showMarkersClicked() { if (showThem) { for (var i = 0; i < waypoints.length; i++) { if (waypoints[i].visible) { - AddMarker(markers[i], markerinfo[i], i); + addMarker(markers[i], markerinfo[i], i); } } } From 94354f12cf726672d326c13d1b7720bfa96365ba Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sat, 15 Jul 2017 16:08:02 -0700 Subject: [PATCH 163/200] add mexd shield --- shields/shieldgen.php | 9 +++++++++ shields/template_mexd.svg | 21 +++++++++++++++++++++ shields/template_mexd_wide.svg | 21 +++++++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 shields/template_mexd.svg create mode 100644 shields/template_mexd_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 1372e6fe..8231c3ea 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -53,6 +53,15 @@ function generate($r, $force_reload = false) $svg = file_get_contents("{$dir}/generic_wide.svg"); } break; + + case 'mexd': + $routeNum = str_replace("MEX", "", $row['route']); + $routeNum = str_replace("D", "", $routeNum); //handled by template + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_mexd_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usai': case 'usaif': diff --git a/shields/template_mexd.svg b/shields/template_mexd.svg new file mode 100644 index 00000000..787f22d7 --- /dev/null +++ b/shields/template_mexd.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg id="svg3755" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 798.25 1064.1" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <g id="layer1" transform="translate(-90.929 -189)"> + <g id="g4749"> + <path id="path4549" d="m106.25 0-106.25 106.25v265.72c13.586 23.46 21.375 50.71 21.375 79.78s-7.789 56.28-21.375 79.75c0 251.96 168.31 464.58 398.62 531.6 230.32-67.02 398.63-279.65 398.63-531.6-13.586-23.465-21.375-50.685-21.375-79.75s7.7885-56.316 21.375-79.781v-265.72l-106.28-106.25c-41.94 27.675-92.18 43.781-146.19 43.781-54 0-104.22-16.111-146.16-43.781 0 0.0047843-0.02-0.0047836-0.03 0-41.93 27.675-92.15 43.781-146.15 43.781-54.01 0-104.25-16.106-146.19-43.781z" transform="translate(91.429 189.5)" stroke="#000" fill="#fff"/> + <path id="rect4435" d="m398.59 41.406c-43.288 24.075-93.111 37.812-146.16 37.812-50.749 0-98.578-12.552-140.53-34.719l-76.469 76.469v242c13.65 26.626 21.375 56.804 21.375 88.781 0 31.978-7.725 62.155-21.375 88.781l0.03125 0.0625h-0.03125c0 231.68 152.03 418.77 361.78 485.06l1.4062 0.2238 1.4062-0.2238c209.75-66.24 361.79-253.33 361.79-485.01-13.67-26.64-21.37-56.84-21.37-88.84 0-32.002 7.7053-62.203 21.375-88.844v-241.94l-76.5-76.5c-41.957 22.171-89.777 34.75-140.53 34.75-53.061 0-102.89-13.725-146.19-37.812zm-0.09 39.844c44.236 21.383 93.855 33.406 146.28 33.406 47.323 0 92.364-9.7766 133.22-27.406l48.375 48.375v201h-655.5v-201l48.656-48.656c40.845 17.619 85.881 27.406 133.19 27.406 52.227 0 101.67-11.898 145.78-33.125zm-320.44 290.81h641.12c-9.15 24.84-14.18 51.68-14.18 79.69 0 34.637 7.6789 67.468 21.375 96.938 0.004 0.009-0.004 0.0226 0 0.0312-0.0134 211.8-136.43 374.66-326.19 439.59-0.76615 0.34524-0.61757 0.16327-2.0654 0.65503-2.6616-1.1921-2.8438-1.1105-4.872-1.9988-187.77-65.81-322.36-227.89-322.36-438.28 13.689-29.47 21.339-62.31 21.339-96.94 0-28.011-4.9979-54.852-14.156-79.688z" transform="translate(91.429 189.5)"/> + <g id="text4593"> + <path id="path4702" d="m276.31 505.24v-104.66l-21.091 66.173-21.618-66.173v104.66h-22.409v-176.64h22.409l21.618 62.482 21.091-62.482h22.146v176.64h-22.146"/> + <path id="path4704" d="m336.83 505.24v-176.64h65.119v22.937h-42.71v45.346h28.473v23.464h-28.473v61.955h45.082v22.937h-67.492"/> + <path id="path4706" d="m480.34 505.24-17.4-53.255-17.137 53.255h-24.255l29.791-90.428-28.473-86.21h24.782l15.291 49.037 16.346-49.037h23.991l-28.473 86.21 29.791 90.428h-24.255"/> + <path id="path4708" d="m532.5 505.24v-176.64h22.409v176.64h-22.409"/> + <path id="path4710" d="m664.43 463.58c-0.00009 3.5152-0.088 6.4152-0.26364 8.7001-0.00009 2.2849-0.088 4.3061-0.26364 6.0637-0.17585 1.5819-0.43949 3.0758-0.79092 4.4819-0.3516 1.4061-0.791 2.9-1.3182 4.4819-1.4062 6.5031-4.9213 11.688-10.546 15.555-5.6244 3.691-12.391 5.5364-20.3 5.5364-8.9638 0-16.346-1.8455-22.146-5.5364-5.6243-3.8667-9.8426-9.9304-12.655-18.191-2.4606-7.3819-4.3061-16.873-5.5364-28.473-1.2303-11.776-1.8455-24.782-1.8455-39.019-0.00002-4.0424 0.0879-8.4363 0.26364-13.182 0.17574-4.7454 0.43938-9.4909 0.79091-14.236 0.52727-4.9211 1.0545-9.5788 1.5818-13.973 0.52726-4.3938 1.1424-8.3484 1.8455-11.864 2.2848-13.533 6.2394-23.2 11.864-29 5.8-5.7999 13.973-8.6999 24.518-8.7001 10.018 0.00018 18.103 2.9881 24.255 8.9637 6.1515 5.8002 9.6667 14.149 10.546 25.046h-22.937c-0.35158-3.6908-1.5819-6.4151-3.6909-8.1728-1.9334-1.9332-4.394-2.8999-7.3819-2.9-4.0425 0.00016-7.2062 1.4062-9.491 4.2182-2.2849 2.8123-4.1304 7.1184-5.5364 12.918-0.87884 3.5153-1.5819 7.1184-2.1091 10.809-0.35156 3.5153-0.70308 7.2941-1.0546 11.336-0.1758 3.8668-0.35155 8.1729-0.52728 12.918-0.00003 4.7456-0.00003 10.018 0 15.818-0.00003 6.1517-0.00003 11.6 0 16.346 0.17573 4.5698 0.35148 8.788 0.52728 12.655 0.35148 3.691 0.703 7.2941 1.0546 10.809 0.52724 3.3395 1.2303 6.8546 2.1091 10.546 1.406 5.8001 3.1636 10.282 5.2728 13.446 2.2848 2.9879 5.2727 4.4819 8.9637 4.4819 4.0424 0.00002 7.0303-1.6697 8.9637-5.0091 1.9333-3.3394 2.9-8.9637 2.9-16.873h22.937"/> + <path id="path4712" d="m774.51 416.65c-0.0001 4.7456-0.0001 10.37 0 16.873-0.0001 6.3274-0.35162 12.918-1.0546 19.773-0.52737 6.8546-1.5819 13.621-3.1637 20.3-1.4062 6.5031-3.691 12.391-6.8546 17.664-2.988 5.097-6.9426 9.2274-11.864 12.391-4.7456 3.1637-10.721 4.7455-17.927 4.7455-7.3819 0-13.534-1.5818-18.455-4.7455-4.7455-3.1637-8.7001-7.294-11.864-12.391-2.9879-5.2728-5.2728-11.161-6.8546-17.664-1.4061-6.6788-2.3728-13.446-2.9-20.3-0.52729-6.8546-0.79093-13.446-0.79092-19.773-0.00001-6.3273-0.00001-11.952 0-16.873-0.00001-5.0969-0.00001-10.809 0-17.137-0.00001-6.503 0.26363-13.094 0.79092-19.773 0.70302-6.6787 1.8454-13.182 3.4273-19.509 1.5818-6.5029 3.8667-12.215 6.8546-17.137 2.9879-5.0968 6.8546-9.1393 11.6-12.127 4.9212-3.1635 10.985-4.7453 18.191-4.7455 7.2061 0.00018 13.182 1.582 17.927 4.7455 4.9212 2.9881 8.8758 7.0305 11.864 12.127 3.1636 5.0972 5.4484 10.897 6.8546 17.4 1.5817 6.3275 2.6363 12.831 3.1637 19.509 0.70294 6.679 1.0545 13.27 1.0546 19.773-0.0001 6.3274-0.0001 11.952 0 16.873m-23.464 0c-0.00007-2.4605-0.0879-5.8-0.26364-10.018-0.00007-4.2181-0.17583-8.7879-0.52727-13.709-0.35159-5.0969-0.87887-10.194-1.5818-15.291-0.7031-5.2726-1.7577-10.018-3.1637-14.236-1.2304-4.2181-2.8122-7.6454-4.7455-10.282-1.9334-2.6362-4.3062-3.9544-7.1182-3.9546-3.3395 0.00016-6.1516 1.4062-8.4364 4.2182-2.1092 2.6365-3.8668 6.1517-5.2728 10.546-1.2304 4.2184-2.197 8.9639-2.9 14.236-0.52731 5.2729-0.96671 10.458-1.3182 15.555-0.1758 4.9214-0.26368 9.4911-0.26364 13.709 0.17572 4.0426 0.2636 7.1184 0.26364 9.2274-0.00004 1.9334-0.0879 5.0092-0.26364 9.2274-0.00004 4.0425 0.0878 8.6123 0.26364 13.709 0.35148 5.0971 0.79088 10.37 1.3182 15.818 0.703 5.4486 1.6697 10.37 2.9 14.764 1.406 4.394 3.1636 8.085 5.2728 11.073 2.2848 2.8122 5.097 4.2182 8.4364 4.2182 3.3394 0.00002 6.0636-1.406 8.1728-4.2182 2.109-2.9879 3.7788-6.6788 5.0091-11.073 1.406-4.394 2.3727-9.3152 2.9-14.764 0.5272-5.4485 0.87872-10.721 1.0546-15.818 0.35145-5.097 0.43933-9.6667 0.26364-13.709-0.00007-4.2181-0.00007-7.2939 0-9.2274"/> + </g> + </g> + <text id="text4597" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" transform="scale(1 .99999)" line-height="125%" font-size="527.28px" y="986.75238" x="490.1087" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan4599" y="986.75238" x="490.1087">***NUMBER***</tspan></text> + </g> + <g id="text4861"> + <path id="path4885" d="m436.4 886.8c0 10.7-1.6 20.1-4.9 28.2-3.2 8-7.8 14.4-13.8 19-2 1.9-4.4 3.3-7.1 4.3-2.6 1-5.3 1.5-8.1 1.7h-38.4v-106.2h34.3c2.6 0 4.9 0.1 6.8 0.3 2 0.1 3.8 0.4 5.4 0.8s3 1 4.3 1.7 2.6 1.6 4.1 2.7c5.6 4.9 9.9 11.4 12.9 19.5s4.5 17.4 4.5 28m-17.1 0c0-7.2-0.8-13.6-2.4-19.2-1.5-5.6-3.5-9.8-6.2-12.5-1.4-1.3-3-2.3-4.8-3.2-1.8-0.8-3.8-1.3-6-1.3h-19v72.4h16.8c2.7 0 5-0.3 6.8-1 1.9-0.6 3.6-1.7 5.1-3.2 3.2-3.2 5.6-7.5 7.1-13 1.7-5.6 2.6-11.9 2.6-19"/> + </g> +</svg> diff --git a/shields/template_mexd_wide.svg b/shields/template_mexd_wide.svg new file mode 100644 index 00000000..28f09e95 --- /dev/null +++ b/shields/template_mexd_wide.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg id="svg3755" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 798.25 1064.1" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <g id="layer1" transform="translate(-90.929 -189)"> + <g id="g4749"> + <path id="path4549" d="m106.25 0-106.25 106.25v265.72c13.586 23.46 21.375 50.71 21.375 79.78s-7.789 56.28-21.375 79.75c0 251.96 168.31 464.58 398.62 531.6 230.32-67.02 398.63-279.65 398.63-531.6-13.586-23.465-21.375-50.685-21.375-79.75s7.7885-56.316 21.375-79.781v-265.72l-106.28-106.25c-41.94 27.675-92.18 43.781-146.19 43.781-54 0-104.22-16.111-146.16-43.781 0 0.0047843-0.02-0.0047836-0.03 0-41.93 27.675-92.15 43.781-146.15 43.781-54.01 0-104.25-16.106-146.19-43.781z" transform="translate(91.429 189.5)" stroke="#000" fill="#fff"/> + <path id="rect4435" d="m398.59 41.406c-43.288 24.075-93.111 37.812-146.16 37.812-50.749 0-98.578-12.552-140.53-34.719l-76.469 76.469v242c13.65 26.626 21.375 56.804 21.375 88.781 0 31.978-7.725 62.155-21.375 88.781l0.03125 0.0625h-0.03125c0 231.68 152.03 418.77 361.78 485.06l1.4062 0.2238 1.4062-0.2238c209.75-66.24 361.79-253.33 361.79-485.01-13.67-26.64-21.37-56.84-21.37-88.84 0-32.002 7.7053-62.203 21.375-88.844v-241.94l-76.5-76.5c-41.957 22.171-89.777 34.75-140.53 34.75-53.061 0-102.89-13.725-146.19-37.812zm-0.09 39.844c44.236 21.383 93.855 33.406 146.28 33.406 47.323 0 92.364-9.7766 133.22-27.406l48.375 48.375v201h-655.5v-201l48.656-48.656c40.845 17.619 85.881 27.406 133.19 27.406 52.227 0 101.67-11.898 145.78-33.125zm-320.44 290.81h641.12c-9.15 24.84-14.18 51.68-14.18 79.69 0 34.637 7.6789 67.468 21.375 96.938 0.004 0.009-0.004 0.0226 0 0.0312-0.0134 211.8-136.43 374.66-326.19 439.59-0.76615 0.34524-0.61757 0.16327-2.0654 0.65503-2.6616-1.1921-2.8438-1.1105-4.872-1.9988-187.77-65.81-322.36-227.89-322.36-438.28 13.689-29.47 21.339-62.31 21.339-96.94 0-28.011-4.9979-54.852-14.156-79.688z" transform="translate(91.429 189.5)"/> + <g id="text4593"> + <path id="path4702" d="m276.31 505.24v-104.66l-21.091 66.173-21.618-66.173v104.66h-22.409v-176.64h22.409l21.618 62.482 21.091-62.482h22.146v176.64h-22.146"/> + <path id="path4704" d="m336.83 505.24v-176.64h65.119v22.937h-42.71v45.346h28.473v23.464h-28.473v61.955h45.082v22.937h-67.492"/> + <path id="path4706" d="m480.34 505.24-17.4-53.255-17.137 53.255h-24.255l29.791-90.428-28.473-86.21h24.782l15.291 49.037 16.346-49.037h23.991l-28.473 86.21 29.791 90.428h-24.255"/> + <path id="path4708" d="m532.5 505.24v-176.64h22.409v176.64h-22.409"/> + <path id="path4710" d="m664.43 463.58c-0.00009 3.5152-0.088 6.4152-0.26364 8.7001-0.00009 2.2849-0.088 4.3061-0.26364 6.0637-0.17585 1.5819-0.43949 3.0758-0.79092 4.4819-0.3516 1.4061-0.791 2.9-1.3182 4.4819-1.4062 6.5031-4.9213 11.688-10.546 15.555-5.6244 3.691-12.391 5.5364-20.3 5.5364-8.9638 0-16.346-1.8455-22.146-5.5364-5.6243-3.8667-9.8426-9.9304-12.655-18.191-2.4606-7.3819-4.3061-16.873-5.5364-28.473-1.2303-11.776-1.8455-24.782-1.8455-39.019-0.00002-4.0424 0.0879-8.4363 0.26364-13.182 0.17574-4.7454 0.43938-9.4909 0.79091-14.236 0.52727-4.9211 1.0545-9.5788 1.5818-13.973 0.52726-4.3938 1.1424-8.3484 1.8455-11.864 2.2848-13.533 6.2394-23.2 11.864-29 5.8-5.7999 13.973-8.6999 24.518-8.7001 10.018 0.00018 18.103 2.9881 24.255 8.9637 6.1515 5.8002 9.6667 14.149 10.546 25.046h-22.937c-0.35158-3.6908-1.5819-6.4151-3.6909-8.1728-1.9334-1.9332-4.394-2.8999-7.3819-2.9-4.0425 0.00016-7.2062 1.4062-9.491 4.2182-2.2849 2.8123-4.1304 7.1184-5.5364 12.918-0.87884 3.5153-1.5819 7.1184-2.1091 10.809-0.35156 3.5153-0.70308 7.2941-1.0546 11.336-0.1758 3.8668-0.35155 8.1729-0.52728 12.918-0.00003 4.7456-0.00003 10.018 0 15.818-0.00003 6.1517-0.00003 11.6 0 16.346 0.17573 4.5698 0.35148 8.788 0.52728 12.655 0.35148 3.691 0.703 7.2941 1.0546 10.809 0.52724 3.3395 1.2303 6.8546 2.1091 10.546 1.406 5.8001 3.1636 10.282 5.2728 13.446 2.2848 2.9879 5.2727 4.4819 8.9637 4.4819 4.0424 0.00002 7.0303-1.6697 8.9637-5.0091 1.9333-3.3394 2.9-8.9637 2.9-16.873h22.937"/> + <path id="path4712" d="m774.51 416.65c-0.0001 4.7456-0.0001 10.37 0 16.873-0.0001 6.3274-0.35162 12.918-1.0546 19.773-0.52737 6.8546-1.5819 13.621-3.1637 20.3-1.4062 6.5031-3.691 12.391-6.8546 17.664-2.988 5.097-6.9426 9.2274-11.864 12.391-4.7456 3.1637-10.721 4.7455-17.927 4.7455-7.3819 0-13.534-1.5818-18.455-4.7455-4.7455-3.1637-8.7001-7.294-11.864-12.391-2.9879-5.2728-5.2728-11.161-6.8546-17.664-1.4061-6.6788-2.3728-13.446-2.9-20.3-0.52729-6.8546-0.79093-13.446-0.79092-19.773-0.00001-6.3273-0.00001-11.952 0-16.873-0.00001-5.0969-0.00001-10.809 0-17.137-0.00001-6.503 0.26363-13.094 0.79092-19.773 0.70302-6.6787 1.8454-13.182 3.4273-19.509 1.5818-6.5029 3.8667-12.215 6.8546-17.137 2.9879-5.0968 6.8546-9.1393 11.6-12.127 4.9212-3.1635 10.985-4.7453 18.191-4.7455 7.2061 0.00018 13.182 1.582 17.927 4.7455 4.9212 2.9881 8.8758 7.0305 11.864 12.127 3.1636 5.0972 5.4484 10.897 6.8546 17.4 1.5817 6.3275 2.6363 12.831 3.1637 19.509 0.70294 6.679 1.0545 13.27 1.0546 19.773-0.0001 6.3274-0.0001 11.952 0 16.873m-23.464 0c-0.00007-2.4605-0.0879-5.8-0.26364-10.018-0.00007-4.2181-0.17583-8.7879-0.52727-13.709-0.35159-5.0969-0.87887-10.194-1.5818-15.291-0.7031-5.2726-1.7577-10.018-3.1637-14.236-1.2304-4.2181-2.8122-7.6454-4.7455-10.282-1.9334-2.6362-4.3062-3.9544-7.1182-3.9546-3.3395 0.00016-6.1516 1.4062-8.4364 4.2182-2.1092 2.6365-3.8668 6.1517-5.2728 10.546-1.2304 4.2184-2.197 8.9639-2.9 14.236-0.52731 5.2729-0.96671 10.458-1.3182 15.555-0.1758 4.9214-0.26368 9.4911-0.26364 13.709 0.17572 4.0426 0.2636 7.1184 0.26364 9.2274-0.00004 1.9334-0.0879 5.0092-0.26364 9.2274-0.00004 4.0425 0.0878 8.6123 0.26364 13.709 0.35148 5.0971 0.79088 10.37 1.3182 15.818 0.703 5.4486 1.6697 10.37 2.9 14.764 1.406 4.394 3.1636 8.085 5.2728 11.073 2.2848 2.8122 5.097 4.2182 8.4364 4.2182 3.3394 0.00002 6.0636-1.406 8.1728-4.2182 2.109-2.9879 3.7788-6.6788 5.0091-11.073 1.406-4.394 2.3727-9.3152 2.9-14.764 0.5272-5.4485 0.87872-10.721 1.0546-15.818 0.35145-5.097 0.43933-9.6667 0.26364-13.709-0.00007-4.2181-0.00007-7.2939 0-9.2274"/> + </g> + </g> + <text id="text4597" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" transform="scale(1 .99999)" line-height="125%" font-size="527.28px" y="986.75238" x="490.1087" font-family="'Roadgeek 2014 Series B'" fill="#000000"><tspan id="tspan4599" y="986.75238" x="490.1087">***NUMBER***</tspan></text> + </g> + <g id="text4861"> + <path id="path4885" d="m436.4 886.8c0 10.7-1.6 20.1-4.9 28.2-3.2 8-7.8 14.4-13.8 19-2 1.9-4.4 3.3-7.1 4.3-2.6 1-5.3 1.5-8.1 1.7h-38.4v-106.2h34.3c2.6 0 4.9 0.1 6.8 0.3 2 0.1 3.8 0.4 5.4 0.8s3 1 4.3 1.7 2.6 1.6 4.1 2.7c5.6 4.9 9.9 11.4 12.9 19.5s4.5 17.4 4.5 28m-17.1 0c0-7.2-0.8-13.6-2.4-19.2-1.5-5.6-3.5-9.8-6.2-12.5-1.4-1.3-3-2.3-4.8-3.2-1.8-0.8-3.8-1.3-6-1.3h-19v72.4h16.8c2.7 0 5-0.3 6.8-1 1.9-0.6 3.6-1.7 5.1-3.2 3.2-3.2 5.6-7.5 7.1-13 1.7-5.6 2.6-11.9 2.6-19"/> + </g> +</svg> From 4218495b142d8a8f14cc1eca20c365a7c52437fd Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 16 Jul 2017 16:00:34 -0700 Subject: [PATCH 164/200] add canab shield --- shields/shieldgen.php | 10 ++++++++++ shields/template_canab.svg | 4 ++++ shields/template_canab_wide.svg | 4 ++++ shields/template_canab_wide3.svg | 4 ++++ 4 files changed, 22 insertions(+) create mode 100644 shields/template_canab.svg create mode 100644 shields/template_canab_wide.svg create mode 100644 shields/template_canab_wide3.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 8231c3ea..e1a7348b 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,6 +20,16 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { + case 'canab': //uses different shields for 1, 2, 3 digits + $routeNum = $row['route']; + if (strlen($routeNum) > 1) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } + if (strlen($routeNum) > 2) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide3.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'cansph': $region = explode(".", $r)[0]; $routeNum = str_replace(strtoupper($region), "", $row['route']); diff --git a/shields/template_canab.svg b/shields/template_canab.svg new file mode 100644 index 00000000..dea82cb9 --- /dev/null +++ b/shields/template_canab.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="600.22" width="450.23" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 450.23 600.224"><metadata id="metadata514"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs512"><clipPath id="clipPath546" clipPathUnits="userSpaceOnUse"><path id="path548" d="m253.8 378h108v30.321h-108v-30.321z"/></clipPath></defs><path id="path5" d="m0.61477 38.481v523.26c0.03998 20.92 16.946 37.84 37.86 37.87h373.28c20.909-0.03 37.817-16.955 37.859-37.868v-523.26c-0.05-20.919-16.95-37.837-37.86-37.868h-373.28c-20.919 0.03076-37.825 16.949-37.865 37.869" stroke="#000" stroke-width=".99956" fill="#fff"/><text id="routenum" style="text-anchor:middle;text-align:center" xml:space="preserve" transform="scale(1.0012 .99882)" line-height="125%" font-size="301.98px" y="457.19986" x="224.94469" font-family="Roadgeek 2005 Blend C3B" fill="#000000"><tspan id="tspan3326" y="457.19986" x="224.9447" font-family="'Roadgeek 2014 Series EM'" fill="#000000">***NUMBER***</tspan></text> +<rect id="rect11" height="581.12" width="427.6" y="9.557" x="11.317" fill="none"/><path id="path13" fill-rule="evenodd" d="m423.59 442.61v-265.24h-396.94v265.24s-5.6752 44.326 34.729 65.069l163.74 77.917 163.74-77.917c40.402-20.743 34.725-65.068 34.725-65.068m-41.11 52.36-157.35 74.87-157.73-75.04c-30.347-15.59-26.896-49.04-26.749-50.46l0.10486-0.82054v-251.91h368.75v251.82l0.0932 0.92055c0.15729 1.4237 3.6002 34.865-27.119 50.635"/><g id="g542" transform="matrix(3.489 0 0 -3.489 -852.8 1460.8)"><g id="g544" clip-path="url(#clipPath546)"><g id="g550" transform="translate(273.64 384.78)"><path id="path552" d="m0 0c1.359 0.496 3.084 1.22 4.903 2.173 0.245-2.076 0.512-3.584 0.809-4.694-1.332 0.482-3.232 1.256-5.712 2.521m19.642-5.323c-1.051 0.156-2.432 1.59-2.85 3.948-0.753 4.245-0.307 8.434 0.94 14.675 0.236 1.181 1.043 3.227-1.521 3.621-0.814 0.125-0.391-0.276-0.62-1.356-0.986-4.649-4.788-7.998-8.605-10.244-0.399 5.321-0.235 11.232 0.766 14.857 0.845 3.057 1.851 2.494 0.604 3.138-1.312 0.677-2.722-0.218-3.863-2.495-1.14-2.276-6.397-14.645-14.791-22.993-4.296-4.272-8.182-2.072-8.96-1.415-0.633 0.535-0.867-0.29-0.083-1.136 3.476-3.746 8.551-1.598 10.399 0.25 5.107 5.107 11.046 16.097 13.448 20.759-0.222-2.626-0.296-7.03 0.193-12.19-2.6-1.267-4.931-2.012-6.029-2.299-1.191-0.312-1.927-0.798-1.949-1.35-0.024-0.603 0.776-1.114 1.931-1.662 2.058-0.975 8.082-3.823 9.568-4.686 1.271-0.738 1.892-0.161 2.268 0.634 0.492 1.038-0.857 1.637-2.164 2.028-0.502 1.747-0.905 4.1-1.172 6.69 3.063 1.885 6.079 4.396 7.818 7.533-0.438-2.622-1.561-11.54 1.254-15.31 0.62-0.83 1.99-1.738 3.327-1.605 0.628 0.063 0.947 0.476 0.884 0.606s-0.424-0.052-0.793 0.002"/></g><g id="g554" transform="translate(299.44 384.35)"><path id="path556" d="m0 0c-0.987-0.1-2.035-0.191-3.139-0.275 0.415 3.144 2.051 7.514 4.088 6.811 1.175-0.405 0.555-4.086-0.949-6.536m-2.584-2.166c-0.357-0.055-0.652-0.05-0.885-0.008 0.139 0.122 0.227 0.298 0.227 0.508 0 0.133 0.004 0.273 0.012 0.418 0.552 0.024 1.416 0.087 2.444 0.186-0.539-0.593-1.147-1.004-1.798-1.104m12.558 7.474c1.3 1.206 1.945 1.121 2.116 0.795 0.368-0.701-1.162-3.171-4.091-4.524 0.252 1.331 0.952 2.781 1.975 3.729m39.848-7.515c-4.02 0-5.058 3.125-5.252 4.673-0.129 1.027 0.093 2.515-1.684 2.317-1.243-0.138-2.367-2.559-3.943-4.598-1.353-1.75-1.958-1.583-1.643-0.081 0.393 1.883 1.962 6.297 3.759 6.62 0.831 0.149 1.127-1.313 1.51-0.399 0.383 0.915 0.032 2.891-1.828 2.891-1.302 0-2.865-1.38-4.146-2.953-1.117-1.37-6.762-9.678-9.129-7.885-1.107 0.839-1.016 4.253-0.32 8.277 2.808 1.083 5.146 0.728 6.467 0.094 0.652-0.313 0.743-0.267 0.463 0.451-0.41 1.055-2.67 2.702-6.202 1.945-0.083-0.018-0.167-0.038-0.251-0.059 0.284 1.306 0.615 2.633 0.976 3.923 0.33 1.182 1.3 3.228-1.232 3.622-0.805 0.125-0.463-0.265-0.729-1.356-0.49-2.008-1.106-4.611-1.553-7.228-2.081-1.198-4.019-3.2-5.438-5.835 0.246 1.215 0.627 2.558 0.654 3.466 0.027 0.954-0.627 1.166-0.882 1.239-0.554 0.159-1.226-0.117-1.889-1.052-1.551-2.185-3.514-5.641-6.499-7.092-2.139-1.04-3.078 0.007-3.132 1.62 0.423 0.128 0.802 0.263 1.121 0.404 3.878 1.719 5.209 4.311 4.225 5.889-0.935 1.499-3.609 1.044-5.721-1.18-1.039-1.096-1.841-2.979-1.934-4.695-0.895-0.193-1.925-0.365-3.074-0.519 1.821 2.955 1.663 6.951-1 7.623-3.092 0.782-4.654-2.221-5.317-4.717 0.204 2.497 0.604 5.539 1.167 8.361 0.237 1.182 1.044 3.228-1.52 3.621-0.814 0.126-0.688-0.253-0.621-1.355 0.091-1.48-1.547-10.438-0.691-14.374-1.104-0.356-1.551-1.185-0.132-2.061 0.977-0.602 3.129-0.803 5.303 0.269 0.78 0.384 1.454 0.925 2.017 1.56 1.295 0.167 2.656 0.375 3.897 0.622 0.213-1.724 1.338-3.046 3.952-2.803 3.717 0.345 7.018 4.911 8.264 7.112-0.225-2.359-1.759-7.509 0.858-7.244 1.025 0.104 0.579 0.266 0.643 1.153 0.225 3.103 2.81 5.734 5.365 7.346-0.443-3.8-0.289-7.195 1.434-8.272 3.171-1.983 7.662 3.238 10.134 6.431-1.259-2.835-1.971-6.469-0.08-7.022 2.216-0.649 3.964 3.029 6.009 5.844 0.239-2.02 1.586-5.501 7.018-5.501 2.441 0 4.514 0.689 6.05 1.779h-2.418c-0.902-0.539-1.928-0.871-3.026-0.871m2.746 10.666v-9.795h0.28c2.129 1.272 3.558 3.705 3.555 5.709-0.002 1.728-0.919 1.641-0.815 1.885 0.298 0.694 2.463 0.296 2.588-2.147 0.106-2.071-0.977-4.077-2.91-5.447h7.098v9.795h-9.796z"/></g></g></g></svg> diff --git a/shields/template_canab_wide.svg b/shields/template_canab_wide.svg new file mode 100644 index 00000000..cc5bcb59 --- /dev/null +++ b/shields/template_canab_wide.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="600.22" width="450.23" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 450.23 600.224"><metadata id="metadata514"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs512"><clipPath id="clipPath546" clipPathUnits="userSpaceOnUse"><path id="path548" d="m253.8 378h108v30.321h-108v-30.321z"/></clipPath></defs><path id="path5" d="m0.61477 38.481v523.26c0.03998 20.92 16.946 37.84 37.86 37.87h373.28c20.909-0.03 37.817-16.955 37.859-37.868v-523.26c-0.05-20.919-16.95-37.837-37.86-37.868h-373.28c-20.919 0.03076-37.825 16.949-37.865 37.869" stroke="#000" stroke-width=".99956" fill="#fff"/><text id="routenum" style="text-anchor:middle;text-align:center" xml:space="preserve" transform="scale(1.0012 .99882)" line-height="125%" font-size="301.98px" y="457.19986" x="224.94469" font-family="Roadgeek 2005 Blend C3B" fill="#000000"><tspan id="tspan3326" y="457.19986" x="224.9447" font-family="'Roadgeek 2014 Series C'" fill="#000000">***NUMBER***</tspan></text> +<rect id="rect11" height="581.12" width="427.6" y="9.557" x="11.317" fill="none"/><path id="path13" fill-rule="evenodd" d="m423.59 442.61v-265.24h-396.94v265.24s-5.6752 44.326 34.729 65.069l163.74 77.917 163.74-77.917c40.402-20.743 34.725-65.068 34.725-65.068m-41.11 52.36-157.35 74.87-157.73-75.04c-30.347-15.59-26.896-49.04-26.749-50.46l0.10486-0.82054v-251.91h368.75v251.82l0.0932 0.92055c0.15729 1.4237 3.6002 34.865-27.119 50.635"/><g id="g542" transform="matrix(3.489 0 0 -3.489 -852.8 1460.8)"><g id="g544" clip-path="url(#clipPath546)"><g id="g550" transform="translate(273.64 384.78)"><path id="path552" d="m0 0c1.359 0.496 3.084 1.22 4.903 2.173 0.245-2.076 0.512-3.584 0.809-4.694-1.332 0.482-3.232 1.256-5.712 2.521m19.642-5.323c-1.051 0.156-2.432 1.59-2.85 3.948-0.753 4.245-0.307 8.434 0.94 14.675 0.236 1.181 1.043 3.227-1.521 3.621-0.814 0.125-0.391-0.276-0.62-1.356-0.986-4.649-4.788-7.998-8.605-10.244-0.399 5.321-0.235 11.232 0.766 14.857 0.845 3.057 1.851 2.494 0.604 3.138-1.312 0.677-2.722-0.218-3.863-2.495-1.14-2.276-6.397-14.645-14.791-22.993-4.296-4.272-8.182-2.072-8.96-1.415-0.633 0.535-0.867-0.29-0.083-1.136 3.476-3.746 8.551-1.598 10.399 0.25 5.107 5.107 11.046 16.097 13.448 20.759-0.222-2.626-0.296-7.03 0.193-12.19-2.6-1.267-4.931-2.012-6.029-2.299-1.191-0.312-1.927-0.798-1.949-1.35-0.024-0.603 0.776-1.114 1.931-1.662 2.058-0.975 8.082-3.823 9.568-4.686 1.271-0.738 1.892-0.161 2.268 0.634 0.492 1.038-0.857 1.637-2.164 2.028-0.502 1.747-0.905 4.1-1.172 6.69 3.063 1.885 6.079 4.396 7.818 7.533-0.438-2.622-1.561-11.54 1.254-15.31 0.62-0.83 1.99-1.738 3.327-1.605 0.628 0.063 0.947 0.476 0.884 0.606s-0.424-0.052-0.793 0.002"/></g><g id="g554" transform="translate(299.44 384.35)"><path id="path556" d="m0 0c-0.987-0.1-2.035-0.191-3.139-0.275 0.415 3.144 2.051 7.514 4.088 6.811 1.175-0.405 0.555-4.086-0.949-6.536m-2.584-2.166c-0.357-0.055-0.652-0.05-0.885-0.008 0.139 0.122 0.227 0.298 0.227 0.508 0 0.133 0.004 0.273 0.012 0.418 0.552 0.024 1.416 0.087 2.444 0.186-0.539-0.593-1.147-1.004-1.798-1.104m12.558 7.474c1.3 1.206 1.945 1.121 2.116 0.795 0.368-0.701-1.162-3.171-4.091-4.524 0.252 1.331 0.952 2.781 1.975 3.729m39.848-7.515c-4.02 0-5.058 3.125-5.252 4.673-0.129 1.027 0.093 2.515-1.684 2.317-1.243-0.138-2.367-2.559-3.943-4.598-1.353-1.75-1.958-1.583-1.643-0.081 0.393 1.883 1.962 6.297 3.759 6.62 0.831 0.149 1.127-1.313 1.51-0.399 0.383 0.915 0.032 2.891-1.828 2.891-1.302 0-2.865-1.38-4.146-2.953-1.117-1.37-6.762-9.678-9.129-7.885-1.107 0.839-1.016 4.253-0.32 8.277 2.808 1.083 5.146 0.728 6.467 0.094 0.652-0.313 0.743-0.267 0.463 0.451-0.41 1.055-2.67 2.702-6.202 1.945-0.083-0.018-0.167-0.038-0.251-0.059 0.284 1.306 0.615 2.633 0.976 3.923 0.33 1.182 1.3 3.228-1.232 3.622-0.805 0.125-0.463-0.265-0.729-1.356-0.49-2.008-1.106-4.611-1.553-7.228-2.081-1.198-4.019-3.2-5.438-5.835 0.246 1.215 0.627 2.558 0.654 3.466 0.027 0.954-0.627 1.166-0.882 1.239-0.554 0.159-1.226-0.117-1.889-1.052-1.551-2.185-3.514-5.641-6.499-7.092-2.139-1.04-3.078 0.007-3.132 1.62 0.423 0.128 0.802 0.263 1.121 0.404 3.878 1.719 5.209 4.311 4.225 5.889-0.935 1.499-3.609 1.044-5.721-1.18-1.039-1.096-1.841-2.979-1.934-4.695-0.895-0.193-1.925-0.365-3.074-0.519 1.821 2.955 1.663 6.951-1 7.623-3.092 0.782-4.654-2.221-5.317-4.717 0.204 2.497 0.604 5.539 1.167 8.361 0.237 1.182 1.044 3.228-1.52 3.621-0.814 0.126-0.688-0.253-0.621-1.355 0.091-1.48-1.547-10.438-0.691-14.374-1.104-0.356-1.551-1.185-0.132-2.061 0.977-0.602 3.129-0.803 5.303 0.269 0.78 0.384 1.454 0.925 2.017 1.56 1.295 0.167 2.656 0.375 3.897 0.622 0.213-1.724 1.338-3.046 3.952-2.803 3.717 0.345 7.018 4.911 8.264 7.112-0.225-2.359-1.759-7.509 0.858-7.244 1.025 0.104 0.579 0.266 0.643 1.153 0.225 3.103 2.81 5.734 5.365 7.346-0.443-3.8-0.289-7.195 1.434-8.272 3.171-1.983 7.662 3.238 10.134 6.431-1.259-2.835-1.971-6.469-0.08-7.022 2.216-0.649 3.964 3.029 6.009 5.844 0.239-2.02 1.586-5.501 7.018-5.501 2.441 0 4.514 0.689 6.05 1.779h-2.418c-0.902-0.539-1.928-0.871-3.026-0.871m2.746 10.666v-9.795h0.28c2.129 1.272 3.558 3.705 3.555 5.709-0.002 1.728-0.919 1.641-0.815 1.885 0.298 0.694 2.463 0.296 2.588-2.147 0.106-2.071-0.977-4.077-2.91-5.447h7.098v9.795h-9.796z"/></g></g></g></svg> diff --git a/shields/template_canab_wide3.svg b/shields/template_canab_wide3.svg new file mode 100644 index 00000000..da00f2f1 --- /dev/null +++ b/shields/template_canab_wide3.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="600.22" width="450.23" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 450.23 600.224"><metadata id="metadata514"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><defs id="defs512"><clipPath id="clipPath546" clipPathUnits="userSpaceOnUse"><path id="path548" d="m253.8 378h108v30.321h-108v-30.321z"/></clipPath></defs><path id="path5" d="m0.61477 38.481v523.26c0.03998 20.92 16.946 37.84 37.86 37.87h373.28c20.909-0.03 37.817-16.955 37.859-37.868v-523.26c-0.05-20.919-16.95-37.837-37.86-37.868h-373.28c-20.919 0.03076-37.825 16.949-37.865 37.869" stroke="#000" stroke-width=".99956" fill="#fff"/><text id="routenum" style="text-anchor:middle;text-align:center" xml:space="preserve" transform="scale(1.0012 .99882)" line-height="125%" font-size="301.98px" y="457.19986" x="224.94469" font-family="Roadgeek 2005 Blend C3B" fill="#000000"><tspan id="tspan3326" y="457.19986" x="224.9447" font-family="'Roadgeek 2014 Series B'" fill="#000000">***NUMBER***</tspan></text> +<rect id="rect11" height="581.12" width="427.6" y="9.557" x="11.317" fill="none"/><path id="path13" fill-rule="evenodd" d="m423.59 442.61v-265.24h-396.94v265.24s-5.6752 44.326 34.729 65.069l163.74 77.917 163.74-77.917c40.402-20.743 34.725-65.068 34.725-65.068m-41.11 52.36-157.35 74.87-157.73-75.04c-30.347-15.59-26.896-49.04-26.749-50.46l0.10486-0.82054v-251.91h368.75v251.82l0.0932 0.92055c0.15729 1.4237 3.6002 34.865-27.119 50.635"/><g id="g542" transform="matrix(3.489 0 0 -3.489 -852.8 1460.8)"><g id="g544" clip-path="url(#clipPath546)"><g id="g550" transform="translate(273.64 384.78)"><path id="path552" d="m0 0c1.359 0.496 3.084 1.22 4.903 2.173 0.245-2.076 0.512-3.584 0.809-4.694-1.332 0.482-3.232 1.256-5.712 2.521m19.642-5.323c-1.051 0.156-2.432 1.59-2.85 3.948-0.753 4.245-0.307 8.434 0.94 14.675 0.236 1.181 1.043 3.227-1.521 3.621-0.814 0.125-0.391-0.276-0.62-1.356-0.986-4.649-4.788-7.998-8.605-10.244-0.399 5.321-0.235 11.232 0.766 14.857 0.845 3.057 1.851 2.494 0.604 3.138-1.312 0.677-2.722-0.218-3.863-2.495-1.14-2.276-6.397-14.645-14.791-22.993-4.296-4.272-8.182-2.072-8.96-1.415-0.633 0.535-0.867-0.29-0.083-1.136 3.476-3.746 8.551-1.598 10.399 0.25 5.107 5.107 11.046 16.097 13.448 20.759-0.222-2.626-0.296-7.03 0.193-12.19-2.6-1.267-4.931-2.012-6.029-2.299-1.191-0.312-1.927-0.798-1.949-1.35-0.024-0.603 0.776-1.114 1.931-1.662 2.058-0.975 8.082-3.823 9.568-4.686 1.271-0.738 1.892-0.161 2.268 0.634 0.492 1.038-0.857 1.637-2.164 2.028-0.502 1.747-0.905 4.1-1.172 6.69 3.063 1.885 6.079 4.396 7.818 7.533-0.438-2.622-1.561-11.54 1.254-15.31 0.62-0.83 1.99-1.738 3.327-1.605 0.628 0.063 0.947 0.476 0.884 0.606s-0.424-0.052-0.793 0.002"/></g><g id="g554" transform="translate(299.44 384.35)"><path id="path556" d="m0 0c-0.987-0.1-2.035-0.191-3.139-0.275 0.415 3.144 2.051 7.514 4.088 6.811 1.175-0.405 0.555-4.086-0.949-6.536m-2.584-2.166c-0.357-0.055-0.652-0.05-0.885-0.008 0.139 0.122 0.227 0.298 0.227 0.508 0 0.133 0.004 0.273 0.012 0.418 0.552 0.024 1.416 0.087 2.444 0.186-0.539-0.593-1.147-1.004-1.798-1.104m12.558 7.474c1.3 1.206 1.945 1.121 2.116 0.795 0.368-0.701-1.162-3.171-4.091-4.524 0.252 1.331 0.952 2.781 1.975 3.729m39.848-7.515c-4.02 0-5.058 3.125-5.252 4.673-0.129 1.027 0.093 2.515-1.684 2.317-1.243-0.138-2.367-2.559-3.943-4.598-1.353-1.75-1.958-1.583-1.643-0.081 0.393 1.883 1.962 6.297 3.759 6.62 0.831 0.149 1.127-1.313 1.51-0.399 0.383 0.915 0.032 2.891-1.828 2.891-1.302 0-2.865-1.38-4.146-2.953-1.117-1.37-6.762-9.678-9.129-7.885-1.107 0.839-1.016 4.253-0.32 8.277 2.808 1.083 5.146 0.728 6.467 0.094 0.652-0.313 0.743-0.267 0.463 0.451-0.41 1.055-2.67 2.702-6.202 1.945-0.083-0.018-0.167-0.038-0.251-0.059 0.284 1.306 0.615 2.633 0.976 3.923 0.33 1.182 1.3 3.228-1.232 3.622-0.805 0.125-0.463-0.265-0.729-1.356-0.49-2.008-1.106-4.611-1.553-7.228-2.081-1.198-4.019-3.2-5.438-5.835 0.246 1.215 0.627 2.558 0.654 3.466 0.027 0.954-0.627 1.166-0.882 1.239-0.554 0.159-1.226-0.117-1.889-1.052-1.551-2.185-3.514-5.641-6.499-7.092-2.139-1.04-3.078 0.007-3.132 1.62 0.423 0.128 0.802 0.263 1.121 0.404 3.878 1.719 5.209 4.311 4.225 5.889-0.935 1.499-3.609 1.044-5.721-1.18-1.039-1.096-1.841-2.979-1.934-4.695-0.895-0.193-1.925-0.365-3.074-0.519 1.821 2.955 1.663 6.951-1 7.623-3.092 0.782-4.654-2.221-5.317-4.717 0.204 2.497 0.604 5.539 1.167 8.361 0.237 1.182 1.044 3.228-1.52 3.621-0.814 0.126-0.688-0.253-0.621-1.355 0.091-1.48-1.547-10.438-0.691-14.374-1.104-0.356-1.551-1.185-0.132-2.061 0.977-0.602 3.129-0.803 5.303 0.269 0.78 0.384 1.454 0.925 2.017 1.56 1.295 0.167 2.656 0.375 3.897 0.622 0.213-1.724 1.338-3.046 3.952-2.803 3.717 0.345 7.018 4.911 8.264 7.112-0.225-2.359-1.759-7.509 0.858-7.244 1.025 0.104 0.579 0.266 0.643 1.153 0.225 3.103 2.81 5.734 5.365 7.346-0.443-3.8-0.289-7.195 1.434-8.272 3.171-1.983 7.662 3.238 10.134 6.431-1.259-2.835-1.971-6.469-0.08-7.022 2.216-0.649 3.964 3.029 6.009 5.844 0.239-2.02 1.586-5.501 7.018-5.501 2.441 0 4.514 0.689 6.05 1.779h-2.418c-0.902-0.539-1.928-0.871-3.026-0.871m2.746 10.666v-9.795h0.28c2.129 1.272 3.558 3.705 3.555 5.709-0.002 1.728-0.919 1.641-0.815 1.885 0.298 0.694 2.463 0.296 2.588-2.147 0.106-2.071-0.977-4.077-2.91-5.447h7.098v9.795h-9.796z"/></g></g></g></svg> From 6a18c9c2890803b858fad3528e277ed0a6e93d04 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 16 Jul 2017 22:01:18 -0700 Subject: [PATCH 165/200] add cannf (same as usasf) --- shields/shieldgen.php | 2 +- shields/template_cannf.svg | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 shields/template_cannf.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index e1a7348b..a82e8f54 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -339,7 +339,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'usasf': case 'usanp': case 'eursf': case 'usakyp': case 'gbrtr': + case 'usasf': case 'usanp': case 'cannf': case 'eursf': case 'usakyp': case 'gbrtr': $lines = explode(',',preg_replace('/(?!^)[A-Z]{3,}(?=[A-Z][a-z])|[A-Z][a-z]/', ',$0', $row['route'])); $index = 0; foreach($lines as $line) { diff --git a/shields/template_cannf.svg b/shields/template_cannf.svg new file mode 100644 index 00000000..1e797de9 --- /dev/null +++ b/shields/template_cannf.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="640" height="480" viewBox="0 0 640 480"><g transform="scale(-1-1)"><rect width="640" height="480" x="-640" y="-480" rx="30" fill="#006b5d"/><rect ry="26.13" rx="26.26" y="-473.2" x="-632.56" height="466.4" width="625.12" fill="none" stroke="#fff" stroke-linejoin="round" stroke-linecap="square" stroke-width="14.88"/></g><text x="315.42" y="152.87" font-family="'Roadgeek 2014 Series EM'" letter-spacing="0" word-spacing="0" text-anchor="middle" text-align="center" fill="#fff" line-height="100%" font-size="160"><tspan x="315.42" y="152.87"><tspan line-height="84%">***NUMBER1***</tspan></tspan><tspan x="315.42" y="272.87" line-height="84%">***NUMBER2***</tspan><tspan x="315.42" y="392.87"><tspan line-height="84%">***NUMBER3***</tspan></tspan></text></svg> \ No newline at end of file From 782bb1de86bbcd5d420aae3f90dd5fd1ec9260d6 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 16 Jul 2017 22:17:20 -0700 Subject: [PATCH 166/200] add twnf shield --- shields/shieldgen.php | 6 ++++++ shields/template_twnf.svg | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 shields/template_twnf.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index a82e8f54..07bf5d87 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -338,6 +338,12 @@ function generate($r, $force_reload = false) } $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'twnf': + $routeNum = str_replace("F", "", $row['route']); + $routeNum = str_replace("A", "甲", $routeNum); //suffix - hope there's no unicode issues + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'usasf': case 'usanp': case 'cannf': case 'eursf': case 'usakyp': case 'gbrtr': $lines = explode(',',preg_replace('/(?!^)[A-Z]{3,}(?=[A-Z][a-z])|[A-Z][a-z]/', ',$0', $row['route'])); diff --git a/shields/template_twnf.svg b/shields/template_twnf.svg new file mode 100644 index 00000000..135a5996 --- /dev/null +++ b/shields/template_twnf.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="700pt" width="700pt" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 700 700"> + <metadata id="metadata20"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g stroke-width=".09375"> + <path id="path4" d="m320.6 17.6c5.4-1.3 11-1.3 16.5-2.6 9.2 0 18.5-0.2 27.7 0.1 3.1 1.5 6.6 0.4 9.8 1.3 24.2 4 48.4 11.2 69 25 6.2 4 12.1 8.5 17.8 13.2 4.3 2.6 6.9 7.2 11.2 9.8 2.2 1.4 3.8 3.6 5.2 5.8 10.7 10.5 19.5 22.9 27.2 35.8 3.4 6.7 7 13.4 9.4 20.6 1.2 3.5 2.1 7.1 3.7 10.5 3.7 0 7.6-0.6 11.1 0.8 3.7 0.5 7.6-0.6 11.2 0.7 15.5 1.7 30.7 6 45.2 11.8 4.6 2 8.9 4.7 13.7 6.3 5.7 3.3 11.2 6.8 16.9 10.1 4.9 3.3 9.5 7.2 14.4 10.6 3.6 2.7 6.1 6.7 10 9 2.2 1.4 3.8 3.6 5.2 5.8 2.6 3 5.8 5.6 8.4 8.6 3.6 5.1 7.5 9.9 11 15 2.7 4.6 5.4 9.2 8.4 13.6 2 5.7 5.2 10.8 7.7 16.3 5.6 13.3 9 27.3 11.6 41.4 0.2 2.1-0.1 4.3 0.7 6.3 1.1 4.5-0.6 9.4 1.3 13.8 0.2 5.8 0.2 11.7 0 17.6-1.2 2.6-0.9 5.4-0.9 8.2-2.8 20-8.9 39.7-18.3 57.7-1.7 3.3-3.3 6.7-5.1 9.9-3.8 5.3-6.6 11.2-10.8 16.3-2.8 4.1-6.1 7.8-9.1 11.8-4.7 4.9-9.6 9.7-14.5 14.6-4.7 3.7-9.4 7.4-14.2 10.9 0 1.6-0.1 3.1 0.1 4.6 2.8 8.7 5 17.7 6.3 26.8 1.1 3.1 0.1 6.5 1.5 9.6 0.2 10.2 0.2 20.4 0 30.6-1.4 3.1-0.4 6.5-1.5 9.6-5.6 38.4-24.5 74.6-52.6 101.4-6.1 6.4-13.4 11.3-20.2 16.8-6.7 3.5-12.3 8.7-19.3 11.7-6.2 3.3-12.6 6.2-19.2 8.8-6.3 1.8-12.2 5-18.7 6.3-6.1 2.3-12.6 2.9-19 4-3.7 1.3-7.9-0.2-11.6 1.5-4.3 0.3-8.5 0-12.8 0.1-3.4-0.1-7 0.5-10.2-0.9-3.7-0.4-7.5 0.5-11-0.9-4.1-0.1-8-1.2-12-2-6.7-0.6-13-3-19.4-4.6-16-4.9-31.5-12.1-45.1-21.9-1.8-1.3-3.5-2.8-5.5-3.8-2.4-0.4-4.3 1.5-6.2 2.7-23 16.2-50.3 26.5-78.2 29.8-4.4 1.5-9.3-0.4-13.6 1.5-5.6 0.1-11.4 0.7-16.9-0.9-3.1-0.2-6.4 0.4-9.5-0.4-2.5-1-5.3-0.3-7.8-1.2-10.1-1.3-20-4.2-29.7-7.3-18.2-6.9-35.9-15.7-50.9-28.1-3.7-3-7.6-5.7-10.8-9.2-5.1-5.6-11.1-10.3-15.5-16.5-14.8-16.2-25.6-35.8-32.3-56.7-3.3-11.9-6.9-24-7.6-36.4-1.9-4.6 0.3-9.8-1.7-14.4-0.2-3.9-0.2-7.8 0-11.6 1.5-3.6 0.7-7.5 0.9-11.2 1.5-9.7 2.7-19.6 6.1-28.9 0.9-2.8 2.5-5.7 1.8-8.7-4.5-5-10.7-8.1-15.2-13.1-6.1-6.6-13.1-12.3-18.5-19.5-5.4-5.7-9.3-12.7-13.8-19.2-3.2-6.1-7.2-11.9-9.5-18.5-7.3-16-12.3-33.2-14.3-50.7-1.1-2.9-0.3-6.2-0.7-9.2-1.4-3.2-0.8-6.8-0.9-10.2 0.1-3.6-0.2-7.2 0.1-10.8 1.8-4 0.1-8.5 1.5-12.6 2.7-22.1 10.1-43.6 20.8-63.2 2.9-4.2 4.9-8.9 8.2-12.8 3.2-4.5 5.8-9.4 9.6-13.5 2.4-4.1 6.7-6.6 9.2-10.7 1.5-2.5 4-4 6.3-5.7 8.8-9.2 19.6-15.9 30.3-22.7 6-3.1 11.5-6.9 17.9-9.1 17.6-8 36.5-14.1 55.9-15 5.5-1.8 11.4-0.6 17.1-0.9 8.5-24.2 21.2-47.4 39.3-65.8 2.3-3.6 5.5-6.5 8.6-9.4 3.2-1.7 5.2-4.8 8.2-6.8 23.2-18.8 51-32.4 80.6-37.4m-3 32.2c-21 4.8-40.7 14.9-57.2 28.6-27.9 22.8-47.9 56.2-51.8 92.3-10.8-1.5-21.6-2.6-32.5-2-25.8 1.2-51.2 9.5-72.7 23.7-23 15.2-41.7 37.1-52.6 62.4-12.4 28.9-16.2 61.8-8 92.3 10.5 40.8 38.7 77.5 77.4 95-1.4 3.8-3.3 7.3-5.1 11-11 25.2-14.7 53.6-10 80.8 3.6 22.8 13 44.7 26.9 63.1 15 20.3 35.8 36 58.8 46.4 42 18.2 92.6 13.7 131.7-9.9 10.6-6.3 19.9-14.5 28.6-23.3 3.2 1.8 5.4 5.1 8.3 7.5 8.9 8 18.9 14.9 29.5 20.4 29.9 15.7 65.3 20.3 98.2 12.8 30-6.5 57.1-23.5 77.5-46.3 38.3-43.6 46.1-111.7 17.5-162.4 10.3-5.4 20.4-11.3 29.2-18.9 15.7-12.6 28.2-28.9 37.2-46.8 13.4-26.8 18-57.8 13.2-87.4-5.1-29.4-18.6-57.7-40.2-78.7-29.8-29.3-72.7-45.6-114.5-41.5-4.5 0.3-8.8 1.6-13.3 1.8-1.7-12-4.7-23.8-9.4-35-15.1-38-47.5-68.5-86.2-81.7-25.7-9.1-54-10-80.5-4.2z" stroke="#fff" fill="#fff"/> + <path id="path6" d="m317.6 49.8c26.5-5.8 54.8-4.9 80.5 4.2 38.7 13.2 71.1 43.7 86.2 81.7 4.7 11.2 7.7 23 9.4 35 4.5-0.2 8.8-1.5 13.3-1.8 41.8-4.1 84.7 12.2 114.5 41.5 21.6 21 35.1 49.3 40.2 78.7 4.8 29.6 0.2 60.6-13.2 87.4-9 17.9-21.5 34.2-37.2 46.8-8.8 7.6-18.9 13.5-29.2 18.9 28.6 50.7 20.8 118.8-17.5 162.4-20.4 22.8-47.5 39.8-77.5 46.3-32.9 7.5-68.3 2.9-98.2-12.8-10.6-5.5-20.6-12.4-29.5-20.4-2.9-2.4-5.1-5.7-8.3-7.5-8.7 8.8-18 17-28.6 23.3-39.1 23.6-89.7 28.1-131.7 9.9-23-10.4-43.8-26.1-58.8-46.4-13.9-18.4-23.3-40.3-26.9-63.1-4.7-27.2-1-55.6 10-80.8 1.8-3.7 3.7-7.2 5.1-11-38.7-17.5-66.9-54.2-77.4-95-8.2-30.5-4.4-63.4 8-92.3 10.9-25.3 29.6-47.2 52.6-62.4 21.5-14.2 46.9-22.5 72.7-23.7 10.9-0.6 21.7 0.5 32.5 2 3.9-36.1 23.9-69.5 51.8-92.3 16.5-13.7 36.2-23.8 57.2-28.6m26.2 28.7c-23.5 1.5-46.4 10.7-64.4 25.9-15.8 13.2-27.9 30.9-34.3 50.5-7 20.2-7.5 42.5-2.2 63.1-4.9-2.3-9.4-5.5-14.5-7.4-33.2-15.4-73.9-12.5-104.8 7-33.1 20.1-53.9 58.7-52.7 97.4 0.5 22.2 7.8 44.3 20.7 62.4 10.6 14.7 24.8 26.9 41 35.1 13.6 6.5 28.4 10.9 43.5 11.6-3.6 3.5-7.5 6.6-10.8 10.3-14.6 15.6-24.6 35.5-28.3 56.6-3.9 21.8-1.1 44.8 7.9 65 14.8 34 47.5 59.3 84.1 64.9 36.5 6.3 75.4-7.3 100.3-34.6 9.2-10.2 16.8-21.9 21.8-34.7 0.8 1.4 1.5 2.7 2.2 4.1 11.2 26.2 33.2 47.6 59.7 58.3 18.8 7.8 39.9 10.1 60 7 18-3 35.2-10.3 49.7-21.3 16.7-12.5 29.7-29.7 37-49.2 13.5-34.4 8.2-75.6-13.8-105.4-5.4-7.9-12.3-14.5-19.2-21 5.6-0.8 11.2-1.2 16.7-2.5 35.4-7.3 66.1-33.1 79.6-66.6 14.8-35 9.8-77.6-12.8-108.2-12.6-17.4-30.3-31-50.3-38.7-17.3-6.7-36.3-8.7-54.7-6.7-16.2 2.4-31.9 8.1-45.9 16.7 8.9-33.5 1-70.8-20.7-97.7-22.2-28.4-58.9-44.5-94.8-41.9z" stroke="#007a36" fill="#007a36"/> + <path id="path8" d="m343.8 78.5c35.9-2.6 72.6 13.5 94.8 41.9 21.7 26.9 29.6 64.2 20.7 97.7 14-8.6 29.7-14.3 45.9-16.7 18.4-2 37.4 0 54.7 6.7 20 7.7 37.7 21.3 50.3 38.7 22.6 30.6 27.6 73.2 12.8 108.2-13.5 33.5-44.2 59.3-79.6 66.6-5.5 1.3-11.1 1.7-16.7 2.5 6.9 6.5 13.8 13.1 19.2 21 22 29.8 27.3 71 13.8 105.4-7.3 19.5-20.3 36.7-37 49.2-14.5 11-31.7 18.3-49.7 21.3-20.1 3.1-41.2 0.8-60-7-26.5-10.7-48.5-32.1-59.7-58.3-0.7-1.4-1.4-2.7-2.2-4.1-5 12.8-12.6 24.5-21.8 34.7-24.9 27.3-63.8 40.9-100.3 34.6-36.6-5.6-69.3-30.9-84.1-64.9-9-20.2-11.8-43.2-7.9-65 3.7-21.1 13.7-41 28.3-56.6 3.3-3.7 7.2-6.8 10.8-10.3-15.1-0.7-29.9-5.1-43.5-11.6-16.2-8.2-30.4-20.4-41-35.1-12.9-18.1-20.2-40.2-20.7-62.4-1.2-38.7 19.6-77.3 52.7-97.4 30.9-19.5 71.6-22.4 104.8-7 5.1 1.9 9.6 5.1 14.5 7.4-5.3-20.6-4.8-42.9 2.2-63.1 6.4-19.6 18.5-37.3 34.3-50.5 18-15.2 40.9-24.4 64.4-25.9" stroke="#fff" fill="#fff"/> + <path id="path14" d="m407.4 310.7c13.2-2.5 27.6-1.3 39.1 5.8 9.6 5.9 16.3 15.7 19.8 26.2 4.7 13.9 5.7 28.8 5.6 43.3-0.3 16.8-2.9 34-11.1 48.8-5.8 10.5-14.8 19.8-26.5 23.4-14.1 4.3-30.4 2.6-42.5-6-9.7-6.8-15.8-17.5-19.5-28.6-5.1-16.3-5.9-33.5-5-50.4 1.1-15.3 3.9-31.2 12.7-44.2 6.3-9.4 16.3-16.1 27.4-18.3z" stroke="#fff" fill="#fff"/> + </g> + <text id="text2997" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="354.67px" y="503.80768" x="352.8215" font-family="'Roadgeek 2014 Series EM'" line-height="125%" fill="#000000"><tspan id="tspan2999" x="352.8215" y="503.80768">***NUMBER***</tspan></text> +</svg> From 81d9955990fb44d4c022bd96590764aaece186b6 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Mon, 24 Jul 2017 11:45:51 -0700 Subject: [PATCH 167/200] fix canab --- shields/shieldgen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 07bf5d87..375a403b 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -22,6 +22,7 @@ function generate($r, $force_reload = false) switch ($row['systemName']) { case 'canab': //uses different shields for 1, 2, 3 digits $routeNum = $row['route']; + $routeNum = str_replace("AB", "", $routeNum); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } From 581fdb1d2ecd116456ac0f0ff946cae796b31b2b Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Mon, 24 Jul 2017 14:51:23 -0400 Subject: [PATCH 168/200] Fix region-based system mileage totals. Closes #186. --- user/region.php | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/user/region.php b/user/region.php index bf366599..a7b5c9e0 100644 --- a/user/region.php +++ b/user/region.php @@ -346,22 +346,19 @@ function redirect($link) { <tbody> <?php $sql_command = <<<SQL - SELECT - sys.systemName, - sys.tier, - sys.level AS status, - sys.fullName, - COALESCE(ROUND(SUM(cr.mileage), 2), 0) AS clinchedMileage, - COALESCE(ROUND(SUM(r.mileage), 2), 0) AS totalMileage, - COALESCE(ROUND(SUM(cr.mileage) / SUM(r.mileage) * 100, 2), 0) AS percentage - FROM systems as sys - INNER JOIN routes AS r - ON r.systemName = sys.systemName - LEFT JOIN clinchedRoutes AS cr - ON cr.route = r.root AND cr.traveler = '{$tmuser}' - WHERE r.region = '{$region}' - GROUP BY r.systemName - ORDER BY sys.tier, sys.systemName; + SELECT + systems.fullName, + miByRegion.systemName, + ROUND(IFNULL(clinchedByRegion.mileage, 0), 2) as clinchedMileage, + ROUND(miByRegion.mileage, 2) as totalMileage, + ROUND(IFNULL(clinchedByRegion.mileage, 0) / miByRegion.mileage * 100, 2) as percentage + FROM systemMileageByRegion as miByRegion + LEFT JOIN clinchedSystemMileageByRegion as clinchedByRegion ON clinchedByRegion.systemName = miByRegion.systemName AND + clinchedByRegion.region = '{$region}' AND + clinchedByRegion.traveler='{$tmuser}' + LEFT JOIN systems ON miByRegion.systemName = systems.systemName + WHERE miByRegion.region = '{$region}' + ORDER BY percentage DESC; SQL; $res = tmdb_query($sql_command); From bf8d0b811fe196be2fa53a7f580c62706b13a0e9 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Mon, 24 Jul 2017 14:57:09 -0400 Subject: [PATCH 169/200] Fix active/preview driven and clinched percentages. Closes #201. --- user/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/index.php b/user/index.php index b1a0ebdb..d4395829 100644 --- a/user/index.php +++ b/user/index.php @@ -139,7 +139,7 @@ $activePreviewRoutes = $row['total']; $res->free(); - $sql_command = "SELECT COUNT(ccr.route) AS driven, SUM(ccr.clinched) AS clinched, ROUND(COUNT(ccr.route) / ".$activeRoutes." * 100,2) AS drivenPercent, ROUND(SUM(ccr.clinched) / ".$activeRoutes." * 100,2) AS clinchedPercent FROM connectedRoutes AS cr LEFT JOIN clinchedConnectedRoutes AS ccr ON cr.firstRoot = ccr.route AND traveler = '" . $tmuser . "' LEFT JOIN routes ON ccr.route = routes.root LEFT JOIN systems ON routes.systemName = systems.systemName WHERE (systems.level = 'active' OR systems.level = 'preview');"; + $sql_command = "SELECT COUNT(ccr.route) AS driven, SUM(ccr.clinched) AS clinched, ROUND(COUNT(ccr.route) / ".$activePreviewRoutes." * 100,2) AS drivenPercent, ROUND(SUM(ccr.clinched) / ".$activePreviewRoutes." * 100,2) AS clinchedPercent FROM connectedRoutes AS cr LEFT JOIN clinchedConnectedRoutes AS ccr ON cr.firstRoot = ccr.route AND traveler = '" . $tmuser . "' LEFT JOIN routes ON ccr.route = routes.root LEFT JOIN systems ON routes.systemName = systems.systemName WHERE (systems.level = 'active' OR systems.level = 'preview');"; $res = tmdb_query($sql_command); $row = $res->fetch_assoc(); $activePreviewDriven = $row['driven']; From c31a504a139503c489eff5e6da4e2ee9ab208e25 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 25 Jul 2017 14:54:56 -0400 Subject: [PATCH 170/200] Minor format fix. --- user/system.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/system.php b/user/system.php index fd1ce2a3..68c62351 100644 --- a/user/system.php +++ b/user/system.php @@ -327,7 +327,7 @@ echo "<td>" . $row['city'] . "</td>"; echo "<td>" . tm_convert_distance($row['clinchedMileage']) . "</td>"; echo "<td>" . tm_convert_distance($row['totalMileage']) . "</td>"; - echo "<td>" . $row['percentage'] . "%</td></tr>"; + echo "<td>" . $row['percentage'] . "%</td></tr>\n"; } $res->free(); ?> From 0fc9ca93f2e91c74fbabfb874a3f941d13d34585 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 25 Jul 2017 14:55:11 -0400 Subject: [PATCH 171/200] Improved comment. --- lib/tmjsfuncs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 05a55d99..ce395745 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -605,6 +605,8 @@ function addMarker(marker, markerinfo, i) { // note: there is also a labelClickHDX used when selecting start and // end vertices for HDX algorithm visualizations +// this one is only called by the HB when someone clicks on +// a waypoint in the table (not on the map) function labelClick(i, label, lat, lon, errors) { map.panTo(new google.maps.LatLng(lat, lon)); From ace2e0c98138bbb07daa0c91f8cd34dc1c90e26d Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 25 Jul 2017 15:14:32 -0400 Subject: [PATCH 172/200] New callback mechanism to support label clicks in HDX. --- lib/tmjsfuncs.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index ce395745..ce5c1d76 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -594,12 +594,25 @@ function zoomChange() { } } +// variable that would be set by any code that wishes to register +// an additional function to be called on a marker click +var labelClickCallback = null; + +// set that variable +function registerMarkerClickListener(func) { + + labelClickCallback = func; +} + function addMarker(marker, markerinfo, i) { marker.setMap(map); google.maps.event.addListener(marker, 'click', function() { infowindow.setContent(markerinfo); infowindow.open(map, marker); + if (labelClickCallback != null) { + labelClickCallback(i); + } }); } From 3562d8c670a26fb3614e39ab8c78ea8ca51fd9f9 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 27 Jul 2017 15:02:59 -0400 Subject: [PATCH 173/200] Edge length function that accounts for intermediate points. --- lib/tmjsfuncs.js | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index ce5c1d76..69506e03 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -630,6 +630,7 @@ function labelClick(i, label, lat, lon, errors) { // handle clicks on edges function edgeClick(i){ + var v1 = waypoints[graphEdges[i].v1]; var v2 = waypoints[graphEdges[i].v2]; var midlat = (parseFloat(v1.lat) + parseFloat(v2.lat))/2.0; @@ -660,10 +661,46 @@ function markerInfo(i, wpt) { } function edgeInfo(i){ - return '<p style="line-height:160%;"><span style="font-size:24pt; color:black">' + graphEdges[i].label + '</span><br><b>Edge Number: ' + (i) + '<\/b><br><b>Endpoints:<\/b> ' + waypoints[graphEdges[i].v1].label + ' - ' +waypoints[graphEdges[i].v2].label + '<br><b>Distance: </b><span class="miles">' +generateUnit(waypoints[graphEdges[i].v1].lat, waypoints[graphEdges[i].v1].lon, waypoints[graphEdges[i].v2].lat, waypoints[graphEdges[i].v2].lon)+ "</span>"; + + return '<p style="line-height:160%;"><span style="font-size:24pt; color:black">' + + graphEdges[i].label + '</span><br><b>Edge Number: ' + (i) + + '<\/b><br><b>Endpoints:<\/b> ' + + waypoints[graphEdges[i].v1].label + ' <-> ' + + waypoints[graphEdges[i].v2].label + + '<br><b>Distance: </b>' + + edgeLengthInMiles(graphEdges[i]).toFixed(4) + ' mi</p>'; } +// compute the length of an edge in miles +function edgeLengthInMiles(e) { + + if (!e.hasOwnProperty("length")) { + let len = 0.0; + if (e.via == null) { + // no intermediate points: easy case + len = distanceInMiles(waypoints[e.v1].lat, waypoints[e.v1].lon, + waypoints[e.v2].lat, waypoints[e.v2].lon); + } + else { + // account for intermediate points in "via" array + len = distanceInMiles(waypoints[e.v1].lat, waypoints[e.v1].lon, + parseFloat(e.via[0]), parseFloat(e.via[1])); + for (var pos = 0; pos < e.via.length - 2; pos += 2) { + len += distanceInMiles(parseFloat(e.via[pos]), + parseFloat(e.via[pos+1]), + parseFloat(e.via[pos+2]), + parseFloat(e.via[pos+3])); + } + len += distanceInMiles(parseFloat(e.via[e.via.length-2]), + parseFloat(e.via[e.via.length-1]), + waypoints[e.v2].lat, waypoints[e.v2].lon); + } + e.length = len; + } + return e.length; +} + // compute distance in miles between two lat/lon points function distanceInMiles(lat1, lon1, lat2, lon2) { if(lat1 == lat2 && lon1 == lon2) From 1226c83d3dc933a9d496a2564064239b1e9e7664 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 8 Aug 2017 22:06:08 -0400 Subject: [PATCH 174/200] Minor style fix. --- css/travelMapping.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/travelMapping.css b/css/travelMapping.css index ddb52a11..5b7746ee 100644 --- a/css/travelMapping.css +++ b/css/travelMapping.css @@ -53,6 +53,7 @@ table.gratable { margin-left: auto; margin-right: auto; background-color: white; + color: black; } table.gratable td, th { From 8abc6378b5416cc9cc0f93b7c3fe15005e916b98 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 8 Aug 2017 22:06:56 -0400 Subject: [PATCH 175/200] Waypoint number consistency. --- lib/tmjsfuncs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index 69506e03..e04ba578 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -656,7 +656,7 @@ function markerInfo(i, wpt) { } intersections += "</p>"; } - return '<p style="line-height:160%;"><span style="font-size:24pt;color:black;">' + wpt.label + '</span><br><b>Waypoint ' + (i+1) + '<\/b><br><b><a target="_blank" href="http://www.openstreetmap.org/?lat='+wpt.lat+'&lon='+wpt.lon+'">Coords.:<\a><\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; + return '<p style="line-height:160%;"><span style="font-size:24pt;color:black;">' + wpt.label + '</span><br><b>Waypoint ' + i + '<\/b><br><b><a target="_blank" href="http://www.openstreetmap.org/?lat='+wpt.lat+'&lon='+wpt.lon+'">Coords.:<\a><\/b> ' + wpt.lat + '°, ' + wpt.lon + '°<\/p>' + intersections; } From 491caa25b3bd7151bdae13a17e247ee8d8834b19 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Tue, 8 Aug 2017 22:07:26 -0400 Subject: [PATCH 176/200] Fix for #207. --- lib/waypoints.js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/waypoints.js.php b/lib/waypoints.js.php index 191e4d35..88f7352f 100644 --- a/lib/waypoints.js.php +++ b/lib/waypoints.js.php @@ -218,7 +218,7 @@ function select_single_route () $pointnum = $pointnum + 1; continue; } - $sql_command = "SELECT w.root, r.route, r.region, r.banner, r.abbrev, r.city FROM waypoints AS w LEFT JOIN routes AS r ON w.root = r.root WHERE w.latitude='".$row['latitude']."' AND w.longitude='".$row['longitude']."';"; + $sql_command = "SELECT DISTINCT w.root, r.route, r.region, r.banner, r.abbrev, r.city FROM waypoints AS w LEFT JOIN routes AS r ON w.root = r.root WHERE w.latitude='".$row['latitude']."' AND w.longitude='".$row['longitude']."';"; $res2 = tmdb_query($sql_command); if ($res2->num_rows > 1) { echo "waypoints[$pointnum].intersecting = new Array();\n"; From ce2d3e45a09dab8647567782d657921545799c07 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 10 Aug 2017 08:31:02 -0400 Subject: [PATCH 177/200] Convert r= QS param value to lower case. Closes #208. --- lib/waypoints.js.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/waypoints.js.php b/lib/waypoints.js.php index 88f7352f..36ad2ba4 100644 --- a/lib/waypoints.js.php +++ b/lib/waypoints.js.php @@ -199,7 +199,7 @@ function select_route_set () { function select_single_route () { - $routeparam = $_GET['r']; + $routeparam = strtolower($_GET['r']); if (array_key_exists('u', $_GET)) { $tmuser = $_GET['u']; From 9f2874e4315b2f71143beaacf9c0a1b3588bb552 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 10 Aug 2017 13:48:30 -0400 Subject: [PATCH 178/200] Moved Twitter link to 'How to Participate' section of main index. --- index.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/index.php b/index.php index c4f8dddd..b8e0877e 100644 --- a/index.php +++ b/index.php @@ -133,6 +133,12 @@ more information. </p> +<p class="text"> +Project news is also posted on the <a +href="https://twitter.com/TravelMapping">Travel Mapping Twitter feed</a>. +Follow us! +</p> + <p class="heading">What's New with Highway Data?</p> <p class="text"> From 9338b5da84f3d6a401c1030ae9dc0f49387dcdb8 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 20 Aug 2017 12:59:24 -0700 Subject: [PATCH 179/200] add usaar, mtqn --- shields/shieldgen.php | 16 +++++++++++++++- shields/template_mtqn_wide3.svg | 10 ++++++++++ shields/template_mtqn_wide6.svg | 10 ++++++++++ shields/template_usaar.svg | 19 +++++++++++++++++++ shields/template_usaar_wide.svg | 21 +++++++++++++++++++++ 5 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 shields/template_mtqn_wide3.svg create mode 100644 shields/template_mtqn_wide6.svg create mode 100644 shields/template_usaar.svg create mode 100644 shields/template_usaar_wide.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 375a403b..d3ce6106 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -268,7 +268,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***NUMBER***", $routeNum, $svg); break; - case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': case 'mara': case 'tuna': + case 'fraa': case 'fran': case 'frht': case 'spmn': case 'mtqa': case 'glpn': case 'gufn': case 'reun': case 'mara': case 'tuna': case 'mtqn': // replace placeholder, add blank after prefix, use wide svg files $routeNum = str_replace("A", "A ", $row['route']); $routeNum = str_replace("N", "N ", $routeNum); @@ -407,6 +407,20 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", $matches['letter'], $svg); break; } + + case 'usaar': + $matches = []; + $routeNum = str_replace('AR', "", $row['route']); + if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) { + $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***LETTER***", $matches['letter'], $svg); + break; + } + else { + $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***LETTER***", '', $svg); + break; + } default: $region = strtoupper(explode(".", $r)[0]); diff --git a/shields/template_mtqn_wide3.svg b/shields/template_mtqn_wide3.svg new file mode 100644 index 00000000..ecc4af44 --- /dev/null +++ b/shields/template_mtqn_wide3.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" width="200px" height="100px" version="1.1" viewBox="0 0 200 100"> + <g fill-rule="evenodd"> + <rect rx="0" ry="0" width="200" height="100" x="0" y="0" fill="#ffffff"/> + <rect rx="10" ry="10" width="200" height="100" x="0" y="0" fill="#d40000"/> + <text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="90px" line-height="100%" x="0" y="0" font-family="'Roadgeek 2005 Transport Heavy'" fill="#ffffff"> + <tspan x="100" y="80">***NUMBER***</tspan> + </text> + </g> +</svg> diff --git a/shields/template_mtqn_wide6.svg b/shields/template_mtqn_wide6.svg new file mode 100644 index 00000000..f57d12a1 --- /dev/null +++ b/shields/template_mtqn_wide6.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" width="350px" height="100px" version="1.1" viewBox="0 0 350 100"> + <g fill-rule="evenodd"> + <rect rx="0" ry="0" width="350" height="100" x="0" y="0" fill="#ffffff"/> + <rect rx="10" ry="10" width="350" height="100" x="0" y="0" fill="#d40000"/> + <text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="90px" line-height="100%" x="0" y="0" font-family="'Roadgeek 2005 Transport Heavy'" fill="#ffffff"> + <tspan x="175" y="80">***NUMBER***</tspan> + </text> + </g> +</svg> diff --git a/shields/template_usaar.svg b/shields/template_usaar.svg new file mode 100644 index 00000000..d0ae51a7 --- /dev/null +++ b/shields/template_usaar.svg @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata id="metadata7"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g id="layer1"> + <path id="rect1872" style="color:#000000" d="m37.5 0h525c20.78 0 37.5 16.725 37.5 37.5v525c0 20.775-16.725 37.5-37.5 37.5h-525c-20.775 0-37.5-16.72-37.5-37.5v-525c0-20.775 16.725-37.5 37.5-37.5z"/> + <path id="path3797" fill="#fff" d="m91.76 534.55v-40.451h-28.268-28.268v-149.81-149.81l-10.986-82.291c-6.042-45.266-11.155-83.398-11.362-84.743l-0.376-2.447h257.9 257.9l3.3158 1.5513c5.2867 2.4733 7.6976 5.6125 9.2753 12.077 1.1736 4.8087 1.2501 5.9964 0.63112 9.7865-0.38745 2.3725-1.0746 7.1027-1.527 10.512-0.65122 4.9077-1.4548 7.6243-3.8597 13.049-2.8865 6.5105-3.0481 7.1744-3.2553 13.375l-0.21804 4.5243 2.4914 3.7942 2.4914 1.7942h24.869 24.869v15.836 15.836l0.1151 1.083c-1.5771 4.254-1.8845 6.0136-1.8845 10.789l-3.9992 11.706-6.5912 16.556c-7.6315 16.484-8.6426 19.066-9.0554 23.123-0.63099 6.2018-5.1558 26.673-7.5378 34.102-1.0664 3.3262-3.0312 10.34-4.3663 15.586-2.5189 9.8983-2.1889 11.203-9.5516 22.134-1.7596 2.6124-5.5915 8.3705-5.6057 11.332-0.004 0.857-1.6535 6.7841-6.1093 15.616-4.4686 8.857-8.4804 17.666-8.9465 19.646-0.99056 4.2063-16.809 33.215-28.818 52.847-6.8405 11.183-8.7158 14.922-15.499 30.905-4.8476 11.422-8.0643 19.912-8.6518 22.835-0.51428 2.5588-1.3604 6.5608-1.8801 8.8933-0.71617 3.214-0.9481 8.5496-0.95802 22.038l-0.0131 15.797 2.1692 8.6695c1.1931 3.6682 2.7668 9.1443 3.4971 12.169 0.73038 3.0248 1.7457 8.3387 2.2564 9.3643 0.78911 1.585 0.90061 4.5425 0.74306 31.029l-0.18543 29.165-2.0885 6.2724c-1.1488 2.3498-3.3395 5.7575-4.8684 7.5727-1.5288 1.8152-2.7797 3.4941-2.7797 3.731 0 0.6043-1.6885 2.2918-2.3107 2.3093-0.2838 0.008-1.2227 0.5886-2.0865 1.2903-1.5503 1.2595-3.9343 1.2761-186.1 1.2904h-184.54v-40.451z"/> + <text id="text4692" style="text-anchor:middle;text-align:center" xml:space="preserve" font-size="434.15px" line-height="125%" y="446.09152" x="258.92001" font-family="'Roadgeek 2014 Series B'"><tspan id="tspan4694" y="446.09152" x="258.92001">***NUMBER***</tspan></text> + <text id="text3763" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="186.01px" line-height="100%" y="275" x="479.33929" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan3765" y="275" x="479.33929">***LETTER***</tspan></text> + </g> +</svg> diff --git a/shields/template_usaar_wide.svg b/shields/template_usaar_wide.svg new file mode 100644 index 00000000..9f7d11d4 --- /dev/null +++ b/shields/template_usaar_wide.svg @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 750 600" version="1.0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata id="metadata7"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g id="layer1"> + <g id="g3759"> + <path id="rect1872" style="color:#000000" d="m37.5 0h675c20.78 0 37.5 16.725 37.5 37.5v525c0 20.775-16.725 37.5-37.5 37.5h-675c-20.775 0-37.5-16.72-37.5-37.5v-525c0-20.775 16.725-37.5 37.5-37.5z"/> + <path id="path3797" fill="#fff" d="m112.44 534.55v-40.451h-35.642-35.642v-149.81-149.81l-13.856-82.3c-7.618-45.256-14.065-83.388-14.326-84.733l-0.474-2.447h325.18 325.18l4.1808 1.5513c6.6658 2.4733 9.7057 5.6125 11.695 12.077 1.4797 4.8087 1.5762 5.9964 0.79576 9.7865-0.48852 2.3725-1.3549 7.1027-1.9253 10.512-0.8211 4.9077-1.8343 7.6243-4.8665 13.049-3.6395 6.5105-3.8432 7.1744-4.1045 13.375l-0.27492 4.5243 3.1413 3.7942 3.1413 1.7942h31.357 31.357v15.836 15.836l0.14513 1.083c-1.9886 4.254-2.3761 6.0136-2.3761 10.789l-5.0425 11.706-8.3106 16.556c-9.6223 16.484-10.897 19.066-11.418 23.123-0.79559 6.2018-6.5007 26.673-9.5042 34.102-1.3446 3.3262-3.822 10.34-5.5053 15.586-3.176 9.8983-2.7599 11.203-12.043 22.134-2.2187 2.6124-7.0501 8.3705-7.068 11.332-0.005 0.857-2.0849 6.7841-7.703 15.616-5.6343 8.857-10.693 17.666-11.28 19.646-1.249 4.2063-21.194 33.215-36.336 52.847-8.625 11.183-10.989 14.922-19.542 30.905-6.1122 11.422-10.168 19.912-10.909 22.835-0.64844 2.5588-1.7152 6.5608-2.3706 8.8933-0.90299 3.214-1.1954 8.5496-1.2079 22.038l-0.0165 15.797 2.7351 8.6695c1.5043 3.6682 3.4885 9.1443 4.4094 12.169 0.92091 3.0248 2.2012 8.3387 2.845 9.3643 0.99496 1.585 1.1356 4.5425 0.9369 31.029l-0.2338 29.165-2.6334 6.2724c-1.4485 2.3498-4.2106 5.7575-6.1384 7.5727-1.9277 1.8152-3.5048 3.4941-3.5048 3.731 0 0.6043-2.129 2.2918-2.9135 2.3093-0.35783 0.008-1.5417 0.5886-2.6308 1.2903-1.9547 1.2595-4.9606 1.2761-234.64 1.2904h-232.66v-40.451z"/> + </g> + <text id="text2987" style="word-spacing:0px;letter-spacing:0px;text-anchor:end;text-align:end" xml:space="preserve" font-size="447.76px" line-height="100%" y="450" x="569.49927" font-family="Roadgeek 2005 Series C" fill="#000000"><tspan id="tspan2989" y="450" x="569.49927" font-family="Roadgeek 2005 Series B" fill="#000000">000</tspan></text> + <text id="text3763" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="186.01px" line-height="100%" y="275" x="609.33954" font-family="Roadgeek 2005 Series C" fill="#000000"><tspan id="tspan3765" y="275" x="609.33954">A</tspan></text> + </g> +</svg> From 56cf6a49f867fd43f24e8f5ff4591adfc4236b0f Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 20 Aug 2017 14:26:38 -0700 Subject: [PATCH 180/200] fix bad usaar_wide --- shields/template_usaar_wide.svg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shields/template_usaar_wide.svg b/shields/template_usaar_wide.svg index 9f7d11d4..dad7864e 100644 --- a/shields/template_usaar_wide.svg +++ b/shields/template_usaar_wide.svg @@ -15,7 +15,7 @@ <path id="rect1872" style="color:#000000" d="m37.5 0h675c20.78 0 37.5 16.725 37.5 37.5v525c0 20.775-16.725 37.5-37.5 37.5h-675c-20.775 0-37.5-16.72-37.5-37.5v-525c0-20.775 16.725-37.5 37.5-37.5z"/> <path id="path3797" fill="#fff" d="m112.44 534.55v-40.451h-35.642-35.642v-149.81-149.81l-13.856-82.3c-7.618-45.256-14.065-83.388-14.326-84.733l-0.474-2.447h325.18 325.18l4.1808 1.5513c6.6658 2.4733 9.7057 5.6125 11.695 12.077 1.4797 4.8087 1.5762 5.9964 0.79576 9.7865-0.48852 2.3725-1.3549 7.1027-1.9253 10.512-0.8211 4.9077-1.8343 7.6243-4.8665 13.049-3.6395 6.5105-3.8432 7.1744-4.1045 13.375l-0.27492 4.5243 3.1413 3.7942 3.1413 1.7942h31.357 31.357v15.836 15.836l0.14513 1.083c-1.9886 4.254-2.3761 6.0136-2.3761 10.789l-5.0425 11.706-8.3106 16.556c-9.6223 16.484-10.897 19.066-11.418 23.123-0.79559 6.2018-6.5007 26.673-9.5042 34.102-1.3446 3.3262-3.822 10.34-5.5053 15.586-3.176 9.8983-2.7599 11.203-12.043 22.134-2.2187 2.6124-7.0501 8.3705-7.068 11.332-0.005 0.857-2.0849 6.7841-7.703 15.616-5.6343 8.857-10.693 17.666-11.28 19.646-1.249 4.2063-21.194 33.215-36.336 52.847-8.625 11.183-10.989 14.922-19.542 30.905-6.1122 11.422-10.168 19.912-10.909 22.835-0.64844 2.5588-1.7152 6.5608-2.3706 8.8933-0.90299 3.214-1.1954 8.5496-1.2079 22.038l-0.0165 15.797 2.7351 8.6695c1.5043 3.6682 3.4885 9.1443 4.4094 12.169 0.92091 3.0248 2.2012 8.3387 2.845 9.3643 0.99496 1.585 1.1356 4.5425 0.9369 31.029l-0.2338 29.165-2.6334 6.2724c-1.4485 2.3498-4.2106 5.7575-6.1384 7.5727-1.9277 1.8152-3.5048 3.4941-3.5048 3.731 0 0.6043-2.129 2.2918-2.9135 2.3093-0.35783 0.008-1.5417 0.5886-2.6308 1.2903-1.9547 1.2595-4.9606 1.2761-234.64 1.2904h-232.66v-40.451z"/> </g> - <text id="text2987" style="word-spacing:0px;letter-spacing:0px;text-anchor:end;text-align:end" xml:space="preserve" font-size="447.76px" line-height="100%" y="450" x="569.49927" font-family="Roadgeek 2005 Series C" fill="#000000"><tspan id="tspan2989" y="450" x="569.49927" font-family="Roadgeek 2005 Series B" fill="#000000">000</tspan></text> - <text id="text3763" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="186.01px" line-height="100%" y="275" x="609.33954" font-family="Roadgeek 2005 Series C" fill="#000000"><tspan id="tspan3765" y="275" x="609.33954">A</tspan></text> + <text id="text2987" style="word-spacing:0px;letter-spacing:0px;text-anchor:end;text-align:end" xml:space="preserve" font-size="447.76px" line-height="100%" y="450" x="569.49927" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan2989" y="450" x="569.49927" font-family="'Roadgeek 2014 Series B'" fill="#000000">***NUMBER***</tspan></text> + <text id="text3763" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="186.01px" line-height="100%" y="275" x="609.33954" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan3765" y="275" x="609.33954">***LETTER***</tspan></text> </g> </svg> From 4ee04b061f1321a90ccbd5eaa358f2770db391e8 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 20 Aug 2017 14:35:33 -0700 Subject: [PATCH 181/200] wrong quotes --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index d3ce6106..32ee5d05 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -418,7 +418,7 @@ function generate($r, $force_reload = false) } else { $svg = str_replace("***NUMBER***", $routeNum, $svg); - $svg = str_replace("***LETTER***", '', $svg); + $svg = str_replace("***LETTER***", "", $svg); break; } From d1a11a83e9d8c8811d06e03e45a8f128573c5552 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sun, 20 Aug 2017 21:48:28 -0700 Subject: [PATCH 182/200] fix usaar shield for usansf --- shields/shieldgen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 32ee5d05..43529a3b 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -144,6 +144,7 @@ function generate($r, $force_reload = false) $region = strtoupper($region); $svg = str_replace("***NUMBER***", $routeNum, $svg); $svg = str_replace("***SYS***", $region, $svg); + $svg = str_replace("***LETTER***", "", $svg); //hack to kill off the suffix for usaar break; case 'belb': case 'hunm': case 'lvaa': case 'lvap': case 'nldp': case 'nldr': case 'pola': case 'pols': case 'svkd': case 'svkr': From 825104ff70a82e20cdaebcf8049df2e2a58bfc8a Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Mon, 21 Aug 2017 18:19:41 -0700 Subject: [PATCH 183/200] add canqca --- shields/shieldgen.php | 3 ++- shields/template_canqca.svg | 4 ++++ shields/template_canqca_wide.svg | 4 ++++ shields/template_canqca_wide3.svg | 4 ++++ 4 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 shields/template_canqca.svg create mode 100644 shields/template_canqca_wide.svg create mode 100644 shields/template_canqca_wide3.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 43529a3b..fd28fd1f 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -20,9 +20,10 @@ function generate($r, $force_reload = false) } switch ($row['systemName']) { - case 'canab': //uses different shields for 1, 2, 3 digits + case 'canab': case 'canqca': //uses different shields for 1, 2, 3 digits $routeNum = $row['route']; $routeNum = str_replace("AB", "", $routeNum); + $routeNum = str_replace("A-", "", $routeNum); if (strlen($routeNum) > 1) { $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } diff --git a/shields/template_canqca.svg b/shields/template_canqca.svg new file mode 100644 index 00000000..7ea00147 --- /dev/null +++ b/shields/template_canqca.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="Layer_1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="289.02" width="217" version="1.0" xml:space="preserve" y="0" x="0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 217 289.0195313"><metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g5"><path id="path7" fill-rule="evenodd" fill="#fff" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z"/><path id="path9" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z" stroke="#000" stroke-miterlimit="3.8637" fill="none"/></g><path id="path11" fill-rule="evenodd" fill="#003f87" d="m210.5 168.5c0 78.97-88.87 109.64-102 113.74-13.133-4.1-102-34.77-102-113.74v-84h204v84z"/><g id="g13" fill="#af1e2d"><polygon id="polygon15" points="6.5 6.5 210.5 6.5 210.5 78.5 6.5 78.5"/></g><path id="path19" fill-rule="evenodd" fill="#fff" d="m108.5 217.46c1.57 1.57 2.93 3.04 4.02 4.67 3.04 4.53 4.07 9.46 2.37 13.45-3.39 8.43-4.69 10.57-4.69 17.29h2.41c0.15-7.39 3.24-12.33 7.84-13.82 2.03-0.7 4.65-0.35 7.06 1.88 2.98 2.76 3.85 10.36-4.9 11.82 0.93-1.24 0.85-3.95-1-4.91-1.42-0.64-3.02-0.39-3.76 0.16-1.21 0.65-2.37 2.75-2.37 4.87l4.16-0.01v4.18l-8.62-0.01c0.11 2.15 1.41 3.87 3.83 4.83-0.31 0.9-1.77 2.75-3.78 2.62-0.39 1.95-0.77 3.05-2.57 4.82-1.8-1.77-2.18-2.87-2.57-4.82-2.01 0.13-3.47-1.72-3.78-2.62 2.42-0.96 3.72-2.68 3.83-4.83l-8.614 0.01-0.002-4.18 4.156 0.01c0-2.12-1.16-4.22-2.365-4.87-0.747-0.55-2.345-0.8-3.761-0.16-1.851 0.96-1.93 3.67-1.005 4.91-8.745-1.46-7.877-9.06-4.898-11.82 2.407-2.23 5.032-2.58 7.057-1.88 4.602 1.49 7.692 6.43 7.842 13.82h2.41c0-6.72-1.3-8.86-4.68-17.29-1.71-3.99-0.68-8.92 2.36-13.45 1.09-1.63 2.45-3.1 4.02-4.67z"/><text id="text1342" style="text-anchor:middle;text-align:center" line-height="125.00000%" font-size="146px" y="202.79219" x="108.49201" font-family="Roadgeek 2005 Series EM" xml:space="preserve" fill="#ffffff"><tspan id="tspan1344" style="text-anchor:middle;text-align:center" font-size="146px" line-height="125.00000%" y="202.79219" x="108.49201" font-family="'Roadgeek 2014 Series EM'">***NUMBER***</tspan></text> +<path id="path16" d="m21.307 24.879s123.08-8.782 175.22-5.516l0.036-2.119s-134.04-0.939-175.22 5.518l-0.043 2.117z" fill="#fff"/><g id="g18" fill="#fff"><polygon id="polygon20" points="130.81 40.479 19 67.805 45.326 67.805"/><polygon id="polygon22" points="53.102 67.805 75.16 67.805 137.15 38.93 132.87 39.976"/></g><g id="g24" fill="#fff"><polygon id="polygon26" points="139.46 39.214 105.89 67.805 138.72 67.805"/><polygon id="polygon28" points="142.01 67.805 175.03 67.805 139.8 38.93 139.61 39.09"/></g><g fill="#fff"><rect id="rect30" height="6.5" width="1.25" y="22.544" x="38"/><rect id="rect32" height="6.5" width="1.25" y="21.108" x="67.875"/><rect id="rect34" height="6.5" width="1.25" y="19.294" x="97.25"/><rect id="rect36" height="6.5" width="1.25" y="18.858" x="127.75"/><rect id="rect38" height="6.5" width="1.25" y="18.379" x="156.07"/><rect id="rect40" height="6.5" width="1.25" y="18.379" x="186.28"/><path id="path42" d="m21.384 29.923v30.199h10.861l26.226-4.238 6.357-23.046 23.577-1.325 7.417 30.729h9.536l8.213-5.562 7.682-27.285h39.735l8.213 27.814 10.595 6.357h13.511l3.179-39.205c0.01-0.001-145.15-0.265-175.09 5.562zm77.116 25.371l-5.5-24.25h3.25l5.75 19.75-3.5 4.5zm7.39-11.332l-4.555-13.334h10.333l-5.78 13.334z"/></g></svg> diff --git a/shields/template_canqca_wide.svg b/shields/template_canqca_wide.svg new file mode 100644 index 00000000..6828ca2f --- /dev/null +++ b/shields/template_canqca_wide.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="Layer_1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="289.02" width="217" version="1.0" xml:space="preserve" y="0" x="0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 217 289.0195313"><metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g5"><path id="path7" fill-rule="evenodd" fill="#fff" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z"/><path id="path9" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z" stroke="#000" stroke-miterlimit="3.8637" fill="none"/></g><path id="path11" fill-rule="evenodd" fill="#003f87" d="m210.5 168.5c0 78.97-88.87 109.64-102 113.74-13.133-4.1-102-34.77-102-113.74v-84h204v84z"/><g id="g13" fill="#af1e2d"><polygon id="polygon15" points="6.5 6.5 210.5 6.5 210.5 78.5 6.5 78.5"/></g><path id="path19" fill-rule="evenodd" fill="#fff" d="m108.5 217.46c1.57 1.57 2.93 3.04 4.02 4.67 3.04 4.53 4.07 9.46 2.37 13.45-3.39 8.43-4.69 10.57-4.69 17.29h2.41c0.15-7.39 3.24-12.33 7.84-13.82 2.03-0.7 4.65-0.35 7.06 1.88 2.98 2.76 3.85 10.36-4.9 11.82 0.93-1.24 0.85-3.95-1-4.91-1.42-0.64-3.02-0.39-3.76 0.16-1.21 0.65-2.37 2.75-2.37 4.87l4.16-0.01v4.18l-8.62-0.01c0.11 2.15 1.41 3.87 3.83 4.83-0.31 0.9-1.77 2.75-3.78 2.62-0.39 1.95-0.77 3.05-2.57 4.82-1.8-1.77-2.18-2.87-2.57-4.82-2.01 0.13-3.47-1.72-3.78-2.62 2.42-0.96 3.72-2.68 3.83-4.83l-8.614 0.01-0.002-4.18 4.156 0.01c0-2.12-1.16-4.22-2.365-4.87-0.747-0.55-2.345-0.8-3.761-0.16-1.851 0.96-1.93 3.67-1.005 4.91-8.745-1.46-7.877-9.06-4.898-11.82 2.407-2.23 5.032-2.58 7.057-1.88 4.602 1.49 7.692 6.43 7.842 13.82h2.41c0-6.72-1.3-8.86-4.68-17.29-1.71-3.99-0.68-8.92 2.36-13.45 1.09-1.63 2.45-3.1 4.02-4.67z"/><text id="text1342" style="text-anchor:middle;text-align:center" line-height="125.00000%" font-size="146px" y="202.79219" x="108.49201" font-family="Roadgeek 2005 Series EM" xml:space="preserve" fill="#ffffff"><tspan id="tspan1344" style="text-anchor:middle;text-align:center" font-size="146px" line-height="125.00000%" y="202.79219" x="108.49201" font-family="'Roadgeek 2014 Series D'">***NUMBER***</tspan></text> +<path id="path16" d="m21.307 24.879s123.08-8.782 175.22-5.516l0.036-2.119s-134.04-0.939-175.22 5.518l-0.043 2.117z" fill="#fff"/><g id="g18" fill="#fff"><polygon id="polygon20" points="130.81 40.479 19 67.805 45.326 67.805"/><polygon id="polygon22" points="53.102 67.805 75.16 67.805 137.15 38.93 132.87 39.976"/></g><g id="g24" fill="#fff"><polygon id="polygon26" points="139.46 39.214 105.89 67.805 138.72 67.805"/><polygon id="polygon28" points="142.01 67.805 175.03 67.805 139.8 38.93 139.61 39.09"/></g><g fill="#fff"><rect id="rect30" height="6.5" width="1.25" y="22.544" x="38"/><rect id="rect32" height="6.5" width="1.25" y="21.108" x="67.875"/><rect id="rect34" height="6.5" width="1.25" y="19.294" x="97.25"/><rect id="rect36" height="6.5" width="1.25" y="18.858" x="127.75"/><rect id="rect38" height="6.5" width="1.25" y="18.379" x="156.07"/><rect id="rect40" height="6.5" width="1.25" y="18.379" x="186.28"/><path id="path42" d="m21.384 29.923v30.199h10.861l26.226-4.238 6.357-23.046 23.577-1.325 7.417 30.729h9.536l8.213-5.562 7.682-27.285h39.735l8.213 27.814 10.595 6.357h13.511l3.179-39.205c0.01-0.001-145.15-0.265-175.09 5.562zm77.116 25.371l-5.5-24.25h3.25l5.75 19.75-3.5 4.5zm7.39-11.332l-4.555-13.334h10.333l-5.78 13.334z"/></g></svg> diff --git a/shields/template_canqca_wide3.svg b/shields/template_canqca_wide3.svg new file mode 100644 index 00000000..93b23b75 --- /dev/null +++ b/shields/template_canqca_wide3.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="Layer_1" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="289.02" width="217" version="1.0" xml:space="preserve" y="0" x="0" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 217 289.0195313"><metadata id="metadata16"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g5"><path id="path7" fill-rule="evenodd" fill="#fff" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z"/><path id="path9" d="m216.5 0.5v168c0 90-108 120-108 120s-108-30-108-120v-168h216z" stroke="#000" stroke-miterlimit="3.8637" fill="none"/></g><path id="path11" fill-rule="evenodd" fill="#003f87" d="m210.5 168.5c0 78.97-88.87 109.64-102 113.74-13.133-4.1-102-34.77-102-113.74v-84h204v84z"/><g id="g13" fill="#af1e2d"><polygon id="polygon15" points="6.5 6.5 210.5 6.5 210.5 78.5 6.5 78.5"/></g><path id="path19" fill-rule="evenodd" fill="#fff" d="m108.5 217.46c1.57 1.57 2.93 3.04 4.02 4.67 3.04 4.53 4.07 9.46 2.37 13.45-3.39 8.43-4.69 10.57-4.69 17.29h2.41c0.15-7.39 3.24-12.33 7.84-13.82 2.03-0.7 4.65-0.35 7.06 1.88 2.98 2.76 3.85 10.36-4.9 11.82 0.93-1.24 0.85-3.95-1-4.91-1.42-0.64-3.02-0.39-3.76 0.16-1.21 0.65-2.37 2.75-2.37 4.87l4.16-0.01v4.18l-8.62-0.01c0.11 2.15 1.41 3.87 3.83 4.83-0.31 0.9-1.77 2.75-3.78 2.62-0.39 1.95-0.77 3.05-2.57 4.82-1.8-1.77-2.18-2.87-2.57-4.82-2.01 0.13-3.47-1.72-3.78-2.62 2.42-0.96 3.72-2.68 3.83-4.83l-8.614 0.01-0.002-4.18 4.156 0.01c0-2.12-1.16-4.22-2.365-4.87-0.747-0.55-2.345-0.8-3.761-0.16-1.851 0.96-1.93 3.67-1.005 4.91-8.745-1.46-7.877-9.06-4.898-11.82 2.407-2.23 5.032-2.58 7.057-1.88 4.602 1.49 7.692 6.43 7.842 13.82h2.41c0-6.72-1.3-8.86-4.68-17.29-1.71-3.99-0.68-8.92 2.36-13.45 1.09-1.63 2.45-3.1 4.02-4.67z"/><text id="text1342" style="text-anchor:middle;text-align:center" line-height="125.00000%" font-size="146px" y="202.79219" x="108.49201" font-family="Roadgeek 2005 Series EM" xml:space="preserve" fill="#ffffff"><tspan id="tspan1344" style="text-anchor:middle;text-align:center" font-size="146px" line-height="125.00000%" y="202.79219" x="108.49201" font-family="'Roadgeek 2014 Series B'">***NUMBER***</tspan></text> +<path id="path16" d="m21.307 24.879s123.08-8.782 175.22-5.516l0.036-2.119s-134.04-0.939-175.22 5.518l-0.043 2.117z" fill="#fff"/><g id="g18" fill="#fff"><polygon id="polygon20" points="130.81 40.479 19 67.805 45.326 67.805"/><polygon id="polygon22" points="53.102 67.805 75.16 67.805 137.15 38.93 132.87 39.976"/></g><g id="g24" fill="#fff"><polygon id="polygon26" points="139.46 39.214 105.89 67.805 138.72 67.805"/><polygon id="polygon28" points="142.01 67.805 175.03 67.805 139.8 38.93 139.61 39.09"/></g><g fill="#fff"><rect id="rect30" height="6.5" width="1.25" y="22.544" x="38"/><rect id="rect32" height="6.5" width="1.25" y="21.108" x="67.875"/><rect id="rect34" height="6.5" width="1.25" y="19.294" x="97.25"/><rect id="rect36" height="6.5" width="1.25" y="18.858" x="127.75"/><rect id="rect38" height="6.5" width="1.25" y="18.379" x="156.07"/><rect id="rect40" height="6.5" width="1.25" y="18.379" x="186.28"/><path id="path42" d="m21.384 29.923v30.199h10.861l26.226-4.238 6.357-23.046 23.577-1.325 7.417 30.729h9.536l8.213-5.562 7.682-27.285h39.735l8.213 27.814 10.595 6.357h13.511l3.179-39.205c0.01-0.001-145.15-0.265-175.09 5.562zm77.116 25.371l-5.5-24.25h3.25l5.75 19.75-3.5 4.5zm7.39-11.332l-4.555-13.334h10.333l-5.78 13.334z"/></g></svg> From 981a7da6543f6e64d7c0e322ad4885bbd4b7a597 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 18:12:45 -0700 Subject: [PATCH 184/200] add cannba --- shields/template_cannba.svg | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 shields/template_cannba.svg diff --git a/shields/template_cannba.svg b/shields/template_cannba.svg new file mode 100644 index 00000000..eaa86b6d --- /dev/null +++ b/shields/template_cannba.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#006a4d"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="279.4px" line-height="100%" y="400.50003" x="298.83652" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="400.50003" x="298.83652" font-family="'Helvetica World'" fill="#000000">***NUMBER***</tspan></text> +</svg> From 27267ccf3502b0cd579c02d154b8cd86b9be8b11 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 18:52:52 -0700 Subject: [PATCH 185/200] fix font --- shields/template_cannba.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_cannba.svg b/shields/template_cannba.svg index eaa86b6d..611d900d 100644 --- a/shields/template_cannba.svg +++ b/shields/template_cannba.svg @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#006a4d"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="279.4px" line-height="100%" y="400.50003" x="298.83652" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="400.50003" x="298.83652" font-family="'Helvetica World'" fill="#000000">***NUMBER***</tspan></text> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#006a4d"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="279.4px" line-height="100%" y="400.50003" x="298.83652" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="400.50003" x="298.83652" font-family="'Helvetica World,Arial,Serif'" fill="#000000">***NUMBER***</tspan></text> </svg> From 32a1c082512781399ad0a8c566aae0829407b884 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 19:41:43 -0700 Subject: [PATCH 186/200] fix fonts one more time --- shields/template_cannba.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/template_cannba.svg b/shields/template_cannba.svg index 611d900d..ba628556 100644 --- a/shields/template_cannba.svg +++ b/shields/template_cannba.svg @@ -1,4 +1,4 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#006a4d"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="279.4px" line-height="100%" y="400.50003" x="298.83652" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="400.50003" x="298.83652" font-family="'Helvetica World,Arial,Serif'" fill="#000000">***NUMBER***</tspan></text> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#006a4d"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="279.4px" line-height="100%" y="400.50003" x="298.83652" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="400.50003" x="298.83652" font-family="'Helvetica World','Helvetica''Arial','Liberation Sans','Sans'" fill="#000000">***NUMBER***</tspan></text> </svg> From aa76b298733e94bef5e41ef12e125d18625bb192 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 22:01:45 -0700 Subject: [PATCH 187/200] fix usanh --- shields/shieldgen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index fd28fd1f..b73ad744 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -409,6 +409,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", $matches['letter'], $svg); break; } + break; case 'usaar': $matches = []; From 97b1a1d16efa817a92b1dcbe38e9379b31d51149 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 22:05:05 -0700 Subject: [PATCH 188/200] fix usanh again --- shields/shieldgen.php | 1 + 1 file changed, 1 insertion(+) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index b73ad744..25890df8 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -409,6 +409,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", $matches['letter'], $svg); break; } + $svg = str_replace("***NUMBER***", $matches['number'], $svg); break; case 'usaar': From 5d2eaac8f41082150177706c993a9257625cd279 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 22:05:49 -0700 Subject: [PATCH 189/200] fix usanh again --- shields/shieldgen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 25890df8..236f8487 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -409,7 +409,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", $matches['letter'], $svg); break; } - $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***NUMBER***", $routeNum, $svg); break; case 'usaar': From bd71c5e9e354805ebb2033d50c1ce115dba21fde Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Tue, 22 Aug 2017 22:10:50 -0700 Subject: [PATCH 190/200] added note, fix usatx --- shields/shieldgen.php | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 236f8487..ffc7a6a7 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -362,6 +362,23 @@ function generate($r, $force_reload = false) $index++; } break; + + case 'usaar': + $matches = []; + $routeNum = str_replace('AR', "", $row['route']); + if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) { + $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***LETTER***", $matches['letter'], $svg); + break; + } + else { + $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***LETTER***", "", $svg); + break; + } + + //the following cases are meant to fall through to the default + //TODO: fix this case 'usatx': case 'usatxl': case 'usatxs': if ($row['root'] == 'tx.nasa1' or $row['systemName'] != 'usatx' or $row['banner'] != "") { @@ -409,23 +426,7 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", $matches['letter'], $svg); break; } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - break; - case 'usaar': - $matches = []; - $routeNum = str_replace('AR', "", $row['route']); - if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) { - $svg = str_replace("***NUMBER***", $matches['number'], $svg); - $svg = str_replace("***LETTER***", $matches['letter'], $svg); - break; - } - else { - $svg = str_replace("***NUMBER***", $routeNum, $svg); - $svg = str_replace("***LETTER***", "", $svg); - break; - } - default: $region = strtoupper(explode(".", $r)[0]); $routeNum = str_replace($region, "", $row['route']); From 27a9610b82c8e0e5ac24321851b133e282690800 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Wed, 23 Aug 2017 20:46:41 -0700 Subject: [PATCH 191/200] add cannbc, cannbl --- shields/template_cannbc_wide.svg | 4 ++++ shields/template_cannbl_wide.svg | 4 ++++ 2 files changed, 8 insertions(+) create mode 100644 shields/template_cannbc_wide.svg create mode 100644 shields/template_cannbl_wide.svg diff --git a/shields/template_cannbc_wide.svg b/shields/template_cannbc_wide.svg new file mode 100644 index 00000000..445ffd5e --- /dev/null +++ b/shields/template_cannbc_wide.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><rect id="rect3816" style="color:#000000" rx="12.5" ry="12.5" height="550" width="550" y="25.5" x="25.5" fill="#003478"/><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="243.81px" line-height="100%" y="388" x="300.67859" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="388" x="300.67859" font-family="'Helvetica World','Helvetica''Arial','Liberation Sans','Sans'" fill="#000000">***NUMBER***</tspan></text> +</svg> diff --git a/shields/template_cannbl_wide.svg b/shields/template_cannbl_wide.svg new file mode 100644 index 00000000..f8cf8485 --- /dev/null +++ b/shields/template_cannbl_wide.svg @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="601" width="601" version="1.1" xml:space="preserve" xmlns:cc="http://creativecommons.org/ns#" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 601.00003 601.00003" xmlns:dc="http://purl.org/dc/elements/1.1/"><metadata id="metadata4"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/><dc:title/></cc:Work></rdf:RDF></metadata><g id="g3818"><rect id="rect3793" style="color:#000000" rx="37.5" ry="37.5" height="600" width="600" stroke="#999" y=".49425" x=".50575" fill="#fff"/><rect id="rect3795" style="color:#000000" rx="25" ry="25" height="575.5" width="575.5" y="12.75" x="12.75"/></g><path id="path21" fill="#fff" d="m516.18 123.2 21.193-13.615-12.9-17.514-7.4344 3.6622 6.5593 11.738-12.571 8.3861 5.1528 7.3428zm1.7772 274.64-10.062-137.1-17.396-11.106 20.528-51.311-33.521 4.5137 13.355-19.753 6.7533-43.725 9.203-7.831-21.884-22.608h-43.195l-52.87 32.847 13.918-39.179-19.282-32.055-29.663 6.6186-14.474-14.474 6.6099-16.427-121.26 38.732-21.732-11.392v-13.198h-104.11v19.408h-21.177v40.699l-31.289 25.91h-15.914v14.112h20.469l22.346-12.412 10.121 24.848v274.39l-15.038 15.232 38.459 27.399 1.6921 43.557 13.24 17.312 7.0809-11.199 9.009 9.4056 42.159-7.5357-8.0703 13.227 122.54-15.99-11.418-12.597-7.1995-7.9313-11.325-12.487-5.5408-6.1131 2.619-4.6312 18.633-32.914-13.472 37.428 12.613 11.03 9.7333-21.134-4.2776 25.908 23.424 20.478 119.65-26.633 10.879 12.454 27.196-50.175-3.0652 45.191 9.9866-19.972v-9.5479l97.57-50.94-52.55-38.33zm24.342-304.33 12.462-9.6913v-15.275h-10.912l3.216 13.337-8.6394 3.7549 3.8735 7.8731zm-330.79 28.65v33.225c0 1.0691 0.22741 1.7762 0.68222 2.1469 0.45483 0.3535 1.3892 0.65635 2.8205 0.90101v1.3472h-22.364v-1.3472c1.5746-0.27807 2.5974-0.61432 3.0695-1.0023 0.46776-0.40417 0.70272-1.0778 0.70272-2.0456v-46.664c0-1.0357-0.24789-1.7427-0.74151-2.1469-0.49253-0.38692-1.5035-0.707-3.0318-0.95166v-1.3472h28.03v1.3472c-0.73287 0.10993-1.33 0.29424-1.7848 0.56367-0.46345 0.28669-0.71563 0.62296-0.75767 1.0444 0 0.37075 0.15197 0.75767 0.47205 1.1284 0.30286 0.38691 0.859 0.85035 1.6339 1.3979l42.462 30.699v-31.735c0-1.0691-0.23603-1.7762-0.69839-2.1469-0.47206-0.3535-1.4992-0.67359-3.0738-0.95166v-1.3472h22.364v1.3472c-1.4733 0.27807-2.4336 0.62294-2.8539 1.0357-0.43757 0.41279-0.64882 1.1026-0.64882 2.0628v46.664c0 1.0357 0.22742 1.7427 0.68223 2.1469 0.45482 0.38691 1.3892 0.69083 2.8205 0.90101v1.3472h-25.774v-1.3472c0.77491-0.1013 1.3806-0.29424 1.8193-0.56367 0.42895-0.27808 0.64881-0.60679 0.64881-0.98508 0-0.3783-0.15951-0.76631-0.47206-1.1618-0.31255-0.39554-0.83311-0.85035-1.5574-1.372l-44.45-32.191zm81.565 37.62v-1.3472c1.566-0.27807 2.5931-0.61432 3.0652-1.0185 0.47205-0.39554 0.70701-1.0778 0.70701-2.0542v-46.681c0-1.0185-0.2522-1.718-0.7415-2.1135-0.49686-0.38693-1.5067-0.69839-3.0318-0.94305v-1.3472h52.928c8.7902 0 15.645 1.2459 20.545 3.7388 4.9006 2.4929 7.359 5.9525 7.359 10.382 0 2.5424-0.88378 4.7659-2.6351 6.6692-1.76 1.9109-4.4124 3.52-7.9733 4.8165 4.4458 1.5919 7.7211 3.4855 9.8432 5.6917s3.1913 4.8499 3.1913 7.9151c0 5.1366-2.7957 9.1438-8.3861 12.007-5.5828 2.8625-13.472 4.2863-23.677 4.2863h-51.194zm48.499-46.613h-27.483v12.125h29.588c4.698 0 8.1673-0.48823 10.407-1.4733 2.2568-0.97645 3.3852-2.4842 3.3852-4.5137 0-2.2655-1.1791-3.8562-3.52-4.7659-2.3571-0.90856-6.4741-1.372-12.377-1.372zm-1.9529 22.094h-25.53v15.089h24.948c7.8558 0 13.245-0.56366 16.184-1.6921 2.9304-1.137 4.4037-3.0813 4.4037-5.8264 0-2.6437-1.5832-4.5633-4.7325-5.7682-3.1492-1.205-8.2428-1.802-15.273-1.802z"/><text id="text3898" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="208.98px" line-height="100%" y="375.5" x="300.65308" font-family="Sans" fill="#000000"><tspan id="tspan3900" font-weight="bold" y="375.5" x="300.65308" font-family="'Helvetica World','Helvetica''Arial','Liberation Sans','Sans'd" fill="#000000">***NUMBER***</tspan></text> +</svg> From c17ed7ef8e5b46d1bec7f621a05d43f78a9c1183 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Thu, 24 Aug 2017 20:59:25 -0400 Subject: [PATCH 192/200] New color scheme. See http://tm.teresco.org/forum/index.php?topic=2174.0 --- lib/tmjsfuncs.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index e04ba578..e74e937d 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -93,14 +93,14 @@ var traveler; // array of objects that define color codes from names in the DB var colorCodes = new Array(); -colorCodes[0] = { name: "blue", unclinched: "rgb(100,100,255)", clinched: "rgb(0,0,255)" }; +colorCodes[0] = { name: "blue", unclinched: "rgb(100,100,255)", clinched: "rgb(0,0,220)" }; colorCodes[1] = { name: "brown", unclinched: "rgb(153,152,102)", clinched: "rgb(153,102,0)" }; -colorCodes[2] = { name: "red", unclinched: "rgb(255,100,100)", clinched: "rgb(255,0,0)" }; -colorCodes[3] = { name: "yellow", unclinched: "rgb(255,255,128)", clinched: "rgb(225,225,0)" }; -colorCodes[4] = { name: "teal", unclinched: "rgb(100,200,200)", clinched: "rgb(0,200,200)" }; -colorCodes[5] = { name: "green", unclinched: "rgb(100,255,100)", clinched: "rgb(0,255,0)" }; -colorCodes[6] = { name: "magenta", unclinched: "rgb(255,100,255)", clinched: "rgb(255,0,255)" }; -colorCodes[7] = { name: "lightsalmon", unclinched: "rgb(255,200,200)", clinched: "rgb(255,160,122)" }; +colorCodes[2] = { name: "red", unclinched: "rgb(255,100,100)", clinched: "rgb(224,0,0)" }; +colorCodes[3] = { name: "yellow", unclinched: "rgb(255,255,100)", clinched: "rgb(232,176,0)" }; +colorCodes[4] = { name: "teal", unclinched: "rgb(100,200,200)", clinched: "rgb(0,140,160)" }; +colorCodes[5] = { name: "green", unclinched: "rgb(100,200,100)", clinched: "rgb(0,224,0)" }; +colorCodes[6] = { name: "magenta", unclinched: "rgb(255,100,255)", clinched: "rgb(208,0,208)" }; +colorCodes[7] = { name: "lightsalmon", unclinched: "rgb(224,162,162)", clinched: "rgb(240,150,115)" }; // array of custom color codes to be pulled from query string parameter // "colors=" From fb7729fb2ec74252380cfbea279e9adfb1ed990a Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Thu, 24 Aug 2017 18:56:33 -0700 Subject: [PATCH 193/200] fix ME usanh --- shields/shieldgen.php | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index ffc7a6a7..568a781a 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -376,6 +376,27 @@ function generate($r, $force_reload = false) $svg = str_replace("***LETTER***", "", $svg); break; } + + case 'usanh': + $matches = []; + $routeNum = str_replace('NH', "", $row['route']); + if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); + $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***LETTER***", $matches['letter'], $svg); + break; + } + elseif (strlen($routeNum) > 2) { + if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) { + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); + } else { + $svg = file_get_contents("{$dir}/generic_wide.svg"); + } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + $svg = str_replace("***SYS***", $region, $svg); + + break; + } //the following cases are meant to fall through to the default //TODO: fix this @@ -417,16 +438,6 @@ function generate($r, $force_reload = false) break; } - case 'usanh': - $matches = []; - $routeNum = str_replace('NH', "", $row['route']); - if (preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches)) { - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide4.svg"); - $svg = str_replace("***NUMBER***", $matches['number'], $svg); - $svg = str_replace("***LETTER***", $matches['letter'], $svg); - break; - } - default: $region = strtoupper(explode(".", $r)[0]); $routeNum = str_replace($region, "", $row['route']); From adfb585b25b5e4f17efb78cdbb8b92c61d9d1872 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Thu, 24 Aug 2017 19:18:42 -0700 Subject: [PATCH 194/200] fix usanh again --- shields/shieldgen.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 568a781a..826959f8 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -387,16 +387,11 @@ function generate($r, $force_reload = false) break; } elseif (strlen($routeNum) > 2) { - if (file_exists("{$dir}/template_" . $row['systemName'] . "_wide.svg")) { - $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); - } else { - $svg = file_get_contents("{$dir}/generic_wide.svg"); - } - $svg = str_replace("***NUMBER***", $routeNum, $svg); - $svg = str_replace("***SYS***", $region, $svg); - - break; + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide.svg"); } + $svg = str_replace("***NUMBER***", $routeNum, $svg); + + break; //the following cases are meant to fall through to the default //TODO: fix this From 5f48ab452baf7f81da58a827fc3b93bdf129a86e Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Fri, 25 Aug 2017 08:18:24 -0400 Subject: [PATCH 195/200] Complete initial route color update. --- lib/tmjsfuncs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tmjsfuncs.js b/lib/tmjsfuncs.js index e74e937d..1820887c 100644 --- a/lib/tmjsfuncs.js +++ b/lib/tmjsfuncs.js @@ -96,7 +96,7 @@ var colorCodes = new Array(); colorCodes[0] = { name: "blue", unclinched: "rgb(100,100,255)", clinched: "rgb(0,0,220)" }; colorCodes[1] = { name: "brown", unclinched: "rgb(153,152,102)", clinched: "rgb(153,102,0)" }; colorCodes[2] = { name: "red", unclinched: "rgb(255,100,100)", clinched: "rgb(224,0,0)" }; -colorCodes[3] = { name: "yellow", unclinched: "rgb(255,255,100)", clinched: "rgb(232,176,0)" }; +colorCodes[3] = { name: "yellow", unclinched: "rgb(255,216,100)", clinched: "rgb(232,176,0)" }; colorCodes[4] = { name: "teal", unclinched: "rgb(100,200,200)", clinched: "rgb(0,140,160)" }; colorCodes[5] = { name: "green", unclinched: "rgb(100,200,100)", clinched: "rgb(0,224,0)" }; colorCodes[6] = { name: "magenta", unclinched: "rgb(255,100,255)", clinched: "rgb(208,0,208)" }; From 1468262d922fc3fbc8e3909667c1d5f68094b2c8 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Fri, 25 Aug 2017 21:48:42 -0700 Subject: [PATCH 196/200] add nclta --- shields/shieldgen.php | 7 +++++++ shields/template_nclt_wide4.svg | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 shields/template_nclt_wide4.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 826959f8..36d1b1c1 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -278,6 +278,13 @@ function generate($r, $force_reload = false) $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($routeNum) . ".svg"); $svg = str_replace("***NUMBER***", $routeNum, $svg); break; + + case 'nclt': + // replace placeholder, add blank after prefix, use wide svg files + $routeNum = str_replace("T", "RT ", $row['route']); + $svg = file_get_contents("{$dir}/template_" . $row['systemName'] . "_wide" . strlen($routeNum) . ".svg"); + $svg = str_replace("***NUMBER***", $routeNum, $svg); + break; case 'espn': // replace placeholder, add hyphen after prefix, use wide svg files diff --git a/shields/template_nclt_wide4.svg b/shields/template_nclt_wide4.svg new file mode 100644 index 00000000..7d92eadd --- /dev/null +++ b/shields/template_nclt_wide4.svg @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg xmlns="http://www.w3.org/2000/svg" width="250px" height="100px" version="1.1" viewBox="0 0 250 100"> + <g fill-rule="evenodd"> + <rect rx="0" ry="0" width="250" height="100" x="0" y="0" fill="#ffffff"/> + <rect rx="10" ry="10" width="250" height="100" x="0" y="0" fill="#d40000"/> + <text letter-spacing="0px" text-anchor="middle" word-spacing="0px" text-align="center" font-size="90px" line-height="100%" x="0" y="0" font-family="'Roadgeek 2005 Transport Heavy'" fill="#ffffff"> + <tspan x="125" y="80">***NUMBER***</tspan> + </text> + </g> +</svg> From ab42a1a708563279907e2fd5a34f8ef13fce87f0 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Sat, 26 Aug 2017 09:18:46 -0400 Subject: [PATCH 197/200] Proposed HB quick redesign. #221 #222 --- hb/index.php | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/hb/index.php b/hb/index.php index fe983df4..e1caafeb 100644 --- a/hb/index.php +++ b/hb/index.php @@ -43,19 +43,19 @@ #pointbox { position: fixed; left: 0px; - top: 70px; - right: 400px; + top: 30px; + right: 275px; bottom: 0px; - width: 400px; + width: 275px; overflow: auto; } #controlbox { position: fixed; - top: 65px; - bottom: 100px; + top: 30px; + bottom: 60px; height: 100%; - left: 400px; + left: 300px; right: 0px; overflow: auto; padding: 5px; @@ -64,9 +64,9 @@ #map { position: absolute; - top: 100px; + top: 60px; bottom: 0px; - left: 400px; + left: 275px; right: 0px; overflow: hidden; } @@ -87,7 +87,7 @@ } #pointbox table { - width: 75%; + width: 95%; margin-bottom: 15px; } @@ -236,22 +236,13 @@ function initFloatingHeaders($table) { if ($routeparam != "") { require $_SERVER['DOCUMENT_ROOT'] . "/shields/shieldgen.php"; echo "<div id=\"pointbox\">\n"; - echo "<span class='bigshield'>" . generate($routeparam, true) . "</span>"; - echo "<span><a href='/user/mapview.php?rte={$routeInfo['route']}'>View Associated Routes</a></span>"; - - echo "<span>"; - $sql_command = "SELECT region, route, banner, city FROM routes WHERE root = '" .$routeparam. "';"; - $res = tmdb_query($sql_command); - $row = $res->fetch_assoc(); - echo $row['region'] . " " . $row['route']; - if (strlen($row['banner']) > 0) { - echo " " . $row['banner']; - } - if (strlen($row['city']) > 0) { - echo " (" . $row['city'] . ")"; + echo "<span class='bigshield'>" . generate($routeparam, true) . "</span>\n"; + echo "<span>" . $routeInfo['banner']; + if (strlen($routeInfo['city']) > 0) { + echo " (" . $routeInfo['city'] . ")"; } - $res->free(); - echo "</span>"; + echo "</span>\n"; + echo "<span>LIST name: " . $routeInfo['region'] . " " . $routeInfo['route'] . $routeInfo['banner'] . $routeInfo['abbrev'] . "</span>\n"; echo "<table id='routeInfo' class=\"gratable\"><thead><tr><th colspan='2'>Route Stats</th></tr></thead><tbody>"; $sql_command = <<<SQL @@ -278,14 +269,13 @@ function initFloatingHeaders($table) { $averageTraveled = tm_convert_distance($row['avgMileage']). " " . $tmunits; echo <<<HTML <tr><td class="important">Total Length</td><td>{$totalLength}</td></tr> - <tr><td>LIST Name</td><td>{$routeInfo['region']} {$routeInfo['route']}{$routeInfo['banner']}{$routeInfo['abbrev']}</td></tr> <tr title="{$row['drivers']}"><td>Total Drivers</td><td>{$row['numDrivers']} ({$row['drivenPct']} %)</td> <tr class="link" title="{$row['clinchers']}"><td rowspan="2">Total Clinched</td><td>{$row['numClinched']} ({$row['clinchedPct']} %)</td> <tr class="link" title="{$row['clinchers']}"><td>{$row['drivenClinchedPct']} % of drivers</td> s<tr><td>Average Traveled</td><td>{$averageTraveled} ({$row['mileagePct']} %)</td></tr> </tbody></table> HTML; - echo "<table id='waypoints' class=\"gratable\"><thead><tr><th colspan=\"3\">Waypoints</th></tr><tr><th>Coordinates</th><th>Name</th><th title='Percent of people who have driven this route who have driven though this point.'>%</th></tr></thead><tbody>\n"; + echo "<table id='waypoints' class=\"gratable\"><thead><tr><th colspan=\"2\">Waypoints</th></tr><tr><th>Name</th><th title='Percent of people who have driven this route who have driven though this point.'>%</th></tr></thead><tbody>\n"; $sql_command = <<<SQL SELECT pointName, latitude, longitude, driverPercent FROM waypoints @@ -312,7 +302,7 @@ function initFloatingHeaders($table) { if (!startsWith($row['pointName'], "+")) { $colorFactor = $row['driverPercent'] / 100; $colors = [255, 255 - round($colorFactor * 128), 255 - round($colorFactor * 128)]; - echo "<tr onClick='javascript:labelClick(" . $waypointnum . ",\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ",0);'><td>(" . $row['latitude'] . "," . $row['longitude'] . ")</td><td class='link'>" . $row['pointName'] . "</td><td style='background-color: rgb({$colors[0]},{$colors[1]},{$colors[2]})'>{$row['driverPercent']}</td></tr>\n"; + echo "<tr onClick='javascript:labelClick(" . $waypointnum . ",\"" . $row['pointName'] . "\"," . $row['latitude'] . "," . $row['longitude'] . ",0);'><td class='link'>" . $row['pointName'] . "</td><td style='background-color: rgb({$colors[0]},{$colors[1]},{$colors[2]})'>{$row['driverPercent']}</td></tr>\n"; } $waypointnum = $waypointnum + 1; } @@ -325,6 +315,8 @@ function initFloatingHeaders($table) { ENDA; if ($routeparam != "") { echo "<table><tbody><tr><td>"; + echo "<a href='/user/mapview.php?rte={$routeInfo['route']}'>View Associated Routes</a>"; + echo "</td><td>"; echo "<input id=\"showMarkers\" type=\"checkbox\" name=\"Show Markers\" onclick=\"showMarkersClicked()\" checked=\"false\" /> Show Markers "; echo "</td><td>"; echo "<form id=\"userForm\" action=\"/hb/index.php\">"; From 47415f168f73aae0b678b8d88908ffc64834ff64 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Sat, 26 Aug 2017 16:31:22 -0400 Subject: [PATCH 198/200] Font adjustments. --- hb/index.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hb/index.php b/hb/index.php index e1caafeb..90f34eb4 100644 --- a/hb/index.php +++ b/hb/index.php @@ -26,7 +26,7 @@ width: 100%; overflow: hidden; text-align: center; - font-size: 30px; + font-size: 20px; font-family: "Times New Roman", serif; font-style: bold; } @@ -48,6 +48,7 @@ bottom: 0px; width: 275px; overflow: auto; + font-size: 18px; } #controlbox { @@ -59,7 +60,7 @@ right: 0px; overflow: auto; padding: 5px; - font-size: 20px; + font-size: 18px; } #map { @@ -242,7 +243,7 @@ function initFloatingHeaders($table) { echo " (" . $routeInfo['city'] . ")"; } echo "</span>\n"; - echo "<span>LIST name: " . $routeInfo['region'] . " " . $routeInfo['route'] . $routeInfo['banner'] . $routeInfo['abbrev'] . "</span>\n"; + echo "<span>.list name: <span style='font-family:courier'>" . $routeInfo['region'] . " " . $routeInfo['route'] . $routeInfo['banner'] . $routeInfo['abbrev'] . "</span></span>\n"; echo "<table id='routeInfo' class=\"gratable\"><thead><tr><th colspan='2'>Route Stats</th></tr></thead><tbody>"; $sql_command = <<<SQL @@ -272,7 +273,7 @@ function initFloatingHeaders($table) { <tr title="{$row['drivers']}"><td>Total Drivers</td><td>{$row['numDrivers']} ({$row['drivenPct']} %)</td> <tr class="link" title="{$row['clinchers']}"><td rowspan="2">Total Clinched</td><td>{$row['numClinched']} ({$row['clinchedPct']} %)</td> <tr class="link" title="{$row['clinchers']}"><td>{$row['drivenClinchedPct']} % of drivers</td> - s<tr><td>Average Traveled</td><td>{$averageTraveled} ({$row['mileagePct']} %)</td></tr> + <tr><td>Average Traveled</td><td>{$averageTraveled} ({$row['mileagePct']} %)</td></tr> </tbody></table> HTML; echo "<table id='waypoints' class=\"gratable\"><thead><tr><th colspan=\"2\">Waypoints</th></tr><tr><th>Name</th><th title='Percent of people who have driven this route who have driven though this point.'>%</th></tr></thead><tbody>\n"; From 76546a0f67bc3e0e61c45300aaeeb9be31af5958 Mon Sep 17 00:00:00 2001 From: rschen7754 <rschen7754@users.noreply.github.com> Date: Sat, 26 Aug 2017 22:47:47 -0700 Subject: [PATCH 199/200] first draft of usanes --- shields/shieldgen.php | 19 +++++++++++++++++++ shields/template_usanes_link.svg | 27 +++++++++++++++++++++++++++ shields/template_usanes_spur.svg | 27 +++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 shields/template_usanes_link.svg create mode 100644 shields/template_usanes_spur.svg diff --git a/shields/shieldgen.php b/shields/shieldgen.php index 36d1b1c1..d620e41a 100644 --- a/shields/shieldgen.php +++ b/shields/shieldgen.php @@ -400,6 +400,25 @@ function generate($r, $force_reload = false) break; + case 'usanes': + $matches = []; + $routeNum = str_replace('NE', "", $row['route']); + if ($routeNum[0] == 'L') { + $svg_path = "{$dir}/template_usanes_link.svg"; + $svg = file_get_contents($svg_path); + $routeNum = str_replace('L', "", $routeNum); + preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches); + } + else { //S + $svg_path = "{$dir}/template_usanes_spur.svg"; + $svg = file_get_contents($svg_path); + $routeNum = str_replace('S', "", $routeNum); + preg_match('/(?<number>[0-9]+)(?<letter>[A-Za-z]+)/', $routeNum, $matches); + } + $svg = str_replace("***NUMBER***", $matches['number'], $svg); + $svg = str_replace("***LETTER***", $matches['letter'], $svg); + break; + //the following cases are meant to fall through to the default //TODO: fix this diff --git a/shields/template_usanes_link.svg b/shields/template_usanes_link.svg new file mode 100644 index 00000000..bab008de --- /dev/null +++ b/shields/template_usanes_link.svg @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg43960" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata id="metadata43965"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g id="layer1" transform="translate(-554.39 236.83)"> + <g id="g44799"> + <rect id="rect44797" rx="37.5" ry="37.5" height="600" width="600" y="-236.83" x="554.39"/> + <path id="rect44794" d="m25 25h550l-100 550h-350z" transform="translate(554.39 -236.83)" fill="#fff"/> + </g> + <text id="text44828" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="334.82px" line-height="100%" y="63.171711" x="798.16663" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan44830" y="63.171711" x="798.16663">***NUMBER***</tspan></text> + <text id="text44842" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="251.87px" line-height="100%" y="63.172192" x="1007.9865" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan44844" y="63.172192" x="1007.9865">***LETTER***</tspan></text> + <g id="text45180"> + <path id="path45213" d="m740.19 238.17v-99.702h14.286v86.458h36.458v13.244h-50.744"/> + <path id="path45215" d="m805 238.17v-99.702h13.988v99.702h-13.988"/> + <path id="path45217" d="m886.13 238.17-30.804-66.815v66.815h-14.286v-99.702h14.286l27.381 59.821v-59.821h14.286v99.702h-10.863"/> + <path id="path45219" d="m959.56 238.17-17.56-48.661-9.0774 16.815v31.845h-14.286v-99.702h14.286v39.881l22.768-39.881h16.518l-20.685 34.97 23.065 64.732h-15.03"/> + </g> + </g> +</svg> diff --git a/shields/template_usanes_spur.svg b/shields/template_usanes_spur.svg new file mode 100644 index 00000000..46d1fdcf --- /dev/null +++ b/shields/template_usanes_spur.svg @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg id="svg43960" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 600 600" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"> + <metadata id="metadata43965"> + <rdf:RDF> + <cc:Work rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/> + <dc:title/> + </cc:Work> + </rdf:RDF> + </metadata> + <g id="layer1" transform="translate(-554.39 236.83)"> + <g id="g44799"> + <rect id="rect44797" rx="37.5" ry="37.5" height="600" width="600" y="-236.83" x="554.39"/> + <path id="rect44794" d="m25 25h550l-100 550h-350z" transform="translate(554.39 -236.83)" fill="#fff"/> + </g> + <text id="text44828" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="334.82px" line-height="100%" y="63.171711" x="798.16663" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan44830" y="63.171711" x="798.16663">***NUMBER***</tspan></text> + <text id="text44842" style="word-spacing:0px;letter-spacing:0px;text-anchor:middle;text-align:center" xml:space="preserve" font-size="251.87px" line-height="100%" y="63.172192" x="1007.9865" font-family="'Roadgeek 2014 Series C'" fill="#000000"><tspan id="tspan44844" y="63.172192" x="1007.9865">***LETTER***</tspan></text> + <g id="text45180"> + <path id="path45185" d="m772.76 210.94c-0.00006 4.0675-0.7441 7.8869-2.2321 11.458-1.389 3.4722-3.3731 6.498-5.9524 9.0774-2.4802 2.5794-5.4068 4.6627-8.7798 6.25-3.2738 1.4881-6.8453 2.2321-10.714 2.2321-4.3651 0-8.2838-0.84326-11.756-2.5298s-6.3988-3.9682-8.7798-6.8452-4.2163-6.2004-5.506-9.9702-1.9345-7.6885-1.9345-11.756h13.988c-0.00002 2.0834 0.24799 4.1667 0.74404 6.25 0.59522 1.9842 1.4385 3.8195 2.5298 5.506 1.1904 1.5873 2.6289 2.877 4.3155 3.869 1.7857 0.99208 3.9186 1.4881 6.3988 1.4881 1.8849 0.00002 3.6706-0.39681 5.3572-1.1905 1.7857-0.79364 3.2738-1.8849 4.4643-3.2738 1.2896-1.3889 2.2817-2.9762 2.9762-4.7619 0.7936-1.8849 1.1904-3.8194 1.1905-5.8036-0.00005-2.877-0.59529-5.4067-1.7857-7.5893-1.1905-2.2817-3.2738-4.5635-6.25-6.8452-0.49607-0.49599-0.69448-0.74401-0.59523-0.74405 0.0992-0.0992-0.19846-0.39678-0.89286-0.89286-0.69448-0.49598-2.1826-1.4384-4.4643-2.8274-2.1826-1.488-5.8036-3.9682-10.863-7.4405-4.0675-2.7777-7.1429-6.0019-9.2262-9.6726-1.9841-3.7698-2.9762-7.8868-2.9762-12.351-0.00001-3.5714 0.64483-6.8948 1.9345-9.9702 1.2897-3.1745 3.0754-5.9523 5.3571-8.3333 2.3809-2.3809 5.1091-4.2162 8.1845-5.506 3.0754-1.3888 6.3988-2.0832 9.9702-2.0833 3.5714 0.0001 6.8452 0.64494 9.8214 1.9345 3.0754 1.2898 5.7043 3.0755 7.8869 5.3572 2.2817 2.2818 4.0674 5.01 5.3571 8.1845 1.3888 3.1747 2.1329 6.6469 2.2321 10.417h-13.69c-0.19846-3.4722-1.3889-6.2499-3.5714-8.3333-2.1826-2.0832-4.8612-3.1249-8.0357-3.125-3.2738 0.00009-6.0516 1.0914-8.3333 3.2738-2.2818 2.1826-3.4226 4.9108-3.4226 8.1845-0.00002 2.4802 0.64482 4.5636 1.9345 6.25 1.2896 1.6866 3.7698 3.5715 7.4405 5.6548 9.623 5.5556 16.617 11.21 20.982 16.964 4.4642 5.754 6.6964 12.252 6.6964 19.494"/> + <path id="path45187" d="m845.4 166.45c-0.00007 9.127-2.2818 16.071-6.8452 20.833-4.4643 4.762-10.913 7.1429-19.345 7.1429h-15.476v43.75h-14.286v-99.702h29.762c3.869 0.0001 7.3908 0.69455 10.565 2.0833 3.2738 1.2898 6.0515 3.1747 8.3333 5.6548 2.3809 2.381 4.1666 5.3076 5.3572 8.7798 1.2896 3.4723 1.9344 7.2917 1.9345 11.458m-13.988 0c-0.00006-4.1666-1.1905-7.5396-3.5714-10.119-2.381-2.5793-5.506-3.869-9.375-3.869h-14.732v28.274h14.732c4.1666 0.00006 7.3412-1.24 9.5238-3.7202 2.2817-2.4801 3.4226-6.0019 3.4226-10.565"/> + <path id="path45189" d="m915.16 208.41c-0.00006 1.9842-0.0993 3.7699-0.29762 5.3571-0.0993 1.5873-0.29768 3.0754-0.59523 4.4643-0.29769 1.2897-0.69451 2.5794-1.1905 3.869-0.4961 1.2897-1.0913 2.5794-1.7857 3.869-2.4802 4.0675-5.9028 7.4405-10.268 10.119-4.2659 2.5794-8.7798 3.869-13.542 3.869-4.9604 0-9.6726-1.2897-14.137-3.869-4.3651-2.5794-7.7877-5.9524-10.268-10.119-0.69446-1.2897-1.2897-2.5794-1.7857-3.869-0.49605-1.2897-0.89287-2.5794-1.1905-3.869-0.29763-1.3889-0.54565-2.877-0.74405-4.4643-0.0992-1.5873-0.14882-3.373-0.14881-5.3571v-69.94h14.286v71.726c-0.00003 4.7619 1.2896 8.5814 3.869 11.458 2.5793 2.877 5.9524 4.3155 10.119 4.3155 3.869 0.00002 7.0436-1.4385 9.5238-4.3155 2.5793-2.877 3.869-6.6964 3.869-11.458v-71.726h14.286v69.94"/> + <path id="path45191" d="m978.03 238.17-13.244-46.875h-13.69v46.875h-14.286v-99.702h29.762c3.869 0.0001 7.3908 0.64494 10.565 1.9345 3.2738 1.2898 6.0515 3.0755 8.3333 5.3571 2.3809 2.2818 4.1666 5.1092 5.3572 8.4821 1.2896 3.2739 1.9344 6.8949 1.9345 10.863-0.00007 5.9524-1.1905 11.012-3.5714 15.179-2.381 4.1667-5.9524 7.1429-10.714 8.9286l14.286 48.958h-14.732m0.74405-73.065c-0.00006-3.869-1.1905-6.9444-3.5714-9.2262-2.381-2.2817-5.506-3.4225-9.375-3.4226h-14.732v25.149h14.732c4.1666 0.00006 7.3412-1.0416 9.5238-3.125 2.2817-2.1825 3.4226-5.3075 3.4226-9.375"/> + </g> + </g> +</svg> From 99a408fc17763c7420a8868fc352f632d85e4f41 Mon Sep 17 00:00:00 2001 From: Jim Teresco <terescoj@gmail.com> Date: Sun, 27 Aug 2017 22:44:21 -0400 Subject: [PATCH 200/200] Minor rewording. --- credits.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credits.php b/credits.php index 60678c80..c1d2503e 100644 --- a/credits.php +++ b/credits.php @@ -15,7 +15,7 @@ <p class="text">Travel Mapping is the successor project to the dormant <a href="http://cmap.m-plex.com">Clinched Highway Mapping</a> (CHM) project, developed and operated by Timothy Reichard. -Some underlying code and the initial highway data are from CHM.</p> +Some underlying code and the initial highway data are based on CHM.</p> <p class="heading">Highway Data Sources</p>