function gmap_defaults in GMap Module 6.2
Same name and namespace in other branches
- 5 gmap.module \gmap_defaults()
- 6 gmap.module \gmap_defaults()
- 7.2 gmap.module \gmap_defaults()
- 7 gmap.module \gmap_defaults()
Get the defaults for a gmap.
9 calls to gmap_defaults()
- gmap_admin_settings in ./
gmap_settings_ui.inc - @file GMap settings form.
- gmap_elements in ./
gmap.module - Implementation of hook_elements().
- gmap_location_node_page in ./
gmap_location.module - Draws a page with a google map with the node on it, or if no node is set all of the nodes on it.
- gmap_location_user_page in ./
gmap_location.module - Draws a page with a google map that has all of the site users.
- gmap_macro_builder_form in ./
gmap_macro_builder.module - Macro builder form.
File
- ./
gmap.module, line 25 - GMap -- Routines to use the Google Maps API in Drupal.
Code
function gmap_defaults() {
$defaults = array(
'width' => '300px',
'height' => '200px',
'zoom' => 3,
'maxzoom' => 14,
'controltype' => 'Small',
'align' => 'None',
'latlong' => '40,0',
'maptype' => 'Map',
'mtc' => 'standard',
'baselayers' => array(
'Map',
'Satellite',
'Hybrid',
),
'styles' => array(
'line_default' => array(
'0000ff',
5,
45,
'',
0,
0,
),
'poly_default' => array(
'000000',
3,
25,
'ff0000',
45,
),
'highlight_color' => 'ff0000',
),
'line_colors' => array(
'#00cc00',
'#ff0000',
'#0000ff',
),
);
$defaults['behavior'] = array();
$m = array();
$behaviors = gmap_module_invoke('behaviors', $m);
foreach ($behaviors as $k => $v) {
$defaults['behavior'][$k] = $v['default'];
}
$defaults = array_merge($defaults, variable_get('gmap_default', array()));
return $defaults;
}