Just to share, if anyone having a problem with WP All Import plugin and Google Maps filed, the above solution works well.
I had an issue with WPAI saving the address, lat and lng but the posts were not coming up in WP_Query. Using the code shared by Yiorgos Theo worked.