image of barnstable county courthouse

Town Websites

#mapcontainer{ margin-right: auto; margin-left: auto } #map { background: white; height: 600px; width: 100%; } .popupCustom .leaflet-popup-tip, .popupCustom .leaflet-popup-content-wrapper { background: #e0e0e0; } .popupCustom .leaflet-popup-content-wrapper { font-family: 'Source Sans Pro', sans-serif; font-size:18px; color: black }
var mymap = L.map('map', { zoomControl: false,attributionControl: false }).setView([41.790, -70.325], 10); mymap.scrollWheelZoom.disable(); mymap.doubleClickZoom.disable(); mymap.dragging.disable(); var style = { weight: 0.8, fillOpacity: 0.4, fillColor: '#085486', color: '#085486', } var customOptions = { 'className' : 'popupCustom' } function highlightFeature(e) { var layer = e.target; layer.setStyle({ fillColor: '#083c5e', weight: 1, fillOpacity: 0.8, color: '#083c5e', dashArray: '', }); if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) { layer.bringToFront(); } } function resetHighlight(e) { var layer = e.target; layer.setStyle(style); if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) { layer.bringToFront(); } } var cape_cod = L.geoJSON(data,{ style: style, onEachFeature: function(feature, layer) { layer.bindPopup(feature.properties.name, customOptions); layer.on('mouseover', function (e) { this.openPopup(); }); layer.on('mouseout', function (e) { this.closePopup(); }); layer.on({ mouseover: highlightFeature, mouseout: resetHighlight, click: onclick }); } }).addTo(mymap); function onclick(e) { window.open(e.target.feature.properties.url); }

On Cape Cod, fifteen towns make up Barnstable County:

Upper Cape 

Bourne 

Sandwich 

Falmouth 

Mashpee 

Mid Cape 

Barnstable 

Dennis 

Yarmouth 

Lower Cape 

Brewster 

Harwich 

Chatham 

Orleans 

Outer Cape 

Eastham 

Wellfleet 

Truro 

Provincetown