Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rahul  >  Google Map Plotter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: Google Map Plotter
Find and display a given location with Google Maps
Author: By
Last change:
Date: 2008-12-15 01:39
Size: 756 bytes
 

Contents

Class file image Download
<?php
/****
 * This file is a example of gmapPlotter Class
 * Req : PHP5, Simple XML , Google map api key for your site
****/

require("gmapPlotter.php");
$mapObj = new googleMapGeocoder();
$address "Taj mahal ,Agra, India";
$latlonArr  $mapObj->geocodeAddress($address);
#print_r($latlonArr);
?>

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=your gmap api key here"
      type="text/javascript">
</script>
<html>
    <head>
        <title> Google Map </title>
     </head>
    <body>
        <div id="map" style="width: 500px;height:400px"></div>
        <?php
            
// plot the map with default marker icon
            
echo $mapObj->plotgoogleMap($latlonArr);
        
?>
    </body>
</html>