def marker_fn(record):
 type = record.type
 if (type in (1, 8)):
  marker = 'asset'
 elif (type == 3):
  marker = 'staff'
 else:
  marker = 'request'
 priority = record.priority
 if (priority == 3):
  marker = ('%s_red' % marker)
 elif (priority == 2):
  marker = ('%s_yellow' % marker)
 mtable = db.gis_marker
 marker = db((mtable.name == marker)).select(mtable.image, mtable.height, mtable.width, cache=s3db.cache, limitby=(0, 1)).first()
 return marker

def marker_fn ( record ) : type = record . type if ( type in ( 1 , 8 ) ) : marker = 'asset' elif ( type == 3 ) : marker = 'staff' else : marker = 'request' priority = record . priority if ( priority == 3 ) : marker = ( '%s_red' % marker ) elif ( priority == 2 ) : marker = ( '%s_yellow' % marker ) mtable = db . gis_marker marker = db ( ( mtable . name == marker ) ) . select ( mtable . image , mtable . height , mtable . width , cache = s3db . cache , limitby = ( 0 , 1 ) ) . first ( ) return marker
function to decide which marker to use for requests map .