【问题标题】:Google Map not fully load in OSClass谷歌地图未在 OSClass 中完全加载
【发布时间】:2013-03-08 04:24:46
【问题描述】:

我在osclass\oc-content\themes\modern\item.php 中有以下代码,

<strong class="share"><a href="#" id="map" rel="nofollow"><?php _e('Map', 'modern'); ?></a></strong>

<strong class="share"><a href="#" id="photo" rel="nofollow"><?php _e('Photo Gallery', 'modern'); ?></a></strong>

<div class="map" style="display:none;">
    <?php osc_run_hook('location'); ?> 
</div>

    <div class="slider-wrapper theme-light image" >
            <div id="slider" class="nivoSlider">                        
            <?php if( osc_images_enabled_at_items() ) { ?>
                <?php if( osc_count_item_resources() > 0 ) { ?>
                    <?php for ( $i = 0; osc_has_item_resources(); $i++ ) { if (osc_resource_for() == 2 ) {  ?>
                        <img src="<?php echo osc_resource_url(); ?>" width="100%" height="240px;" alt="<?php echo osc_item_title(); ?>" title="<?php echo osc_item_title(); ?>" />
                    <?php } } ?>
                <?php } ?>
            <?php } osc_reset_resources();  ?>  
        </div>
    </div>

JavaScript 代码是,

$("#photo").click(function() {      
    $(".image").css("display","block");
    $(".map").css("display","none");
});

$("#map").click(function() {
    $(".map").css("display","block");
    $(".image").css("display","none");
});     

这里的照片加载得很好。但是当我点击#map时,地图会出现以下问题。

如果我在第 1 次加载地图并将 display:none; 设置为 .image 意味着,地图将完全加载。

问题出在哪里?

【问题讨论】:

    标签: google-maps osclass


    【解决方案1】:

    我刚刚测试了 3.1 版,它正在我的本地主机上运行

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多