Expand my Community achievements bar.

SOLVED

Best way to integrate a store locator in AEM 6.1

Avatar

Level 1

For integrating a store locator functionality in to AEM 6.1, what are the best possible options that needs to be considered?

Wanted to make sure we are using as many out of the box features in implementing the solution. Please advise.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi

Please go through he following article covering different way to implement Store Locator:

Link:- http://theoryapp.com/store-locator-using-java/

//Store Locator using Java

The basic idea is as below:

  • Design a Store class, and load all data into an ArrayList of Stores.
  • Ask the user for an address, and find its geographical location.
  • Scan through the ArrayList of all stores to find the closest one.

First, we define the Location class with the following attributes and methods:

  • String address
  • double latitude
  • double longitude
  • public Location(String addr, double lat, double lng)
  • double distanceTo(Location loc): computes the distance to loc
  • String toString(): displays the location

Now we define a tool class LocationTool. It has the following methods:

  • ArrayList loadData(String urlString): reads data from the url
  • Location makeLocation(String addr): creates a location object from an address. We use Google’s geocoding services to find the latitude and longitude of an address string.

Finally we build the main program Locator with a main method. As the program starts, it loads the data; then it asks for an input address, finds its geographical location, and searches for the closet store.

 

Link:- https://github.com/googlemaps/js-store-locator

The library provides the following features:

  • Pluggable data source – display stores from a data source of your choosing
  • HTML5 Geolocation – determines a good initial viewport for the user
  • Info window – shows details about a store
  • Street View
  • Extensible – customise your own markers, info windows, etc.
  • Fully-featured side panel, providing:
    • Feature filtering
    • Autocomplete search
    • List of nearby stores
    • Directions

Demo:-

  1. panel.html – A simple store locator, including panel. Data is fetched from a static CSV file.
  2. dynamic.html – Same as above, except stores are fetched dynamically from a JSONP web service.
  3. gme.html – Same as above, except stores are fetched dynamically from Google Maps Engine.

 

Link :- https://www.pcapredict.com/support/articles/article/how-to-implement-a-store-locator

// Insert this JS in your code, rest all would be cater by this third party app.

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 9

Hi,

Implementing store locator could be simple. But, it would be good to know what are expectations & functionalities you expect. Is it just displaying information in the tabular format or also integrating google map etc.

---Jitendra

Avatar

Level 1

The store information containing location, lat longs etc are in a SQL Server DB . When the end user lat longs are detected or when he provides the location details, the results needs to be fetched and displayed in Tabular format. 

---Deepu.

Avatar

Correct answer by
Administrator

Hi

Please go through he following article covering different way to implement Store Locator:

Link:- http://theoryapp.com/store-locator-using-java/

//Store Locator using Java

The basic idea is as below:

  • Design a Store class, and load all data into an ArrayList of Stores.
  • Ask the user for an address, and find its geographical location.
  • Scan through the ArrayList of all stores to find the closest one.

First, we define the Location class with the following attributes and methods:

  • String address
  • double latitude
  • double longitude
  • public Location(String addr, double lat, double lng)
  • double distanceTo(Location loc): computes the distance to loc
  • String toString(): displays the location

Now we define a tool class LocationTool. It has the following methods:

  • ArrayList loadData(String urlString): reads data from the url
  • Location makeLocation(String addr): creates a location object from an address. We use Google’s geocoding services to find the latitude and longitude of an address string.

Finally we build the main program Locator with a main method. As the program starts, it loads the data; then it asks for an input address, finds its geographical location, and searches for the closet store.

 

Link:- https://github.com/googlemaps/js-store-locator

The library provides the following features:

  • Pluggable data source – display stores from a data source of your choosing
  • HTML5 Geolocation – determines a good initial viewport for the user
  • Info window – shows details about a store
  • Street View
  • Extensible – customise your own markers, info windows, etc.
  • Fully-featured side panel, providing:
    • Feature filtering
    • Autocomplete search
    • List of nearby stores
    • Directions

Demo:-

  1. panel.html – A simple store locator, including panel. Data is fetched from a static CSV file.
  2. dynamic.html – Same as above, except stores are fetched dynamically from a JSONP web service.
  3. gme.html – Same as above, except stores are fetched dynamically from Google Maps Engine.

 

Link :- https://www.pcapredict.com/support/articles/article/how-to-implement-a-store-locator

// Insert this JS in your code, rest all would be cater by this third party app.

 

I hope this would help you.

Thanks and Regards

Kautuk Sahni



Kautuk Sahni