If there is a javascript error on the page, does google map not load?

前端 未结 1 1473
逝去的感伤
逝去的感伤 2021-01-27 13:27

I am using the Google Maps API. I get the Google Map by:

$map = $this->ci->gis->draw_map_position_by_lat_long($this->ci->profile_data[\'LocLat\']         


        
相关标签:
1条回答
  • 2021-01-27 13:50

    The script is hogging the load event, which can have the effect that the google map can't use it. If you use the jQuery events instead of DOM events, several scripts can use the event.

    Try changing this:

    jQuery(document).ready(function(){
            jQuery('#photo-slider').bxSlider();
    
    
            window.onload = createUploader;     
    });
    

    to:

    jQuery(document)
    .ready(function(){ jQuery('#photo-slider').bxSlider(); })
    .load(createUploader);
    
    0 讨论(0)
提交回复
热议问题