[#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
Requester davidc (at) advan (dot) ca
Created 2004-09-03 (5312 days ago)
Updated 2004-09-03 (5312 days ago)
Resolved 2004-09-03 (5312 days ago)
Patch No

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


Saved Queries