PHP Classes

File: example4.php

Recommend this page to a friend!
  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: 17 years ago
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>