Home Forums WordPress WordPress Google Maps Disable Lazy load

Disable Lazy load

This topic contains 4 replies, has 3 voices, and was last updated by Profile photo of cristiangauma cristiangauma 4 months, 3 weeks ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5459
    Profile photo of ReWegar
    ReWegar
    @rewegar

    Participant

    Hi,
    please how to disable lazy load map?

    Thanks!

    #5489
    Profile photo of Kelly
    Kelly
    @kelly

    Moderator

    Dear ReWegar,

    Thank you for contacting us.

    Will it be possible to ask you to give us more details?
    We will be happy to assist.

    Regards,

    #5518
    Profile photo of cristiangauma
    cristiangauma
    @cristiangauma

    Participant

    Hi,

    I came here to ask for the same question. The definition of “Lazy Load” on Wikipedia is really accurate, let me paste it here:

    “Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed.”

    Basically, what happens is that the Map is not loaded when the Page is loaded. It is only loaded when you scroll through the page and arrive at the row where the map is. In that moment, the map is loaded. Even though it seems a good idea (and it really is for some cases)… it can create some problems.

    For instance with an autoscroll. What happens is that the scroll is not accurate because once you clicked on the link which starts the autoscroll (for instance a menu item), when the browser scrolls over the map, then the map loads and the scroll does not stop on the correct part of the web. It happens because the browser didn’t expect the “map” object before the scroll, as it was not already loaded in the web when we clicked the item that started the autoscroll though the page.

    Could you please provide which modifications should be done to force to load the map when the web is loaded, and not only when it is needed?

    Thank you.

    #5556
    Profile photo of Kelly
    Kelly
    @kelly

    Moderator

    Dear cristiangauma,

    Please, check the following changes that need to be done in the main code:
    Find this file:
    assets/js/frontend/frontend.js
    And find the block mentioned in the screenshot:
    http://prntscr.com/fp4pjm

    take out the hugeitMapsFrontAnimations() from block and remove the block
    http://prntscr.com/fp4ppl
    http://prntscr.com/fp4q8p

    Please, keep us updated about the results,
    Regards,

    #5588
    Profile photo of cristiangauma
    cristiangauma
    @cristiangauma

    Participant

    Awesome!

    It worked!

    Thank you for your support :).

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.