Google Maps question - loading with info from MySQL DB
Discussion
I've got a MySQL DB with latitudes and longitudes in. I've also got a PHP page that pulls that info from the DB.
What I want to do is extract lat and long from the database, then load an embedded google map, centered on this lat/long pair.
However, it seems that the map has to be loaded in the head of the document (in other words, before I can go to the DB and get the info I
need). How can I:
Load the page
Get the info from the MySQL DB via PHP
THEN load the map centered on this point.
I've tried taking load() from the <body> tag and putting it between script tags in the page but it's not having it.
It's probably very easy, just having a brain out moment...Thanks.
What I want to do is extract lat and long from the database, then load an embedded google map, centered on this lat/long pair.
However, it seems that the map has to be loaded in the head of the document (in other words, before I can go to the DB and get the info I
need). How can I:
Load the page
Get the info from the MySQL DB via PHP
THEN load the map centered on this point.
I've tried taking load() from the <body> tag and putting it between script tags in the page but it's not having it.
It's probably very easy, just having a brain out moment...Thanks.
Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff


