Two police officers were taken to hospital after a rock was thrown through the side window of a police vehicle.