-
Notifications
You must be signed in to change notification settings - Fork 9
/
map_options_symfony.php
46 lines (36 loc) · 1.12 KB
/
map_options_symfony.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
<?php
// This is for my examples
require( '_system/config.php' );
// This is how you autoload with Symfony
require( '_system/UniversalClassLoader.php' );
use Symfony\Component\ClassLoader\UniversalClassLoader;
$loader = new UniversalClassLoader();
$loader->registerNamespace( 'PHPGoogleMaps', '../' );
$loader->register();
$map_options = array(
'map_id' => 'map23',
'draggable' => false,
'center' => 'San Diego, CA',
'height' => '600px',
'width' => '600px',
'zoom' => 10,
'bicycle_layer' => true
);
$map = new \PHPGoogleMaps\Map( $map_options );
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Symfony Class Loader - <?php echo PAGE_TITLE ?></title>
<link rel="stylesheet" type="text/css" href="_css/style.css">
<?php $map->printHeaderJS() ?>
<?php $map->printMapJS() ?>
</head>
<body>
<h1>Using the Symfony class loader</h1>
<p>This loads a map using <a href="https://github.com/symfony/symfony/blob/master/autoload.php.dist">Symfony's UniversalClassLoader</a></p>
<?php require( '_system/nav.php' ) ?>
<?php $map->printMap() ?>
</body>
</html>