Changes for mobile map
This commit is contained in:
parent
e9f2983176
commit
6eb5061237
|
@ -25,8 +25,8 @@ $('#index').live('pageinit',function(){
|
|||
$(".slideImg").muImageResize({width: $globalW, height: Math.floor($globalW/720*240)});
|
||||
$(this).find(".newpic img").muImageResize({width: 280, height: 200});
|
||||
$('.slideshow').cycle({
|
||||
fx:'scrollLeft',
|
||||
timeout: 6000,
|
||||
fx: $effect,
|
||||
timeout: $timeout
|
||||
});
|
||||
$(".newlist").css({
|
||||
"width" : $(".newitem").outerWidth()*(Math.floor($globalW/$(".newitem").outerWidth()))+30,
|
||||
|
@ -40,8 +40,9 @@ $('#index').live('pageinit',function(){
|
|||
$('#announcement_content').live('pageinit',function(){
|
||||
$(this).find(".newpic img").muImageResize({width: 320, height: 220});
|
||||
});
|
||||
var mobileDemo = { 'center': '24.987449, 121.576117', 'zoom': 17 };
|
||||
|
||||
$('#map').live('pageinit', function() {
|
||||
var mobileDemo = { 'center': $map_center, 'zoom': $map_zoom };
|
||||
var $windowH = $(window).height();
|
||||
$("#map_canvas").css({
|
||||
'height' : $windowH,
|
||||
|
@ -50,7 +51,7 @@ $('#map').live('pageinit', function() {
|
|||
$('#map_canvas').gmap({'center': mobileDemo.center, 'zoom': mobileDemo.zoom, 'disableDefaultUI':false, 'callback': function() {
|
||||
var self = this;
|
||||
self.addMarker({'position': this.get('map').getCenter() }).click(function() {
|
||||
self.openInfoWindow({ 'content': "<%= I18n.t('mobile.location_description') %>" }, this);
|
||||
self.openInfoWindow({ 'content': $info }, this);
|
||||
});
|
||||
}});
|
||||
}).load('basic_map');
|
||||
|
|
|
@ -23,4 +23,5 @@
|
|||
<script type='text/javascript'>
|
||||
var $effect = "<%= @ad_banner.ad_fx.nil? ? 'fade': @ad_banner.ad_fx %>"
|
||||
var $timeout = "<%= @ad_banner.transition_msec %>"
|
||||
var $info = "<%= t('mobile.location_description').html_safe %>"
|
||||
</script>
|
||||
|
|
|
@ -2,4 +2,9 @@
|
|||
<%= render 'header_map' %>
|
||||
<% end %>
|
||||
|
||||
<div id='map_canvas'></div>
|
||||
<div id='map_canvas'></div>
|
||||
|
||||
<script type='text/javascript'>
|
||||
var $map_center = "24.987449, 121.576117"
|
||||
var $map_zoom = 17
|
||||
</script>
|
|
@ -7,5 +7,5 @@ en:
|
|||
home: Home
|
||||
language: Language
|
||||
location: Location
|
||||
location_description: '<h3>國立政治大學</h3>11605 臺北市文山區指南路二段64號'
|
||||
location_description: '<h3>National Chengchi University</h3>NO.64,Sec.2,ZhiNan Rd.,Wenshan District,Taipei City 11605,Taiwan (R.O.C)'
|
||||
page: Page
|
Reference in New Issue