ryancramerdesign / FieldtypeMapMarker

Fieldtype for ProcessWire - holds an address or location name, and automatically geocodes the address to latitude/longitude using Google Maps API.
http://processwire.com
29 stars 16 forks source link

Periodically check for AJAX-loaded Inputfields and init() them #16

Open bee8bit opened 7 years ago

bee8bit commented 7 years ago

I had a problem with MapMarkers that are in a PageTable or a (collapsed) repeater. Those MapMarkers don't exist yet upon document.ready so they wouldn't be initialized and didn't show a map. See my comment at https://processwire.com/talk/topic/9711-map-marker-map/?do=findComment&comment=129945

My suggestion is to look for new MapMarkers periodically and initialize them then. This introduces a slight delay but is still faster than using non-collapsed repeaters.