-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathground_overlays.php
49 lines (35 loc) · 1.15 KB
/
ground_overlays.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
// This is for the examples
require( '_system/config.php' );
$relevant_code = array(
'\PHPGoogleMaps\Overlay\GroundOverlay',
'\PHPGoogleMaps\Overlay\GroundOverlayDecorator'
);
// Autoload stuff
require( '_system/autoload.php' );
$map = new \PHPGoogleMaps\Map;
$go = new \PHPGoogleMaps\Overlay\GroundOverlay(
'http://www.volunteer.blogs.com/winewaves/images/san_diego_postcard.jpg',
\PHPGoogleMaps\Service\Geocoder::geocode( 'San Diego, CA' ),
\PHPGoogleMaps\Service\Geocoder::geocode( 'Balboa Park San Diego, CA' )
);
$map->addObject( $go );
$map->setCenter( \PHPGoogleMaps\Service\Geocoder::geocode( 'San Diego, CA' ) );
$map->setZoom( 14 );
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ground Overlays - <?php echo PAGE_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="_css/style.css">
<?php $map->printHeaderJS() ?>
<?php $map->printMapJS() ?>
</head>
<body>
<h1>Ground Overlays</h1>
<?php require( '_system/nav.php' ) ?>
<?php $map->printMap() ?>
<a href="#" onclick="<?php echo $kml->getJsVar() ?>.setMap(null)">Remove KML Layer</a>
</body>
</html>