+ id,minlat,maxlat,minlon,maxlon,minzoom,maxzoom=rec
+
+ if backend == "tirex" or backend == "default":
+
+ command = 'map='+map+ \
+ ' z='+str(minzoom)+'-'+str(maxzoom)+ \
+ ' lat='+str(minlat)+','+str(maxlat)+ \
+ ' lon='+str(minlon)+','+str(maxlon)
+
+ if force:
+ command = 'tirex-batch -n 0 --prio=50 '+command
+ else:
+ command = 'tirex-batch -n 0 --prio=50 '+command+' -f not-exists'
+
+ print command
+
+ if system(command)==0:
+ dcur=conn.cursor()
+ dcur.execute('delete from render_queue where id=?',(id,))
+ conn.commit()
+
+ elif backend == "renderd":
+
+ print minlat,minlon,maxlat,maxlon
+
+ for zoom in range(minzoom,maxzoom+1):
+ minx,miny=deg2num(minlat,minlon,zoom)
+ maxx,maxy=deg2num(maxlat,maxlon,zoom)
+
+ if minx>maxx:
+ tx=minx
+ maxx=minx
+ minx=tx
+
+ if miny>maxy:
+ ty=miny
+ maxy=miny
+ miny=ty
+
+ print zoom,minx,miny,maxx,maxy
+
+ maps = map.split(',')
+
+ for map_name in maps:
+
+ command = 'render_list -a -m '+map+ \
+ ' -z '+str(zoom)+' -Z '+str(zoom)+ \
+ ' -x '+str(minx)+' -X '+str(maxx)+ \
+ ' -y '+str(miny)+' -Y '+str(maxy)
+ if force:
+ command = command+ ' --force'
+
+ print command
+
+ if system(command)<>0:
+ return