Discussion on Untitled - Multipurpose Parallax Html Template

41 comments found

vaciph Purchased

Sorry to bother you again!

1. how can i reduce the speed of testimonial slider? 2. how can i remove googlemap from loading process, google map is taking long to download?

thanks

Default-user
vaciph Purchased

I have found out the way to reduce the speed of testimonials!

Can you please let me know that how can exclude google map from loading process? its making loading long.

nasirwd

Hi,

I will look into it and let you know shortly.

nasirwd
Hi, In order to exclude the google maps from the loading process, several steps must be made. The Map has to be initialize asynchronously after the window.load is hit. Here is what you have to do: - remove the following lines from your html file (near the end of the file)
    <!--Google maps javascript-->
    <!--<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script type="text/javascript" src="js/gmaps.js"></script>-->
-add the following lines at the begining of your script.js file (right at the begining)
var initializeGmap;
initializeGmap = function () {
    //$.getScript('js/gmaps.js');
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'js/gmaps.js';
    document.body.appendChild(script);
}

function loadGmapScript() {
    var script = document.createElement('script');
    script.type = 'text/javascript';
    script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp' +
        '&signed_in=true&callback=initializeGmap';
    document.body.appendChild(script);
}
- in script.js file, look for $(window).load(function () {...}) and add this line into this function (before the closing bracket } ):
loadGmapScript();
- in gmaps.js file, look for this line
google.maps.event.addDomListener(window, 'load', init_map);
and replace it with this line:
init_map();
That should be all. Let us know if it works.

Best regards,

by
by
by
by
by
by