Skip to content

Inputfield map does not initialise when AJAX-loaded #19

@Toutouwai

Description

@Toutouwai

If the Map Marker inputfield is AJAX-loaded (e.g. in a repeater, or because field visibility setting) then the map does not initialise.

Suggested fix

Add 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'));
    });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions