subscribe to RSS feeds

What's happening at OcularCMS®



« back to all blogs

New "Address" Database Field Type

addressIn addition to the many different types of fields in the database (like images, slideshows, states, maps, etc), a new Address field type has been added, making it easier to capture accurate addresses and display properly on maps. Previously, there were two ways to save addresses in the database. You could have individual fields (ie, address, city, state, zip), which is fine, but requires at least 4 fields to accomplish. Or you could use a muti-line text box, but this relies on the user to enter info properly, and often leads to invalid addresses according to the USPS (which means the address might not show up on maps). The new field type addresses both of these concerns by fitting 5 fields into one (address 1, address 2, city, state, zip). When the field is displayed in a form, the field is automatically divided into the 5 fields for easily capturing accurate data. And when addresses are displayed on the site, they are uniform and make the site look a lot cleaner. Plus, they are HTML-formatted using schema.org microdata, which search engines love.

geo filteringAdditionally, when an address is captured or updated, it is geocoded using Google's Maps API, resulting in the latitude/longitude coordinates, which are stored for use in maps on the site. Prior to this update, all maps were geocoded in real-time by supplying an address to Google and getting coordinates for every address, each time a map was accessed. The problem with this is that these requests add up quickly and Google limits geocoding requests to a particular number in a 24 hour period. And if you go over that limit, the point won't display on the map until the next day (not a very good user experience). Google also has a max of 5 requests per second, and since maps are generated in milliseconds, often having many more than 5 points on the map, this can lead to problems as well. However, the new Address field type only geocodes once per address and stores the coordinates in the database along with each address, thus drastically reducing geocoding requests and keeping well below Google's limits.

The new Address field impacts both types of maps available on the platform (ie, single-location and multiple-location maps). They now use the stored coordinates instead. And as a backup, if coordinates are missing, the maps will make a geocoding request to ensure the address will be displayed on the map. For sites with a map displaying addresses from the database, the database and maps have all been upgraded to incorporate this new field type. No additional steps are needed.

One very exciting new feature (geo-location filtering) takes advantage of this new field type, allowing users to filter results to within a specified range of a specific location.

by

Categories: changelog
 

Blog Articles

Categories

subscribe for product announcements