I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I have looked at.
[GIS] Multiple GeoJSON Layers
d3javascriptleaflet
Best Answer
If I understand what you are asking, you have a basemap of the US, and geojson layers for zip codes and county shapes, and you want to toggle (turn on or off) the geojson layers?
Leaflet layer control is designed for this
Documentation
http://leafletjs.com/reference.html#control-layers
Example
http://leafletjs.com/examples/layers-control/
Leaflet
L.geoJson()
returns a layer which you can use in the layers control: