summaryrefslogtreecommitdiff
path: root/media/js
diff options
context:
space:
mode:
Diffstat (limited to 'media/js')
-rw-r--r--media/js/slideshow.js12
-rw-r--r--media/js/slideshow.pack.js2
2 files changed, 7 insertions, 7 deletions
diff --git a/media/js/slideshow.js b/media/js/slideshow.js
index b8c1921..32e262f 100644
--- a/media/js/slideshow.js
+++ b/media/js/slideshow.js
@@ -45,14 +45,14 @@ function create_map(obj) {
imgid = obj.title.split(',')[2];
//create container divs
$('<div class="map-container" id="mc-'+imgid+'">').insertBefore($(obj).parent().parent());
- //$(obj).parent().parent().parent().append('<div id="map-container">');
+ //$(obj).parent().parent().parent().prepend('<div class="map-container" id="mc-'+imgid+'">');
$('#mc-'+imgid).append('<div class="map-wrapper" id="mw-'+imgid+'">');
//deal with the variable height of div.legend
- //$('#map-container').css({
- // bottom: function(index, value) {
- // return parseFloat($(obj).parent().parent().height())-2;
- // }
- //});
+ $('#mc-'+imgid).css({
+ bottom: function(index, value) {
+ return parseFloat($(obj).parent().parent().height())+20;
+ }
+ });
mapit(obj.title);
}
diff --git a/media/js/slideshow.pack.js b/media/js/slideshow.pack.js
index 5565fec..b99b0e2 100644
--- a/media/js/slideshow.pack.js
+++ b/media/js/slideshow.pack.js
@@ -1,7 +1,7 @@
function mapit(latlontitle){lat=parseFloat(latlontitle.split(',')[0]);lon=parseFloat(latlontitle.split(',')[1]);elid=latlontitle.split(',')[2];centerCoord=new google.maps.LatLng(lat,lon);var mapitinit;if(mapitinit==true){mapPanTo();}else{mapInit();}
function mapInit(){var mapOptions={zoom:8,center:centerCoord,disableDefaultUI:true,navigationControl:true,mapTypeId:google.maps.MapTypeId.TERRAIN,navigationControlOptions:{style:google.maps.NavigationControlStyle.SMALL}};map=new google.maps.Map(document.getElementById("mw-"+elid),mapOptions);var marker=new google.maps.Marker({position:centerCoord,map:map});mapitinit=true;}
function mapPanTo(){var marker=new google.maps.Marker({position:centerCoord,map:map});map.panTo(centerCoord);}}
-function create_map(obj){imgid=obj.title.split(',')[2];$('<div class="map-container" id="mc-'+imgid+'">').insertBefore($(obj).parent().parent());$('#mc-'+imgid).append('<div class="map-wrapper" id="mw-'+imgid+'">');mapit(obj.title);}
+function create_map(obj){imgid=obj.title.split(',')[2];$('<div class="map-container" id="mc-'+imgid+'">').insertBefore($(obj).parent().parent());$('#mc-'+imgid).append('<div class="map-wrapper" id="mw-'+imgid+'">');$('#mc-'+imgid).css({bottom:function(index,value){return parseFloat($(obj).parent().parent().height())+20;}});mapit(obj.title);}
function remove_map(imgid){$('#mc-'+imgid).remove();}
$(document).ready(function(){$('.map-link').click(function(){imgid=this.title.split(',')[2];if($('#mc-'+imgid).is(":visible")){remove_map(imgid);}else{create_map(this);}
return false;});var $ele=$('#slides').children()