Forum Moderators: coopster
Here is what Im trying to do.
I have a database with about 1000 churches in it. We have all sorts of data including their address, zip etc.
I want to have this data displayed publicly and show a small button that says "map". When they click this a pop up box opens approx 500x400 and then displays a google map for the address of that church.
on the page that pops up I would like to have some code like the follwing
<?php
$address = $_GET['address'];
$zip = $_GET['zip'];
?>
now how to I insert that data so I can geocode it and show a map? Here is what I have from google so far
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}
//]]>
</script>
I've already looked at stuff google has and it's over my head, I just need a script that converts that address & zip and then brings up a map. No manula entry or clciking another submit button.
hope i communicated this clear enough, thanks for the help
:)
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}
//]]>
</script>
This function doesn't seem to take address and zip as input, instead you see the latitude and longitude of the place as inputs. You might need to check other google functions which can take the zip and address as input and display the map.
Habtom