Jump to content

[SOLVED] Google Maps


CoreyR

Recommended Posts

Ok, I understand what is wrong but do not know how to fix it.

 

The problem is each time I click on my link which calls the google map, the code below only executes once which is giving me the same map each time.

http://www.romerowebsites.com/demo/view_listings.php

 

In my file googlemap.php which calls the phoogle.php I have the following code.

 

require_once 'phoogle.php';

 

$map = new PhoogleMap();

$map->setAPIKey("ABQIAAAAqJ_s059owdpe4QSV2eYcTBRflJZNvbanLx8_ukfuFPPwSn-nfBSFT9n5fABqKjEtezsSSOMULbirUQ");

?>

 

  <? $map->printGoogleJS(); ?>

 

  <?

    //customization options are here

    $map->zoomLevel = 2;            //zoom in as far as we can

    $map->setWidth(350);            //pixels

    $map->setHeight(350);          //pixels

    $map->controlType = 'large';    //show large controls on the side

    $map->showType = false;        //hide the map | sat | hybrid buttons

   

 

// Connects to your Database

mysql_connect("mysql", "coreysromero", "sierra69") or die(mysql_error());

mysql_select_db("Realestate_Demo") or die(mysql_error());

$data = mysql_query("SELECT * FROM data WHERE status='For Sale'")

or die(mysql_error());

while($info = mysql_fetch_array( $data ))

{

$address=$_POST['address'];

$city=$_POST['city'];

$state=$_POST['state'];

 

//CUSTOM INFO WINDOW DATA

 

$map->addAddress("$info[address],$info[city],$info[state]",$description);

 

}

  $map->showMap();

?>

Link to comment
https://forums.phpfreaks.com/topic/41559-solved-google-maps/#findComment-201428
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.