function getlocations_mapbox_get_map_layers in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_mapbox/getlocations_mapbox.module \getlocations_mapbox_get_map_layers()
@file getlocations_mapbox.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Provides mapbox maps integration for Leaflet.
1 call to getlocations_mapbox_get_map_layers()
- getlocations_leaflet_get_map_layers in modules/
getlocations_leaflet/ getlocations_leaflet.module - Function
File
- modules/
getlocations_mapbox/ getlocations_mapbox.module, line 14 - getlocations_mapbox.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_mapbox_get_map_layers() {
$mapbox_info = variable_get('getlocations_leaflet_mapbox', '');
$add = array();
if (!empty($mapbox_info) && isset($mapbox_info['mapbox_info']) && is_array($mapbox_info['mapbox_info'])) {
foreach ($mapbox_info['mapbox_info'] as $k => $info) {
if (isset($info['key']) && $info['key'] && isset($info['label']) && $info['label']) {
$add['MapBox' . '.' . $info['label']] = array(
'label' => $info['label'],
'type' => isset($info['type']) ? $info['type'] : 'base',
'options' => array(
'id' => $info['key'],
'accessToken' => $info['token'],
),
);
}
}
}
return $add;
}