summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
Diffstat (limited to 'media')
-rw-r--r--media/js/slideshow.js69
1 files changed, 35 insertions, 34 deletions
diff --git a/media/js/slideshow.js b/media/js/slideshow.js
index c889621..05f00a7 100644
--- a/media/js/slideshow.js
+++ b/media/js/slideshow.js
@@ -1,32 +1,34 @@
//Utility functions for map info window
function mapit(latlontitle) {
- var map;
lat = parseFloat(latlontitle.split(',')[0]);
- lon = parseFloat(latlontitle.split(',')[1]);
- title= latlontitle.split(',')[2];
- var mapitinit;
+ lon = parseFloat(latlontitle.split(',')[1]);
+ title= latlontitle.split(',')[2];
+ centerCoord = new google.maps.LatLng(lat, lon);
+ var mapitinit;
if (mapitinit == true) {
- panto();
- } else {
- mapInit();
- }
-
- function mapInit() {
- var centerCoord = new google.maps.LatLng(lat, lon);
- var mapOptions = {
- zoom: 6,
- center: centerCoord,
- mapTypeId: google.maps.MapTypeId.TERRAIN
- };
- map = new google.maps.Map(document.getElementById("map-wrapper"), mapOptions);
- var marker = new google.maps.Marker({
+ mapPanTo();
+ } else {
+ mapInit();
+ }
+
+ function mapInit() {
+ var mapOptions = {
+ zoom: 6,
+ center: centerCoord,
+ disableDefaultUI: true,
+ navigationControl: true,
+ mapTypeId: google.maps.MapTypeId.TERRAIN,
+ navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL}
+ };
+ map = new google.maps.Map(document.getElementById("map-wrapper"), mapOptions);
+ var marker = new google.maps.Marker({
position: centerCoord,
map: map,
title: title
});
mapitinit = true;
}
- function panto(){
+ function mapPanTo(){
var marker = new google.maps.Marker({
position: centerCoord,
map: map,
@@ -44,7 +46,7 @@ function create_map(obj) {
//deal with the variable height of div.legend
$('#map-container').css({
bottom: function(index, value) {
- return parseFloat($(obj).parent().parent().css("height"))-2;
+ return parseFloat($(obj).parent().parent().height())-2;
}
});
@@ -60,7 +62,7 @@ function get_exif(obj,id) {
//deal with the variable height of div.legend
$('#exif-container').css({
bottom: function(index, value) {
- return parseFloat($(obj).parent().parent().css("height"))-14;
+ return parseFloat($(obj).parent().parent().height())-14;
}
});
}
@@ -113,17 +115,16 @@ $(document).ready(function(){
$('#slides .bigimg').wrapAll('<div class="bigimgs">').parents('#slides').append('<ul class="menu" id="feature_gallery_pager">').cycle({
fx: 'fade',
startingSlide: index,
- pause: 1,
- prev: '#prev',
- next: '#next',
- before: onBefore,
- after: onAfter,
+ prev: '#prev',
+ next: '#next',
+ before: onBefore,
+ after: onAfter,
slideExpr: '.bigimg',
pager: '#feature_gallery_pager',
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#"><img src="'+slide.id+'" class="thumb"><span></span></a></li>';
- }
-
+ },
+ pause: 1
});
//callback to delete map and camera info windows if they exist
@@ -154,7 +155,7 @@ $(document).ready(function(){
});
};
- //initialize the jcarousel plugin
+ //initialize the jcarousel plugin
$(function() {
$('#feature_gallery_pager').jcarousel({
scroll:10,
@@ -164,11 +165,11 @@ $(document).ready(function(){
/* hover buttons, currently not used
$("#slideshow").hover(function() {
- $("ul#nav").fadeIn();
- },
- function() {
- $("ul#nav").fadeOut();
- });
+ $("ul#nav").fadeIn();
+ },
+ function() {
+ $("ul#nav").fadeOut();
+ });
*/
//enable keyboard shortcuts: