Login   Register  
PHP Classes
elePHPant
Icontem

File: example4.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Sven Weih  >  N/X API to Google Maps  >  example4.php  >  Download  
File: example4.php
Role: Example script
Content type: text/plain
Description: Example File
Class: N/X API to Google Maps
Present world maps with Google Maps API
Author: By
Last change:
Date: 2006-09-05 13:02
Size: 911 bytes
 

Contents

Class file image Download
<html>
<?php
require "nxgooglemapsapi.php";


$api = new NXGoogleMapsAPI();

// setup the visual design of the control
$api->setWidth(800);
$api->setHeight(600);
$api->setZoomFactor(10);
$api->addControl(GSmallMapControl);
$api->divId "mapid";
// center to a point
$api->setCenter(51,11);


?>
<head>

<?php echo $api->getHeadCode(); ?>

</head>

<body onLoad="<?php echo $api->getOnLoadCode(); ?>">

<h1> Getting Geocodes </h1>

<?php echo $api->getBodyCode(); ?>
<br><br>
Search for an address. Drag the red flag afterwards.
<input type="text" value="" name="address" id="address"><input type="button" value="Search Address" onClick="moveToAddressDMarker(document.getElementById('address').value);"> 

<!-- Coordinates are always written to coordX and coordY -->
X: <input type="text" value="" id="coordX">  Y: <input type="text" value="" id="coordY">


</body>
</html>