#NEWLINE# def get( self , * args , **kwargs ) : #NEWLINE# #INDENT# 'Service a GET request to the \'/map\' URI.\n\n        The \'bbox\' parameter contains 4 coordinates "l" (w), "b" (s),\n        "r" (e) and "t" (n).' #NEWLINE# bbox_arg = self . get_argument ( 'bbox' , None ) #NEWLINE# if ( not bbox_arg ) : #NEWLINE# #INDENT# raise tornado . web . HTTPError ( 400 ) #NEWLINE# #UNINDENT# bbox = bbox_arg . split ( ',' ) #NEWLINE# if ( len ( bbox ) != 4 ) : #NEWLINE# #INDENT# raise tornado . web . HTTPError ( 400 ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# ( w , s , e , n ) = map ( float , bbox ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise tornado . web . HTTPError ( 400 ) #NEWLINE# #UNINDENT# if ( ( w < C . LON_MIN ) or ( w > C . LON_MAX ) or ( e < C . LON_MIN ) or ( e > C . LON_MAX ) or ( s < C . LAT_MIN ) or ( s > C . LAT_MAX ) or ( n < C . LAT_MIN ) or ( n > C . LAT_MAX ) or ( n < s ) or ( e < w ) ) : #NEWLINE# #INDENT# raise tornado . web . HTTPError ( 400 ) #NEWLINE# #UNINDENT# ( nodelist , ways , relations ) = self . handle_map ( bbox ) #NEWLINE# response = self . build_bbox_response ( nodelist , ways , relations , bbox ) #NEWLINE# self . set_header ( C . CONTENT_TYPE , C . TEXT_XML ) #NEWLINE# self . write ( response_to_xml ( response ) )