modified main activity to call js with latest locations