Jump to content

Recommended Posts

Posted

I'm using the Map Marker (Google Maps) module with PW 3.0.61 within a Repeater field which is inside a Repeater Matrix field (I know I know!) but I open to add the data to the field it's just showing a blank map. Inspecting the DOM all the HTML is there and the Google Maps API JS link is included in the source (with the API key) so I'm a bit at a loss.

Any other way I can check what's going wrong?

 

Screen Shot 2017-06-14 at 18.08.50.png

Screen Shot 2017-06-14 at 18.10.04.png

Posted

Currently the Map Marker inputfield does not support AJAX-loading. I have opened a GitHub issue for this.

Until an update is released you can fix the problem by adding the following to InputfieldMapMarker.js:

$(document).on('reloaded', '.InputfieldMapMarker', function() {
    $(this).find('.InputfieldMapMarkerMap').each(function() {
        var $t = $(this);
        InputfieldMapMarker.init($t.attr('id'), $t.attr('data-lat'), $t.attr('data-lng'), $t.attr('data-zoom'), $t.attr('data-type'));
    });
});

 

  • Like 3
  • Thanks 1
Posted
13 hours ago, Robin S said:

Currently the Map Marker inputfield does not support AJAX-loading. I have opened a GitHub issue for this.

Until an update is released you can fix the problem by adding the following to InputfieldMapMarker.js:


$(document).on('reloaded', '.InputfieldMapMarker', function() {
    $(this).find('.InputfieldMapMarkerMap').each(function() {
        var $t = $(this);
        InputfieldMapMarker.init($t.attr('id'), $t.attr('data-lat'), $t.attr('data-lng'), $t.attr('data-zoom'), $t.attr('data-type'));
    });
});

 

This works a treat, Robin. Thanks for the help. Let's hope it gets pushed to master soon.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...