-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathsidebar_simple.php
54 lines (43 loc) · 1.49 KB
/
sidebar_simple.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
50
51
52
53
54
<?php
// This is for my examples
require( '_system/config.php' );
$relevant_code = array(
'\PHPGoogleMaps\Overlay\Marker'
);
// Autoload stuff
require( '_system/autoload.php' );
$map = new \PHPGoogleMaps\Map;
$marker1 = \PHPGoogleMaps\Overlay\Marker::createFromLocation( 'New York, NY',
array( 'title' => 'New York, NY', 'content' => 'New York marker' )
);
$marker2 = \PHPGoogleMaps\Overlay\Marker::createFromPosition( new \PHPGoogleMaps\Core\LatLng( 32.7153292,-117.1572551 ),
array( 'title' => 'San Diego, CA', 'content' => 'San Diego marker' )
);
$marker3 = \PHPGoogleMaps\Overlay\Marker::createFromLocation( 'Dallas, TX',
array( 'title' => 'Dallas, TX', 'content' => 'Dallas marker' )
);
$map->addObjects( array( $marker1, $marker2, $marker3 ) );
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Simple Sidebar - <?php echo PAGE_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="_css/style.css">
<style type="text/css">
#map, #map_sidebar { float: left }
.sidebar { list-style:none; margin:0 0 0 10px;padding:0;width: 200px; }
.sidebar li { margin-bottom: 2px; }
.sidebar p { background-color: #eee;margin:0; padding: 5px;cursor: pointer; }
.sidebar p:hover { background-color: #ddd; }
</style>
<?php $map->printHeaderJS() ?>
<?php $map->printMapJS() ?>
</head>
<body>
<h1>Simple Sidebar</h1>
<?php require( '_system/nav.php' ) ?>
<?php $map->printMap() ?>
<?php echo $map->getSideBar() ?>
</body>
</html>