calculating lat&lng to array