PHPackages                             studioespresso/craft-easyaddressfield - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. studioespresso/craft-easyaddressfield

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

studioespresso/craft-easyaddressfield
=====================================

The only address field you need

5.1.0(1y ago)320.3k4[1 PRs](https://github.com/studioespresso/craft-easyaddressfield/pulls)PHPCI failing

Since Jan 21Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/studioespresso/craft-easyaddressfield)[ Packagist](https://packagist.org/packages/studioespresso/craft-easyaddressfield)[ RSS](/packages/studioespresso-craft-easyaddressfield/feed)WikiDiscussions develop-v5 Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (57)Used By (0)

Easy Address Field plugin for Craft CMS 3.x
===========================================

[](#easy-address-field-plugin-for-craft-cms-3x)

[![Easy Address Field](https://camo.githubusercontent.com/296db95d3119a9ab9f749e4d9a4ccf867a932d861f87f0aaeaf332c7019c4366/68747470733a2f2f7777772e73747564696f657370726573736f2e636f2f6173736574732f456173792d416464726573732d4669656c642d4769746875622d42616e6e65722e706e67)](https://camo.githubusercontent.com/296db95d3119a9ab9f749e4d9a4ccf867a932d861f87f0aaeaf332c7019c4366/68747470733a2f2f7777772e73747564696f657370726573736f2e636f2f6173736574732f456173792d416464726573732d4669656c642d4769746875622d42616e6e65722e706e67)

The only address field you need

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-RC1 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require studioespresso/craft-easyaddressfield

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for "Easy Address Field".

Settings
--------

[](#settings)

You can choose which geocoding API the plugin will use when you have geocoding enabled for your fields. Options are:

- OpenStreetMap's Nominatim (default, no configuration, but very strict rate limits)
- Google Maps (requires an API key, see below)

### Google Maps API

[](#google-maps-api)

To enable geolocating and custom marker placement, you need to provide a Google Maps API key.

1. Sign in to [Google's developers console](http://console.developers.google.com/)
2. Create a new project
3. Enable the `Google Maps Geocoding API` and the `Google Static Maps API`

**🚨 Important 🚨:**

Google's Geocoding API does not support HTTP referrer restrictions. Make sure the API key you are using does not have these set.

#### API Errors

[](#api-errors)

When `devMode` is enabled, any errors returned by Google's API will show an exception so you can clearly see what's going wrong. With `devMode` disabled, any errors will be logged to Craft's `web.log`.

### GeoCoding for Craft Address elements

[](#geocoding-for-craft-address-elements)

Since Craft 5, Craft has a built-in element for Addresses, but no way to get coordinates for addresses out of the box. When you install Easy Address Field, you can enable GeoCoding for Craft Address elements. This will add a `latitude` and `longitude` values to each Address element. You can enable this feature in the plugin settings.

Template variables
------------------

[](#template-variables)

### Printing address values

[](#printing-address-values)

You can access the values from your address field in Twig through the following variables:

```
field.name
field.street
field.street2
field.postalCode
field.state
field.country // returns the country code
field.getCountryName(craft.app.locale) // returns the coutry's full name, in the country's locale
field.latitude
field.longitude
field.getDirectionsUrl() // get a directions link to the given address
```

Custom GeoCoding services
-------------------------

[](#custom-geocoding-services)

Out of the box, the plugin comes with support for geocoding with OpenStreetMap's Nominatim service and Google. If you'd like to use a different service, you can create a custom service by creating a new class that implements the `studioespresso\easyaddressfield\services\geocoders\BaseGeoCoder` interface.

Once you created your geocoder, register it with the following event:

```
use studioespresso\easyaddressfield\events\RegisterGeocoderEvent;
use studioespresso\easyaddressfield\services\GeoLocationService;

Event::on(
   GeoLocationService::class,
   GeoLocationService::EVENT_REGISTER_GEOCODERS,
   function (RegisterGeocoderEvent $event) {
       $event->geoCoders['your-service'] = YourGeoCoder::class;
});
```

Upgrading from Craft 4 to Craft 5
---------------------------------

[](#upgrading-from-craft-4-to-craft-5)

### getDirectionsUrl()

[](#getdirectionsurl)

If you're using the `getDirectionsUrl()` function on `craft.address`, you'll now need to call the function on the field itself instead of the on the plugin's Twig variable.

### getStaticMap() &amp; getStaticMapRaw()

[](#getstaticmap--getstaticmapraw)

These functions have been removed from the plugin, you'll need to replace these yourself.

---

###### Brought to you by [Studio Espresso](https://studioespresso.co)

[](#brought-to-you-by-studio-espresso)

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance67

Regular maintenance activity

Popularity31

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 99.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Recently: every ~27 days

Total

49

Last Release

487d ago

Major Versions

3.1.2 → 4.0.102024-08-07

4.0.10 → 5.0.12024-08-07

3.1.3 → 4.0.112024-09-09

4.0.11 → 5.0.22024-09-09

4.0.12 → 5.0.32024-09-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/d8c2fa7c41948f5681df5a1696d3cf9654b75fd6fd5904eeb818e3ed7c4b2628?d=identicon)[janhenckens](/maintainers/janhenckens)

---

Top Contributors

[![janhenckens](https://avatars.githubusercontent.com/u/755428?v=4)](https://github.com/janhenckens "janhenckens (297 commits)")[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (1 commits)")

---

Tags

craft-plugincraftcmsaddresscmsyii2craftcmsfieldtype

### Embed Badge

![Health badge](/badges/studioespresso-craft-easyaddressfield/health.svg)

```
[![Health](https://phpackages.com/badges/studioespresso-craft-easyaddressfield/health.svg)](https://phpackages.com/packages/studioespresso-craft-easyaddressfield)
```

###  Alternatives

[craftcms/ckeditor

Edit rich text content in Craft CMS using CKEditor.

48359.1k52](/packages/craftcms-ckeditor)[craftcms/generator

Craft CMS component generator

88377.0k38](/packages/craftcms-generator)[craftcms/guest-entries

This plugin allows you to save guest entries from the front-end of your website.

10693.0k3](/packages/craftcms-guest-entries)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[verbb/many-to-many

A field type to manage relationships from both sides.

8112.0k](/packages/verbb-many-to-many)[verbb/tablemaker

Create customizable and user-defined table fields.

40168.8k1](/packages/verbb-tablemaker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
