Every city and town may erect and maintain drawbridges across navigable streams that flow through or penetrate the boundaries thereof, when the public necessity requires it, or it may grant franchises to persons or corporations to erect them and charge toll thereon.