nettrinity
(Thanhvn Info)
October 21, 2011, 1:38pm
1
User may input the following string for location for a search, like (www.yelp.com ) e.g.:
453 adams St, Dorchester, MA 02122
or
Wellesley, MA
or
02457
or
MA
Is there an extension to parse the string into “city”, “state”, and “zip” ? I checked out the Yii extension and couldn’t find any related things. But I think it’s a common task, somebody must have done it before.
Thank you!
jacmoe
(Jacob Moena)
October 21, 2011, 1:52pm
2
Full text search on those three fields?
gusnips
(Gustavo)
October 21, 2011, 2:35pm
3
I never saw a extension for this.
Try phpclasses, google and then create a component for this based on your finds and add to the repository =)
nettrinity
(Thanhvn Info)
October 21, 2011, 6:35pm
4
I don’t know what is Full text search. But just search against database related field, e.g.: business.state = ‘MA’, and business.zip = ‘02493’, etc.
nettrinity
(Thanhvn Info)
October 21, 2011, 6:38pm
5
I never saw a extension for this.
Try phpclasses, google and then create a component for this based on your finds and add to the repository =)
Gosh… It’s challenging for me, but I will definitely share it with you guys if I come across some result.
putera
(Libputera)
October 22, 2011, 7:16pm
6
nettrinity:
User may input the following string for location for a search, like (www.yelp.com ) e.g.:
453 adams St, Dorchester, MA 02122
or
Wellesley, MA
or
02457
or
MA
Is there an extension to parse the string into “city”, “state”, and “zip” ? I checked out the Yii extension and couldn’t find any related things. But I think it’s a common task, somebody must have done it before.
Thank you!
You’d need to parse the input using regex, Parse city, state and zip , compare the result using CDbCriteria::compare() perhaps with $partialMatch set to ‘true’.
nettrinity
(Thanhvn Info)
October 22, 2011, 8:11pm
7
{
"name": "1600 Amphitheatre Parkway, Mountain View, CA, USA",
"Status": {
"code": 200,
"request": "geocode"
},
"Placemark": [
{
"address": "1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA",
"AddressDetails": {
"Country": {
"CountryNameCode": "US",
"AdministrativeArea": {
"AdministrativeAreaName": "CA",
"SubAdministrativeArea": {
"SubAdministrativeAreaName": "Santa Clara",
"Locality": {
"LocalityName": "Mountain View",
"Thoroughfare": {
"ThoroughfareName": "1600 Amphitheatre Pkwy"
},
"PostalCode": {
"PostalCodeNumber": "94043"
}
}
}
}
},
"Accuracy": 8
},
"Point": {
"coordinates": [-122.083739, 37.423021, 0]
}
}
]
}
Thanks a lot, Putera! Do you know what kind language is the above code? I am not familiar with this, let along the logic…
fiSCIENCES
(Martin Pineault)
August 12, 2024, 8:01pm
9