aboutsummaryrefslogtreecommitdiff
path: root/gmap_arcgis.module
diff options
context:
space:
mode:
authorSilvio <silvio@socioambiental.org>2013-03-27 15:36:02 -0300
committerSilvio <silvio@socioambiental.org>2013-03-27 15:36:02 -0300
commit99ca342bd59ab2669f51daebd9e6995cf69614f0 (patch)
treeff4e9746b54d3b78e4e2d39ff8ddfb46301d7b91 /gmap_arcgis.module
parentce19c2e23ee61edfa2d889b6e65c3515897ff8ad (diff)
downloadgmap_arcgis-99ca342bd59ab2669f51daebd9e6995cf69614f0.tar.gz
gmap_arcgis-99ca342bd59ab2669f51daebd9e6995cf69614f0.tar.bz2
Now gmap_arcgis.js part of a separate library
Diffstat (limited to 'gmap_arcgis.module')
-rw-r--r--gmap_arcgis.module10
1 files changed, 6 insertions, 4 deletions
diff --git a/gmap_arcgis.module b/gmap_arcgis.module
index dba9aae..1c0a093 100644
--- a/gmap_arcgis.module
+++ b/gmap_arcgis.module
@@ -45,12 +45,13 @@ function gmap_arcgis_gmap($op, &$map) {
* The order to load the following js code is important.
*/
// Add Google js API
- $key = variable_get('gmap_api_key', '');
- $script = '<script type="text/javascript" ';
+ $key = variable_get('gmap_api_key', '');
+ $script = '<script type = "text/javascript" ';
drupal_set_html_head($script . 'src="http://www.google.com/jsapi?key=' . $key . '&sensor=true&language=pt-BR"></script>');
// Add ArcGIS js API
- drupal_set_html_head($script . 'src="'. $base_url .'/sites/all/libraries/google-maps-utility-library-v3/arcgislink/src/arcgislink_compiled.js"></script>');
+ drupal_add_js($base_url .'/sites/all/libraries/google-maps-utility-library-v3/arcgislink/src/arcgislink_compiled.js');
+ drupal_add_js($base_url .'/sites/all/libraries/gmap_arcgis_js/gmap_arcgis.js');
// Setup Map Id
drupal_add_js(array('gmap_arcgis' => array('id' => $map['id'])), 'setting');
@@ -58,12 +59,13 @@ function gmap_arcgis_gmap($op, &$map) {
// Add custom js
$gmap_arcgis_path = drupal_get_path('module', 'gmap_arcgis') . '/';
drupal_add_js($gmap_arcgis_path . 'gmap_arcgis.js');
+
+ // TODO: move somewhere else
//jquery_ui_add('ui.dialog');
jquery_ui_add('effects.fold');
jquery_ui_add('effects.explode');
jquery_ui_add('effects.core');
jquery_ui_add('ui.slider');
-
$path_ui_css = drupal_get_path('module', 'jquery_ui');
drupal_add_css($path_ui_css . '/jquery.ui/themes/default/ui.all.css');
}