6.0.0-RC7
6/29/26

[#544] Correct mapquest selection for Canada
Summary Correct mapquest selection for Canada
Queue Turba
Queue Version 1.2.2
Type Bug
State Resolved
Priority 1. Low
Owners
Requester davidc (at) advan (dot) ca
Created 9/3/04 (7969 days ago)
Due
Updated 9/3/04 (7969 days ago)
Assigned
Resolved 9/3/04 (7969 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
594 Chuck Hagenbuch Comment #3
State ⇒ Resolved
Reply to this comment
Fixed, thanks!
134 davidc (at) advan (dot) ca Comment #2 Reply to this comment
I mean those are the lines from my _corrected_ display.inc file!!
554 davidc (at) advan (dot) ca Comment #1
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Correct mapquest selection for Canada
Queue ⇒ Turba
Reply to this comment
In the display.inc file there is a correction for the identification 
of Cdn postal codes that changes the country to "CA". However, 
mapquest requires the url to have "province" instead of "state". Apply 
the same fix.



Enclosed are lines 67-74 of display.inc from Turba 1.2.2 final.



if (!empty($addressParts[3])) {

    if (preg_match('|[a-zA-Z]\d[a-zA-Z]\s?\d[a-zA-Z]\d|', $addressParts[4])) {

       $mapurl .= '&province=' . urlencode($addressParts[3]);

    }

    else {

       $mapurl .= '&state=' . urlencode($addressParts[3]);

    }

}

P.S. This was awesome that it auto-discovered and provided a map option!!!



dbc.

Saved Queries