Revision 4c21ffdb
Added by Andreas Kohlbecker almost 7 years ago
modules/cdm_dataportal/cdm_dataportal.module | ||
---|---|---|
161 | 161 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . $openlayers, |
162 | 162 |
array( |
163 | 163 |
'type' => 'file', |
164 |
'weight' => JS_LIBRARY, |
|
164 |
'group' => JS_LIBRARY, |
|
165 |
'weight' => 0, |
|
165 | 166 |
'cache' => TRUE, |
166 | 167 |
'preprocess' => FALSE |
167 | 168 |
) |
... | ... | |
172 | 173 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . $proj4js, |
173 | 174 |
array( |
174 | 175 |
'type' => 'file', |
175 |
'weight' => JS_LIBRARY, |
|
176 |
'group' => JS_LIBRARY, |
|
177 |
'weight' => -1, // before open layers |
|
176 | 178 |
'cache' => TRUE, |
177 | 179 |
) |
178 | 180 |
); |
... | ... | |
182 | 184 |
$openlayers_imp_path = drupal_get_path('module', 'cdm_dataportal') . '/js/map/img/dark/'; |
183 | 185 |
drupal_add_js('OpenLayers.ImgPath="' . base_path() . $openlayers_imp_path . '";', array( |
184 | 186 |
'type' => 'inline', |
185 |
'weight' => JS_LIBRARY, |
|
187 |
'group' => JS_LIBRARY, |
|
188 |
'weight' => 1, // after openlayers |
|
186 | 189 |
'cache' => TRUE, |
187 | 190 |
'preprocess' => FALSE |
188 | 191 |
)); |
modules/cdm_dataportal/includes/maps.inc | ||
---|---|---|
114 | 114 |
|
115 | 115 |
$edit_map_service = get_edit_map_service_settings(); |
116 | 116 |
|
117 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/map/openlayers_map.js'); |
|
118 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/map/openlayers_layers.js'); |
|
117 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/map/openlayers_map.js', |
|
118 |
array( |
|
119 |
'type' => 'file', |
|
120 |
'group' => JS_DEFAULT, // module-layer JavaScript. |
|
121 |
'weight' => 0, |
|
122 |
'cache' => TRUE, |
|
123 |
'preprocess' => FALSE |
|
124 |
)); |
|
125 |
drupal_add_js(drupal_get_path('module', 'cdm_dataportal') . '/js/map/openlayers_layers.js', |
|
126 |
array( |
|
127 |
'type' => 'file', |
|
128 |
'group' => JS_DEFAULT, |
|
129 |
'weight' => 1, // after openlayers_map.js |
|
130 |
'cache' => TRUE, |
|
131 |
'preprocess' => FALSE |
|
132 |
)); |
|
119 | 133 |
|
120 | 134 |
$cdm_openlayers_options = array( |
121 | 135 |
'legendPosition' => '3', |
... | ... | |
145 | 159 |
drupal_set_message('A Google Maps layer is configured but the API key is either missing or invalid. |
146 | 160 |
Please set your Google Maps API key in the ' . l('Geo & Map Settings', 'admin/config/cdm_dataportal/settings/geo') .'.', 'warning'); |
147 | 161 |
} |
148 |
|
|
149 | 162 |
} |
150 | 163 |
} |
151 | 164 |
|
... | ... | |
160 | 173 |
} |
161 | 174 |
} |
162 | 175 |
|
163 |
|
|
164 | 176 |
} |
165 | 177 |
|
166 | 178 |
// --- custom wms base layer |
... | ... | |
360 | 372 |
); |
361 | 373 |
*/ |
362 | 374 |
} |
363 |
$out = compose_map(NULL, NULL, $query_string, $legendFormatQueryStr);
|
|
375 |
$out = compose_map('distribution', NULL, $query_string, $legendFormatQueryStr);
|
|
364 | 376 |
|
365 | 377 |
return $out; |
366 | 378 |
} |
modules/cdm_dataportal/includes/pages.inc | ||
---|---|---|
94 | 94 |
$occurrence_query = $occurrence_queryDto->occurrenceQuery; |
95 | 95 |
$legend_format_query = null; |
96 | 96 |
$distribution_query = NULL; |
97 |
$render_array['map'] = compose_map(NULL, $occurrence_query, $distribution_query, $legend_format_query, array());
|
|
97 |
$render_array['map'] = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array());
|
|
98 | 98 |
} |
99 | 99 |
} |
100 | 100 |
if(variable_get('cdm_dataportal_compressed_specimen_derivate_table')){ |
modules/cdm_dataportal/settings.php | ||
---|---|---|
2613 | 2613 |
' may not be accurate in case of image maps, please check the map display in the taxon pages.': |
2614 | 2614 |
'.<br/>Hold down Strg and drag with your mouse to select a bbox to zoom to. <br/>The bbox of the visible area of the map is always displayed below the map.') |
2615 | 2615 |
); |
2616 |
$form['map_preview']['openlayers_map'] = compose_map(NULL, NULL, $dummy_distribution_query, NULL, array(
|
|
2616 |
$form['map_preview']['openlayers_map'] = compose_map('settings-preview', NULL, $dummy_distribution_query, NULL, array(
|
|
2617 | 2617 |
'move' => "this.cdmOpenlayersMap.printInfo", |
2618 | 2618 |
'#execute' => "this.cdmOpenlayersMap.printInfo" |
2619 | 2619 |
), true // resizable |
Also available in: Unified diff
ref #5938 fixing js lib loading order (and defined map container ids)