convert city and state ids to city and state names

16 views
Skip to first unread message

Am

unread,
Oct 27, 2011, 11:47:31 AM10/27/11
to google-map...@googlegroups.com
Hi,
I'm pulling a city and state id from my database to display in my map search results. Is there a tutorial somewhere that will show me how to write the code to display the city and state name rather than the id number? If not, how do I do that?
http://www.rentalmatch101.com.php5-20.dfw1-1.websitetestlink.com/googlemap.php
Thank you for your help.

Andrew Leach

unread,
Oct 27, 2011, 12:00:20 PM10/27/11
to google-map...@googlegroups.com

Are the city and state name in your database? If not, how can anyone
link "11527" to "Seattle" (for example)?

If they are in your database, then select that data instead of the
code number -- that is, your SELECT statement in the
phpsqlsearch_genxml.php needs to include the right columns.

Am

unread,
Oct 27, 2011, 12:19:15 PM10/27/11
to google-map...@googlegroups.com, andrew....@gmail.com
Unfortunately the names are not in the database.

davie strachan

unread,
Oct 27, 2011, 4:37:42 PM10/27/11
to Google Maps JavaScript API v3
Hi
http://www.rentalmatch101.com.php5-20.dfw1-1.websitetestlink.com/phpsqlsearch_genxml.php?lat=40&lng=-100&radius=2000
produces XLM which contains both city and state
IF you type arvada into the input box it gives 2 markers and the
sidebar shows both city & state
Regards Davie
Reply all
Reply to author
Forward
0 new messages