Closed GoogleCodeExporter closed 9 years ago
Right now we don't support the new province searches, the state search is only
for
the US at the moment. I'm not sure when I will get to doing this just yet, so
patches
are welcome!
Original comment by helixblue
on 20 Sep 2008 at 2:43
Not sure if this is what you meant, but these are the following state_id's for
South
African Provinces:
152 - Western Cape
153 - Eastern Cape
154 - Northern Cape
155 - Mpumalanga
156 - North West
157 - Kwazulu Natal
158 - Limpopo
159 - Gauteng
160 - Free State
Original comment by nraider3...@gmail.com
on 21 Sep 2008 at 10:02
Interesting to know that provinces are implemented just like states! If you add
these
codes to lib/searchcode.rb (make sure they are lowercase), it works
fantastically (I
tested it with 'gaunteng' -> 159)
The difficult part is going to be handling countries who have the same province
names
but different codes. It looks like lib/searchcode.rb is going to have to be
refactored so that each country has it's own searchcode list.
lib/searchcode.rb is actually generated by tools/countryrip.rb. It seems to be
the
best way to go about things is to iterate over each country and fetch the list
of
state_id's for each one.
Original comment by helixblue
on 21 Sep 2008 at 12:12
Many Thanks
Original comment by marc.tho...@gmail.com
on 21 Sep 2008 at 7:27
The same state / province issue could be fixed by prefixing the state/province
name
with -us (-usa?) or -ca(-can?), etc. alabama-us, alberta-can, etc.
would make it fairly obvious as to which one to pick...
#Canadian Provinces
$idHash['state_id']['alberta-ca']=63
$idHash['state_id']['british columbia-ca']=64
$idHash['state_id']['manitoba-ca']=65
$idHash['state_id']['New Brunswick-ca']=66
$idHash['state_id']['newfoundland-ca']=67
$idHash['state_id']['nova scotia-ca']=68
$idHash['state_id']['ontario-ca']=69
$idHash['state_id']['prince edward island-ca']=70
$idHash['state_id']['quebec-ca']=62
$idHash['state_id']['saskatchewan-ca']=71
$idHash['state_id']['northwest territories-ca']=72
$idHash['state_id']['nunavut-ca']=73
$idHash['state_id']['yukon territory-ca']=74
#South African Provinces
$idHash['state_id']['western cape-sa']=152
$idHash['state_id']['eastern cape-sa']=153
$idHash['state_id']['northern cape-sa']=154
$idHash['state_id']['mpumalanga-sa']=155
$idHash['state_id']['north west-sa']=156
$idHash['state_id']['kwazulu natal-sa']=157
$idHash['state_id']['limpopo-sa']=158
$idHash['state_id']['gauteng-sa']=159
$idHash['state_id']['free state-sa']=160
Original comment by dur...@gmail.com
on 16 Mar 2009 at 9:14
Original comment by helixblue
on 1 Jul 2009 at 5:15
State searches are deprecated in 3.10, in favor of location searches using the
Google
Maps API. This should now be useful to you.
Original comment by helixblue
on 24 Jan 2010 at 9:12
Original issue reported on code.google.com by
marc.tho...@gmail.com
on 20 Sep 2008 at 1:39