function ip_geoloc_library in IP Geolocation Views & Maps 7
Implements hook_library().
File
- ./
ip_geoloc.module, line 78 - IPGV&M is a mapping engine for Views that contain locations of entities and/or visitors. Google Maps, Leaflet and OpenLayers2 maps are all supported. and available through this module. Using a number of optional sources IPGV&M also retrieves…
Code
function ip_geoloc_library() {
$libraries = array();
$path_fullscreen = libraries_get_path('leaflet-fullscreen') . '/dist';
$libraries['leaflet-fullscreen'] = array(
'title' => 'Leaflet Fullscreen',
'version' => '0.0.3',
'js' => array(
array(
'type' => 'file',
'data' => "{$path_fullscreen}/Leaflet.fullscreen.min.js",
'group' => JS_LIBRARY,
'weight' => 2,
'preprocess' => FALSE,
),
),
'css' => array(
"{$path_fullscreen}/leaflet.fullscreen.css" => array(
'type' => 'file',
'media' => 'screen',
'group' => CSS_DEFAULT,
'weight' => 2,
),
),
);
$path_minimap = libraries_get_path('leaflet-minimap') . '/dist';
$libraries['leaflet-minimap'] = array(
'title' => 'Leaflet MiniMap',
'version' => '2.1.0',
'js' => array(
array(
'type' => 'file',
'data' => "{$path_minimap}/Control.MiniMap.min.js",
'group' => JS_LIBRARY,
'weight' => 2,
'preprocess' => FALSE,
),
),
'css' => array(
"{$path_minimap}/Control.MiniMap.min.css" => array(
'type' => 'file',
'media' => 'screen',
'group' => CSS_DEFAULT,
'weight' => 2,
),
),
);
foreach (ip_geoloc_get_font_icon_libs() as $css_file) {
$css_file = trim($css_file);
if (!empty($css_file)) {
$libraries['ip_geoloc_font_icon_libs']['css'][$css_file] = array(
'type' => 'file',
'media' => 'all',
'group' => -101,
);
}
}
if (!empty($libraries['ip_geoloc_font_icon_libs']['css'])) {
$libraries['ip_geoloc_font_icon_libs']['title'] = t('IPGV&M font icon libraries');
}
return $libraries;
}