How to query pages based on Zip Code data?
I have been given a task to move a legacy web page that provides a location lookup based on a US zip code into our new AEM 5.6.1 website. The old site has two database tables, a zip code table (zip code, lat, long) and a shop location table that, when combined with a mathematical algorithm, are used to return a list of locations within a 50 miles radius of any given US zip code.
So I have a few questions:
- How would I import a source table of zip code data into CQ5 (either tabular data or xml)?
- How would I use Query API (and/or SQL2) to implement the mathematical radius algorithm?
- Is there some other better way to accomplish this in CQ5?
I'm just looking to be pointed in the right direction.