And the magic happens. Use google reverse geocoding to fetch closest country and also update country on node drag. Ftb.
Update some code for location check. No js error anymore