Skip to content

Commit

Permalink
OSM directions route should use listing location as an end point - CH…
Browse files Browse the repository at this point in the history
…ANGED
  • Loading branch information
kprajapatii committed Feb 16, 2024
1 parent 4973023 commit 26b3341
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
10 changes: 7 additions & 3 deletions assets/leaflet/routing/leaflet-routing-machine.js
Original file line number Diff line number Diff line change
Expand Up @@ -2235,9 +2235,13 @@
if (!this._waypoints[i].latLng) return false;
return true
},
getWaypoints: function() {
var i, wps = [];
for (i = 0; i < this._waypoints.length; i++) wps.push(this._waypoints[i]);
getWaypoints: function() {/* CHANGE: Switch inttial to destination */
var i, wps = [], gdReverse = 0;
for (i = 0; i < this._waypoints.length; i++) {
wps.push(this._waypoints[i]);
if (i > 0 && this._waypoints[i].latLng) gdReverse++;
}
if (gdReverse > 0) wps.reverse();
return wps
},
setWaypoints: function(waypoints) {
Expand Down
2 changes: 1 addition & 1 deletion assets/leaflet/routing/leaflet-routing-machine.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ We don't offer free trials, but we have a 30-day money-back guarantee if you are

__WARNING: GDv2 is a significant update over GDv1 and may require manual work, such as adding widgets to sidebars to recreate your current layout. As always, we recommend trying this on a staging site first. [Learn more](https://docs.wpgeodirectory.com/article/260-upgrading-from-gdv1-to-gdv2)__

= GeoDirectory v2.3.41 - TBD =
* OSM directions route should use listing location as an end point - CHANGED

= GeoDirectory v2.3.40 - 2024-02-15 =
* Custom single post map is not loading on non GD pages - FIXED
* PHP 8.2 compatibility changes in Emogrifier class - CHANGED
Expand Down

0 comments on commit 26b3341

Please sign in to comment.