ez projects / location_finder
|UNIX name||Owner||Status||Version||Compatible with|
Location Finder Extension
Developed by Blend Interactive
The locationfinder extension allows you to easily create 'find the
applications using eZ Publish (e.g. Find the nearest store location.)
It does this by assigning location data (latitude and longitude) to eZ
objects using a workflow event. A module is then provided that will query
location data and return a list of the closest objects, as well as their
Location data is assigned in one of two ways:
-- If you have Blend's Gmaps Location Datatype on your object, the
event will read the lat/lon data directly from that attribute. You can
the datatype extension here:
-- If you don't have the Gmaps datatype, the workflow event can ask
to geocode your object by concatenating a number of attributes
For instance, if your object has attributes called 'address_1', 'city',
'state', and 'zip', and they're set to '123 Test St', 'Sioux Falls',
'SD',' and '57104' respectively, you can configure the workflow event
ask Google's API to geocode '123 Test St, Sioux Falls, SD, 57104'.
The extension provides a couple of ways to use this data:
-- A /locationfinder/search module lets you search for located objects
by postal code or address (or, really, anything Google will turn into
a lat/lon for you).
-- A couple of template fetch functions let you integrate the located
objects into your own templates by either finding objects nearest to
a lat/lon point, or finding located objects that are nearest to
another object. (ie 'find the image taken the closest to this other
image', or 'find the airport nearest to this hotel').
See the included README.txt for full details.
A couple of points:
-- This extension is still a bit experimental and is of alpha quality.
think it will start anything on fire, but I won't die of shock if you find
a bug (in fact, I'd appreciate it)
-- In the interests of speed, the algorithm used to select the closest
is pretty simplistic. Certain situations may arise in which it
strictly return the closest point. It also won't work across the
International Date Line (the 180th meridian line in the Pacific where
longitude goes from negative to positive).