6.0.0-beta1
7/7/25

[#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 09/03/2004 (7612 days ago)
Due
Updated 09/03/2004 (7612 days ago)
Assigned
Resolved 09/03/2004 (7612 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
09/03/2004 04:36:59 PM Chuck Hagenbuch Comment #3
State ⇒ Resolved
Reply to this comment
Fixed, thanks!
09/03/2004 04:04:13 PM davidc (at) advan (dot) ca Comment #2 Reply to this comment
I mean those are the lines from my _corrected_ display.inc file!!
09/03/2004 04:02:55 PM 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