• Hi

    I’ve got an issue with the store locator, we want to load this in an iframe via an Ajax popup. The problem is that sometimes the map doesn’t zoom in and is fully zoomed out with the map of the whole world. I’ve tried putting in some code to refresh the iframe but this doesn’t seem to work all the time.

    Is there anything we can do to combat this? The map performs fine when viewed directly on the page and not via an iframe

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi there!

    Well, it is possible that Wp Store Locator doesn’t behave well inside of an AJAX popup, since the store locator itself also retrieves the search results via AJAX, and sometimes it is not possible to decide the order in which AJAX calls are made in a certain website, so it could be trickier than it looks.

    However, if you want to share the URL with us so we can take a look, maybe we can spot something…

    Regards,

    Thread Starter dreamabstract

    (@dreamabstract)

    I think that might be it, here is the link, if you click on the Pin icon next to the logo at the top it will load the pop up. It be interested to see if you have any thoughts, thanks

    https://sarahn12.sg-host.com/

    Hi there,

    Thanks for the link. Yes, I can see the mentioned behaviour. Can you let me know what are the settings you have that are related to the initial zoom (see screenshot)?

    Thanks!

    Thread Starter dreamabstract

    (@dreamabstract)

    Initial zoom is set to 9 and max auto zoom level is 15, auto-adjust is also ticked. Perhaps there might also be a way to limit the zoom out level, I don’t think their stockists will extend beyond the UK at this point.

    Thread Starter dreamabstract

    (@dreamabstract)

    This is the raw page by comparison, as you can see this loads correctly each time. On the Ajax Pop up it seems to be intermittent regardless of whether i add the extra Javascript to refresh the iframe : https://sarahn12.sg-host.com/find-a-stockist

    • This reply was modified 1 year, 11 months ago by dreamabstract.
    Thread Starter dreamabstract

    (@dreamabstract)

    Hey @farroyob I just wondered if you have any further thoughts as to this issue?

    Hi again,

    Sorry for the late reply. We have been taking a look at your issue and it is actually very weird, there is obviously some strange interaction between your AJAX iframe and the store locator settings when it loads, but we have been unable to determine an easy fix. It must be some timing issue when the script runs.

    If you are comfortable with code maybe you can wait around 1 second after load and then try triggering a zoom change in the map via. That would imply messing around with the plugin core files, in particular wpsl-gmap.js and then minifying it to the expected file name, wpsl-gmap.min.js.

    I hope that points you in the right direction.
    Regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Issue with map in iframe’ is closed to new replies.