
import json
from time import sleep

slptime = 10

# define list with values
paramList = ["51.5","-2","0" ,"52"]

Locs1 = [{"W": "-4.350586", "E": "0.560303", "N": "53.924054", "S": "50.886033"}]
# westlong is -4.350586, eastlong is 0.560303, northlat is 53.924054, southlat is 50.886033


Locs2 = [{"W": "-4.097900", "E": "0.812988", "N": "55.169750", "S": "52.221385"}]
#westlong is -4.097900, eastlong is 0.812988, northlat is 55.169750, southlat is 52.221385

Locs3 = [{"W": "-1.109619", "E": "3.801270", "N": "55.100668", "S": "52.147289"}]
#westlong is -1.109619, eastlong is 3.801270, northlat is 55.100668, southlat is 52.147289

Locs4 = [{"W": "-1.345825", "E": "3.565063", "N": "52.643376", "S": "49.514844"}]
#westlong is -1.345825, eastlong is 3.565063, northlat is 52.643376, southlat is 49.514844

while True:
# open output file for writing
	with open('./DashMap1/Location.json', 'w') as filehandle:
	    json.dump(Locs1, filehandle)
	
	with open('./DashMap2/Location.json', 'w') as filehandle:
    		json.dump(Locs1, filehandle)

	sleep(slptime)

	with open('./DashMap1/Location.json', 'w') as filehandle:
    		json.dump(Locs2, filehandle)

	with open('./DashMap2/Location.json', 'w') as filehandle:
    		json.dump(Locs2, filehandle)

	sleep(slptime)


	with open('./DashMap1/Location.json', 'w') as filehandle:
    		json.dump(Locs3, filehandle)

	with open('./DashMap2/Location.json', 'w') as filehandle:
    		json.dump(Locs3, filehandle)

	sleep(slptime)

	with open('./DashMap1/Location.json', 'w') as filehandle:
    		json.dump(Locs4, filehandle)

	with open('./DashMap2/Location.json', 'w') as filehandle:
    		json.dump(Locs4, filehandle)

	sleep(slptime)


