Counties Tiles

Vector tiles for US county boundaries and labels. Use for county-level choropleths, administrative boundaries, and regional analysis.

Endpoint

GEThttps://api.landmapmagic.com/v1/tiles/counties/{z}/{x}/{y}.mvt

Returns a Mapbox Vector Tile containing county polygon geometries and label points. Zoom range: 0 – 12.

URL Parameters

Parameters

NameTypeDescription
z*numberZoom level (0-12).
x*numberTile X coordinate.
y*numberTile Y coordinate.
key*stringYour API key.

Source Layers

Source Layers

countiesCounty polygon boundaries.z2-14
counties_labelsCounty label points (centroids).z0-12

Attributes

Available Attributes

AttributeTypeDescription
idnumberUnique internal feature identifier.
NAMEstringCounty name (e.g. "Story").
COUNTYFPstringThree-digit FIPS county code (e.g. "169").
STATEFPstringTwo-digit FIPS state code for the parent state (e.g. "19").
STATE_NAMEstringFull name of the parent state (e.g. "Iowa").
COUNTYNSstringGNIS (Geographic Names Information System) identifier for the county.

Code Examples

curl
curl "https://api.landmapmagic.com/v1/tiles/counties/6/15/23.mvt?key=YOUR_API_KEY" \
  --output tile.mvt
JavaScript
const response = await fetch(
  "https://api.landmapmagic.com/v1/tiles/counties/6/15/23.mvt?key=YOUR_API_KEY"
);
const data = await response.arrayBuffer();
console.log("Tile size:", data.byteLength, "bytes");
Python
import requests

response = requests.get(
    "https://api.landmapmagic.com/v1/tiles/counties/6/15/23.mvt",
    params={"key": "YOUR_API_KEY"}
)
print(f"Status: {response.status_code}, Size: {len(response.content)} bytes")

Response

Response Headers

HTTP/1.1 200 OK
Content-Type: application/vnd.mapbox-vector-tile
Content-Encoding: gzip
Cache-Control: public, max-age=86400

The response body is a binary MVT protobuf. Empty tiles return HTTP 204 with no body.

County boundaries cover all counties and county-equivalents in the 50 US states and the District of Columbia. US territories (Puerto Rico, Guam, US Virgin Islands, American Samoa, and Northern Mariana Islands) are excluded from this layer.