Problem with map in add listing

This topic contains 8 replies, has 3 voices, and was last updated by  Stiofan O’Connor 7 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket

Tagged: 

  • Author
    Posts
  • #386358

    Misa Misa
    Free User
    Post count: 6

    A weird bug is happening, when I go to add listing the map is gray (nothing is being showed, see attachment), but when I click inspect element it magically shows up.

    I’m using Google maps and it works on the other places in geodirectory, like on the listings, but not here. Anybody knows what the problem might be?

    #386368

    Kor
    Moderator
    Post count: 16516

    Hi Misa,

    Please share WP temp admin access to your site so we can take a better look. You can post the details here using the private reply option below.

    #386497

    Misa Misa
    Free User
    Post count: 6
    This reply has been marked as private.
    #386502

    Kor
    Moderator
    Post count: 16516
    This reply has been marked as private.
    #386506

    Misa Misa
    Free User
    Post count: 6
    This reply has been marked as private.
    #386529

    Misa Misa
    Free User
    Post count: 6

    Okay, after further inspection, turns out that the inspect element made it work because it resized the viewport, or the document. It seems to be a common issue, and they suggest a fix over here and here with triggering the resize event on the map element.

    My question now is: in which file is the map element/object being created, where can I insert this code to resize the map right after it is loaded? I hope this is a more concise question and an easier one to answer (without debugging)

    #386706

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    You can just triger the window resize with will make it appear

    jQuery(window).trigger('resize');

    Stiofan

    #386872

    Misa Misa
    Free User
    Post count: 6

    Problem solved, it was an issue with the fieldset. We made the add listing form to be a multistep form with previous and next buttons, and the location is on the second “tab” which is set to display:none, so the map doesn’t load. Fixed it with visibility:hidden instead.

    #386874

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Kool, thanks for letting us know 🙂

    Stiofan

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount