[Tickets #544] NEW: Correct mapquest selection for Canada
bugs at bugs.horde.org
bugs at bugs.horde.org
Fri Sep 3 09:02:56 PDT 2004
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=544
-----------------------------------------------------------------------
Ticket | 544
Created By | davidc at advan.ca
Summary | Correct mapquest selection for Canada
Queue | Turba
Version | 1.2.2
State | Unconfirmed
Priority | 1. Low
Type | Bug
Owners |
-----------------------------------------------------------------------
davidc at advan.ca (2004-09-03 09:02) wrote:
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.
More information about the bugs
mailing list