Introduction
This product helps integrating the collective.geo.* packages and aims to provide some sensible defaults. Besides some integration glue it defines a new interface IGeocodableLocation that can be used to create adapters that knows how to represent the location of a content type with address-like fields as a string suitable for passing to a geocoding API.
Purpose
Automatic geocoding of IGeoreferenceable content types via an IGeocodableLocation adapter
Caching of geocoding responses
Only trigger geocoding lookups if location related fields on the content item changed
Facilitate doing automatic geocoding based on location fields and still allow for manually setting custom coordinates
Usage
Automatically geocoding your content types
In order for your content types to be automatically geocoded on ObjectEdited or ObjectInitialized events, you need to create an adapter for your content type that implements IGeocodableLocation and knows how to build a geocodable location string from the content type's location related fields.
In order to implement the interface you need to define a getLocationString method on your adapter that returns the complete location as a comma separated string, with the location parts getting less specific from left to right.
|