forked from bjohnson045/phpMyDirectory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
events_map.php
36 lines (26 loc) · 1.31 KB
/
events_map.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
<?php
// Define the current section being accessed
define('PMD_SECTION', 'public');
// Include initialization script
include('./defaults.php');
// Load language variables from database based on section
$PMDR->loadLanguage(array('public_events'));
$PMDR->setAdd('page_title',$PMDR->getLanguage('public_events_events_map'));
$PMDR->set('meta_title',coalesce($PMDR->getConfig('events_map_meta_title'),$PMDR->getLanguage('public_events_events_map')));
$PMDR->set('meta_description',coalesce($PMDR->getConfig('events_map_meta_description'),$PMDR->getLanguage('public_events_events_map')));
$PMDR->setAddArray('breadcrumb',array('link'=>BASE_URL.'/events_map.php','text'=>$PMDR->getLanguage('public_events_events_map')));
$template_content = $PMDR->get('Template',PMDROOT.TEMPLATE_PATH.'events_map.tpl');
$map = $PMDR->get('Map');
$map->mapID = 'map_full';
$map->setZoomLevel(3);
$coordinates = explode(',',$PMDR->getConfig('map_select_coordinates'));
$map->setCenterCoords($coordinates[1],$coordinates[0]);
$map->viewportLoader = true;
$map->viewportLoaderSource = 'map_events';
$PMDR->loadJavascript($map->getHeaderJS());
$PMDR->loadJavascript($map->getMapJS());
$PMDR->setAdd('javascript_onload','mapOnLoad();');
$map_output = $map->getMap();
$template_content->set('map',$map_output);
include(PMDROOT.'/includes/template_setup.php');
?>