el-schneider/statamic-simple-address
A lightweight Statamic addon that adds a simple address fieldtype for capturing postal addresses in your content. Store structured address details without a heavyweight CRM or geocoding dependency, with straightforward templating and control panel editing.
This is a Statamic addon (el-schneider/statamic-simple-address), so it runs on top of a Laravel + Statamic app rather than a plain Laravel project.
composer require el-schneider/statamic-simple-addressphp artisan vendor:publish --tag="simple-address-config" (verify the tag with php artisan vendor:publish --provider=... if it doesn't resolve).config/simple-address.php first — as of v0.2.4 this is where the map tile layers live, and it's the file you'll touch most.location or contact collection): field handle address, type simple_address.First use case: a single address field on an entry with a map preview and stored lat/lng, rendered on the front end via Antlers.
Blueprint-driven address fields. Configure the field once in the blueprint and let editors pick addresses; store the structured result on the entry. Keep the handle stable (address) so templates and any geocoding logic don't churn.
Rendering in Antlers. Read the field as a structured value rather than a raw string, e.g. {{ address:line1 }}, {{ address:lat }}, {{ address:lng }}. Guard with {{ if address }} — a failed geocode often yields an empty field rather than an exception.
Tile layer configuration (v0.2.4+). The config now exposes provider-neutral light and dark tile layers. Point both at any XYZ-style source by supplying a URL template with {z}/{x}/{y} placeholders:
'tiles' => [
'light' => 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
'dark' => 'https://your-provider.example/dark/{z}/{x}/{y}.png',
],
Because the default is now OpenStreetMap, you get a working map out of the box with no API key or watermark — good for local dev and low-traffic sites.
Dark mode. If you don't set a separate dark layer, the light layer is reused, so you can ship a dark theme without sourcing a second provider. Wire the front end to swap layers on a prefers-color-scheme / theme-class toggle rather than expecting the package to detect it.
Provider swap strategy. Treat tile URLs as environment-specific: keep OSM defaults in the committed config for dev, and override to a paid provider (MapTiler, Stadia, Thunderforest, self-hosted) in production via env-driven config. This keeps you compliant with OSM's tile usage policy without changing code.
Existing installs. v0.2.4 is backward compatible with published configs, so an upgrade won't break anything — but a previously published config also won't gain the new tile keys. Merge the new keys in manually, or republish and diff.
tile.openstreetmap.org is fine for development and low-volume production, but it forbids heavy/bulk use and requires attribution. Set a descriptive User-Agent/Referer and put "© OpenStreetMap contributors" on every map. For real traffic, switch to a commercial or self-hosted provider.simple-address.php it still holds the old CARTO defaults (and their watermarks). Actively replace those entries — the compatibility guarantee is about not breaking, not about migrating values.php artisan config:clear (and re-cache) after editing tile URLs; a stale bootstrap/cache/config.php is the usual reason a provider change "does nothing."img-src (or connect-src if tiles are fetched via JS). Switching to OSM means adding https://tile.openstreetmap.org — a CSP violation shows up only in the browser console, not in Laravel logs.tiles.dark is actually set and non-empty.How can I help you explore Laravel packages today?