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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
<?php /* * google_maps -- map server * * @package plugins */
// force UTF-8 Ø
define('OFFSET_PATH', 3); require_once(dirname(dirname(dirname(__FILE__))) . '/functions.php'); if (getOption('gmap_sessions')) { zp_session_start(); } require_once(dirname(dirname(__FILE__)) . '/GoogleMap.php'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=<?php echo getOption('charset'); ?>" /> <?php GoogleMap::js(); ?> </head> <body> <?php if (getOption('gmap_sessions')) { $map_data = $_SESSION['GoogleMapVars']; } else { $param = base64_decode(str_replace(' ', '+', sanitize($_GET['map_data']))); if ($param) { if (function_exists('bzcompress')) { $data = bzdecompress($param); } else { $data = gzuncompress($param); } $map_data = sanitize(unserialize($data), 4); } }
if (is_array($map_data)) {
/* map configuration */ $mapControls = getOption('gmap_control_type'); if ($mapControls == 'none') { $mapTypeControl = false; } else { $mapTypeControl = true; $map_control_type = $mapControls;
$allowedMapTypes = array(); if (getOption('gmap_map_hybrid')) $allowedMapTypes[] = 'HYBRID'; if (getOption('gmap_map_roadmap')) $allowedMapTypes[] = 'ROADMAP'; if (getOption('gmap_map_satellite')) $allowedMapTypes[] = 'SATELLITE'; if (getOption('gmap_map_terrain')) $allowedMapTypes[] = 'TERRAIN'; }
$config['center'] = '0, 0'; $config['zoom'] = 'auto'; $config['cluster'] = true; $config['zoomControlStyle'] = getOption('gmap_zoom_size'); if ($mapTypeControl) { $config['map_type'] = getOption('gmap_starting_map'); $config['map_types_available'] = $allowedMapTypes; } else { $config['disableMapTypeControl'] = true; } $config['map_width'] = getOption('gmap_width') . "px"; $config['map_height'] = getOption('gmap_height') . "px"; $config['clusterMaxZoom'] = getOption('gmap_cluster_max_zoom'); $config['clusterAverageCenter'] = true; $config['onclick'] = "iw.close();"; $config['minifyJS'] = true;
$map = new Googlemaps($config);
$map->output_js_contents = $map_data["output_js_contents"]; $map->output_html = $map_data["output_html"]; ?> <div class="googlemap"> <script type="text/javascript"> //<![CDATA[ <?php echo $map->output_js_contents; echo omsAdditions(); ?>
function image(album, image) { window.parent.location = '<?php echo WEBPATH; ?>/index.php?album=' + album + '&image=' + image; } //]]> </script> <div id=googlemap_data"> <?php echo $map->output_html; ?> </div> </div> <?php } else { ?> <div class="errorbox"> <h2><?php echo gettext('Map display error') ?></h2> <p> <?php echo gettext('The GoogleMap plugin <em>map display</em> script has received a corrupt <em>Map</em> parameter. This is most likely caused by URL character limitations from your browser.'); ?> <?php echo gettext('For information on URL limits visit <a href="javascript:parent.window.location=\'http://www.boutell.com/newfaq/misc/urllength.html\';">What is the maximum length of a URL</a>.'); ?> </p> <p> <?php echo gettext('You can try a different browser or contact the site manager for assistance.'); ?> </p> <p> <?php echo gettext('If you are the manager of this site you can try the following:'); ?> <ul> <?php if (!getOption('gmap_sessions')) { ?> <li><?php printf(gettext('Enable the <a href="javascript:parent.window.location=%s;">GoogleMap option</a> <em>Map sessions</em>.'), "'" . FULLWEBPATH . '/' . ZENFOLDER . '/admin-options.php?tab=plugin&show-GoogleMap' . "'"); ?></li> <?php } ?> <li><?php echo gettext('Reduce the number of <em>points</em> being displayed'); ?></li> <li><?php echo gettext('Reduce the text passed as the description of each <em>point</em>'); ?></li> <li><?php echo gettext('Truncate the titles of the <em>points</em>'); ?></li> </ul> </p> </div> <?php } ?> </body> </html>
|