I made mention of this upcoming feature before and now it is complete and ready for the next release. What it will offer for everyone is the automatic background geocoding of every address input for an entry when adding a new entry or updating an existing entry. Or you can manually invoke geocoding of the address before saving the entry. This allows you to tweak the geocode by adjusting a pin using drop and drag on a map. The manual feature will be very useful in cases where Google doesn’t do such a great job at pin pointing the correct location.
As a bonus to those using the CSV Import pro add-on, every address will automatically be geocoded on import. One word of caution- Google limits geocode queries to 2,500/day unless you have one of their premium accounts. So if you import more than that, the rest will silently fail.
Geo-location search result has also been added. This feature is primarily to support the forthcoming pro add-on “Locate“, however, I did add five new options to the shortcode that will be available to everyone using Connections and they are:
- near_addr — The address provided will be geocoded and used as the search radius center. If used in conjunction with near_coord, near_coord will take priority. Although I am providing this as an option I really recommend against using it because Google limits geocode queries to 2,500/day, unless you have one of their premium accounts. So a moderately busy site could exhaust that 2,500 queries.
- latitude — The latitude center point of the search radius.
- longitude — The longitude center point of the search radius.
- radius — The radius value that an entry should be within to be shown as a search result. The default value is 10.
- unit — The unit of measure that the radius is to be calculated. The default is miles. The supported list of units of measure is quite extensive so I’m not going to list them all. Both miles (mi) and kilometers (km) are supported and those, I expect, will be the most used.
I tried to be very thorough in implementing this feature, but there is one deficiency: Any pre-existing entries that do not already have latitude/longitude will not be automatically geocoded. The only way to have them geocoded will be to manually update each entry. I don’t consider this to be a major issue as the templates that already support Google Maps will continue to geocode on the fly. However, if you use the latitude and longitude shortcode optiona, any entries without latitude/longitude will not be returned in the search results.