PHP Classes

Multiple Maps on a Page

Recommend this page to a friend!

      Easy Google Map  >  All threads  >  Multiple Maps on a Page  >  (Un) Subscribe thread alerts  
Subject:Multiple Maps on a Page
Summary:Is it possible to put multiple maps on a page?
Messages:4
Author:Gregory Nickoloff
Date:2007-10-05 15:43:13
Update:2007-10-11 00:10:59
 

  1. Multiple Maps on a Page   Reply   Report abuse  
Picture of Gregory Nickoloff Gregory Nickoloff - 2007-10-05 15:43:13
Can I put two or more maps on the same page or indicate more than one address on the same map? Either would be helpful. Seems that I've had more than one on a page before, but I can't find the example again.

  2. Re: Multiple Maps on a Page   Reply   Report abuse  
Picture of Gregory Nickoloff Gregory Nickoloff - 2007-10-05 17:56:45 - In reply to message 1 from Gregory Nickoloff
Figured it out. Added and index to the object name and edited the MapHolder function to pass it to the <div id...

echo $gm[$l]->MapHolder($l);
echo $gm[$l]->InitJs($l);

Seems to work OK.

  3. Re: Multiple Maps on a Page   Reply   Report abuse  
Picture of Gregory Nickoloff Gregory Nickoloff - 2007-10-09 16:39:51 - In reply to message 2 from Gregory Nickoloff
I spoke too soon. This seems to work fine with FireFox, etc. but not with IE 6 or 7.

I get an error that the site can not be navigated to and seem to lose function of the browser. Any ideas about this?

Anyone?

  4. Re: Multiple Maps on a Page   Reply   Report abuse  
Picture of Mitchelle Pascual Mitchelle Pascual - 2007-10-11 00:10:59 - In reply to message 3 from Gregory Nickoloff
Can you please put some of your codes?
Are you using table tags in your html code?

Maybe you could try the ff.

<?php
require'EasyGoogleMap.class.php';
$gm = & new EasyGoogleMap("yourgooglemapkeyhere");
$gm->SetMarkerIconStyle('STAR');
$gm->SetMapZoom(10);
$gm->SetAddress("10 market st, san francisco");
$gm->SetInfoWindowText("This is the address # 1.");

$gm->SetAddress("Manila, Philippines");
$gm->SetInfoWindowText("This is Philippine Country. <br /><a href=\"#\">asdf</a>");
$gm->SetSideClick('Philippines');

$gm->SetAddress("Quezon City, Philippines");
$gm->SetAddress("Makati, Philippines");


$gm->SetAddress("Tarlac, Philippines");

?>
<html>
<head>
<title>EasyGoogleMap</title>
<?php echo $gm->GmapsKey(); ?>
</head>
<body>
<table width="90%" border="0" cellspacing="0" cellpadding="0" id="border_white">
<tr>
<td width="516" height="316">
<?php echo $gm->MapHolder(); ?>
<?php echo $gm->GetSideClick(); ?>
</td>
</tr>
</table>
</body>
</html>
<?php echo $gm->InitJs(); ?>
<?php echo $gm->UnloadMap(); ?>