The Heller decision of course only involved the Second Amendment’s effects on federal laws (including laws of federal enclaves, such as D.C.). Whether the Constitution limits state and local gun bans — which is to say whether the Second Amendment is “incorporated” against states and their subdivisions by the Fourteenth Amendment — will have to be decided in a future case. The majority doesn’t clearly signal its view on the question, but it does suggest that simply citing some late 1800s cases which rejected incorporation (at a time when incorporation was generally being rejected as to nearly all of the Bill of Rights) will not suffice. Here’s footnote 23, on page 48 of the majority oinion:
With respect to Cruikshank’s continuing validity on incorporation, a question not presented by this case, we note that Cruikshank also said that the First Amendment did not apply against the States and did not engage in the sort of Fourteenth Amendment inquiry required by our later cases. Our later decisions in Presser v. Illinois, 116 U. S. 252, 265 (1886) and Miller v. Texas, 153 U. S. 535, 538 (1894), reaffirmed that the Second Amendment applies only to the Federal Government.
Cruikshank‘s judgment that the First Amendment wasn’t incorporated was of course reversed by “later cases” starting in the 1920s.