With the recent release of Craft 4, we've updated the Google Maps plugin to be fully compatible and meet all new technical requirements. In fact, we're proud to say that all of our plugins are now compatible with Craft 4.
In addition to Craft 4 compatibility, we've introduced a few new features since the plugin's 4.1 release...
It's now possible to require an Address field to have valid coordinates, and/or require specific subfields to be completed. This ensures that your Address values are valid according to your own internal business needs.
By default, only the coordinates will be required. And those requirements will only be enforced if you have also marked the field as "Required" in the field layout...
If you do not mark the Address field as "Required" in your field layout, none of the other requirements will be enforced.
All of the following methods are now available as universal methods...
More importantly, the
kmlId) parameter can accept any of these...
*, which will affect all markers (or KML layers).
setMarkerIcon method can now accept any of the formats noted above. This makes it a breeze to change the icon of multiple markers at the same time...
Use these methods to manipulate the map however you choose. Whether you chain these methods together or simply call one at a time, it opens the floodgates for what is possible on your map.
As always, we've continued to fix bugs and improve performance. Most notably, we've added some protections against the dreaded "grey box" scenario, where a map could appear as only a grey rectangle, because it was missing either the center coordinates or a zoom level. The plugin now provides better default values, making it nearly impossible to display a grey box by accident.
We hope you are enjoying the Google Maps plugin, thanks for using it in your Craft projects! Stay tuned as we continue to add new features and improvements far into the future. 💪