Welcome Guest, Not a member yet? Register   Sign In
Passing Results from SQL to Google Maps API in CodeIgniter
#1

[eluser]jshultz[/eluser]
I'm hoping to use Google Maps on my site.

My addresses are stored in a DB. I’m pulling up a page where the information is all dynamic. For example: mysite.com/site/business/5 (where 5 is the id of the business).

Let’s say I do a query like this:

Code:
function addressForMap($id) {
    $this->db->select('b.id, b.busaddress, b.buscity, b.buszip');
    $this->db->from('business as b');
    $this->db->where('b.id', $id);
}

How can I output the info to the Google Maps API correctly so that it displays the map appropriately?

The Google Maps API interface I'm using takes the results like this: $marker['address'] = 'Crescent Park, Palo Alto'; within the controller before the map is created.


Messages In This Thread
Passing Results from SQL to Google Maps API in CodeIgniter - by El Forum - 05-24-2010, 09:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB