• Resolved 2caffe

    (@2caffe)


    Hi, I have a theme in which pages are loaded via ajax.
    So, if the page with the map is the first one to be loaded, it shows up. But, id the page with the map is navigated with the menu (and the page is loaded with ajax) tha map doesn’t work. I think the reason is that the map cannot be “automagically” initialized by the theme.
    So, is there a js method to init the map?
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Carlos Moreira

    (@carlosmoreirapt)

    Hi @2caffe
    The best would be to disable the ajax loading for the page where you have the map. Usually themes have that option. Although the map has js methods to trigger it, I doubt the theme loads all the necessary files when loading the page with ajax.
    Greetings, Carlos

    Thread Starter 2caffe

    (@2caffe)

    Hi Carlos, thanks for the answer.
    Disabling ajax loading is not an option, since the website is based on it.
    Can you tell me the js method to trigger it?
    Thanks

    Plugin Contributor Carlos Moreira

    (@carlosmoreirapt)

    The code to trigger the maps is

    iMaps.init(false);

    But this will only work if all files and variables (iMapsData) already exist on the page.

    Greetings, Carlos

    Thread Starter 2caffe

    (@2caffe)

    Hi Carlos, thanks for the answer.
    Unfortunately, it is not enough, as you expected.
    I will do by myself, without your plugin.
    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Page loaded in ajax’ is closed to new replies.