def make_bindings_type(filenames,color_input,colorkey,time,file_dictionary):
	string=''
	blocky="""\nfunction addDataToMap(data, map) {
    var dataLayer = L.geoJson(data);
    dataLayer.addTo(map);
}\n"""
	count=0
	for row in filenames:
		color_input=''
		count+=1
		filename=row
		with open(row) as data_file:    
   			data = json.load(data_file)
   		#pprint(data)
   		data=data['features']
   		data=data[0]
   		featuretype=data['geometry']
   		featuretype=featuretype['type']
		data=data['properties']
		if not file_dictionary==False:
			try:
				color_input=file_dictionary[filename]
			except Exception:
				color_input=''
			if featuretype=='Point':
				colorline=get_colorline_marker(color_input)
			else:
				colorline=get_colorline_marker2(color_input)

   		if not colorkey=='':
   			if featuretype=='Point':
   				colorline=get_colorline(data[str(colorkey)])
   			else:
   				colorline=get_colorline_marker2(data[str(colorkey)])

   		if featuretype=='Point':
   			colorline=get_colorline_marker(color_input)
   		else:
   			colorline=get_colorline_marker2(color_input)

   		
   		headers=[]
   		for row in data:
   			headers.append(str(row))
   		blocky=	blocky="""\nfunction addDataToMap%s(data, map) {
    var dataLayer = L.geoJson(data);
    dataLayer.addTo(map);
}\n""" % count
		preloc='function add%s() {\n' % (str(count))
		loc="""\t$.getJSON('http://localhost:8000/%s',function(data) { addDataToMap%s(data,map); });""" % (filename,count)
		if featuretype=='Point':
			string+=blocky+preloc+loc+make_bindings2(headers,count,colorline,featuretype,time)+'\n'
		else:
			string+=blocky+preloc+loc+make_bindings2(headers,count,colorline,featuretype,time)+'\n'
	return string

# given a list of file names and kwargs carried throughout returns a string of the function bindings for each element
dataset/ETHPy150Open murphy214/berrl/berrl/piperealtime.py/make_bindings_type/original