A smog advisory has been issued for much of southern and central Ontario, and temperatures are expected to hover around the 30C range over the next two days.

The warning, issued by the Ontario Ministry of the Environment, urges residents, especially those with respiratory problems, to refrain from heavy outdoor activity.

When an alert is issued, it means there is a strong possibility of poor air quality in the next 24 hours.

Residents are urged to take public transit or carpool, and refrain from using gas-powered motors, aerosol sprays and solvents as the air quality index is expected to exceed the "poor" mark of 50 due to ground level ozone and fine particulate matter, the government said.

Pollutants from the U.S. and Ontario sources will accumulate and react with sunlight to form photochemical smog.

Heavy outdoor activities may cause respiratory symptoms such as coughing or shortness of breath. Residents with heart or lung disease including asthma may experience a worsening of their condition.

The mercury is expected to flirt with the 30C mark on both Wednesday and Thursday as the forecast calls for plenty of sunshine.

A cold front is expected to move in and bring scattered precipitation and cooler temperatures for Friday. The forecast is expected to be in the low 20s.

The Ontario government reports on the Air Quality Index every hour of each day, year-round. While smog can occur at any time of the year, it forms most frequently during the summer months.

Meanwhile, enforcement officers in Toronto are cracking down this week on motorists who unnecessarily idle their vehicles. Twelve officers will be out handing $125 tickets to those who idle for more than three minutes.

The city issued 66 tickets last year.

The anti-idling bylaw does not apply when temperatures pass 27C or drop below 5C.