/[drupal]/contributions/modules/gmap/gmap.install
ViewVC logotype

Contents of /contributions/modules/gmap/gmap.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download) (as text)
Thu Feb 12 23:45:23 2009 UTC (9 months, 1 week ago) by bdragon
Branch: MAIN
CVS Tags: DRUPAL-6--1-1-RC1, HEAD
Changes since 1.4: +16 -1 lines
File MIME type: text/x-php
Add support for ClusterMarker and MarkerManager (without the G) marker managers.

Fix #155104 by Scott Falconer: Add "Zoom to cluster area" support.

Allow falling back to the default Clusterer marker if desired.

Allow entering larger numbers in some marker manager settings.

Allow choosing between the original and the new "zoom to marker area" behavior on Clusterer.
1 <?php
2 // $Id: gmap.install,v 1.4 2008/10/29 17:39:41 bdragon Exp $
3
4 /**
5 * @file
6 * GMap install file
7 */
8
9 /**
10 * Implementation of hook_uninstall().
11 */
12 function gmap_uninstall() {
13 variable_del('gmap_method');
14 variable_del('gmap_wms');
15 variable_del('gmap_default');
16 variable_del('gmap_mm_type');
17 variable_del('gmap_load_zoom_plugin');
18 variable_del('gmap_markermanager');
19 variable_del('gmap_markerfiles');
20 variable_del('gmap_node_markers');
21 variable_del('gmap_private_markerfile');
22
23 variable_del('googlemap_api_key');
24 }
25
26 /**
27 * Updates from 5.x-1.0alpha1 to 5.x-1.0.
28 * Do some tidying up of the settings.
29 */
30 function gmap_update_5000() {
31 $ret = array();
32
33 $d = variable_get('gmap_default', array());
34
35 // Add the previous implicit baselayers back in.
36 if (!isset($d['baselayers'])) {
37 $d['baselayers'] = array(
38 // Default map type
39 'maptype' => isset($d['maptype']) ? $d['maptype'] : 'Map',
40 'Map' => 1,
41 'Satellite' => 1,
42 'Hybrid' => 1,
43 'Physical' => 0,
44 );
45 }
46
47 // Default maptype was moved into baselayers.
48 unset($d['maptype']);
49
50 // Determine the map type control that was in use.
51 if (!isset($d['mtc'])) {
52 // User had the notype behavior flag set.
53 if (!empty($d['behavior']['notype'])) {
54 $d['mtc'] = 'none';
55 }
56 else {
57 $d['mtc'] = 'standard';
58 }
59 }
60
61 // notype is gone, mtc is more generic.
62 if (isset($d['behavior']['notype'])) {
63 unset($d['behavior']['notype']);
64 }
65
66 variable_set('gmap_default', $d);
67 return $ret;
68 }
69
70 /**
71 * Post 5.x-1.0beta2 update 1.
72 * We added a menu callback, force a rebuild.
73 */
74 function gmap_update_5001() {
75 $ret = array();
76 menu_rebuild();
77 return $ret;
78 }
79
80 /**
81 * Mini-update -- mousewheel.js no longer needed.
82 */
83 function gmap_update_5002() {
84 $ret = array();
85 variable_del('gmap_load_zoom_plugin');
86 return $ret;
87 }
88
89 /**
90 * Mini-update -- slight tweak to marker manager settings format.
91 */
92 function gmap_update_5003() {
93 $ret = array();
94 $val = variable_get('gmap_markermanager', array());
95 if (isset($val['clusterer']) && isset($val['clusterer']['clusterer_file']) && !empty($val['clusterer']['clusterer_file'])) {
96 $val['clusterer']['filename'] = $val['clusterer']['clusterer_file'];
97 unset($val['clusterer']['clusterer_file']);
98 variable_set('gmap_markermanager', $val);
99 }
100 drupal_set_message(t('Border Padding on marker managers is now defaulting to the recommended 256 pixels, rather than 0 pixels. You may wish to change your marker manager settings on the <a href="@url">GMap settings page</a> to match.', array('@url' => url('admin/settings/gmap'))));
101 return $ret;
102 }

  ViewVC Help
Powered by ViewVC 1.1.2