diff --git a/modules/exif_gps/controllers/admin_exif_gps.php b/modules/exif_gps/controllers/admin_exif_gps.php index a140b753..d089ea45 100644 --- a/modules/exif_gps/controllers/admin_exif_gps.php +++ b/modules/exif_gps/controllers/admin_exif_gps.php @@ -72,7 +72,7 @@ class Admin_EXIF_GPS_Controller extends Admin_Controller { ->value(module::get_var("exif_gps", "sidebar_zoom")) ->rules("required"); $gps_sidebar->dropdown("sidebar_mapformat") - ->label(t("Default Map Format")) + ->label(t("Map Interface")) ->options(array(t("Static"), t("Interactive"))) ->selected(module::get_var("exif_gps", "sidebar_mapformat")); $gps_sidebar->dropdown("sidebar_maptype") diff --git a/modules/exif_gps/helpers/exif_gps_block.php b/modules/exif_gps/helpers/exif_gps_block.php index 77e3d5e5..466f465a 100644 --- a/modules/exif_gps/helpers/exif_gps_block.php +++ b/modules/exif_gps/helpers/exif_gps_block.php @@ -38,7 +38,19 @@ class exif_gps_block_Core { $block = new Block(); $block->css_id = "g-exif-gps-sidebar"; $block->title = t("Location"); - $block->content = new View("exif_gps_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_mapformat") == 1) { + $block->content = new View("exif_gps_dynamic_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "ROADMAP"; + if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "SATELLITE"; + if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "HYBRID"; + if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "TERRAIN"; + } else { + $block->content = new View("exif_gps_static_sidebar.html"); + if (module::get_var("exif_gps", "sidebar_maptype") == 0) $block->content->sidebar_map_type = "roadmap"; + if (module::get_var("exif_gps", "sidebar_maptype") == 1) $block->content->sidebar_map_type = "satellite"; + if (module::get_var("exif_gps", "sidebar_maptype") == 2) $block->content->sidebar_map_type = "hybrid"; + if (module::get_var("exif_gps", "sidebar_maptype") == 3) $block->content->sidebar_map_type = "terrain"; + } $block->content->latitude = $record->latitude; $block->content->longitude = $record->longitude; } elseif (module::is_active("tagsmap") && module::is_active("tag")) { diff --git a/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php b/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php new file mode 100644 index 00000000..061e2ad4 --- /dev/null +++ b/modules/exif_gps/views/exif_gps_dynamic_sidebar.html.php @@ -0,0 +1,22 @@ + + + +
diff --git a/modules/exif_gps/views/exif_gps_sidebar.html.php b/modules/exif_gps/views/exif_gps_sidebar.html.php deleted file mode 100644 index 93aa3594..00000000 --- a/modules/exif_gps/views/exif_gps_sidebar.html.php +++ /dev/null @@ -1,3 +0,0 @@ - -