Hi,

I'm attempting to use the Location extension (https://github.com/
gerrit/radiant-location-extension) to display all locations within a
certain radius of a starting point, but I can't work out the correct
way to use the tags.

Here's my example. Let's say I have two addresses in my Locations
database:

1 Main St, Leominster, MA, 01453
1 Bacon St, Westminster, MA, 01473

and let's say I have a starting point of:

1 West St, Leominster, MA, 01453

In theory, if I try to search for all addresses within 1 mile of the
starting point, I should only get one result (the Leominster one). If
I try to search within 50 miles, I should get both results.

My problem is that despite trying various arrangements of the Location
tags, I don't get the results I expect. Can anyone show me explicitly
how I should be using the tags?

Here's what I'm trying, which is obviously wrong:

<r:location origin="1 West St, Leominster, MA, 01453" distance="10"
units="miles">
<r:locations:each>
<h2><r:name /></h2>
</r:locations:each>
</r:location>

As a follow up, is there a way to allow the starting point to be
determined by the site visitor (in the manner of a Store Locator or
Dealer Locator)?

Thanks,

JT

Reply via email to