Welcome Guest, Not a member yet? Register   Sign In
BIOSTALL googlempas API
#1

[eluser]stingray9[/eluser]
Hey,

i've used it before and had never problems with it, in contrary, it's a great library.
Though, i'm facing a problem now.

In the past I've always set a lat and lng for my $marker['position'], but now i want to do it with an adress string from my database.

This is in my controller:

Code:
$this->load->library('googlemaps');
         $this->googlemaps->initialize();
         $config['zoom'] = '18';
         $query = $this->db->query("SELECT * FROM location")->result();
        foreach ($query as $row)
        {    
        $marker = array();
        $marker['position'] = $row->address;
        $this->googlemaps->add_marker($marker);
        }
        
        $data['map'] = $this->googlemaps->create_map();

But it always gives me a marker at 0,0
And in my database is one record with a string in it. If i put that string in the information box of that marker, it shows it, but still, it's not shown off on the right place. So the value is pulled out of my database, but the position isn't well defined.

Can anyone please help me out on this matter?


Messages In This Thread
BIOSTALL googlempas API - by El Forum - 03-21-2011, 06:11 PM
BIOSTALL googlempas API - by El Forum - 03-22-2011, 05:48 AM
BIOSTALL googlempas API - by El Forum - 06-04-2011, 12:39 PM
BIOSTALL googlempas API - by El Forum - 06-04-2011, 05:05 PM
BIOSTALL googlempas API - by El Forum - 06-04-2011, 05:27 PM
BIOSTALL googlempas API - by El Forum - 06-04-2011, 09:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB