<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>
<p dir="auto">My comments are all cosmetic, around making naming consistent.</p>
<p dir="auto">I'm open to arguments that we shouldn't have the prefix, but we should be consistent in either having it or not having it - whether to have it really comes down to whether we're likely to have multiple instances of OSRM or Valhalla at any point...</p><hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3848#discussion_r1055604004">config/locales/en.yml</a>:</p>
<pre style='color:#555'>> @@ -2927,6 +2927,9 @@ en:
graphhopper_bicycle: "Bicycle (GraphHopper)"
graphhopper_car: "Car (GraphHopper)"
graphhopper_foot: "Foot (GraphHopper)"
+ valhalla_bicycle: "Bicycle (Valhalla)"
+ valhalla_car: "Car (Valhalla)"
+ valhalla_foot: "Foot (Valhalla)"
</pre>
<p dir="auto">Can we make the prefix here <code class="notranslate">fossgis_valhalla</code> please, for consistency with other references to this engine?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3848#discussion_r1055606999">app/assets/javascripts/index/directions/osrm.js</a>:</p>
<pre style='color:#555'>> // Doesn't yet support hints
-function FOSSGISEngine(id, vehicleType) {
+function OSRMEngine(id, vehicleType) {
</pre>
<p dir="auto">Can we have this <code class="notranslate">FOSSGISOSRMEngine</code> please? and also rename the file to <code class="notranslate">fossgis_osrm.js</code>?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3848#discussion_r1055607364">app/assets/javascripts/index/directions/valhalla.js</a>:</p>
<pre style='color:#555'>> @@ -0,0 +1,112 @@
+function ValhallaEngine(id, costing) {
</pre>
<p dir="auto">Can we have this <code class="notranslate">FOSSGISValhallaEngine</code> please? and also rename the file to <code class="notranslate">fossgis_valhalla.js</code>?</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3848#discussion_r1055610101">app/assets/javascripts/index/directions/valhalla.js</a>:</p>
<pre style='color:#555'>> + });
+ } else {
+ callback(true);
+ }
+ },
+ error: function () {
+ callback(true);
+ }
+ });
+ }
+ };
+}
+
+ OSM.Directions.addEngine(new ValhallaEngine("valhalla_car", "auto"), true);
+ OSM.Directions.addEngine(new ValhallaEngine("valhalla_bicycle", "bicycle"), true);
+ OSM.Directions.addEngine(new ValhallaEngine("valhalla_foot", "pedestrian"), true);
</pre>
<p dir="auto">Can we add a <code class="notranslate">fossgis_</code> prefix to the engine names here please?</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3848#pullrequestreview-1227885017">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPHA3TAZR2YRDRLH5DWOR3LNANCNFSM6AAAAAATBFJZFE">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLKTMR4HMSNW4NGJNYLWOR3LNA5CNFSM6AAAAAATBFJZFGWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTSJGAE5S.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/3848/review/1227885017</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3848#pullrequestreview-1227885017",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3848#pullrequestreview-1227885017",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>