Pages: [1]
  Print  
Author Topic: Simple Google Map  (Read 484 times)
kolopko
Newbie
*
Offline Offline

Posts: 2


View Profile
« on: October 19, 2009, 04:15:24 AM »

Hello.
Here's a very simple way to add a google map view for the propery. It's based on the adres of the property, SO THE ADRES HAVE TO BE CORRECT.

In \manager\static\view.php find this fragment of the code:


<div id="propTitle">
      <? echo stripslashes(ucfirst($result[0]['title'])); if($result[0]['featured']==1){ echo " <span style=\"font-size:14px;font-style:oblique;\">(FEATURED)</span>"; } ?><br />
      <strong><?=$lang['addr'];?>:</strong><br /><? echo stripslashes(ucwords($result[0]['address'])); ?><br />
      <? echo stripslashes(ucwords($result[0]['city'])); ?>, <? echo stripslashes(ucwords($result[0]['state'])); ?>
<? echo stripslashes(ucfirst($result[0]['zip'])); ?><br />
      <strong><?=$lang['listprice'];?>:</strong> <? echo $cf->formatWithSymbol($result[0]['price'],"EUR"); ?><br />
      <strong><?=$lang['listtype'];?>:</strong> <? echo ucwords($result[0]['type']); ?><br  />
      <strong><?=$lang['listphone'];?>:</strong> <? echo $result[0]['mls']; ?><br  />


And after it simply add this javascript:


<script language="JavaScript">
<!--
function FUNCTION1()
{
window.open('http://maps.google.nl/maps?f=q&source=s_q&hl=nl&q=<? echo stripslashes(ucwords($result[0]['address'])); ?>,+<? echo stripslashes(ucwords($result[0]['city'])); ?>','Map','width=800,height=600,toolbar=no,menubar=no,scrollbars=no,resizable=no');
}
//-->
</script>

<a href="javascript:FUNCTION1()">Look up on map</a><br>


Enjoy  Grin
Logged
Pages: [1]
  Print  
 
Jump to: