Dirofilaria immitis is the causal agent of heartworm, a mosquito-borne parasite that primarily infects domestic and wild canids. The infection is endemic in parts of Canada, and Ontario has been identified as the province where the majority of heartworm infections occur. Test results for blood samples submitted by veterinary clinics for the years 2007-2016 were used to conduct a spatial risk analysis of heartworm among domestic dogs in Ontario. The geographic extent of the apparent heartworm prevalence was examined through smoothed choropleth maps for all 49 census division regions. Furthermore, the regions were assessed for local clusters in apparent prevalence using the flexible spatial scan statistic. Three clusters were found and located in western, southern and eastern Ontario, respectively. A spatial Poisson regression model for heartworm prevalence among pet dog populations in southern Ontario census divisions was fit to determine the association between human population size, heartworm development units (HDUs), climate moisture index (CMI), precipitation and directions, east or north, with heartworm infection. The model identified the spatial distribution of HDUs and CMI as positively associated with heartworm infection and therefore important predictors of the infection. In contrast, human population size, increasing northern latitude and drier areas were negatively associated with heartworm infection. The east direction and precipitation were not significant.