Kan. Stat. Ann. § 12-4211
A law enforcement officer may detain a person when:
(d) any violation of an ordinance has been or is being committed by such person in his or her view.
A law enforcement officer having detained a person pursuant to the preceding paragraph, except subsection (a) or (b) thereof, may release the person or may prepare and serve upon such person a complaint and notice to appear, as provided by K.S.A. 12-4204 or 12-4205 and shall then release such accused person from such detention, except in such instances where the law enforcement officer has power and authority to arrest such accused person as hereinafter set forth.
L. 1973, ch. 61, § 12-4211; April 1, 1974.