FieldtypeMapMarker
FieldtypeMapMarker copied to clipboard
Inputfield map does not initialise when AJAX-loaded
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'));
});
});
Good work. A tested fix @ryancramerdesign
Actually this doesnt seem to work in fieldset tab.