From af787427e19ebaa3c8d0272d8e93a665520b1e46 Mon Sep 17 00:00:00 2001 From: Clifford Date: Wed, 23 Jul 2014 12:50:53 -0500 Subject: [PATCH] Fix "Directions" link Examples: (without this fix) http://maps.google.com/maps?f=d&q=7502+East+83rd+Street,+Tulsa,+OK+74133,+USA redirects to https://www.google.com/maps/preview?f=d&q=7502+East+83rd+Street,+Tulsa,+OK+74133,+USA which then redirects to https://www.google.com/maps/dir///@36.2928559,-95.8048779,12z/data=!3m1!4b1!4m3!4m2!1m0!1m0 (with this fix) http://maps.google.com/maps?q=7502+East+83rd+Street,+Tulsa,+OK+74133,+USA redirects to https://www.google.com/maps/preview?q=7502+East+83rd+Street,+Tulsa,+OK+74133,+USA and works as intended --- examples/gcm/js/cnMapFilter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/gcm/js/cnMapFilter.js b/examples/gcm/js/cnMapFilter.js index ca81075..c779046 100644 --- a/examples/gcm/js/cnMapFilter.js +++ b/examples/gcm/js/cnMapFilter.js @@ -68,7 +68,7 @@ return this.validCoords ? this.lt + "," + this.lg : ''; }; EventClass.prototype.getDirectionsUrlStr = function(){ - return 'http://maps.google.com/maps?f=d&q=' + this.addrToGoogle.replace(/ /g, '+').replace(/"/g, '%22'); + return 'http://maps.google.com/maps?q=' + this.addrToGoogle.replace(/ /g, '+').replace(/"/g, '%22'); }; EventClass.prototype.insideCurMap = function(mapbox){ return this.validCoords ? mapbox.contains(new google.maps.LatLng(this.lt, this.lg)) : false;