{
  "path": "/articles/2025-a-fresh-start-for-easy-address-field",
  "site": "at://did:plc:kq2tuvvnlen4jjcqiw4oprjm/site.standard.publication/3mhyhqc3kcaw7",
  "tags": [
    "Craft CMS"
  ],
  "$type": "site.standard.document",
  "title": "A fresh start for Easy Address Field",
  "content": {
    "html": "<div><h2>Google Geocoding service</h2><p>At launch, the plugin used the <a href=\"https://developers.google.com/maps/documentation/geocoding/overview\">Google Geocoding API</a>. However, Google is quite specific about how you should and should not restrict this particular API in a very peculiar way, which led to many support requests.</p>\n<p>In 2020, for version 3.0, I replaced Google with <a href=\"https://nominatim.org\">Nominatim</a>, a free, zero-configuration service. Just install the plugin, and you’re ready to go.</p>\n<p>However, about six months ago, the Nominatim API became much stricter about rate limiting, causing issues for sites with numerous locations or addresses.</p>\n<p>In the latest release, I reintroduced support for Google’s API, giving users the option to choose between Nominatim and Google.</p>\n</div><div><h2>Craft Address elements</h2><p>Since Craft 5, Craft has its own Address element and field, which you can easily add to any entry or section. That element includes fields for latitude and longitude but does not offer a way to obtain coordinates for an address.</p>\n<p>In the latest release of Easy Address Field, you can now enable geocoding for those fields as well—using the geocoding service you’ve configured in the plugin.</p>\n<img src=\"/uploads/easyaddressfield-element.png\" alt=\"\"></div><div><h2>Bring your own geocoding service</h2><p>Adding support for multiple geocoding services was a great opportunity to use an event to register them. This also allows you to register your own geocoding service if desired (e.g., Geoapify, Mapbox, etc.).</p><p>Check out the <a href=\"https://github.com/studioespresso/craft-easyaddressfield?tab=readme-ov-file#custom-geocoding-services\">documentation</a> for a code sample—and feel free to <a href=\"mailto:jan@studioespresso.co\">get in touch</a> if you encounter any issues!</p></div>",
    "$type": "org.wordpress.html"
  },
  "updatedAt": "2025-01-06T15:27:25+01:00",
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreia45kczmi4evq3535zxxc6e4wfdsf3comdlxaey2lggkryjnpeolu"
    },
    "mimeType": "image/jpeg",
    "size": 3207029
  },
  "description": "When I first dipped my toe into plugin development during the Craft 2 days, a dedicated field for addresses was the first plugin I released. I made the first commit in October 2017, and it was high time to give the codebase some extra attention.",
  "publishedAt": "2025-01-05T19:07:00+01:00",
  "textContent": "Google Geocoding serviceAt launch, the plugin used the Google Geocoding API. However, Google is quite specific about how you should and should not restrict this particular API in a very peculiar way, which led to many support requests.\nIn 2020, for version 3.0, I replaced Google with Nominatim, a free, zero-configuration service. Just install the plugin, and you’re ready to go.\nHowever, about six months ago, the Nominatim API became much stricter about rate limiting, causing issues for sites with numerous locations or addresses.\nIn the latest release, I reintroduced support for Google’s API, giving users the option to choose between Nominatim and Google.\nCraft Address elementsSince Craft 5, Craft has its own Address element and field, which you can easily add to any entry or section. That element includes fields for latitude and longitude but does not offer a way to obtain coordinates for an address.\nIn the latest release of Easy Address Field, you can now enable geocoding for those fields as well—using the geocoding service you’ve configured in the plugin.\nBring your own geocoding serviceAdding support for multiple geocoding services was a great opportunity to use an event to register them. This also allows you to register your own geocoding service if desired (e.g., Geoapify, Mapbox, etc.).Check out the documentation for a code sample—and feel free to get in touch if you encounter any issues!"
}