예제 #1
0
<?php
require_once("geographics.inc.php");
$testVector = "AB12CD";
echo ($testVector . " -> " . minLatFromMaidenhead($testVector) . "; " . minLongFromMaidenhead($testVector) . " -> " . maxLatFromMaidenhead($testVector) . "; " . maxLongFromMaidenhead($testVector) . "<br />\n");

$testVector = "JO01";
echo ($testVector . " -> " . minLatFromMaidenhead($testVector) . "; " . minLongFromMaidenhead($testVector) . " -> " . maxLatFromMaidenhead($testVector) . "; " . maxLongFromMaidenhead($testVector) . "\n");

$testVector = "JO00";
echo ($testVector . " -> " . minLatFromMaidenhead($testVector) . "; " . minLongFromMaidenhead($testVector) . " -> " . maxLatFromMaidenhead($testVector) . "; " . maxLongFromMaidenhead($testVector) . "\n");

$fields = array("JO", "JN", "IO");
$bigSquares = array();
$k = 0;
for ($i = 0; $i < 100; $i++) {
	for ($j = 0; $j < count($fields); $j++) {
		$bigSquares[$k++] = $fields[$j] . str_pad($i, 2, "0");
	}
}
echo ("<pre>" . print_r($bigSquares) . "</pre>");
?>
<?php echo("Hello");?>
예제 #2
0
	?>
	<Placemark>
		  <name><?php echo($bigSquare); ?></name>
		  <styleUrl>#<?php echo (getSquareColour($bigSquare)); ?></styleUrl>
		  <Polygon>
			<tessellate>1</tessellate>
			<altitudeMode>clampToGround</altitudeMode>
			<outerBoundaryIs>
			  <LinearRing>
				<coordinates>
				<?php
					echo (
						minLongFromMaidenhead($bigSquare) . "," . minLatFromMaidenhead($bigSquare) . ",10," .
						minLongFromMaidenhead($bigSquare) . "," . maxLatFromMaidenhead($bigSquare) . ",10," .
						maxLongFromMaidenhead($bigSquare) . "," . maxLatFromMaidenhead($bigSquare) . ",10," .
						maxLongFromMaidenhead($bigSquare) . "," . minLatFromMaidenhead($bigSquare) . ",10," .
						minLongFromMaidenhead($bigSquare) . "," . minLatFromMaidenhead($bigSquare) . ",10");
				?></coordinates>
			  </LinearRing>
			</outerBoundaryIs>
		  </Polygon>
	</Placemark>
<?php
}
echo "
  </Folder>
  <Folder>
    <name>Contacts</name>
";
$cCnt = 0; // Colour count
foreach (getContacts() as $callsign => $locator) {