'Provide the options for a Search widget
- countries is a list of ISO2 codes
- normally provided via settings.get_gis_countries()'

@staticmethod
def gis_country_opts(countries):

    db = current.db
    table = db.gis_location
    ttable = db.gis_location_tag
    query = (((ttable.tag == 'ISO2') & ttable.value.belongs(countries)) & (ttable.location_id == table.id))
    opts = db(query).select(table.id, table.name, orderby=table.name)
    od = OrderedDict()
    for opt in opts:
        od[opt.id] = opt.name
    return od
