def make_bindings_type2(filenames,color_input,colorkey):
	string=''
	blocky="""\nfunction addDataToMap(data, map) {
    var dataLayer = L.geoJson(data);
    dataLayer.addTo(map);
}\n"""
	count=0
	for row in filenames:
		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 a point and no entry for color_input
   		if featuretype=='Point' and colorkey=='':
   			colorline=get_colorline_marker(color_input)
   		elif not colorkey=='' and featuretype=='Point':
   			colorline=get_colorline_marker(data[str(colorkey)])
   		elif not colorkey=='':
   			colorline=get_colorline_marker2(data[str(colorkey)])
   		elif colorkey=='':
   			colorline=get_colorline_marker2(str(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
		start='function add() {'
		loc=(filename,count) % """\n$.getJSON('http://localhost:8000/%s',function(data) { addDataToMap%s(data,map); });"""
		if featuretype=='Point':
			string+=blocky+loc+make_bindings2(headers,count,colorline,featuretype)+'\n'
		else:
			string+=blocky+loc+make_bindings2(headers,count,colorline,featuretype)+'\n'
	return string


# makes the corresponding styled html for the map were about to load
dataset/ETHPy150Open murphy214/berrl/berrl/piperealtime.py/make_bindings_type2/swapped operands of `%`